soml 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/soml/document.rb +1 -0
- data/lib/soml/field.rb +4 -3
- data/lib/soml/util.rb +2 -1
- data/lib/soml/version.rb +1 -1
- data/lib/soml.rb +1 -1
- metadata +17 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98d491c622a6864b981552e57beb102c94d6afb41dd26e19e538f02f7dcfbc16
|
4
|
+
data.tar.gz: c24c90c9b6993c594e387f77d8d850a57134c499debb7788f5130aae66d237ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 227082a4f691374be1684fe0c73ec13c74529f82914b0e8333a3ec442ee672d8b96924b5466c97a6e14315f2c665c36b9c626abdfe7159101f86926c357d72a2
|
7
|
+
data.tar.gz: c996cbc0e1b7e8538b2ab2b531827a6447e0e150c3ad407dc4ac966e2aa422916de43ca5e85e55f267e1c689d63798b3ff5acba293faa1bf2fd78bdab98ccc93
|
data/lib/soml/document.rb
CHANGED
data/lib/soml/field.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
module SOML
|
2
2
|
class Field
|
3
|
-
attr_reader :name
|
3
|
+
attr_reader :name
|
4
|
+
attr_reader :value
|
4
5
|
|
5
6
|
def initialize(name, value)
|
6
7
|
@name = name
|
@@ -8,7 +9,7 @@ module SOML
|
|
8
9
|
end
|
9
10
|
|
10
11
|
def to_s
|
11
|
-
if
|
12
|
+
if multi_line?
|
12
13
|
to_multi_line
|
13
14
|
else
|
14
15
|
to_single_line
|
@@ -17,7 +18,7 @@ module SOML
|
|
17
18
|
|
18
19
|
private
|
19
20
|
|
20
|
-
def
|
21
|
+
def multi_line?
|
21
22
|
@value.to_s.include?("\n")
|
22
23
|
end
|
23
24
|
|
data/lib/soml/util.rb
CHANGED
@@ -3,7 +3,8 @@ module SOML
|
|
3
3
|
def self.dedent(str)
|
4
4
|
indentation_level = str.lines.map { |line| line[/^\s*/].length }.min
|
5
5
|
return str if indentation_level == 0
|
6
|
-
|
6
|
+
|
7
|
+
return str.lines.map { |line| line[indentation_level..] }.join
|
7
8
|
end
|
8
9
|
|
9
10
|
def self.indent(str, level: 4)
|
data/lib/soml/version.rb
CHANGED
data/lib/soml.rb
CHANGED
metadata
CHANGED
@@ -1,45 +1,45 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- crdx
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: rake
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '3
|
19
|
+
version: '12.3'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '3
|
26
|
+
version: '12.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '3.8'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
41
|
-
description:
|
42
|
-
email:
|
40
|
+
version: '3.8'
|
41
|
+
description:
|
42
|
+
email:
|
43
43
|
executables: []
|
44
44
|
extensions: []
|
45
45
|
extra_rdoc_files: []
|
@@ -52,8 +52,9 @@ files:
|
|
52
52
|
homepage: https://github.com/crdx/soml
|
53
53
|
licenses:
|
54
54
|
- MIT
|
55
|
-
metadata:
|
56
|
-
|
55
|
+
metadata:
|
56
|
+
rubygems_mfa_required: 'true'
|
57
|
+
post_install_message:
|
57
58
|
rdoc_options: []
|
58
59
|
require_paths:
|
59
60
|
- lib
|
@@ -61,15 +62,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
61
62
|
requirements:
|
62
63
|
- - ">="
|
63
64
|
- !ruby/object:Gem::Version
|
64
|
-
version: '0'
|
65
|
+
version: '3.0'
|
65
66
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
66
67
|
requirements:
|
67
68
|
- - ">="
|
68
69
|
- !ruby/object:Gem::Version
|
69
70
|
version: '0'
|
70
71
|
requirements: []
|
71
|
-
rubygems_version: 3.
|
72
|
-
signing_key:
|
72
|
+
rubygems_version: 3.2.29
|
73
|
+
signing_key:
|
73
74
|
specification_version: 4
|
74
75
|
summary: SOML parser
|
75
76
|
test_files: []
|