metanorma-utils 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/utils/main.rb +1 -1
- data/lib/utils/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8ae87e8a2582071abee8bdf9dcedc29748752e841d8223d3ccea204fc6446c3
|
4
|
+
data.tar.gz: 6e49a57e3062b5ce3860de9ee92eab343f5c9bc8044687ae4ff13e38a3c79546
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1659ee28aa09a7de7260f87676e5b6b07ae0efe9af2fdd48a2d15a980e80ade14d48a5f728112c41bf44c06da186b7a2991e966c75a06c8a507faf2f7bcc3e3
|
7
|
+
data.tar.gz: 40eb1d98da67ea6f743e9f57cc11dcd0ec5493947cc57078466be59d336fedf164b57bb3aa78b2bce3ab0acf674221e3dc40573972ec21b9a33f33332cb4eeb7
|
data/lib/utils/main.rb
CHANGED
@@ -60,8 +60,8 @@ module Metanorma
|
|
60
60
|
hash[key].nil? ? new_val : [hash[key], new_val]
|
61
61
|
else
|
62
62
|
if hash[key].is_a?(Array)
|
63
|
+
hash[key][-1] = {} if !hash[key].empty? && hash[key][-1].nil?
|
63
64
|
hash[key] << {} if hash[key].empty? || !hash[key][-1].is_a?(Hash)
|
64
|
-
hash[key][-1] = {} if hash[key][-1].nil?
|
65
65
|
set_nested_value(hash[key][-1], keys[1..-1], new_val)
|
66
66
|
elsif hash[key].nil? || hash[key].empty?
|
67
67
|
hash[key] = {}
|
data/lib/utils/version.rb
CHANGED