soaspec 0.0.13 → 0.0.14
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/ChangeLog +5 -0
- data/Gemfile.lock +1 -1
- data/exe/xml_to_yaml_file +9 -1
- data/lib/soaspec/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6202f11ed3bac43b110dbf5069cad49325550bf6
|
4
|
+
data.tar.gz: 417b06d2b9ae9ac557e0e0b3e225bb7113aa3816
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 630bdfc3d10e149b8923b22263614004896dab904b10cf12cef923cc2d717ade508fea859d8775b0c4e40dd7c138e0565b552197f3329ca2e49347ee3e0dc4e2
|
7
|
+
data.tar.gz: 7bcccfe2739045f4cfcaccb021786299be0c780b59f36e5d6ad09a47d5503c0a692c285feb6badb974216ef017717ced9e8ce31a74d54544492ceea9148f0a89
|
data/ChangeLog
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
Version 0.0.14 / 2018-1-23
|
2
|
+
* Fixes
|
3
|
+
* Updated 'xml_to_yaml_file' exe to clean up YAML more. No more array for Hash value. Indenting needs work though.
|
4
|
+
Now it's more like something you can read and pass into Savon request.
|
5
|
+
|
1
6
|
Version 0.0.13 / 2018-1-23
|
2
7
|
* Enhancements
|
3
8
|
* Executable to create xml file from yaml
|
data/Gemfile.lock
CHANGED
data/exe/xml_to_yaml_file
CHANGED
@@ -46,11 +46,19 @@ def convert_hash_keys(value)
|
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
49
|
+
# Remove arrays created as another string
|
50
|
+
def clean_up_yaml(yaml_string)
|
51
|
+
yaml_string = yaml_string.gsub(/\R+(\s*)-/, '').gsub(/{}/, "''") # Remove arrays, {} -> ''
|
52
|
+
# Insert new line where there are 2 ':' on 1 line. Issue from first gsub
|
53
|
+
yaml_string.gsub(/:(\s)(\w*):/){|s| s.insert(1, "\n")}
|
54
|
+
end
|
55
|
+
|
49
56
|
if ARGV[0]
|
50
57
|
warn "Using '#{default_output_file}' as default output file since no 2nd argument passed" unless ARGV[1]
|
51
58
|
hash = XmlSimple.xml_in(ARGV[0])
|
52
59
|
converted = convert_hash_keys hash
|
53
|
-
|
60
|
+
yaml_file = clean_up_yaml(converted.to_yaml)
|
61
|
+
create_file(filename: ARGV[1] || default_output_file, content: yaml_file)
|
54
62
|
else
|
55
63
|
puts 'usage: xml_to_yaml_file [input.xml] [output.yml] '
|
56
64
|
end
|
data/lib/soaspec/version.rb
CHANGED