sqm2json 0.0.2 → 0.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d777ca4a5b2618203709bcf6ed9fc20b55881516
4
- data.tar.gz: f8721a692c66988fcfdae9a030aa2d599f0769a8
3
+ metadata.gz: e973a062c13629e9521d626426481b667b4e6b0e
4
+ data.tar.gz: 66ac9e2c60e69dc69ca38465373dd0a265a5ae58
5
5
  SHA512:
6
- metadata.gz: 92c843eb04b36af684abf23429004249059f859097801a76eb65b38e803aa44cebdedc2b45c5151296410efadef8c6ced443e7944f83cb84aed89899af078f42
7
- data.tar.gz: 528b3a57c6a8d58920c392778d3bce7e11de7e37f6ffe5343b1c646e52e41080346b42158fbed637cd3f6ae1c8a513c53d0dfbbe3bce335742188c034a1907ab
6
+ metadata.gz: e6d6f5ac71cc9625fda4cd788e78b0955ab5c6a01f50a47506cfbb76cdad4e031241c60f7708019c994c0dbcb4efc67ee0876bbf3e16d13f0b79b4c7c76bca60
7
+ data.tar.gz: 4e4163637df825ebccac392065f2fa3b308bc4c7d5c33daf7b5a4957716318f537c23a22d4e505a12e9231bfd4995e750ff633c0e7c6ab986246e8e7bdd39145
@@ -0,0 +1,20 @@
1
+ # CHANGELOG
2
+
3
+ ## Syntax Help
4
+ \+ added feature
5
+ \- removed feature
6
+ ~ modified feature
7
+ @ bug fix
8
+ !! security fix
9
+
10
+ ## [v0.0.3] - 2016-08-22
11
+ \+ changelog
12
+ \+ supported SQM format versions provides *get_supported_versions* and *is_version_supported?*
13
+ @ fix parsing values containing backslash character
14
+
15
+ ## [0.0.2] - 2016-05-18
16
+ ~ improve README.md documentation
17
+ ~ homepage in gemspec file
18
+
19
+ ## [0.0.1] - 2016-05-18
20
+ \+ initial version
@@ -11,9 +11,8 @@ module Sqm2Json
11
11
  content.gsub!('""', '\"') # 2x" in init fields replaced by \"
12
12
 
13
13
  content.gsub!(/(?<key>[\w]+)(\[\])?=(?<val>".{0,}?([^\\]\";))/) { |m|
14
- pairs = m.split('=')
15
- puts pairs[1].gsub(/;/,'ʊ').gsub(/,/,'ʎ').chomp('ʊ').gsub('""','\"') if pairs[1].include? '""'
16
- "\"#{pairs[0]}\": #{pairs[1].gsub(/;/,'ʊ').gsub(/,/,'ʎ').chomp('ʊ').gsub('""','\"')},"
14
+ pairs = m.split('=', 2)
15
+ "\"#{pairs[0]}\": #{pairs[1].gsub(/;/,'ʊ').gsub(/,/,'ʎ').chomp('ʊ').gsub('""','\"').gsub(/\\([^"])/, '\\\\\\\\\1')},"
17
16
  }
18
17
 
19
18
  content.gsub!(/class (?<val>\w+)\s*\{/, '"\k<val>" : {')
@@ -25,6 +24,7 @@ module Sqm2Json
25
24
  content.gsub!(/ʊ/, ';') if content.include? 'ʊ'
26
25
  content.gsub!(/ʎ/, ',') if content.include? 'ʎ'
27
26
  content.gsub!(/ʉ/, '') if content.include? 'ʉ'
27
+ content.gsub!(/ɣ/, '\'') if content.include? 'ɣ'
28
28
  content = "{#{content.chomp('"').chomp(',')}}"
29
29
 
30
30
  ::JSON.parse(content, symbolize_names: true)
@@ -1,3 +1,12 @@
1
1
  module Sqm2Json
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
+
4
+ def self.get_supported_versions
5
+ [12,51,52]
6
+ end
7
+
8
+ def self.is_version_supported?(version)
9
+ get_supported_versions.include?(version)
10
+ end
11
+
3
12
  end
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.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas FLINOIS
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-08 00:00:00.000000000 Z
11
+ date: 2016-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -76,6 +76,7 @@ extensions: []
76
76
  extra_rdoc_files: []
77
77
  files:
78
78
  - ".gitignore"
79
+ - CHANGELOG.md
79
80
  - Gemfile
80
81
  - LICENSE.md
81
82
  - README.md