dnssd 1.3 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,8 @@
1
+ === 1.3.1 / 2009-10-13
2
+
3
+ * 1 bug fix
4
+ * Fix regexp for parsing the fullname. Patch by James Sadler.
5
+
1
6
  === 1.3 / 2009-08-18
2
7
 
3
8
  * 4 major enhancements
@@ -13,7 +13,7 @@ module DNSSD
13
13
  ##
14
14
  # The version of DNSSD you're using.
15
15
 
16
- VERSION = '1.3'
16
+ VERSION = '1.3.1'
17
17
 
18
18
  ##
19
19
  # Registers +socket+ with DNSSD as +name+. If +service+ is omitted it is
@@ -82,7 +82,7 @@ class DNSSD::Reply
82
82
  # Sets #name, #type and #domain from +fullname+
83
83
 
84
84
  def set_fullname(fullname)
85
- fullname = fullname.gsub(/\\([0-9]+)/) do $1.to_i.chr end
85
+ fullname = fullname.gsub(/\\([0-9]{1,3})/) do $1.to_i.chr end
86
86
  fullname = fullname.scan(/(?:[^\\.]|\\\.)+/).map do |part|
87
87
  part.gsub "\\.", '.'
88
88
  end
@@ -51,6 +51,9 @@ class TestDNSSDReply < MiniTest::Unit::TestCase
51
51
  assert_equal "Dr. Pepper", @reply.instance_variable_get(:@name)
52
52
  assert_equal '_http._tcp', @reply.instance_variable_get(:@type)
53
53
  assert_equal 'local.', @reply.instance_variable_get(:@domain)
54
+
55
+ @reply.set_fullname "Dr\\.\\032Pepper\\032\\0352._http._tcp.local."
56
+ assert_equal "Dr. Pepper #2", @reply.instance_variable_get(:@name)
54
57
  end
55
58
 
56
59
  def test_set_names
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dnssd
3
3
  version: !ruby/object:Gem::Version
4
- version: "1.3"
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Hodel
@@ -35,7 +35,7 @@ cert_chain:
35
35
  x52qPcexcYZR7w==
36
36
  -----END CERTIFICATE-----
37
37
 
38
- date: 2009-08-18 00:00:00 -07:00
38
+ date: 2009-10-13 00:00:00 -07:00
39
39
  default_executable:
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
metadata.gz.sig CHANGED
Binary file