coppertone 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f008edbec530072ac470e674b2ac2b97732809bf
4
- data.tar.gz: a211786a871481a84b7c7c786c3da0c34b4d0b35
3
+ metadata.gz: 6ef116ba53f031efce0470d0e7b2650161fa44d4
4
+ data.tar.gz: f8080851318443517abd3ab0f7f84e26997c6f07
5
5
  SHA512:
6
- metadata.gz: 8b94b130d7f3e834cc2ceca9f27391524036f266294d622499014ef59b330be1250fd5b993f98f992432c1d5c5c859b9009bcf864562c0ce329a355ed59f1df8
7
- data.tar.gz: 251a6a4f25c5e46313a7e598c2be17ae347b6b4e56e535f76d900c2d2c8e34cccfd64102da00cca0aa1c25de6a737ce993c7aabf9d58682a9281b92ae9f88a02
6
+ metadata.gz: a2a5c2716e42eb0922f84e5d7cfd9d4612ac39d11398a2e6f64bd533fa5a33dbc8e95212eedba1d8156149f9fd2829ae9267581c78bd9a16f84f89b2f980283d
7
+ data.tar.gz: bf1c8f0e057f065d5f74de705685fc3634d3955cefbd8409e67ca8dde22dff31555a3aa0b21440a9ee7696414fb883622027751cd76b215dbd14e73418d15ffb
@@ -56,7 +56,7 @@ module Coppertone
56
56
  end
57
57
 
58
58
  def self.valid_label?(l)
59
- (l.length >= 0) && (l.length <= 63) && !l.match(/\s/)
59
+ !l.empty? && (l.length <= 63) && !l.match(/\s/)
60
60
  end
61
61
 
62
62
  def self.macro_expanded_domain(domain)
@@ -1,3 +1,3 @@
1
1
  module Coppertone
2
- VERSION = '0.0.9'.freeze
2
+ VERSION = '0.0.10'.freeze
3
3
  end
@@ -27,6 +27,11 @@ describe Coppertone::Utils::DomainUtils do
27
27
  expect(subject.valid?('one')).to eq(false)
28
28
  end
29
29
 
30
+ it 'should reject domains with empty labels' do
31
+ expect(subject.valid?('.spf.example.com')).to eq(false)
32
+ expect(subject.valid?('spf..example.com')).to eq(false)
33
+ end
34
+
30
35
  it 'should handle IDNA domains' do
31
36
  expect(subject.valid?('清华大学.cn')).to eq(true)
32
37
  expect(subject.valid?('ジェーピーニック.jp')).to eq(true)
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.9
4
+ version: 0.0.10
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: 2017-07-25 00:00:00.000000000 Z
11
+ date: 2017-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dns_adapter
@@ -269,7 +269,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
269
269
  version: '0'
270
270
  requirements: []
271
271
  rubyforge_project:
272
- rubygems_version: 2.6.11
272
+ rubygems_version: 2.6.13
273
273
  signing_key:
274
274
  specification_version: 4
275
275
  summary: A Sender Policy Framework (SPF) toolkit