remote_dwsregistry 0.2.2 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/remote_dwsregistry.rb +21 -0
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 501751ab87c8a924b2dfd82b42d20e47d7832795
|
4
|
+
data.tar.gz: 876f485d052fc7c247cc87a4615cdb8e7c8db14b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bcad6aa3a3dc7ab12ea3e5c75988dfc6be5b6f7460a9585c4deb2edb474e30fcbeba3c43446640311ef76216b0f6e5639734e59a4f1597d0b41b02e53a520596
|
7
|
+
data.tar.gz: 971664bc5aff29b5372895d1e8ef9091db62490c5b085ed719e575159b8c6c525839bc54e6fedf13e9ecda6399213c1deeb2218e9beea0cf7595f71c4fe862b6
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/remote_dwsregistry.rb
CHANGED
@@ -116,4 +116,25 @@ class RemoteDwsRegistry
|
|
116
116
|
r.xml if r.is_a? Rexle::Element
|
117
117
|
end
|
118
118
|
|
119
|
+
def xpath(path)
|
120
|
+
|
121
|
+
r = @req.get(@url_base, {xpath: path})
|
122
|
+
|
123
|
+
case r.content_type
|
124
|
+
when 'application/xml'
|
125
|
+
|
126
|
+
doc = Rexle.new(r.body)
|
127
|
+
doc.root
|
128
|
+
|
129
|
+
when 'application/json'
|
130
|
+
|
131
|
+
JSON.parse r.body
|
132
|
+
|
133
|
+
else
|
134
|
+
|
135
|
+
r.body
|
136
|
+
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
119
140
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|