Comments (2)
I apologize - The output above was actually with some of my attempted fixes.
Here is the output from the unmodified gem:
*sugarloafcut.com has the following txt record: v=spf1 include:gmail.com ~all
$ be irb 2.2.2
irb(main):001:0> require 'spf'
=> true
irb(main):002:0> spf_server = SPF::Server.new
=> #<SPF::Server:0x007fe8e28fd568 @default_authority_explanation=#<SPF::MacroString:0x007fe8e28fd4f0 @text="Please see http://www.openspf.org/Why?s=%{_scope};id=%{S};ip=%{C};r=%{R}", @server=#<SPF::Server:0x007fe8e28fd568 ...>, @request=nil, @expanded="Please see http://www.openspf.org/Why?s=%{_scope};id=%{S};ip=%{C};r=%{R}">, @hostname="scott-berke-mba.local", @dns_resolver=#<Resolv::DNS:0x007fe8e28fd270 @mutex=#<Mutex:0x007fe8e28fd248>, @config=#<Resolv::DNS::Config:0x007fe8e28fd220 @mutex=#<Mutex:0x007fe8e28fd1f8>, @config_info=nil, @initialized=nil, @timeouts=nil>, @initialized=nil>, @query_rr_types=1, @max_dns_interactive_terms=10, @max_name_lookups_per_term=10, @max_name_lookups_per_mx_mech=10, @max_name_lookups_per_ptr_mech=10, @max_void_dns_lookups=2, @raise_exceptions=true>
irb(main):003:0> request = SPF::Request.new(
irb(main):004:1* versions: [1],
irb(main):005:1* scope: 'mfrom',
irb(main):006:1* identity: "[email protected]",
irb(main):007:1* ip_address: "167.89.50.131"
irb(main):008:1> )
=> #<SPF::Request:0x007fe8e28cf7a8 @opt={:versions=>[1], :scope=>"mfrom", :identity=>"[email protected]", :ip_address=>"167.89.50.131"}, @state={}, @versions=[1], @scope=:mfrom, @authority_domain=nil, @identity="[email protected]", @ip_address=#<IP::V4 167.89.50.131>, @helo_identity=nil, @root_request=#<SPF::Request:0x007fe8e28cf7a8 ...>, @super_request=#<SPF::Request:0x007fe8e28cf7a8 ...>, @record=nil, @sub_requests=[], @localpart="example", @domain="sugarloafcut.com", @ip_address_v6=#<IP::V6 ::ffff:167.89.50.131>>
irb(main):009:0>
irb(main):010:0* spf_server.process(request)
TypeError: exception object expected
from /Users/scottberke/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spf-0.0.46/lib/spf/model.rb:566:in `raise'
from /Users/scottberke/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spf-0.0.46/lib/spf/model.rb:566:in `match'
from /Users/scottberke/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spf-0.0.46/lib/spf/model.rb:988:in `block in eval'
from /Users/scottberke/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spf-0.0.46/lib/spf/model.rb:984:in `each'
from /Users/scottberke/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spf-0.0.46/lib/spf/model.rb:984:in `eval'
from /Users/scottberke/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spf-0.0.46/lib/spf/eval.rb:103:in `process'
from (irb):10
from /Users/scottberke/.rbenv/versions/2.2.2/bin/irb:11:in `<main>'
from spf-ruby.
Thanks for looking into this, and sorry that you wound up in a rabbit hole! Can you try with the latest code? Handling of redirect: modifiers was pretty horribly broken in a couple places.
from spf-ruby.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spf-ruby.