xml-registry 0.2.1 → 0.2.2

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: 3730a4bb1b989b5b2220a078f7fdac48787b4260
4
- data.tar.gz: b39de156b2e96337b9725c1ebe7ca2a49390eabf
3
+ metadata.gz: 777b107229bcfaa59fc56dff72416e8d571aac76
4
+ data.tar.gz: c534a0ac4bf095ba5e7649d5efccd927b477749a
5
5
  SHA512:
6
- metadata.gz: f32997086251dd6431aee52e4ef18c6cb56872612b2692c65715300a762db6a3db921ecde93fb67b3643f725b9068a4137903d26d640da33cf566f0dc55bef43
7
- data.tar.gz: 845accf8cbd904387396814e59cc631e308298a5da8810919339cef05bb472b195ec31c0a205fc37c4dc54df0ce41ac5c68b5671862bf15b4a62b163e42ac531
6
+ metadata.gz: c47aba43f009170009e44d8886590b586ec128d761e0060d4710126dd0c041d923852b84811fdfd041bfc3420ae13b0a52fa319b0ad3c5ea6afcdf72315319cb
7
+ data.tar.gz: 9e856f4959562a363106f75fb75e9cb59d9a098ccf968a999f1be94c35e6eced75fb6b0c2ec2e3a0d8b9d5bd58ff193939b4411cf910c415d100ce60f0b07939
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/xml-registry.rb CHANGED
@@ -30,7 +30,6 @@ class XMLRegistry
30
30
  #
31
31
  def set_key(path, value)
32
32
 
33
- puts "set_key : path: %s value: %s" % [path,value]
34
33
  # if the 1st element doesn't exist create it
35
34
  e = path.split('/',2).first
36
35
  @doc.root.add_element Rexle::Element.new(e) unless @doc.root.element e
@@ -43,6 +42,10 @@ class XMLRegistry
43
42
 
44
43
  add_value(path, value)
45
44
  end
45
+
46
+ def key[]=(path, val)
47
+ self.set_key key, val
48
+ end
46
49
 
47
50
  # get the key value by passing the path
48
51
  # example: get_key('app/gtd/funday').value #=> 'friday'
@@ -54,6 +57,10 @@ class XMLRegistry
54
57
  raise ("xml-registry: key %s not found" % path) unless key
55
58
  key
56
59
  end
60
+
61
+ def key[](path)
62
+ self.doc.root.element path
63
+ end
57
64
 
58
65
  # get several keys using a Rexle XPath
59
66
  # example: get_key('//funday') #=> [<funday>tuesday</funday>,<funday>friday</funday>]
@@ -64,6 +71,10 @@ class XMLRegistry
64
71
  @doc.root.xpath path
65
72
  end
66
73
 
74
+ def keys[](path)
75
+ self.get_keys path
76
+ end
77
+
67
78
  # delete the key at the specified path
68
79
  # example: delete_key 'app/gtd/funday'
69
80
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xml-registry
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
@@ -10,53 +10,55 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDRDCCAiygAwIBAgIBADANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
13
+ MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
14
14
  YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
15
- 8ixkARkWAmV1MB4XDTEzMDIwNjIxMDg0MVoXDTE0MDIwNjIxMDg0MVowSDESMBAG
15
+ 8ixkARkWAmV1MB4XDTE0MDUyMTA4NDIzMVoXDTE1MDUyMTA4NDIzMVowSDESMBAG
16
16
  A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
17
17
  EjAQBgoJkiaJk/IsZAEZFgJldTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
18
- ggEBAMDCp78IqAw1SFZILd6pYwVHuY9niU7HZDl5AFB2Li1bciytg2y9KywTm1DS
19
- 9aiJoaFnYKjsTwmxqQKHbq76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hLus3/CveSoFZnl0N1glOJ2NFNJ
23
+ 9MzMRILKQGkN6J6bfA3t7I2CHrsCAwEAAaOBijCBhzAJBgNVHRMEAjAAMAsGA1Ud
24
+ DwQEAwIEsDAdBgNVHQ4EFgQU6PKB3kn9YLJ67cyHyl5sUSDdUPswJgYDVR0RBB8w
25
+ HYEbZ2VtbWFzdGVyQGphbWVzcm9iZXJ0c29uLmV1MCYGA1UdEgQfMB2BG2dlbW1h
26
+ c3RlckBqYW1lc3JvYmVydHNvbi5ldTANBgkqhkiG9w0BAQUFAAOCAQEAaZvE2uwC
27
+ CJXM9jhBn4XvuBz2AgStvL7C38hqgQNlHqAeITwZvoTisqNBJztv89rnc89cwOaY
28
+ u6vUHrfbE5fFF4tbd8BJvLM1JKrpQKNyf3lwuWH6M5sop6BVuHyDFBR+Mq8hvGGs
29
+ 2gQnxM9WbaR1doRzqwsYpNjzM69ES6w1fgN3kQDw1+ARls3J970xV6+jgMZDeK+n
30
+ Ma5r9plc6A6XGtWuZw3XRpyzkLBzxTgR1yAUnr5/GVdm9ZT4wSYJXgh1IVac9kbv
31
+ OJamM7Bcj9+piGsKBJNnDsRMUDp9HTnzSQZQa6VGuC+B8wmTfyHedNg8nhA5omWj
32
+ 01hmb/53blp2Mw==
31
33
  -----END CERTIFICATE-----
32
- date: 2013-09-19 00:00:00.000000000 Z
34
+ date: 2014-05-21 00:00:00.000000000 Z
33
35
  dependencies:
34
36
  - !ruby/object:Gem::Dependency
35
37
  name: rexle
36
38
  requirement: !ruby/object:Gem::Requirement
37
39
  requirements:
38
- - - '>='
40
+ - - ">="
39
41
  - !ruby/object:Gem::Version
40
42
  version: '0'
41
43
  type: :runtime
42
44
  prerelease: false
43
45
  version_requirements: !ruby/object:Gem::Requirement
44
46
  requirements:
45
- - - '>='
47
+ - - ">="
46
48
  - !ruby/object:Gem::Version
47
49
  version: '0'
48
50
  - !ruby/object:Gem::Dependency
49
51
  name: rxfhelper
50
52
  requirement: !ruby/object:Gem::Requirement
51
53
  requirements:
52
- - - '>='
54
+ - - ">="
53
55
  - !ruby/object:Gem::Version
54
56
  version: '0'
55
57
  type: :runtime
56
58
  prerelease: false
57
59
  version_requirements: !ruby/object:Gem::Requirement
58
60
  requirements:
59
- - - '>='
61
+ - - ">="
60
62
  - !ruby/object:Gem::Version
61
63
  version: '0'
62
64
  description:
@@ -76,17 +78,17 @@ require_paths:
76
78
  - lib
77
79
  required_ruby_version: !ruby/object:Gem::Requirement
78
80
  requirements:
79
- - - '>='
81
+ - - ">="
80
82
  - !ruby/object:Gem::Version
81
83
  version: '0'
82
84
  required_rubygems_version: !ruby/object:Gem::Requirement
83
85
  requirements:
84
- - - '>='
86
+ - - ">="
85
87
  - !ruby/object:Gem::Version
86
88
  version: '0'
87
89
  requirements: []
88
90
  rubyforge_project:
89
- rubygems_version: 2.0.0.rc.2
91
+ rubygems_version: 2.1.11
90
92
  signing_key:
91
93
  specification_version: 4
92
94
  summary: xml-registry
metadata.gz.sig CHANGED
Binary file