easy_upnp 1.0.0 → 1.0.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1d0115b9fa09e9153b84782c6e5c79d86fa80d6
|
4
|
+
data.tar.gz: 3d3383dc43d280a1a5db1e56f7c7479ea9e8eff7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 `:
|
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
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
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
|
-
|
29
|
+
validator.validate(val)
|
29
30
|
rescue ArgumentError => e
|
30
31
|
raise ArgumentError, "Invalid value for argument #{arg}: #{e}"
|
31
32
|
end
|
data/lib/easy_upnp/version.rb
CHANGED