cfa 1.0.1 → 1.0.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 +4 -4
- data/lib/cfa/augeas_parser/writer.rb +9 -1
- data/lib/cfa/base_model.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb1b7fa6df8016efdaa72096f38b083b336a02e5c66daae550c7bcb8d4f97b03
|
4
|
+
data.tar.gz: 6b962269233a54a85e20244c68e478b6972b3b63b24d3a27820a35d642c5823e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8066f5355f28a46197ebc7ddf67db6aaf3e29f834d094db92006480a233794288cf0d902cc967af2c2f02fda79bb6ff3c6c4b6ef0f8ffe0c24a27e54b5cd616f
|
7
|
+
data.tar.gz: 1f863794c77fa3a1ba6f9e90de407dd33d3b9b4ac5fa7e1af7752110358bb36aeeadc60eea9dd7998dfea94c4542f28ab305bdbe3b3f5abf83e5642fa394c02a
|
@@ -293,7 +293,15 @@ module CFA
|
|
293
293
|
# @param located_entry [LocatedEntry] entry to insert
|
294
294
|
# @return [String] where value should be written.
|
295
295
|
def insert_after(preceding, located_entry)
|
296
|
-
aug.insert(preceding.path, located_entry.key, false)
|
296
|
+
res = aug.insert(preceding.path, located_entry.key, false)
|
297
|
+
# if insert failed it means, that previous preceding entry was single
|
298
|
+
# element and now it is multiple ones, so try to first element as add
|
299
|
+
# is done in reverse order
|
300
|
+
if res == -1
|
301
|
+
# TODO: what about deep nesting of trees where upper level change
|
302
|
+
# from single to collection?
|
303
|
+
aug.insert(preceding.path + "[1]", located_entry.key, false)
|
304
|
+
end
|
297
305
|
path_after(preceding)
|
298
306
|
end
|
299
307
|
|
data/lib/cfa/base_model.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cfa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josef Reidinger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-augeas
|
@@ -61,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
61
61
|
version: 1.3.6
|
62
62
|
requirements: []
|
63
63
|
rubyforge_project:
|
64
|
-
rubygems_version: 2.7.
|
64
|
+
rubygems_version: 2.7.6.2
|
65
65
|
signing_key:
|
66
66
|
specification_version: 4
|
67
67
|
summary: CFA (Config Files API) provides an easy way to create models on top of configuration
|