ws_discovery 0.0.2 → 0.0.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: 26563c4c512bac506b4896e8815c73adec7e80e4
4
- data.tar.gz: 30218e0afdce4d63cf9fab82b9856644a443d205
3
+ metadata.gz: 9f3a7ab66b4a19dd8e9e0492e05a9895083fca68
4
+ data.tar.gz: f8bfedf888aa44b5f97c8502db5c7d1699c403ba
5
5
  SHA512:
6
- metadata.gz: 5d3b2d80a9b09c7452054d1f757b58ddd4816e4505e0ceaec28de186bce374e3bb2a3dbdf34b45a88acb2c895de4622fe659001dcc347c7fe17c78a6a63708f6
7
- data.tar.gz: 20ba3f6c8d9a157b0bc8a948b5ff6c83f2dd7cb25a4cc57f733e0726815ea4f0956532f25ac489da686b93bb90cf2e13547a1f8b4547cbec0a6613ebb92635d6
6
+ metadata.gz: b461c7f2ea5a81c6fc38e9e66ccfc3e5b3f3b5ea3bd8eaf63b240f82a8d113695fb49e17a1371299932811c3399d33a14296bb8b629678f3fa4442f6719b2807
7
+ data.tar.gz: 71a05e59ffd0402b783808427caadd7b39a300e197a87b824a738488748fa7989eef348d76d0bdc6fd0e39630c9fb29b7a188ee834418a31a6be8f5ab5aaed4a
data/History.rdoc CHANGED
@@ -1,3 +1,7 @@
1
+ === 0.0.3 / 2013-07-29
2
+
3
+ * Corrected errors with searching for devices of a specific type.
4
+
1
5
  === 0.0.2 / 2013-03-25
2
6
 
3
7
  * Updated to be compatible with Nori 2.0.0.
@@ -73,7 +73,7 @@ class WSDiscovery::Searcher < WSDiscovery::MulticastConnection
73
73
  'xmlns:d' => 'http://schemas.xmlsoap.org/ws/2005/04/discovery',
74
74
  'xmlns:s' => 'http://www.w3.org/2003/05/soap-envelope'
75
75
  }
76
- namespaces.merge options[:env_namespaces] if options[:env_namespaces]
76
+ namespaces.merge! options[:env_namespaces] if options[:env_namespaces]
77
77
 
78
78
  Builder::XmlMarkup.new.s(:Envelope, namespaces) do |xml|
79
79
  xml.s(:Header) do |xml|
@@ -83,8 +83,10 @@ class WSDiscovery::Searcher < WSDiscovery::MulticastConnection
83
83
  end
84
84
 
85
85
  xml.s(:Body) do |xml|
86
- xml.d(:Types, options[:type_attributes], options[:types])
87
- xml.d(:Scopes, options[:scope_attributes], options[:scopes])
86
+ xml.d(:Probe) do
87
+ xml.d(:Types, options[:type_attributes], options[:types])
88
+ xml.d(:Scopes, options[:scope_attributes], options[:scopes])
89
+ end
88
90
  end
89
91
  end
90
92
  end
@@ -1,3 +1,3 @@
1
1
  module WSDiscovery
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
@@ -8,7 +8,8 @@ describe WSDiscovery::Searcher do
8
8
  "ttp://www.w3.org/2003/05/soap-envelope\"><s:Header><a:Action>http://sch" +
9
9
  "emas.xmlsoap.org/ws/2005/04/discovery/Probe</a:Action><a:MessageID>uuid" +
10
10
  ":a-uuid</a:MessageID><a:To>urn:schemas-xmlsoap-org:ws:2005:04:discovery" +
11
- "</a:To></s:Header><s:Body><d:Types/><d:Scopes/></s:Body></s:Envelope>"
11
+ "</a:To></s:Header><s:Body><d:Probe><d:Types/><d:Scopes/></d:Probe></s:B" +
12
+ "ody></s:Envelope>"
12
13
  end
13
14
 
14
15
  around(:each) do |example|
@@ -77,8 +78,18 @@ describe WSDiscovery::Searcher do
77
78
  end
78
79
 
79
80
  describe "#probe" do
80
- it "builds the MSEARCH string using the given parameters" do
81
- subject.probe.should == default_probe
81
+ it "builds the probe string using the given parameters" do
82
+ subject.probe(
83
+ env_namespaces: { "xmlns:dn" => "http://www.onvif.org/ver10/network/wsdl" },
84
+ types: "dn:NetworkVideoTransmitter").should == <<-PROBE.strip
85
+ <s:Envelope xmlns:a=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\" xmlns:\
86
+ d=\"http://schemas.xmlsoap.org/ws/2005/04/discovery\" xmlns:s=\"http://www.w3.o\
87
+ rg/2003/05/soap-envelope\" xmlns:dn=\"http://www.onvif.org/ver10/network/wsdl\"\
88
+ ><s:Header><a:Action>http://schemas.xmlsoap.org/ws/2005/04/discovery/Probe</a:A\
89
+ ction><a:MessageID>uuid:a-uuid</a:MessageID><a:To>urn:schemas-xmlsoap-org:ws:20\
90
+ 05:04:discovery</a:To></s:Header><s:Body><d:Probe><d:Types>dn:NetworkVideoTrans\
91
+ mitter</d:Types><d:Scopes/></d:Probe></s:Body></s:Envelope>
92
+ PROBE
82
93
  end
83
94
  end
84
95
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ws_discovery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - tindron
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-03-26 00:00:00.000000000 Z
11
+ date: 2013-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: builder
@@ -309,7 +309,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
309
309
  version: 1.8.0
310
310
  requirements: []
311
311
  rubyforge_project:
312
- rubygems_version: 2.0.2
312
+ rubygems_version: 2.0.3
313
313
  signing_key:
314
314
  specification_version: 4
315
315
  summary: Search for devices using WS-Discovery