sonycam 1.3.0 → 1.3.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: 267685466ea2942f1aaeb2de7a06390c6755a25a
4
- data.tar.gz: 6324ddf7763fe498cf7a574a243fb7dffa8eab20
3
+ metadata.gz: 2ce94eb6c341f619ef65191b765a3a79bd86a241
4
+ data.tar.gz: ded56c7cc81ef457d55c4ba62a4dacc7f5065206
5
5
  SHA512:
6
- metadata.gz: db15ae7fe31a6432daf7ecdfe2369903ac0a26233fead4e5cc8abdda1a892553c6e55802e4c2ca6f396e22d50464d9d2eed64d1d738581b3b65e8744c7fdaae4
7
- data.tar.gz: 9b2e817e2e67beea7f2691ecf773f295214077e398156cba48aac6ab47e0142e31c86f937bbba0661bdf3db7464fd4c94c133eaf20aac57104106e620d8a9b41
6
+ metadata.gz: c0b1038851747875aa94fca082ec67701781a3921c70062bc5d1a267ffa3f410175352a1cae734f97c554051d5130eddd0a7ad6ff19062e0c0818f7f5831b712
7
+ data.tar.gz: 654765f80967c3c7bf0fdba9c0e0072f215675de383f13114c08a492698b5c74e26f9d75bd502d72583b7aeb5b4727f64eb5b6580e96b3fe49418a3323f58e77
@@ -1,18 +1,17 @@
1
- require 'nokogiri'
1
+ require 'rexml/document'
2
2
  require 'open-uri'
3
3
 
4
4
  module Sonycam
5
5
  class DeviceDescription
6
6
  attr_reader :doc
7
7
 
8
- # document: String or Nokogiri::XML::Node
9
8
  def initialize document
10
- @doc = Nokogiri::XML(open(document))
11
- @camera_name = @doc.at_xpath('//xmlns:friendlyName').content
9
+ @doc = REXML::Document.new(open(document))
10
+ @camera_name = REXML::XPath.first(@doc, "//xmlns:friendlyName").text
12
11
  @api_url_hash = {}
13
- @doc.xpath('//av:X_ScalarWebAPI_Service', av: 'urn:schemas-sony-com:av').each do |node|
14
- type = node.at_xpath('av:X_ScalarWebAPI_ServiceType', av: 'urn:schemas-sony-com:av').content
15
- url = node.at_xpath('av:X_ScalarWebAPI_ActionList_URL', av: 'urn:schemas-sony-com:av').content
12
+ REXML::XPath.each(@doc, '//av:X_ScalarWebAPI_Service') do |element|
13
+ type = REXML::XPath.first(element, 'av:X_ScalarWebAPI_ServiceType').text
14
+ url = REXML::XPath.first(element, 'av:X_ScalarWebAPI_ActionList_URL').text
16
15
  @api_url_hash[type.to_sym] = url
17
16
  end
18
17
  end
@@ -1,3 +1,3 @@
1
1
  module Sonycam
2
- VERSION = '1.3.0'
2
+ VERSION = '1.3.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sonycam
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Jian
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: nokogiri
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
27
  description: Sony Camera Remote API Wrapper
42
28
  email: tonytonyjan@gmail.com
43
29
  executables: