dws-registry 0.3.1 → 0.3.3

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: 5bf2df6d7f3e5e48d65c3a1990ae4ac55f95bf84
4
- data.tar.gz: b8763c62926e4fad3eb06ff257110ad7215d6503
3
+ metadata.gz: e7752123bb5ab4b719dc176d9491bbb8d3a9c9d3
4
+ data.tar.gz: 8f7fd4514dedef958466edd5ae99fddf1f79572a
5
5
  SHA512:
6
- metadata.gz: e92e85a95abd55616879088b9bb7dac9acd5eed22266e91fbd30cc3dd4f9560398a6b2fa539ebfc5ab427d93f0dc1c364191ac66411c5a7fb67cced3fccdefb3
7
- data.tar.gz: 155aff3c366405e7fb492b089578994c625f5244159635e4469e5734b871095cf34e79dfe39393140d20f5d42d0a4673c7790e85866de53ded4b5591556cb7c9
6
+ metadata.gz: 94d6ef81acf25ce78b01300070c8335a74acb51718da181fce6fbae0d1c3e6276fd5b18b1e3926b8fb5e44b9b96e4e513bce57cdf4e72e341d5e55e66b9a19de
7
+ data.tar.gz: 7d4b7d32bf226e3ad8f8455a929c0f89070b4b75d75be1860889a51c5ec2a24c162d1071bd10361620465289e9ea354dad75ca57147d65064a58ab056b437206
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/dws-registry.rb CHANGED
@@ -5,6 +5,7 @@
5
5
  require 'time'
6
6
  require 'xml-registry'
7
7
  require 'rscript'
8
+ require 'json'
8
9
 
9
10
 
10
11
  class DWSRegistry < XMLRegistry
@@ -53,7 +54,8 @@ class DWSRegistry < XMLRegistry
53
54
  end
54
55
  },
55
56
  number: ->(x){ x[/^[0-9]+$/] ? x.to_i : x.to_f },
56
- time: ->(x) {Time.parse x}
57
+ time: ->(x) {Time.parse x},
58
+ json: ->(x) {JSON.parse x}
57
59
  }
58
60
 
59
61
  h[c.to_sym].call s
@@ -69,6 +71,7 @@ class DWSRegistry < XMLRegistry
69
71
  when :float then [value.to_s, :number]
70
72
  when :falseclass then [value.to_s, :boolean]
71
73
  when :trueclass then [value.to_s, :boolean]
74
+ when :array then ["%s" % value.to_json, :json]
72
75
  end
73
76
 
74
77
  e = super(path, value)
@@ -122,6 +125,7 @@ class DWSRegistry < XMLRegistry
122
125
  elsif v.downcase[/^(?:true|false|on|off|yes|no)$/] then :boolean
123
126
  elsif v[/^\#.*\#$/] then :time
124
127
  elsif v[/^\/\/job:\S+\s+https?:\/\//] then :job
128
+ elsif v[/^\[.*\]$/] then :json
125
129
  end
126
130
  end
127
131
 
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dws-registry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  PGZIlz7FJwJ4++0ZB4E5454Xa7aPv5k3PP+urajaDnG0vSBYhI76SWHkG0+PBDau
32
32
  8P/40FmSZqbOtg==
33
33
  -----END CERTIFICATE-----
34
- date: 2015-04-18 00:00:00.000000000 Z
34
+ date: 2015-09-04 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: xml-registry
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  version: '0'
81
81
  requirements: []
82
82
  rubyforge_project:
83
- rubygems_version: 2.4.6
83
+ rubygems_version: 2.4.8
84
84
  signing_key:
85
85
  specification_version: 4
86
86
  summary: dws-registry
metadata.gz.sig CHANGED
Binary file