lib/spf/model.rb in spf-0.0.8 vs lib/spf/model.rb in spf-0.0.9
- old
+ new
@@ -83,11 +83,11 @@
:: (?: #{HEXWORD_PATTERN} : ){0,5} #{TWO_HEXWORDS_OR_IPV4_ADDRESS_PATTERN} |
# :: | -
::
"
- attr_reader :errors, :ip_netblocks, :ip_address, :ip_network, :ipv4_prefix_length, :ipv6_prefix_length
+ attr_reader :errors, :ip_netblocks, :ip_address, :ip_network, :ipv4_prefix_length, :ipv6_prefix_length, :domain_spec
def initialize(options = {})
@ip_address = nil
@ip_network = nil
@ipv4_prefix_length = nil
@@ -812,11 +812,10 @@
@parse_text.sub!(/^#{self.version_tag_pattern}\s+/ix, '')
unless $1
raise SPF::InvalidRecordVersionError.new(
"Not a '#{self.version_tag}' record: '#{@text}'")
end
-
end
def parse_term
regex = /
^
@@ -866,9 +865,10 @@
elsif SPF::PositionalMod === mod
# Positional modifier, queue normally:
@terms << mod
end
end
+
else
raise SPF::JunkInRecordError.new("Junk encountered in record '#{@text}'")
end
return term
end