spf 0.0.37 → 0.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/spf/eval.rb CHANGED
@@ -68,8 +68,9 @@ class SPF::Server
68
68
  DEFAULT_MAX_NAME_LOOKUPS_PER_MX_MECH
69
69
  @max_name_lookups_per_ptr_mech = options[:max_name_lookups_per_ptr_mech] ||
70
70
  DEFAULT_MAX_NAME_LOOKUPS_PER_PTR_MECH
71
- @max_void_dns_lookups = options[:max_void_dns_lookups] ||
72
- DEFAULT_MAX_VOID_DNS_LOOKUPS
71
+
72
+ # TODO: We should probably do this for the above maximums (allow nil maximums).
73
+ @max_void_dns_lookups = options.has_key?(:max_void_dns_lookups) ? options[:max_void_dns_lookups] : DEFAULT_MAX_VOID_DNS_LOOKUPS
73
74
 
74
75
  @raise_exceptions = options.has_key?(:raise_exceptions) ? options[:raise_exceptions] : true
75
76
 
@@ -127,7 +128,7 @@ class SPF::Server
127
128
  end
128
129
  end
129
130
 
130
- def dns_lookup(domain, rr_type, &block)
131
+ def dns_lookup(domain, rr_type)
131
132
  if SPF::MacroString === domain
132
133
  domain = domain.expand
133
134
  # Truncate overlong labels at 63 bytes (RFC 4408, 8.1/27)
@@ -142,7 +143,7 @@ class SPF::Server
142
143
 
143
144
  packet = nil
144
145
  begin
145
- packet = block_given? ? yield(domain, rr_type) : @dns_resolver.getresources(domain, rr_type)
146
+ packet = @dns_resolver.getresources(domain, rr_type)
146
147
  rescue Resolv::TimeoutError => e
147
148
  raise SPF::DNSTimeoutError.new(
148
149
  "Time-out on DNS '#{rr_type}' lookup of '#{domain}'")
data/lib/spf/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module SPF
2
- VERSION = '0.0.37'
2
+ VERSION = '0.0.38'
3
3
  end
4
4
 
5
5
  # vim:sw=2 sts=2
data/spf.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "spf"
8
- s.version = "0.0.37"
8
+ s.version = "0.0.38"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Andrew Flury", "Julian Mehnle"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.37
4
+ version: 0.0.38
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: