dws-registry 0.4.1 → 0.4.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 +5 -5
- checksums.yaml.gz.sig +0 -0
- data/lib/dws-registry.rb +11 -2
- data.tar.gz.sig +0 -0
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 67c05f606131fa4258813a46998cc9fd3a6eff0f5a66534077187f12b31962b0
|
4
|
+
data.tar.gz: e85e6c963460b0ff7af996241a24ed853063c1b1049134405fa2ea0043d47011
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe369f256932f4dbe7a6d298ec5b457c3c0a24c7ac39319bc33cd21a6363e66ca47601648bcf60c4ddbb1ad2c3d960d82c7b68dda4a335646ed554c4d52f0818
|
7
|
+
data.tar.gz: abb7ba00e216d2d904c4f395b191f1d315ba515017d77b2468bc61a2ce2c28b3d36fee601bbe484ba05861ce2438f1c38b95e652316b1621f0884512992b3d35
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/dws-registry.rb
CHANGED
@@ -11,9 +11,9 @@ require 'json'
|
|
11
11
|
class DWSRegistry < XMLRegistry
|
12
12
|
include RXFHelperModule
|
13
13
|
|
14
|
-
def initialize(filename='registry.xml', autosave: true)
|
14
|
+
def initialize(filename='registry.xml', autosave: true, debug: false)
|
15
15
|
|
16
|
-
super()
|
16
|
+
super(debug: debug)
|
17
17
|
|
18
18
|
@autosave = autosave
|
19
19
|
|
@@ -66,6 +66,12 @@ class DWSRegistry < XMLRegistry
|
|
66
66
|
|
67
67
|
def set_key(path, value)
|
68
68
|
|
69
|
+
if @debug then
|
70
|
+
puts 'inside set_key path: ' + path.inspect
|
71
|
+
puts ' value: ' + value.inspect
|
72
|
+
puts ' value.class : ' + value.class.inspect
|
73
|
+
end
|
74
|
+
|
69
75
|
value, type = case value.class.to_s.downcase.to_sym
|
70
76
|
when :string then value
|
71
77
|
when :time then ["#%s#" % value.to_s, :time]
|
@@ -75,6 +81,7 @@ class DWSRegistry < XMLRegistry
|
|
75
81
|
when :falseclass then [value.to_s, :boolean]
|
76
82
|
when :trueclass then [value.to_s, :boolean]
|
77
83
|
when :array then ["%s" % value.to_json, :json]
|
84
|
+
else value
|
78
85
|
end
|
79
86
|
|
80
87
|
e = super(path, value)
|
@@ -123,6 +130,8 @@ class DWSRegistry < XMLRegistry
|
|
123
130
|
|
124
131
|
def find_type(v)
|
125
132
|
|
133
|
+
puts 'v: ' + v.inspect if @debug
|
134
|
+
|
126
135
|
if v[/^\d+$/] and v.to_i.to_s.length == v.length then :number
|
127
136
|
elsif v[/^\d+\.\d+$/] and v.to_f.to_s.length == v.length then :number
|
128
137
|
elsif v.downcase[/^(?:true|false|on|off|yes|no)$/] then :boolean
|
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.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
2OIP5ipuioL7Hk+Qn8RSiaAEhysfSx6KXdlDxCMWh/OraisuuCve1XSh5j/lVLse
|
31
31
|
4oU=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2018-
|
33
|
+
date: 2018-10-04 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: xml-registry
|
@@ -79,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
79
79
|
version: '0'
|
80
80
|
requirements: []
|
81
81
|
rubyforge_project:
|
82
|
-
rubygems_version: 2.6
|
82
|
+
rubygems_version: 2.7.6
|
83
83
|
signing_key:
|
84
84
|
specification_version: 4
|
85
85
|
summary: An XML registry which stores the Ruby data type as well as the value
|
metadata.gz.sig
CHANGED
Binary file
|