easy_upnp 0.2.4 → 0.2.5

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: 8030fbfc811395ade16a4394dc27df68e2ced1cb
4
- data.tar.gz: 18a421a73a75ecfb3842214953f5db50158c7b3d
3
+ metadata.gz: 664553443adb7bbc4003b3fe22d361fc6cee121a
4
+ data.tar.gz: cc018adaff76a026018bb087779ca166098e30fc
5
5
  SHA512:
6
- metadata.gz: c5d5eb348c9cd11d53063500cc1f53300ae71c10306eebec39c5735cc346c482cac9e111599f2c9c33b54b2da79743d33b73056796a501a3f559d6e04f9216c2
7
- data.tar.gz: 4b5a0e97cd64a3458283eb760f859af810da889a95ab55822b5827a89b37381fc10e14d2075fa0c45b17d7b0c3d6ecf88fdb38f7ca126603a958389ec34d45be
6
+ metadata.gz: cb5c3136247b07d5b2ebcb0203b95712e4a808ad51d63b0cf1edef837f9c70595459de0fe104a2aedcffb3fd747024b0cc08a58172e6d6e1901fd68104df8700
7
+ data.tar.gz: cdcee4ca55bdfe97d4c9fee3d3a8086ec2e31dff7c33d985187b75e61b6d489476c205646cef772fa552315d9ef0f8802a7c2f80bc6884ce209ad8f33b34b699
@@ -2,6 +2,8 @@ require 'nokogiri'
2
2
  require 'open-uri'
3
3
  require 'nori'
4
4
 
5
+ require_relative 'logger'
6
+
5
7
  module EasyUpnp
6
8
  class DeviceControlPoint
7
9
  attr_reader :service_methods, :service_endpoint
@@ -12,7 +14,7 @@ module EasyUpnp
12
14
  @options = options
13
15
  @definition = definition
14
16
 
15
- @client = Savon.client do |c|
17
+ @client = Savon.client(log: EasyUpnp::Log.enabled?, log_level: EasyUpnp::Log.level) do |c|
16
18
  c.endpoint service_endpoint
17
19
  c.namespace urn
18
20
 
@@ -0,0 +1,15 @@
1
+ module EasyUpnp
2
+ module Log
3
+ class <<self
4
+ attr_accessor :enabled, :level
5
+ end
6
+
7
+ def self.enabled?
8
+ @enabled.nil? ? @enabled = true : @enabled
9
+ end
10
+
11
+ def self.level
12
+ @level ||= :info
13
+ end
14
+ end
15
+ end
@@ -1,3 +1,3 @@
1
1
  module EasyUpnp
2
- VERSION = '0.2.4'
2
+ VERSION = '0.2.5'
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.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Mullins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-27 00:00:00.000000000 Z
11
+ date: 2016-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -95,6 +95,7 @@ files:
95
95
  - bin/upnp-list
96
96
  - easy_upnp.gemspec
97
97
  - lib/easy_upnp/device_control_point.rb
98
+ - lib/easy_upnp/logger.rb
98
99
  - lib/easy_upnp/ssdp_searcher.rb
99
100
  - lib/easy_upnp/upnp_device.rb
100
101
  - lib/easy_upnp/version.rb