spf 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/spf/model.rb +3 -3
- data/lib/spf/request.rb +3 -1
- data/lib/spf/version.rb +1 -1
- data/spf.gemspec +1 -1
- metadata +1 -1
data/lib/spf/model.rb
CHANGED
@@ -207,7 +207,7 @@ class SPF::Mech < SPF::Term
|
|
207
207
|
super()
|
208
208
|
@text = options[:text]
|
209
209
|
if not self.instance_variable_defined?(:@parse_text)
|
210
|
-
@parse_text = @text
|
210
|
+
@parse_text = @text.dup
|
211
211
|
end
|
212
212
|
if self.instance_variable_defined?(:@domain_spec) and
|
213
213
|
not @domain_spec.is_a?(SPF::MacroString)
|
@@ -564,7 +564,7 @@ class SPF::Mod < SPF::Term
|
|
564
564
|
@text = options[:text]
|
565
565
|
@domain_spec = options[:domain_spec]
|
566
566
|
|
567
|
-
@parse_text = @text unless @parse_text
|
567
|
+
@parse_text = @text.dup unless @parse_text
|
568
568
|
|
569
569
|
if @domain_spec and not @domain_spec.is_a?(SPF::MacroString)
|
570
570
|
@domain_spec = SPF::MacroString.new({:text => @domain_spec})
|
@@ -719,7 +719,7 @@ class SPF::Record
|
|
719
719
|
|
720
720
|
def initialize(options)
|
721
721
|
super()
|
722
|
-
@parse_text = @text = options[:text] if not self.instance_variable_defined?(:@parse_text)
|
722
|
+
@parse_text = (@text = options[:text] if not self.instance_variable_defined?(:@parse_text)).dup
|
723
723
|
@terms ||= []
|
724
724
|
@global_mods ||= {}
|
725
725
|
end
|
data/lib/spf/request.rb
CHANGED
@@ -4,7 +4,7 @@ require 'spf/error'
|
|
4
4
|
|
5
5
|
class SPF::Request
|
6
6
|
|
7
|
-
attr_reader :scope, :identity, :domain, :localpart, :ip_address, :ip_address_v6, :helo_identity, :versions
|
7
|
+
attr_reader :scope, :identity, :domain, :localpart, :ip_address, :ip_address_v6, :helo_identity, :versions, :sub_requests
|
8
8
|
attr_accessor :record, :opt, :root_request, :super_request
|
9
9
|
|
10
10
|
VERSIONS_FOR_SCOPE = {
|
@@ -33,6 +33,7 @@ class SPF::Request
|
|
33
33
|
@root_request = self
|
34
34
|
@super_request = self
|
35
35
|
@record = nil
|
36
|
+
@sub_requests = []
|
36
37
|
|
37
38
|
# Scope:
|
38
39
|
versions_for_scope = VERSIONS_FOR_SCOPE[@scope] or
|
@@ -118,6 +119,7 @@ class SPF::Request
|
|
118
119
|
obj = self.class.new(opt.merge(options))
|
119
120
|
obj.super_request = self
|
120
121
|
obj.root_request = super_request.root_request
|
122
|
+
@sub_requests << obj
|
121
123
|
return obj
|
122
124
|
end
|
123
125
|
|
data/lib/spf/version.rb
CHANGED
data/spf.gemspec
CHANGED