spf 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
@@ -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
 
@@ -1,5 +1,5 @@
1
1
  module SPF
2
- VERSION = '0.0.0'
2
+ VERSION = '0.0.1'
3
3
  end
4
4
 
5
5
  # vim:sw=2 sts=2
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "spf"
8
- s.version = "0.0.0"
8
+ s.version = "0.0.1"
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.0
4
+ version: 0.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: