yaml_tools 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tools/combine.rb +0 -54
- data/lib/tools/compare.rb +0 -4
- data/lib/tools/utility.rb +1 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d03ebf934f0bed962b211a4042b698ce44674b8785a82a8fbb2a87de49e29e7
|
4
|
+
data.tar.gz: a0fd98dc358d594229f624eba8505549344abe620f99b2aff17289e37fa7df3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b06e324d082bb922fab275f5cbc576888f975601ebe66147d47c49e56648f6db7221484eb89dc6d7d49ad04226ec3ad7b37ad9e7b216e3f28a02e99c34f8726a
|
7
|
+
data.tar.gz: 8f3b1223c70be6c69171e20169f8b8b82e7fb500f6f206b418e2467efdd89b6d02acb21649b30dc81cf72bd8af243b0e4dd545df355881786fd980572a0140fe
|
data/lib/tools/combine.rb
CHANGED
@@ -123,60 +123,6 @@ module YAMLTools
|
|
123
123
|
level
|
124
124
|
end
|
125
125
|
|
126
|
-
# def flatten_merge_keys(s)
|
127
|
-
# level = []
|
128
|
-
|
129
|
-
# sourceChildren = s.each_slice(2).to_a
|
130
|
-
|
131
|
-
# mergeKeys = sourceChildren.find_all {|i| i[0].value == "<<" }
|
132
|
-
|
133
|
-
# if (mergeKeys.length > 0) then
|
134
|
-
# if (mergeKeys.length == 1) then
|
135
|
-
# # Add merge key
|
136
|
-
# level << mergeKeys.first[0]
|
137
|
-
# level << mergeKeys.first[1]
|
138
|
-
# else
|
139
|
-
# newSequence = Psych::Nodes::Sequence.new(nil, nil, true, Psych::Nodes::Sequence::FLOW)
|
140
|
-
|
141
|
-
# mergeKeys.each {|m|
|
142
|
-
# if (m[1].is_a?(Psych::Nodes::Alias)) then
|
143
|
-
# newSequence.children << m[1]
|
144
|
-
# elsif (m[1].is_a?(Psych::Nodes::Sequence)) then
|
145
|
-
# newSequence.children.concat(m[1].children)
|
146
|
-
# end
|
147
|
-
# }
|
148
|
-
|
149
|
-
# level << Psych::Nodes::Scalar.new("<<")
|
150
|
-
# level << newSequence
|
151
|
-
# end
|
152
|
-
# end
|
153
|
-
|
154
|
-
# sourceChildren.each {|sourcePair|
|
155
|
-
# sourceKey = sourcePair[0]
|
156
|
-
# sourceValue = sourcePair[1]
|
157
|
-
|
158
|
-
# if (sourceValue.is_a?(Psych::Nodes::Mapping)) then
|
159
|
-
# childLevel = flatten_merge_keys(sourceValue.children)
|
160
|
-
|
161
|
-
# newMapping = Psych::Nodes::Mapping.new(sourceValue.anchor, sourceValue.tag, sourceValue.implicit, sourceValue.style)
|
162
|
-
|
163
|
-
# if (childLevel.length > 0) then
|
164
|
-
# newMapping.children.push(*childLevel)
|
165
|
-
# end
|
166
|
-
|
167
|
-
# level << sourceKey
|
168
|
-
# level << newMapping
|
169
|
-
# else
|
170
|
-
# if (sourceKey.value != "<<") then
|
171
|
-
# level << sourceKey
|
172
|
-
# level << sourceValue
|
173
|
-
# end
|
174
|
-
# end
|
175
|
-
# }
|
176
|
-
|
177
|
-
# level
|
178
|
-
# end
|
179
|
-
|
180
126
|
def combine_files(sourceFilePath, differenceFilePath)
|
181
127
|
sourceFile = File.open(sourceFilePath, "r")
|
182
128
|
differenceFile = File.open(differenceFilePath, "r")
|
data/lib/tools/compare.rb
CHANGED
@@ -81,11 +81,7 @@ module YAMLTools
|
|
81
81
|
level << destinationKey
|
82
82
|
level << destinationValue
|
83
83
|
end
|
84
|
-
else
|
85
|
-
# Bad data
|
86
84
|
end
|
87
|
-
else
|
88
|
-
# Bad data
|
89
85
|
end
|
90
86
|
elsif (destinationValue.is_a?(Psych::Nodes::Mapping)) then
|
91
87
|
childLevel = processLevel(sourceValue.children, destinationValue.children, includeAnchorDependencies)
|
data/lib/tools/utility.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yaml_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Atlas Systems, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02-
|
11
|
+
date: 2023-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|