dkim-query 0.2.3 → 0.2.4

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: 1044c31de0b41b92f7bef616f018efd5214ba8e1
4
- data.tar.gz: 6ed8cc2e233929018e7a464457436674f25a1f33
3
+ metadata.gz: 130134550b9bd8dade6eacb8ca1b3d2a654ac7a3
4
+ data.tar.gz: 953bfb67c8346433f67f600cc0c6254b0aa65043
5
5
  SHA512:
6
- metadata.gz: 7d0bf4acd647b16c40291120e8f172dfe529cec4dd9e0cd65f607871548684a4b8d737134981e15d001b158d885d8ee795bf9d81dfa4f078e35995309dc5a910
7
- data.tar.gz: b3422596b4b3dc22ba95561eb22368bdd7de929db4b9a086679c14f6ea16d38d8a155c556799bc965e3774d454f3d3dce94b45f132f8c6be61530873db6bae96
6
+ metadata.gz: 79a52c749f8536b8e6321315f073ff3e5e8d418b180ba44cc0f38f542b1c244c120ea362632cf3af02a6c9d044a344eeb6466db09e545b1472db9f712d7799a1
7
+ data.tar.gz: baee6085870a7aaa84390e3d83094fc2154686274cfa779c70b44edc9fc91446f1b660c11375ceed6a9dec9e16bde3181437811b3816989fd5b30226ee4e6530
data/ChangeLog.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 0.2.4 / 2015-08-13
2
+
3
+ * Fixed a bug where the queried host has no TLD (ex: `test`).
4
+
1
5
  ### 0.2.3 / 2015-07-22
2
6
 
3
7
  * Fixed a typo in the `dkim-query` util.
@@ -65,7 +65,9 @@ module DKIM
65
65
  # @api private
66
66
  #
67
67
  def self.host_without_tld(host)
68
- host[0,host.rindex('.')]
68
+ if host.include?('.') then host[0,host.rindex('.')]
69
+ else host
70
+ end
69
71
  end
70
72
 
71
73
  end
@@ -1,6 +1,6 @@
1
1
  module DKIM
2
2
  module Query
3
3
  # dkim-query version
4
- VERSION = '0.2.3'
4
+ VERSION = '0.2.4'
5
5
  end
6
6
  end
data/spec/query_spec.rb CHANGED
@@ -12,6 +12,14 @@ describe DKIM::Query do
12
12
  it "should strip the last component of the domain" do
13
13
  expect(subject.host_without_tld(domain)).to be == domain.chomp(tld)
14
14
  end
15
+
16
+ context "when given a host with no tld" do
17
+ let(:domain) { 'test' }
18
+
19
+ it "should return the full host" do
20
+ expect(subject.host_without_tld(domain)).to be == domain
21
+ end
22
+ end
15
23
  end
16
24
 
17
25
  describe ".selectors_for" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dkim-query
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - nicktitle
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-22 00:00:00.000000000 Z
11
+ date: 2015-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parslet