spf 0.0.51 → 0.0.52

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ODUyYWMzZjg2M2M5NjRkNjVjOWY1MDE2NDQ3ODE4OWJlYmZkZDk0YQ==
5
- data.tar.gz: !binary |-
6
- ZmZjZjhkNGU3NTNjNTUwNTdjZDFiOWRlNzEzM2I5Y2QzZTYwZjQ3Nw==
2
+ SHA1:
3
+ metadata.gz: b17ea1cbb732cbec18d856f16a3e107ccb7fb994
4
+ data.tar.gz: e160f6ad54fb977fca0fa9d2a9040c573c680ce3
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- NGI0Yjg3ZTRlNzk0ZjA4MTUzMzEwMjE0YThmMzIyMTQ5ZWUyNTI3NjQwNDEy
10
- NWE2ODc1ZDA2OTRlNzQ5YjYzZjUzNDY2MmJjMTZhMWNlMmQ5ODdjOWMzYTIx
11
- N2YzYWFhMjAyZjQyMzBkZmUyMDc0YjUxMzIyM2ZkY2IwYzhhOGI=
12
- data.tar.gz: !binary |-
13
- YzBjYTc5ZDA5MzRlMjQ2N2RlNDQ4ZjlhZmU2YzQ1ODYwMWJhMjY4NGU0MDVk
14
- Yjg0N2RiNDNiMmQ4NTBkNjExN2NjYjRiZTI1Zjk1M2M3NjBkZmMwOTNmNGE1
15
- Y2M0M2MyNzJhMWNmZThmOTg2ZGNhNTBjMzNmY2M4MWFhNDc1Y2Y=
6
+ metadata.gz: dc7615918b321907dd7a434a53e36b313e44a07868fb2f64c9a66f0ac2a11b3b6c7d630edf508dfbfb5bf7b93afaac2bb966e2a665ff8f1a8b2fb339feb090f8
7
+ data.tar.gz: bacbe5b5077843edd490606fa853fcaca6a66eee2a03d251b2f3bbc126e94d8c1ce799fe340a600eb27347765ecc0fb145273e266494581dd6dc17c8476a1698
data/Gemfile CHANGED
@@ -9,8 +9,8 @@ gem "ruby-ip", "~> 0.9.1"
9
9
  # Include everything needed to run rake, tests, features, etc.
10
10
  group :development do
11
11
  gem "rspec", "~> 2.9"
12
- gem "rdoc", "~> 3"
12
+ gem "rdoc", "~> 4.3"
13
13
  gem "bundler", "~> 1.2"
14
- gem "jeweler", "~> 1.8"
14
+ gem "jeweler", "~> 2.0"
15
15
  gem "simplecov", :require => false, :group => :test
16
16
  end
@@ -1,47 +1,55 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- addressable (2.3.7)
5
- builder (3.2.2)
4
+ addressable (2.4.0)
5
+ builder (3.2.4)
6
+ descendants_tracker (0.0.4)
7
+ thread_safe (~> 0.3, >= 0.3.1)
6
8
  diff-lcs (1.2.5)
7
9
  docile (1.1.5)
8
- faraday (0.8.9)
9
- multipart-post (~> 1.2.0)
10
- git (1.2.9.1)
11
- github_api (0.10.1)
12
- addressable
13
- faraday (~> 0.8.1)
14
- hashie (>= 1.2)
15
- multi_json (~> 1.4)
16
- nokogiri (~> 1.5.2)
17
- oauth2
18
- hashie (3.4.0)
19
- highline (1.7.1)
20
- jeweler (1.8.8)
10
+ faraday (0.9.2)
11
+ multipart-post (>= 1.2, < 3)
12
+ git (1.7.0)
13
+ rchardet (~> 1.8)
14
+ github_api (0.16.0)
15
+ addressable (~> 2.4.0)
16
+ descendants_tracker (~> 0.0.4)
17
+ faraday (~> 0.8, < 0.10)
18
+ hashie (>= 3.4)
19
+ mime-types (>= 1.16, < 3.0)
20
+ oauth2 (~> 1.0)
21
+ hashie (4.1.0)
22
+ highline (2.0.3)
23
+ jeweler (2.3.9)
21
24
  builder
22
- bundler (~> 1.0)
25
+ bundler
23
26
  git (>= 1.2.5)
24
- github_api (= 0.10.1)
27
+ github_api (~> 0.16.0)
25
28
  highline (>= 1.6.15)
26
- nokogiri (= 1.5.10)
29
+ nokogiri (>= 1.5.10)
30
+ psych
27
31
  rake
28
32
  rdoc
29
- json (1.8.2)
30
- jwt (1.3.0)
33
+ semver2
34
+ jwt (2.2.1)
35
+ mime-types (2.99.3)
36
+ mini_portile2 (2.4.0)
31
37
  multi_json (1.10.1)
32
- multi_xml (0.5.5)
33
- multipart-post (1.2.0)
34
- nokogiri (1.5.10)
35
- oauth2 (1.0.0)
36
- faraday (>= 0.8, < 0.10)
37
- jwt (~> 1.0)
38
+ multi_xml (0.6.0)
39
+ multipart-post (2.1.1)
40
+ nokogiri (1.10.10)
41
+ mini_portile2 (~> 2.4.0)
42
+ oauth2 (1.4.4)
43
+ faraday (>= 0.8, < 2.0)
44
+ jwt (>= 1.0, < 3.0)
38
45
  multi_json (~> 1.3)
39
46
  multi_xml (~> 0.5)
40
- rack (~> 1.2)
41
- rack (1.6.2)
47
+ rack (>= 1.2, < 3)
48
+ psych (3.1.0)
49
+ rack (2.2.3)
42
50
  rake (10.4.2)
43
- rdoc (3.12.2)
44
- json (~> 1.4)
51
+ rchardet (1.8.0)
52
+ rdoc (4.3.0)
45
53
  rspec (2.99.0)
46
54
  rspec-core (~> 2.99.0)
47
55
  rspec-expectations (~> 2.99.0)
@@ -51,19 +59,24 @@ GEM
51
59
  diff-lcs (>= 1.1.3, < 2.0)
52
60
  rspec-mocks (2.99.3)
53
61
  ruby-ip (0.9.3)
62
+ semver2 (3.4.2)
54
63
  simplecov (0.9.2)
55
64
  docile (~> 1.1.0)
56
65
  multi_json (~> 1.0)
57
66
  simplecov-html (~> 0.9.0)
58
67
  simplecov-html (0.9.0)
68
+ thread_safe (0.3.6)
59
69
 
60
70
  PLATFORMS
61
71
  ruby
62
72
 
63
73
  DEPENDENCIES
64
74
  bundler (~> 1.2)
65
- jeweler (~> 1.8)
66
- rdoc (~> 3)
75
+ jeweler (~> 2.0)
76
+ rdoc (~> 4.3)
67
77
  rspec (~> 2.9)
68
78
  ruby-ip (~> 0.9.1)
69
79
  simplecov
80
+
81
+ BUNDLED WITH
82
+ 1.16.1
@@ -275,7 +275,13 @@ class SPF::Server
275
275
  versions.each do |version|
276
276
  klass = RECORD_CLASSES_BY_VERSION[version]
277
277
  begin
278
- record = klass.new_from_string(text, {:raise_exceptions => @raise_exceptions})
278
+ options = {:raise_exceptions => @raise_exceptions}
279
+ # A MacroString object for domain indicates this is a nested record.
280
+ # Storing the domain.text maintains an association to the include domain.
281
+ if domain.class == SPF::MacroString
282
+ options[:record_domain] = domain.text
283
+ end
284
+ record = klass.new_from_string(text, options)
279
285
  rescue SPF::InvalidRecordVersionError => error
280
286
  if text =~ /#{LOOSE_SPF_MATCH_PATTERN}/
281
287
  possible_matches << text
@@ -86,7 +86,7 @@ class SPF::Term
86
86
  ::
87
87
  "
88
88
 
89
- attr_reader :errors, :ip_netblocks, :ip_address, :ip_network, :ipv4_prefix_length, :ipv6_prefix_length, :domain_spec, :raw_params
89
+ attr_reader :errors, :ip_netblocks, :ip_address, :ip_network, :ipv4_prefix_length, :ipv6_prefix_length, :domain_spec, :raw_params, :record_domain
90
90
 
91
91
  def initialize(options = {})
92
92
  @ip_address = nil
@@ -97,6 +97,7 @@ class SPF::Term
97
97
  @errors = []
98
98
  @ip_netblocks = []
99
99
  @text = options[:text]
100
+ @record_domain = options[:record_domain]
100
101
  @raise_exceptions = options.has_key?(:raise_exceptions) ? options[:raise_exceptions] : true
101
102
  end
102
103
 
@@ -117,6 +118,8 @@ class SPF::Term
117
118
  domain_spec = $1
118
119
  domain_spec.sub!(/^(.*?)\.?$/, $1)
119
120
  @domain_spec = SPF::MacroString.new({:text => domain_spec})
121
+ elsif record_domain
122
+ @domain_spec = SPF::MacroString.new({:text => record_domain})
120
123
  elsif required
121
124
  error(SPF::TermDomainSpecExpectedError.new(
122
125
  "Missing required domain-spec in '#{@text}'"))
@@ -844,6 +847,7 @@ class SPF::Record
844
847
  @global_mods ||= {}
845
848
  @errors = []
846
849
  @ip_netblocks = []
850
+ @record_domain = options[:record_domain]
847
851
  @raise_exceptions = options.has_key?(:raise_exceptions) ? options[:raise_exceptions] : true
848
852
  end
849
853
 
@@ -914,7 +918,11 @@ class SPF::Record
914
918
  error(exception)
915
919
  mech_class = SPF::Mech
916
920
  end
917
- term = mech = mech_class.new_from_string(mech_text, {:raise_exceptions => @raise_exceptions})
921
+ options = {:raise_exceptions => @raise_exceptions}
922
+ if instance_variable_defined?("@record_domain")
923
+ options[:record_domain] = @record_domain
924
+ end
925
+ term = mech = mech_class.new_from_string(mech_text, options)
918
926
  term.errors << exception if exception
919
927
  @ip_netblocks << mech.ip_netblocks if mech.ip_netblocks
920
928
  @terms << mech
@@ -1,6 +1,6 @@
1
1
  # encoding: ASCII-8BIT
2
2
  module SPF
3
- VERSION = '0.0.51'
3
+ VERSION = '0.0.52'
4
4
  end
5
5
 
6
6
  # vim:sw=2 sts=2
@@ -6,7 +6,7 @@
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "spf"
9
- s.version = "0.0.51"
9
+ s.version = "0.0.52"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.51
4
+ version: 0.0.52
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Flury
8
8
  - Julian Mehnle
9
9
  - Jacob Rideout
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
  date: 2015-04-29 00:00:00.000000000 Z
@@ -16,74 +16,75 @@ dependencies:
16
16
  name: ruby-ip
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - ~>
19
+ - - "~>"
20
20
  - !ruby/object:Gem::Version
21
21
  version: 0.9.1
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
- - - ~>
26
+ - - "~>"
27
27
  - !ruby/object:Gem::Version
28
28
  version: 0.9.1
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: rspec
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - ~>
33
+ - - "~>"
34
34
  - !ruby/object:Gem::Version
35
35
  version: '2.9'
36
36
  type: :development
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - ~>
40
+ - - "~>"
41
41
  - !ruby/object:Gem::Version
42
42
  version: '2.9'
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: rdoc
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - ~>
47
+ - - "~>"
48
48
  - !ruby/object:Gem::Version
49
49
  version: '3'
50
50
  type: :development
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
- - - ~>
54
+ - - "~>"
55
55
  - !ruby/object:Gem::Version
56
56
  version: '3'
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: bundler
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
- - - ~>
61
+ - - "~>"
62
62
  - !ruby/object:Gem::Version
63
63
  version: '1.2'
64
64
  type: :development
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
- - - ~>
68
+ - - "~>"
69
69
  - !ruby/object:Gem::Version
70
70
  version: '1.2'
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: jeweler
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
- - - ~>
75
+ - - "~>"
76
76
  - !ruby/object:Gem::Version
77
77
  version: '1.8'
78
78
  type: :development
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
- - - ~>
82
+ - - "~>"
83
83
  - !ruby/object:Gem::Version
84
84
  version: '1.8'
85
- description: ! " An object-oriented Ruby implementation of the Sender Policy Framework
86
- (SPF)\n e-mail sender authentication system, fully compliant with RFC 4408.\n"
85
+ description: |2
86
+ An object-oriented Ruby implementation of the Sender Policy Framework (SPF)
87
+ e-mail sender authentication system, fully compliant with RFC 4408.
87
88
  email:
88
89
  - code@agari.com
89
90
  - aflury@agari.com
@@ -94,8 +95,8 @@ extensions: []
94
95
  extra_rdoc_files:
95
96
  - README.rdoc
96
97
  files:
97
- - .document
98
- - .rspec
98
+ - ".document"
99
+ - ".rspec"
99
100
  - Gemfile
100
101
  - Gemfile.lock
101
102
  - README.rdoc
@@ -117,24 +118,24 @@ homepage: https://github.com/agaridata/spf-ruby
117
118
  licenses:
118
119
  - none (all rights reserved)
119
120
  metadata: {}
120
- post_install_message:
121
+ post_install_message:
121
122
  rdoc_options: []
122
123
  require_paths:
123
124
  - lib
124
125
  required_ruby_version: !ruby/object:Gem::Requirement
125
126
  requirements:
126
- - - ! '>='
127
+ - - ">="
127
128
  - !ruby/object:Gem::Version
128
129
  version: '0'
129
130
  required_rubygems_version: !ruby/object:Gem::Requirement
130
131
  requirements:
131
- - - ! '>='
132
+ - - ">="
132
133
  - !ruby/object:Gem::Version
133
134
  version: '0'
134
135
  requirements: []
135
- rubyforge_project:
136
- rubygems_version: 2.6.14
137
- signing_key:
136
+ rubyforge_project:
137
+ rubygems_version: 2.5.1
138
+ signing_key:
138
139
  specification_version: 4
139
140
  summary: Implementation of the Sender Policy Framework
140
141
  test_files: []