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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 86a26629f27cd8bca2d70c2f74976184ab06ab62
4
- data.tar.gz: 8fb95a2bc7522f7badb67a87ffb03331da59f2c1
3
+ metadata.gz: 501751ab87c8a924b2dfd82b42d20e47d7832795
4
+ data.tar.gz: 876f485d052fc7c247cc87a4615cdb8e7c8db14b
5
5
  SHA512:
6
- metadata.gz: 521041fc0ccbf9734c029051378feb62a89233dd523f446f2cc52ba9db2df50df2a118a3afcdb66ec45f7ced46b5f241e6df008eb3a4999acb044cb5e252265d
7
- data.tar.gz: 3fac2a3df7338df3de42b5cf0f0545d9fc5c817510c57c3c74ef9971a0322574e3a7216f2e78c07c0c1d7cd1e8e5062e10bbdc7553484be56d992b9032a59d19
6
+ metadata.gz: bcad6aa3a3dc7ab12ea3e5c75988dfc6be5b6f7460a9585c4deb2edb474e30fcbeba3c43446640311ef76216b0f6e5639734e59a4f1597d0b41b02e53a520596
7
+ data.tar.gz: 971664bc5aff29b5372895d1e8ef9091db62490c5b085ed719e575159b8c6c525839bc54e6fedf13e9ecda6399213c1deeb2218e9beea0cf7595f71c4fe862b6
checksums.yaml.gz.sig CHANGED
Binary file
@@ -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
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remote_dwsregistry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file