easy_upnp 0.2.2 → 0.2.3

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: ba225151d956a041aaadd246678194bb56d0dbf3
4
- data.tar.gz: c75a1966c29b922dd79ec0e64f971f1504f77390
3
+ metadata.gz: 81b1e9fbc61f582fd37f2206ed899f4a6f09fe9c
4
+ data.tar.gz: 01588f5e7b679a8834a33b60dee1d5b444b74ac9
5
5
  SHA512:
6
- metadata.gz: 18148d3f3aacad599e4c618cfafdb3381c27a2fd1e079042f29c0975c0e04de0c408d634beee1b94b93f8db326d8256dfa72fbf854f5ae4fd6ce2462cfaa7dfc
7
- data.tar.gz: fb9a6f08c5350ed95170705aa662cd638de2fe94b0698b7bea2f07c259ad1b337a33a1cca30cf72cddae434333c029ac3925c94e56cc2e3b9dcfce7dd3997b4a
6
+ metadata.gz: b2c6e5bb318fc4b78543f865b27eff34cb420e8642629a86931c5512a5f984158e51270221c08c29bda6cb72445a8df558c943869dd9c33d45b3134ec82f3799
7
+ data.tar.gz: e6bbbbf71e24d07481f0c853e7287fb621fb0c38a87db6d2d13c5fabc97b1b1bb24fe02683cc080d8cb7b6c13f6a36f8e4a090095d6beae3b2f6b0f2e2931461
@@ -98,8 +98,11 @@ module EasyUpnp
98
98
  define_singleton_method(action['name']) do |args_hash = {}|
99
99
  if !args_hash.is_a? Hash
100
100
  raise RuntimeError.new "Input arg must be a hash"
101
- elsif
102
- (args_hash.keys - input_args).any?
101
+ end
102
+
103
+ args_hash = args_hash.inject({}) { |m,(k,v)| m[k.to_sym] = v; m }
104
+
105
+ if (args_hash.keys - input_args).any?
103
106
  raise RuntimeError.new "Unsupported arguments: #{(args_hash.keys - input_args)}." <<
104
107
  " Supported args: #{input_args}"
105
108
  end
@@ -32,7 +32,7 @@ module EasyUpnp
32
32
  @options[key]
33
33
  end
34
34
 
35
- def search urn
35
+ def search urn = 'ssdp:all'
36
36
  socket = build_socket
37
37
  packet = construct_msearch_packet(urn)
38
38
 
@@ -1,3 +1,3 @@
1
1
  module EasyUpnp
2
- VERSION = '0.2.2'
2
+ VERSION = '0.2.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_upnp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Mullins