easy_upnp 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/easy_upnp/ssdp_searcher.rb +13 -11
- data/lib/easy_upnp/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2849bdeadd6cd4e7a7d1a64990a5cfdcd5074f87
|
4
|
+
data.tar.gz: 0c6b0e8b1b59cf57811a6217caccf5d6e5cbb060
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c479a9a47ff6c655d320d25ed1778b19e60f99fe6576d325c747b877d41d54cd650d517d03a2e21864e11d27b4513c8178a5a0248130fe3fc5405177e37a75b2
|
7
|
+
data.tar.gz: e3e01ee79d282d937432a23162a576c6a80415a09c393e949c469dbdc00cc2e3c7b3fb28094fb74b3994ecca53d4992cc0dc704bb741b1eb94755afc226482c3
|
@@ -50,7 +50,7 @@ module EasyUpnp
|
|
50
50
|
begin
|
51
51
|
Timeout::timeout(option :timeout) do
|
52
52
|
loop do
|
53
|
-
raw_messages.push
|
53
|
+
raw_messages.push(send_socket.recv(4196))
|
54
54
|
end
|
55
55
|
end
|
56
56
|
rescue Timeout::Error
|
@@ -84,17 +84,19 @@ ST: #{urn}\r
|
|
84
84
|
|
85
85
|
def parse_message message
|
86
86
|
lines = message.split "\r\n"
|
87
|
-
headers = lines
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
87
|
+
headers = lines.map do |line|
|
88
|
+
if !(match = line.match(/([^:]+):\s?(.*)/i)).nil?
|
89
|
+
header, value = match.captures
|
90
|
+
key = header.
|
91
|
+
downcase.
|
92
|
+
gsub('-', '_').
|
93
|
+
to_sym
|
94
|
+
|
95
|
+
[key, value]
|
96
|
+
end
|
96
97
|
end
|
97
|
-
|
98
|
+
|
99
|
+
Hash[headers.reject(&:nil?)]
|
98
100
|
end
|
99
101
|
|
100
102
|
private
|
data/lib/easy_upnp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy_upnp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Mullins
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|