easy_upnp 1.0.0 → 1.0.1

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: c58d2d816ce224f674b5bca2393a6f25007b27b3
4
- data.tar.gz: 97eca3f41437f100470a5bb8cdda6815a5fc7959
3
+ metadata.gz: a1d0115b9fa09e9153b84782c6e5c79d86fa80d6
4
+ data.tar.gz: 3d3383dc43d280a1a5db1e56f7c7479ea9e8eff7
5
5
  SHA512:
6
- metadata.gz: ac8b59b38423087c105266b9781e93f33e92a9771a851ef8c0c4beb89754117674694c5231889486fb96dcfc26d95fb40e12af39d65b7d2e6576dd19a1d18d24
7
- data.tar.gz: b875881fd185faef0f4b8dc4c07aca21f04ce0d80acee5b2a96dd457681085ee186b086323215c86cbe69b550d062eab1dcbdb6494e3bb7c519c1361a752e092
6
+ metadata.gz: 4315c796f88ba6fc46dcf6bbaf0f8fe4c51e80c8601ad10c20afcb81e73e185625a4a5a40b35bbc1d437c8837c8368aa69be2008e08c2c562edc6945fba08dab
7
+ data.tar.gz: 226784376fa3b7db72b722260aa722a348a3e5ff02ee585d06e421652d53eb5d8e9e0ef92dd773f790e7a56536a2fd064c242918beb774c9607f61fac7eb9a26
data/README.md CHANGED
@@ -75,14 +75,19 @@ client.GetSystemUpdateID
75
75
 
76
76
  ## Logging
77
77
 
78
- By default, logs will be printed to `$stdout` at the `:info` level. To change this behavior, you can use the following:
78
+ By default, logs will be printed to `$stdout` at the `:error` level. To change this behavior, you can use the following options when constructing a control point:
79
79
 
80
80
  ```ruby
81
- # Disable logging
82
- EasyUpnp::Log.enabled = false
83
-
84
- # Change log level (only has an effect if logging is enabled)
85
- EasyUpnp::Log.level = :debug
81
+ service = client.service(
82
+ 'urn:schemas-upnp-org:service:ContentDirectory:1',
83
+ log_enabled: true,
84
+ log_level: :info
85
+ )
86
+
87
+ service = client.service('urn:schemas-upnp-org:service:ContentDirectory:1') do |s|
88
+ s.log_enabled = true
89
+ s.log_level = :debug
90
+ end
86
91
  ```
87
92
 
88
93
  ## Validation
@@ -24,8 +24,9 @@ module EasyUpnp
24
24
  end
25
25
 
26
26
  args_hash.each do |arg, val|
27
+ validator = validator_provider.validator(arg_reference(arg))
27
28
  begin
28
- validator_provider.validator(arg_reference(arg)).validate(val)
29
+ validator.validate(val)
29
30
  rescue ArgumentError => e
30
31
  raise ArgumentError, "Invalid value for argument #{arg}: #{e}"
31
32
  end
@@ -31,7 +31,7 @@ module EasyUpnp
31
31
  end
32
32
 
33
33
  class NoOpValidatorProvider
34
- def validator(method, arg)
34
+ def validator(arg_ref)
35
35
  ArgumentValidator.no_op
36
36
  end
37
37
  end
@@ -1,3 +1,3 @@
1
1
  module EasyUpnp
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
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: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Mullins