anvl-converter 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c26551769c00964196526b98ada691d927ee2d0c6192be03aeec98d17e8c378a
4
- data.tar.gz: f0f67ed7298bade6b1eb110f92fb00fd97875b4df85e1f67c1c1f7b3d8fa2eef
3
+ metadata.gz: 06316816ead742016732201a76359c14f6f13aa2d723f3c6dd088c54c8f3f4bd
4
+ data.tar.gz: 9ec722672687c3e08dfdf5195a6e97d2399ad585853ba043a70557144f8cb86b
5
5
  SHA512:
6
- metadata.gz: 77353bd1b40500a9da3c5ed7a1e9d200b65facc11931e38af2f949ce8d3c0c37210d9303a398faac046bcf1af79fe4f43b1748b452f0491bd877e07914c31c49
7
- data.tar.gz: 12b48541b577556f8f975d43416842d931e8cd2038572d02a3b0b8cdf1a901562ec098f13b704dfc617180633cc089eda8d1b9a4146767bdf448a2adf0f01a3e
6
+ metadata.gz: 0b3e7f487e472d9debb998666680eda53656f7bd2ecbc39997e640c4542d8d5382b79cffa4794ead1d39448e24b8447ac9621e63cca50c3f2bd0199b25b81dcf
7
+ data.tar.gz: 27e0055083e405dc21a518dec1769bb7991b2cc0bcbb5b85f97596ff95af6113f01536121e47c02af76dfdead49f1d3ebc28ae6a27273cf90b27c6b6e956de1f
@@ -1,15 +1,15 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- anvl-converter (0.2.1)
4
+ anvl-converter (0.2.2)
5
5
  activesupport (>= 4.2.5, < 6)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activesupport (5.1.4)
10
+ activesupport (5.2.0)
11
11
  concurrent-ruby (~> 1.0, >= 1.0.2)
12
- i18n (~> 0.7)
12
+ i18n (>= 0.7, < 2)
13
13
  minitest (~> 5.1)
14
14
  tzinfo (~> 1.1)
15
15
  codeclimate-test-reporter (1.0.8)
@@ -17,7 +17,7 @@ GEM
17
17
  concurrent-ruby (1.0.5)
18
18
  diff-lcs (1.3)
19
19
  docile (1.1.5)
20
- i18n (0.9.3)
20
+ i18n (1.0.1)
21
21
  concurrent-ruby (~> 1.0)
22
22
  json (2.1.0)
23
23
  minitest (5.11.3)
@@ -41,7 +41,7 @@ GEM
41
41
  simplecov-html (~> 0.10.0)
42
42
  simplecov-html (0.10.2)
43
43
  thread_safe (0.3.6)
44
- tzinfo (1.2.4)
44
+ tzinfo (1.2.5)
45
45
  thread_safe (~> 0.1)
46
46
 
47
47
  PLATFORMS
@@ -56,4 +56,4 @@ DEPENDENCIES
56
56
  simplecov
57
57
 
58
58
  BUNDLED WITH
59
- 1.16.0
59
+ 1.16.1
@@ -5,7 +5,7 @@ class String
5
5
  # ignore
6
6
  elsif line.include?(":")
7
7
  k, v = line.split(":", 2)
8
- sum[k.to_s.strip.anvlunesc] = v.to_s.strip.anvlunesc
8
+ sum[k.to_s.strip.anvlunesc] = v.to_s.strip.sub(/\A['"](.*)['"]\z/, '\\1').anvlunesc
9
9
  elsif line.strip.present? && line.start_with?(" ")
10
10
  sum[sum.keys.last] += " " + line.strip
11
11
  end
@@ -1,3 +1,3 @@
1
1
  module Anvl
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
@@ -7,6 +7,16 @@ describe String do
7
7
  expect(str.from_anvl).to eq("_status"=>"public")
8
8
  end
9
9
 
10
+ it "single quotes" do
11
+ str = "_status: 'public'"
12
+ expect(str.from_anvl).to eq("_status"=>"public")
13
+ end
14
+
15
+ it "double quotes" do
16
+ str = "_status: \"public\""
17
+ expect(str.from_anvl).to eq("_status"=>"public")
18
+ end
19
+
10
20
  it "escaped newlines" do
11
21
  str = "name: Josiah%0ACarberry"
12
22
  expect(str.from_anvl).to eq("name"=>"Josiah\nCarberry")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anvl-converter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-04 00:00:00.000000000 Z
11
+ date: 2018-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  version: '0'
150
150
  requirements: []
151
151
  rubyforge_project:
152
- rubygems_version: 2.7.4
152
+ rubygems_version: 2.7.7
153
153
  signing_key:
154
154
  specification_version: 4
155
155
  summary: Ruby library to parse and generate ANVL