soml 1.0.2 → 1.1.0
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 +18 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1965a7b3c8c4a9711d41c0a8057ff910b5945fb51acae996fa548ea9028dd20
|
4
|
+
data.tar.gz: 683b30223d58d09c587dad56e686d188d85fa5cf816bba043b3433ad5c741a8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 198a4c6aaa797c6563f3c0390cf03e0cbe632a6b2d1a3c2bd4ab87700d8a6777e03595cb9fb2c194febbcbd7e7fbf060ccbbc68ffa4113b17d71a640fb1a0b91
|
7
|
+
data.tar.gz: d74245532b25450bc2f7515af835ef3fbcbc3b3c7c97af5c0e1d443fd04e45fcb80a3263cf9123569241f19a5dd081db272fbf8331629740a79f019eb05c4fd1
|
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.1.0
|
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: 2024-03-24 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: []
|
@@ -51,9 +51,10 @@ files:
|
|
51
51
|
- lib/soml/version.rb
|
52
52
|
homepage: https://github.com/crdx/soml
|
53
53
|
licenses:
|
54
|
-
-
|
55
|
-
metadata:
|
56
|
-
|
54
|
+
- GPLv3
|
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.3.25
|
73
|
+
signing_key:
|
73
74
|
specification_version: 4
|
74
75
|
summary: SOML parser
|
75
76
|
test_files: []
|