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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a0f8b872fa78970e2fcf5076b276f02bfc17afd3
4
- data.tar.gz: 443fddae6d3e7cb2710b42b1aa0c8db0a7537014
3
+ metadata.gz: 2849bdeadd6cd4e7a7d1a64990a5cfdcd5074f87
4
+ data.tar.gz: 0c6b0e8b1b59cf57811a6217caccf5d6e5cbb060
5
5
  SHA512:
6
- metadata.gz: bd6892840b047132db10e4edf3995a7fc39c64288c9fc9d2c3b53237bddb7b43f252eb3fd65bd8ad6c78bfd1673eb331e60d17f0515509078008c5374744ba95
7
- data.tar.gz: 1b4238c13de11c27a35c523d03e52bbc7c2bbd498e6fba562b230f3f5587f7cbdba4061988645c7fa4bacbf1a25daf9fa539d049f8619fc30bb36d01c492d943
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 send_socket.recv(4196)
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[1...-1].map do |line|
88
- header, value = line.match(/([^:]+):\s?(.*)/i).captures
89
-
90
- key = header.
91
- downcase.
92
- gsub('-', '_').
93
- to_sym
94
-
95
- [key, value]
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
- Hash[headers]
98
+
99
+ Hash[headers.reject(&:nil?)]
98
100
  end
99
101
 
100
102
  private
@@ -1,3 +1,3 @@
1
1
  module EasyUpnp
2
- VERSION = '0.1.5'
2
+ VERSION = '0.1.6'
3
3
  end
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.5
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-01 00:00:00.000000000 Z
11
+ date: 2015-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake