coppertone 0.0.5 → 0.0.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eab9d4a15947e26efa6ff34c18a0af365d26da20
4
- data.tar.gz: 36a361ab1ce2daffd730e3ca7fa7057fea5ca1bf
3
+ metadata.gz: 917311c72ae373052b881395ec48c4e6b24a0695
4
+ data.tar.gz: ee1e33eae825d36765f1fa6a345bbc1a7f5552d6
5
5
  SHA512:
6
- metadata.gz: 089c7ed04c2396bb0f7aa2982b22eb471f68e5f1afa353a30489df75817714227b36aae6bf1afd6f9435f2d1e5af8d86ec8bdeb584f130e9134f423cf4ef48f5
7
- data.tar.gz: ef9e3c6459a1b1900826fcdc37cd58f6e621ed56da3aa237dce3c97ae4cc18cf50e208474bbed400ef69340fcecacd9a5c3fdb1b835bfa99d78bc0e2d06ec2b9
6
+ metadata.gz: 0e197602cb1fcc52ce0897a77ad1321aa7e37ec6148268fb9736cefd83936d880cecc6b638ee06d839f4e0d1318a7a7e9b712cd75e0cd30a76f1cf42d95f6c9e
7
+ data.tar.gz: 1db1f121f8697504863b3332586755dbbcf47cf96e19541c89f99ea14c5d2508ecd6d4294a30eaec9f3f973900f1160c55d8edba17aed677fb90c0898b3e7911
@@ -71,7 +71,7 @@ module Coppertone
71
71
  end
72
72
 
73
73
  def context_dependent_evaluation?
74
- return true if directives.exist?(&:context_dependent)
74
+ return true if directives.any?(&:context_dependent?)
75
75
  redirect && redirect.context_dependent?
76
76
  end
77
77
 
@@ -1,3 +1,3 @@
1
1
  module Coppertone # rubocop:disable Style/Documentation
2
- VERSION = '0.0.5'.freeze
2
+ VERSION = '0.0.6'.freeze
3
3
  end
data/spec/record_spec.rb CHANGED
@@ -144,4 +144,24 @@ describe Coppertone::Record do
144
144
  expect(includes.map(&:target_domain)).to eq(%w(_spf.domain1.com _spf.domain2.com))
145
145
  end
146
146
  end
147
+
148
+ context '#context_dependent_evaluation?' do
149
+ it 'should be false when the record is not context dependent' do
150
+ r = Coppertone::Record
151
+ .new('v=spf1 include:_spf.domain1.com ip4:1.2.3.4 include:_spf.domain2.com ~all exp=explain._spf.source.com')
152
+ expect(r).not_to be_context_dependent_evaluation
153
+ end
154
+
155
+ it 'should be false when the record has a context dependent redirect' do
156
+ r = Coppertone::Record
157
+ .new('v=spf1 redirect=explain._spf.%{h}')
158
+ expect(r).to be_context_dependent_evaluation
159
+ end
160
+
161
+ it 'should be false when the record has a context dependent directive' do
162
+ r = Coppertone::Record
163
+ .new('v=spf1 include:_spf.domain1.com ip4:1.2.3.4 include:_spf.%{l}.domain2.com ~all exp=explain._spf.static.com')
164
+ expect(r).to be_context_dependent_evaluation
165
+ end
166
+ end
147
167
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coppertone
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter M. Goldstein
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-20 00:00:00.000000000 Z
11
+ date: 2015-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dns_adapter