sqm2json 0.0.5 → 0.0.6
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.md +10 -0
- data/lib/sqm2json/json2sqm.rb +11 -11
- data/lib/sqm2json/version.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: b0205d1803db07b24a01d4f9f8f724558b1acd239563c37b28a03aa401a1df76
|
|
4
|
+
data.tar.gz: 6de7251a1e81056f24c6cf6208d617ff29c2c001450c5c531a5fd84aa5d2591d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1c38982487c1d5e2d92ff4f9d344ccb0b00400a5db9e5ac152fcb7dbdaf20449aae8f1e94926955d211d4b9553981d3bca7f1b704cdc914bc901e8c522b1de5e
|
|
7
|
+
data.tar.gz: 74f81499454ea81c0f75e9008b36495c49ea9f66b2e9b13f60961eb5b059a49abc505cab94a573b6b297106daff881fbdc4960f4a0eacf9b877dd333596f8599
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,16 @@
|
|
|
7
7
|
@ bug fix
|
|
8
8
|
!! security fix
|
|
9
9
|
|
|
10
|
+
## [v0.0.6] - 2025-02-27
|
|
11
|
+
~ change carriage return for SQM generation
|
|
12
|
+
|
|
13
|
+
## [v0.0.5] - 2025-01-13
|
|
14
|
+
@ Fix parsing of field containing *""* as it can happen into _init_
|
|
15
|
+
~ addition of test cases into spec
|
|
16
|
+
|
|
17
|
+
## [v0.0.4] - 2024-04-28
|
|
18
|
+
~ support SQM v54
|
|
19
|
+
|
|
10
20
|
## [v0.0.3] - 2016-08-22
|
|
11
21
|
\+ changelog
|
|
12
22
|
\+ supported SQM format versions provides *get_supported_versions* and *is_version_supported?*
|
data/lib/sqm2json/json2sqm.rb
CHANGED
|
@@ -23,20 +23,20 @@ module Sqm2Json
|
|
|
23
23
|
|
|
24
24
|
case value
|
|
25
25
|
when ::Numeric
|
|
26
|
-
content << "#{key}=#{get_numeric(value)};\
|
|
26
|
+
content << "#{key}=#{get_numeric(value)};\n"
|
|
27
27
|
when ::String
|
|
28
|
-
content << "#{key}=\"#{value}\";\
|
|
28
|
+
content << "#{key}=\"#{value}\";\n"
|
|
29
29
|
when ::Array
|
|
30
30
|
content << get_array(key, value, level)
|
|
31
31
|
when ::Hash
|
|
32
|
-
content << "class #{key}\
|
|
32
|
+
content << "class #{key}\n"
|
|
33
33
|
level.times { content << "\t" }
|
|
34
|
-
content << "{\
|
|
34
|
+
content << "{\n"
|
|
35
35
|
value.each { |k, v|
|
|
36
36
|
content << get_element(k, v, level + 1)
|
|
37
37
|
}
|
|
38
38
|
level.times { content << "\t" }
|
|
39
|
-
content << "};\
|
|
39
|
+
content << "};\n"
|
|
40
40
|
else
|
|
41
41
|
raise "Invalid JSON element type: #{value.class}"
|
|
42
42
|
end
|
|
@@ -58,18 +58,18 @@ module Sqm2Json
|
|
|
58
58
|
}
|
|
59
59
|
content.chomp!(',')
|
|
60
60
|
else
|
|
61
|
-
content << "\
|
|
61
|
+
content << "\n"
|
|
62
62
|
level.times { content << "\t" }
|
|
63
|
-
content << "{\
|
|
63
|
+
content << "{\n"
|
|
64
64
|
values.each do |v|
|
|
65
65
|
(level + 1).times {content << "\t" }
|
|
66
|
-
content << "\"#{v.to_s}\",\
|
|
66
|
+
content << "\"#{v.to_s}\",\n"
|
|
67
67
|
end
|
|
68
|
-
content.chomp!(",\
|
|
69
|
-
content << "\
|
|
68
|
+
content.chomp!(",\n")
|
|
69
|
+
content << "\n"
|
|
70
70
|
level.times { content << "\t" }
|
|
71
71
|
end
|
|
72
|
-
content << "};\
|
|
72
|
+
content << "};\n"
|
|
73
73
|
content
|
|
74
74
|
end
|
|
75
75
|
|
data/lib/sqm2json/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sqm2json
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nicolas FLINOIS
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
11
|
+
date: 2025-02-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -119,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
119
119
|
- !ruby/object:Gem::Version
|
|
120
120
|
version: '0'
|
|
121
121
|
requirements: []
|
|
122
|
-
rubygems_version: 3.
|
|
122
|
+
rubygems_version: 3.4.10
|
|
123
123
|
signing_key:
|
|
124
124
|
specification_version: 4
|
|
125
125
|
summary: This library aims at converting Arma's missions SQM format to JSON and vice-versa
|