state_mate 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/state_mate/adapters/json.rb +10 -3
- data/lib/state_mate/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6405979811d0c551cc74702afc8e4b32b17a7947
|
4
|
+
data.tar.gz: d5832875e024eb641f188c9d1cfc5ceb574b0261
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6d84cdcff0f671d9db98c1a2e27faf6bda37c181ca7ba3039c87196c0b38cf53daa59d9ad7b551a03d12b46f60d687614ca6b2b48036ac2776c8f76077fb6a8
|
7
|
+
data.tar.gz: e76937841bc8713c17c8390b06b35f6f2af1f62b9686499199fbb93366302530bbec05e9e73e4437404fea750c99746c35aaf3041847259d361e94736943dedf
|
@@ -36,8 +36,15 @@ module StateMate::Adapters::JSON
|
|
36
36
|
}.merge options
|
37
37
|
|
38
38
|
filepath, key_segs = parse_key key
|
39
|
+
|
40
|
+
StateMate.debug "writing json",
|
41
|
+
options: options,
|
42
|
+
filepath: filepath,
|
43
|
+
key_segs: key_segs
|
39
44
|
|
40
|
-
new_root = if key_segs.
|
45
|
+
new_root = if key_segs.empty?
|
46
|
+
value
|
47
|
+
else
|
41
48
|
root = read filepath
|
42
49
|
|
43
50
|
StateMate::Adapters::Defaults.hash_deep_write!(
|
@@ -47,9 +54,9 @@ module StateMate::Adapters::JSON
|
|
47
54
|
)
|
48
55
|
|
49
56
|
root
|
50
|
-
else
|
51
|
-
value
|
52
57
|
end
|
58
|
+
|
59
|
+
StateMate.debug new_root: new_root
|
53
60
|
|
54
61
|
content = if options['pretty']
|
55
62
|
::JSON.pretty_generate new_root
|
data/lib/state_mate/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: state_mate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nrser
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|