ws_discovery 0.0.2 → 0.0.3
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 +4 -4
- data/History.rdoc +4 -0
- data/lib/ws_discovery/searcher.rb +5 -3
- data/lib/ws_discovery/version.rb +1 -1
- data/spec/ws_discovery/searcher_spec.rb +14 -3
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9f3a7ab66b4a19dd8e9e0492e05a9895083fca68
|
|
4
|
+
data.tar.gz: f8bfedf888aa44b5f97c8502db5c7d1699c403ba
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b461c7f2ea5a81c6fc38e9e66ccfc3e5b3f3b5ea3bd8eaf63b240f82a8d113695fb49e17a1371299932811c3399d33a14296bb8b629678f3fa4442f6719b2807
|
|
7
|
+
data.tar.gz: 71a05e59ffd0402b783808427caadd7b39a300e197a87b824a738488748fa7989eef348d76d0bdc6fd0e39630c9fb29b7a188ee834418a31a6be8f5ab5aaed4a
|
data/History.rdoc
CHANGED
|
@@ -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(:
|
|
87
|
-
|
|
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
|
data/lib/ws_discovery/version.rb
CHANGED
|
@@ -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/></
|
|
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
|
|
81
|
-
subject.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.
|
|
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-
|
|
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.
|
|
312
|
+
rubygems_version: 2.0.3
|
|
313
313
|
signing_key:
|
|
314
314
|
specification_version: 4
|
|
315
315
|
summary: Search for devices using WS-Discovery
|