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 +4 -4
- data/Gemfile.lock +6 -6
- data/lib/anvl/core_ext/ruby/string.rb +1 -1
- data/lib/anvl/version.rb +1 -1
- data/spec/string_spec.rb +10 -0
- 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: 06316816ead742016732201a76359c14f6f13aa2d723f3c6dd088c54c8f3f4bd
|
4
|
+
data.tar.gz: 9ec722672687c3e08dfdf5195a6e97d2399ad585853ba043a70557144f8cb86b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b3e7f487e472d9debb998666680eda53656f7bd2ecbc39997e640c4542d8d5382b79cffa4794ead1d39448e24b8447ac9621e63cca50c3f2bd0199b25b81dcf
|
7
|
+
data.tar.gz: 27e0055083e405dc21a518dec1769bb7991b2cc0bcbb5b85f97596ff95af6113f01536121e47c02af76dfdead49f1d3ebc28ae6a27273cf90b27c6b6e956de1f
|
data/Gemfile.lock
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
anvl-converter (0.2.
|
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.
|
10
|
+
activesupport (5.2.0)
|
11
11
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
12
|
-
i18n (
|
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.
|
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.
|
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.
|
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
|
data/lib/anvl/version.rb
CHANGED
data/spec/string_spec.rb
CHANGED
@@ -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.
|
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-
|
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.
|
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
|