rack_dwsregistry 0.2.1 → 0.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 603412499c79000f90b00394f5e7adda95f3a806
4
- data.tar.gz: 4329ca20edfa48e2502425180fbac7634d416811
3
+ metadata.gz: 6ff62a5f9cfbefd8080c845f247496dd616c54fd
4
+ data.tar.gz: 18015eea5d079b2237b2bc2a902065ea4294d3aa
5
5
  SHA512:
6
- metadata.gz: 137477fe5d37a29c356e1d05d8498b16b16e55b200b144278af46f00b6ec999be7d8d8d673e6b30092343568ff2e6bc9c0f655afa398b66ada831c7424651478
7
- data.tar.gz: d01e1c957c0b9572f6e0cc95ce2e22e0d7fb360d89184b1403de208823f6bdb27484069fad8d21a327129f16a0bbc974e5fce3f54cfdf9bca16ed354cc5c5da3
6
+ metadata.gz: f7a72f48c1c0b55bd87ac496539908d9790540f6ca959068ea9b5a4c914218b2625ff9c5cdad84633bc322b79ee0f3bb03ea6464f4ee09178f612b4b1d49a1d3
7
+ data.tar.gz: 3868634ec43e23c00ea3f7ffeb872f1cd4b6aaf0567d905ed3cc4c9233c7734c6160f88cbda50265c3bfe75f7355490547cf714ffdcb891dc18f1bef0b16b0ba
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -50,6 +50,22 @@ class RackDwsRegistry
50
50
 
51
51
  def default_routes(env, params={})
52
52
 
53
+ # xpath
54
+ #
55
+ get /\/\?xpath=/ do
56
+
57
+ xpath = params['xpath']
58
+
59
+ recordset = @reg.xpath(xpath)
60
+
61
+ if recordset then
62
+ [recordset.to_doc(root: 'recordset').root.xml, 'application/xml']
63
+ else
64
+ [{get_keys: 'empty'}.to_json, 'application/json']
65
+ end
66
+
67
+ end
68
+
53
69
  # get_key('.')
54
70
  #
55
71
  get '/' do |key|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack_dwsregistry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file