dnsruby 1.59.2 → 1.59.3

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: cbf23b466d13bc0423b226829df425bc505406a6
4
- data.tar.gz: c5e4177c7f9e84406c53882df0d93f25e23e0a55
3
+ metadata.gz: 7df18e131f6ea67c915c87802242c9f4b5336c2d
4
+ data.tar.gz: 8d7d98f5c264ffe18600f133f9b18f43f869fe4a
5
5
  SHA512:
6
- metadata.gz: 4217655015fa0bc119772d27557f804d746fe82e4bc5993bf92c7fa43a32e8f550d2208829f9b7d83c5531f5ae2010213d458f902c95d768dd79741db085a93b
7
- data.tar.gz: f322b406b51df752f032bf109f56b35f4618e43c905f46dcc206564770d6d7cd0900533047dedca4199e219a1cd55c870da193d6c476a886b1ce689737aa1574
6
+ metadata.gz: 2549d20e5db3d157744813968a8b0483f20fb9f0f972557b2ee6c3b1dd73db1885470c64ca9813b69a7b88d87a391d6b504e1bce93251d3300ed0b251589c9a9
7
+ data.tar.gz: 887d3cff6ba77f6ce30c752559037149fbf0304d9f6f1b86bd3e56d3998b72c2199b57c7e14760fdf00935c19c2cb2ca6afab80d4990bb1b659f51ca8153166b
@@ -1,5 +1,11 @@
1
1
  # Release Notes
2
2
 
3
+ ## v1.59.3
4
+
5
+ * Output TXT record multiple strings correctly
6
+ * NONE class encoding fix
7
+ * only add name labels if there are any
8
+
3
9
  ## v1.59.2
4
10
 
5
11
  * Timeout error fix
@@ -29,7 +29,7 @@ module Dnsruby
29
29
  attr_accessor :strings
30
30
 
31
31
  def data
32
- @strings[0]
32
+ @strings.join
33
33
  end
34
34
 
35
35
  def from_data(data)
@@ -43,7 +43,9 @@ module Dnsruby
43
43
  end
44
44
 
45
45
  def encode_rdata(msg, canonical=false) #:nodoc: all
46
- msg.put_name(@domainname, canonical)
46
+ if (klass != Classes::NONE)
47
+ msg.put_name(@domainname, canonical)
48
+ end
47
49
  end
48
50
 
49
51
  def self.decode_rdata(msg) #:nodoc: all
@@ -153,7 +153,7 @@ module Dnsruby
153
153
  add_pre(rec)
154
154
  return rec
155
155
  else
156
- raise ArgumentError.new("Wrong number of arguments (#{args.length} for 1 or 2) for Update#absent")
156
+ raise ArgumentError.new("Wrong number of arguments (#{args.length} for 1 or 2) for Update#present")
157
157
  end
158
158
  end
159
159
 
@@ -1,3 +1,3 @@
1
1
  module Dnsruby
2
- VERSION = '1.59.2'
2
+ VERSION = '1.59.3'
3
3
  end
@@ -219,6 +219,17 @@ class TestUpdate < Minitest::Test
219
219
  assert_equal(Classes.NONE, pre[2].klass, 'forth class right'); #66
220
220
  end
221
221
 
222
+ def test_absent_cname
223
+ update = Update.new()
224
+ rr = update.absent("target_name", "CNAME")
225
+ assert(rr, 'nxdomain() returned RR');
226
+ assert_equal(rr.name.to_s, "target_name", 'nxdomain - right name');
227
+ assert_equal(rr.ttl, 0, 'nxdomain - right ttl');
228
+ assert_equal(rr.klass.string, 'NONE', 'nxdomain - right class');
229
+ assert_equal(rr.type.string, 'CNAME', 'nxdomain - right type');
230
+ assert(is_empty(rr.rdata), 'nxdomain - data empty');
231
+ end
232
+
222
233
  def test_txt
223
234
  update = Update.new()
224
235
  update.add("target_name", "TXT", 100, "test signed update")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dnsruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.59.2
4
+ version: 1.59.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Dalitz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-26 00:00:00.000000000 Z
11
+ date: 2016-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry