language-ruby 1.1.2 → 1.2.0
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 +4 -4
- data/.github/dependabot.yml +13 -13
- data/.github/workflows/ci.yml +25 -24
- data/.node-version +1 -1
- data/.npm-version +1 -0
- data/.rubocop.yml +16 -12
- data/.ruby-version +1 -1
- data/.tool-versions +2 -2
- data/Gemfile +4 -6
- data/Gemfile.lock +138 -49
- data/VERSION +1 -1
- data/bin/dorian +31 -0
- data/language-ruby.gemspec +1 -1
- data/lib/language/atom/and.rb +1 -1
- data/lib/language/atom/present.rb +27 -0
- data/lib/language/atom.rb +4 -0
- data/lib/language.rb +4 -0
- data/package-lock.json +3 -3
- data/package.json +3 -3
- data/spec/language_spec.rb +19 -0
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a115d1bc42494deae4dfa239e73ef2a87ea724356530aebf399b972011dd361
|
4
|
+
data.tar.gz: b49baefcdb25d34096dac0eeeb3d68f0868ceb80173cc287cab50c6661863d01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fea53944f04ee2a2a70fd19d1aa78ea074f91deda0473daf11ba452e50c28b50587178e808981362eb742b43249a4a435bc891c095c07455b13fd19c83125cdf
|
7
|
+
data.tar.gz: 9b20a292749126ba40fcfe1ae8dd9a7524636dbf81da1fa09d19a8ed0761d53a89bd657d3a64fce0618c4b29dcef15936e015dbc4406ee01d9564d4102ed303e
|
data/.github/dependabot.yml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
|
-
version: 2
|
3
2
|
updates:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
3
|
+
- directory: "/"
|
4
|
+
package-ecosystem: github-actions
|
5
|
+
schedule:
|
6
|
+
interval: daily
|
7
|
+
- directory: "/"
|
8
|
+
package-ecosystem: npm
|
9
|
+
schedule:
|
10
|
+
interval: daily
|
11
|
+
- directory: "/"
|
12
|
+
package-ecosystem: bundler
|
13
|
+
schedule:
|
14
|
+
interval: daily
|
15
|
+
version: 2
|
data/.github/workflows/ci.yml
CHANGED
@@ -1,37 +1,38 @@
|
|
1
|
-
|
2
|
-
on: push
|
1
|
+
---
|
3
2
|
jobs:
|
4
3
|
bundler-audit:
|
5
4
|
name: Bundler Audit
|
6
5
|
runs-on: ubuntu-latest
|
7
6
|
steps:
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
7
|
+
- uses: actions/checkout@v4
|
8
|
+
- uses: ruby/setup-ruby@v1
|
9
|
+
with:
|
10
|
+
bundler-cache: true
|
11
|
+
- run: bin/bundler-audit check --update
|
12
|
+
npm-audit:
|
13
|
+
name: npm Audit
|
14
|
+
runs-on: ubuntu-latest
|
15
|
+
steps:
|
16
|
+
- uses: actions/checkout@v4
|
17
|
+
- uses: actions/setup-node@v4
|
18
|
+
- run: npm audit
|
13
19
|
rspec:
|
14
20
|
name: Test
|
15
21
|
runs-on: ubuntu-latest
|
16
22
|
steps:
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
23
|
+
- uses: actions/checkout@v4
|
24
|
+
- uses: ruby/setup-ruby@v1
|
25
|
+
with:
|
26
|
+
bundler-cache: true
|
27
|
+
- run: bin/test
|
22
28
|
rubocop:
|
23
29
|
name: Rubocop
|
24
30
|
runs-on: ubuntu-latest
|
25
31
|
steps:
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
runs-on: ubuntu-latest
|
34
|
-
steps:
|
35
|
-
- uses: actions/checkout@v4
|
36
|
-
- uses: actions/setup-node@v4
|
37
|
-
- run: npm audit
|
32
|
+
- uses: actions/checkout@v4
|
33
|
+
- uses: ruby/setup-ruby@v1
|
34
|
+
with:
|
35
|
+
bundler-cache: true
|
36
|
+
- run: bin/rubocop
|
37
|
+
name: CI
|
38
|
+
'on': push
|
data/.node-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
23.11.0
|
data/.npm-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
11.2.0
|
data/.rubocop.yml
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
---
|
2
2
|
AllCops:
|
3
3
|
Exclude:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
- vendor/**/*
|
4
|
+
- "**/node_modules/**/*"
|
5
|
+
- "**/vendor/**/*"
|
6
|
+
- "**/db/schema.rb"
|
8
7
|
NewCops: enable
|
8
|
+
TargetRubyVersion: 3.0
|
9
9
|
Layout/ClosingHeredocIndentation:
|
10
10
|
Enabled: false
|
11
11
|
Layout/FirstArgumentIndentation:
|
@@ -22,6 +22,8 @@ Layout/MultilineMethodCallIndentation:
|
|
22
22
|
Enabled: false
|
23
23
|
Layout/MultilineOperationIndentation:
|
24
24
|
Enabled: false
|
25
|
+
Layout/SpaceInsideHashLiteralBraces:
|
26
|
+
Enabled: false
|
25
27
|
Lint/EmptyClass:
|
26
28
|
Enabled: false
|
27
29
|
Lint/MissingSuper:
|
@@ -58,6 +60,8 @@ Naming/MethodParameterName:
|
|
58
60
|
Enabled: false
|
59
61
|
Naming/VariableNumber:
|
60
62
|
Enabled: false
|
63
|
+
Performance/Sum:
|
64
|
+
Enabled: false
|
61
65
|
Performance/UnfreezeString:
|
62
66
|
Enabled: false
|
63
67
|
RSpec/AnyInstance:
|
@@ -116,11 +120,11 @@ Style/StringLiterals:
|
|
116
120
|
Enabled: false
|
117
121
|
Style/StringLiteralsInInterpolation:
|
118
122
|
Enabled: false
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
123
|
+
plugins:
|
124
|
+
- rubocop-factory_bot
|
125
|
+
- rubocop-performance
|
126
|
+
- rubocop-rails
|
127
|
+
- rubocop-rake
|
128
|
+
- rubocop-rspec
|
129
|
+
- rubocop-capybara
|
130
|
+
- rubocop-rspec_rails
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.4.2
|
data/.tool-versions
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
ruby 3.
|
1
|
+
ruby 3.4.2
|
2
2
|
yarn 1.22.22
|
3
|
-
nodejs
|
3
|
+
nodejs 23.11.0
|
data/Gemfile
CHANGED
@@ -4,17 +4,15 @@ source "https://rubygems.org"
|
|
4
4
|
|
5
5
|
gemspec
|
6
6
|
|
7
|
-
ruby "3.
|
8
|
-
|
9
|
-
gem "rspec"
|
7
|
+
ruby "3.4.2"
|
10
8
|
|
11
9
|
gem "bundler-audit"
|
12
|
-
|
10
|
+
gem "dorian"
|
11
|
+
gem "rspec"
|
12
|
+
gem "rubocop-capybara"
|
13
13
|
gem "rubocop-factory_bot"
|
14
14
|
gem "rubocop-performance"
|
15
15
|
gem "rubocop-rails"
|
16
16
|
gem "rubocop-rake"
|
17
17
|
gem "rubocop-rspec"
|
18
18
|
gem "rubocop-rspec_rails"
|
19
|
-
|
20
|
-
gem "rubocop-capybara"
|
data/Gemfile.lock
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
language-ruby (1.
|
4
|
+
language-ruby (1.2.0)
|
5
5
|
dorian-arguments
|
6
6
|
zeitwerk
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activesupport (
|
11
|
+
activesupport (8.0.2)
|
12
12
|
base64
|
13
|
+
benchmark (>= 0.3)
|
13
14
|
bigdecimal
|
14
15
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
15
16
|
connection_pool (>= 2.2.5)
|
@@ -19,91 +20,179 @@ GEM
|
|
19
20
|
minitest (>= 5.1)
|
20
21
|
securerandom (>= 0.3)
|
21
22
|
tzinfo (~> 2.0, >= 2.0.5)
|
22
|
-
|
23
|
+
uri (>= 0.13.1)
|
24
|
+
addressable (2.8.7)
|
25
|
+
public_suffix (>= 2.0.2, < 7.0)
|
26
|
+
ast (2.4.3)
|
23
27
|
base64 (0.2.0)
|
24
|
-
|
28
|
+
benchmark (0.4.0)
|
29
|
+
bigdecimal (3.1.9)
|
25
30
|
bundler-audit (0.9.2)
|
26
31
|
bundler (>= 1.2.0, < 3)
|
27
32
|
thor (~> 1.0)
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
33
|
+
cmdparse (3.0.7)
|
34
|
+
concurrent-ruby (1.3.5)
|
35
|
+
connection_pool (2.5.0)
|
36
|
+
csv (3.3.3)
|
37
|
+
diff-lcs (1.6.1)
|
38
|
+
dorian (2.6.3)
|
39
|
+
csv
|
40
|
+
dorian-arguments
|
41
|
+
dorian-eval
|
42
|
+
dorian-progress
|
43
|
+
dorian-to_struct
|
44
|
+
git
|
45
|
+
hexapdf
|
46
|
+
json
|
47
|
+
mini_racer
|
48
|
+
ostruct
|
49
|
+
parallel
|
50
|
+
syntax_tree
|
51
|
+
syntax_tree-haml
|
52
|
+
syntax_tree-xml
|
53
|
+
terminal-table
|
54
|
+
w_syntax_tree-erb
|
55
|
+
yaml
|
56
|
+
dorian-arguments (1.2.2)
|
32
57
|
bigdecimal
|
58
|
+
dorian-eval (1.5.0)
|
59
|
+
yaml
|
60
|
+
dorian-progress (1.1.2)
|
61
|
+
ruby-progressbar
|
62
|
+
dorian-to_struct (2.0.2)
|
33
63
|
drb (2.2.1)
|
34
|
-
|
64
|
+
geom2d (0.4.1)
|
65
|
+
git (3.0.0)
|
66
|
+
activesupport (>= 5.0)
|
67
|
+
addressable (~> 2.8)
|
68
|
+
process_executer (~> 1.3)
|
69
|
+
rchardet (~> 1.9)
|
70
|
+
haml (6.3.0)
|
71
|
+
temple (>= 0.8.2)
|
72
|
+
thor
|
73
|
+
tilt
|
74
|
+
hexapdf (1.2.0)
|
75
|
+
cmdparse (~> 3.0, >= 3.0.3)
|
76
|
+
geom2d (~> 0.4, >= 0.4.1)
|
77
|
+
openssl (>= 2.2.1)
|
78
|
+
strscan (>= 3.1.2)
|
79
|
+
i18n (1.14.7)
|
35
80
|
concurrent-ruby (~> 1.0)
|
36
|
-
json (2.
|
37
|
-
language_server-protocol (3.17.0.
|
38
|
-
|
39
|
-
|
81
|
+
json (2.10.2)
|
82
|
+
language_server-protocol (3.17.0.4)
|
83
|
+
libv8-node (23.6.1.0-arm64-darwin)
|
84
|
+
libv8-node (23.6.1.0-x86_64-linux)
|
85
|
+
lint_roller (1.1.0)
|
86
|
+
logger (1.7.0)
|
87
|
+
mini_racer (0.18.1)
|
88
|
+
libv8-node (~> 23.6.1.0)
|
89
|
+
minitest (5.25.5)
|
90
|
+
openssl (3.3.0)
|
91
|
+
ostruct (0.6.1)
|
40
92
|
parallel (1.26.3)
|
41
|
-
parser (3.3.
|
93
|
+
parser (3.3.7.4)
|
42
94
|
ast (~> 2.4.1)
|
43
95
|
racc
|
96
|
+
prettier_print (1.2.1)
|
97
|
+
prism (1.4.0)
|
98
|
+
process_executer (1.3.0)
|
99
|
+
public_suffix (6.0.1)
|
44
100
|
racc (1.8.1)
|
45
|
-
rack (3.1.
|
101
|
+
rack (3.1.12)
|
46
102
|
rainbow (3.1.1)
|
47
|
-
|
103
|
+
rchardet (1.9.0)
|
104
|
+
regexp_parser (2.10.0)
|
48
105
|
rspec (3.13.0)
|
49
106
|
rspec-core (~> 3.13.0)
|
50
107
|
rspec-expectations (~> 3.13.0)
|
51
108
|
rspec-mocks (~> 3.13.0)
|
52
|
-
rspec-core (3.13.
|
109
|
+
rspec-core (3.13.3)
|
53
110
|
rspec-support (~> 3.13.0)
|
54
|
-
rspec-expectations (3.13.
|
111
|
+
rspec-expectations (3.13.3)
|
55
112
|
diff-lcs (>= 1.2.0, < 2.0)
|
56
113
|
rspec-support (~> 3.13.0)
|
57
|
-
rspec-mocks (3.13.
|
114
|
+
rspec-mocks (3.13.2)
|
58
115
|
diff-lcs (>= 1.2.0, < 2.0)
|
59
116
|
rspec-support (~> 3.13.0)
|
60
|
-
rspec-support (3.13.
|
61
|
-
rubocop (1.
|
117
|
+
rspec-support (3.13.2)
|
118
|
+
rubocop (1.75.2)
|
62
119
|
json (~> 2.3)
|
63
|
-
language_server-protocol (
|
120
|
+
language_server-protocol (~> 3.17.0.2)
|
121
|
+
lint_roller (~> 1.1.0)
|
64
122
|
parallel (~> 1.10)
|
65
123
|
parser (>= 3.3.0.2)
|
66
124
|
rainbow (>= 2.2.2, < 4.0)
|
67
|
-
regexp_parser (>= 2.
|
68
|
-
rubocop-ast (>= 1.
|
125
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
126
|
+
rubocop-ast (>= 1.44.0, < 2.0)
|
69
127
|
ruby-progressbar (~> 1.7)
|
70
|
-
unicode-display_width (>= 2.4.0, <
|
71
|
-
rubocop-ast (1.
|
72
|
-
parser (>= 3.3.
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
rubocop (~> 1.
|
77
|
-
rubocop-
|
78
|
-
|
79
|
-
rubocop
|
80
|
-
rubocop-
|
128
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
129
|
+
rubocop-ast (1.44.0)
|
130
|
+
parser (>= 3.3.7.2)
|
131
|
+
prism (~> 1.4)
|
132
|
+
rubocop-capybara (2.22.1)
|
133
|
+
lint_roller (~> 1.1)
|
134
|
+
rubocop (~> 1.72, >= 1.72.1)
|
135
|
+
rubocop-factory_bot (2.27.1)
|
136
|
+
lint_roller (~> 1.1)
|
137
|
+
rubocop (~> 1.72, >= 1.72.1)
|
138
|
+
rubocop-performance (1.25.0)
|
139
|
+
lint_roller (~> 1.1)
|
140
|
+
rubocop (>= 1.75.0, < 2.0)
|
141
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
142
|
+
rubocop-rails (2.31.0)
|
81
143
|
activesupport (>= 4.2.0)
|
144
|
+
lint_roller (~> 1.1)
|
82
145
|
rack (>= 1.1)
|
83
|
-
rubocop (>= 1.
|
84
|
-
rubocop-ast (>= 1.
|
85
|
-
rubocop-rake (0.
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
rubocop (~> 1.
|
91
|
-
|
146
|
+
rubocop (>= 1.75.0, < 2.0)
|
147
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
148
|
+
rubocop-rake (0.7.1)
|
149
|
+
lint_roller (~> 1.1)
|
150
|
+
rubocop (>= 1.72.1)
|
151
|
+
rubocop-rspec (3.5.0)
|
152
|
+
lint_roller (~> 1.1)
|
153
|
+
rubocop (~> 1.72, >= 1.72.1)
|
154
|
+
rubocop-rspec_rails (2.31.0)
|
155
|
+
lint_roller (~> 1.1)
|
156
|
+
rubocop (~> 1.72, >= 1.72.1)
|
157
|
+
rubocop-rspec (~> 3.5)
|
92
158
|
ruby-progressbar (1.13.0)
|
93
|
-
securerandom (0.
|
159
|
+
securerandom (0.4.1)
|
160
|
+
strscan (3.1.2)
|
161
|
+
syntax_tree (6.2.0)
|
162
|
+
prettier_print (>= 1.2.0)
|
163
|
+
syntax_tree-haml (4.0.3)
|
164
|
+
haml (>= 5.2)
|
165
|
+
prettier_print (>= 1.2.1)
|
166
|
+
syntax_tree (>= 6.0.0)
|
167
|
+
syntax_tree-xml (0.1.0)
|
168
|
+
prettier_print
|
169
|
+
syntax_tree (>= 2.0.1)
|
170
|
+
temple (0.10.3)
|
171
|
+
terminal-table (4.0.0)
|
172
|
+
unicode-display_width (>= 1.1.1, < 4)
|
94
173
|
thor (1.3.2)
|
174
|
+
tilt (2.6.0)
|
95
175
|
tzinfo (2.0.6)
|
96
176
|
concurrent-ruby (~> 1.0)
|
97
|
-
unicode-display_width (
|
98
|
-
|
177
|
+
unicode-display_width (3.1.4)
|
178
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
179
|
+
unicode-emoji (4.0.4)
|
180
|
+
uri (1.0.3)
|
181
|
+
w_syntax_tree-erb (0.12.0)
|
182
|
+
prettier_print (~> 1.2, >= 1.2.0)
|
183
|
+
syntax_tree (~> 6.1, >= 6.1.1)
|
184
|
+
yaml (0.4.0)
|
185
|
+
zeitwerk (2.7.2)
|
99
186
|
|
100
187
|
PLATFORMS
|
101
188
|
arm64-darwin-22
|
102
189
|
arm64-darwin-23
|
190
|
+
arm64-darwin-24
|
103
191
|
x86_64-linux
|
104
192
|
|
105
193
|
DEPENDENCIES
|
106
194
|
bundler-audit
|
195
|
+
dorian
|
107
196
|
language-ruby!
|
108
197
|
rspec
|
109
198
|
rubocop-capybara
|
@@ -115,7 +204,7 @@ DEPENDENCIES
|
|
115
204
|
rubocop-rspec_rails
|
116
205
|
|
117
206
|
RUBY VERSION
|
118
|
-
ruby 3.
|
207
|
+
ruby 3.4.2p28
|
119
208
|
|
120
209
|
BUNDLED WITH
|
121
|
-
2.
|
210
|
+
2.6.7
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.2.0
|
data/bin/dorian
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'dorian' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
12
|
+
|
13
|
+
bundle_binstub = File.expand_path("bundle", __dir__)
|
14
|
+
|
15
|
+
if File.file?(bundle_binstub)
|
16
|
+
if File.read(bundle_binstub, 300).include?(
|
17
|
+
"This file was generated by Bundler"
|
18
|
+
)
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort(
|
22
|
+
"Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
23
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again."
|
24
|
+
)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
require "rubygems"
|
29
|
+
require "bundler/setup"
|
30
|
+
|
31
|
+
load Gem.bin_path("dorian", "dorian")
|
data/language-ruby.gemspec
CHANGED
data/lib/language/atom/and.rb
CHANGED
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class Language
|
4
|
+
class Atom
|
5
|
+
class Present < Atom
|
6
|
+
def initialize(parent: nil)
|
7
|
+
@parent = parent
|
8
|
+
end
|
9
|
+
|
10
|
+
def parse(parser)
|
11
|
+
clone =
|
12
|
+
Parser.new(
|
13
|
+
root: self,
|
14
|
+
input: parser.input,
|
15
|
+
cursor: parser.cursor,
|
16
|
+
buffer: parser.buffer
|
17
|
+
)
|
18
|
+
|
19
|
+
@parent&.parse(clone)
|
20
|
+
end
|
21
|
+
|
22
|
+
def to_s
|
23
|
+
@parent ? "(#{@parent}).present" : "present"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/lib/language/atom.rb
CHANGED
data/lib/language.rb
CHANGED
data/package-lock.json
CHANGED
data/package.json
CHANGED
data/spec/language_spec.rb
CHANGED
@@ -32,6 +32,13 @@ class Code
|
|
32
32
|
.then { |output| output[:something].upcase }
|
33
33
|
end
|
34
34
|
end
|
35
|
+
|
36
|
+
class BooleanPresent < Language
|
37
|
+
def root
|
38
|
+
str("t").aka(:boolean) << str(" ").present << str(" ") << str("rest").aka(:string) |
|
39
|
+
str("trest").aka(:string)
|
40
|
+
end
|
41
|
+
end
|
35
42
|
end
|
36
43
|
end
|
37
44
|
|
@@ -55,4 +62,16 @@ RSpec.describe Language do
|
|
55
62
|
it "works with then with output" do
|
56
63
|
expect(Code::Parser::ThenWithOutput.parse("value")).to eq("VALUE")
|
57
64
|
end
|
65
|
+
|
66
|
+
it "works with present (string)" do
|
67
|
+
expect(Code::Parser::BooleanPresent.parse("trest")).to eq(
|
68
|
+
{ string: "trest" }
|
69
|
+
)
|
70
|
+
end
|
71
|
+
|
72
|
+
it "works with present (boolean and string)" do
|
73
|
+
expect(Code::Parser::BooleanPresent.parse("t rest")).to eq(
|
74
|
+
{ boolean: "t", string: "rest" }
|
75
|
+
)
|
76
|
+
end
|
58
77
|
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: language-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dorian Marié
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-04-21 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: dorian-arguments
|
@@ -49,6 +48,7 @@ files:
|
|
49
48
|
- ".github/workflows/ci.yml"
|
50
49
|
- ".gitignore"
|
51
50
|
- ".node-version"
|
51
|
+
- ".npm-version"
|
52
52
|
- ".prettierignore"
|
53
53
|
- ".rspec"
|
54
54
|
- ".rubocop.yml"
|
@@ -62,6 +62,7 @@ files:
|
|
62
62
|
- bin/bundle
|
63
63
|
- bin/bundle-audit
|
64
64
|
- bin/bundler-audit
|
65
|
+
- bin/dorian
|
65
66
|
- bin/language
|
66
67
|
- bin/rspec
|
67
68
|
- bin/rubocop
|
@@ -77,6 +78,7 @@ files:
|
|
77
78
|
- lib/language/atom/ignore.rb
|
78
79
|
- lib/language/atom/maybe.rb
|
79
80
|
- lib/language/atom/or.rb
|
81
|
+
- lib/language/atom/present.rb
|
80
82
|
- lib/language/atom/repeat.rb
|
81
83
|
- lib/language/atom/str.rb
|
82
84
|
- lib/language/atom/then.rb
|
@@ -99,7 +101,6 @@ licenses:
|
|
99
101
|
- MIT
|
100
102
|
metadata:
|
101
103
|
rubygems_mfa_required: 'true'
|
102
|
-
post_install_message:
|
103
104
|
rdoc_options: []
|
104
105
|
require_paths:
|
105
106
|
- lib
|
@@ -107,15 +108,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
107
108
|
requirements:
|
108
109
|
- - ">="
|
109
110
|
- !ruby/object:Gem::Version
|
110
|
-
version: 3.
|
111
|
+
version: '3.0'
|
111
112
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
112
113
|
requirements:
|
113
114
|
- - ">="
|
114
115
|
- !ruby/object:Gem::Version
|
115
116
|
version: '0'
|
116
117
|
requirements: []
|
117
|
-
rubygems_version: 3.
|
118
|
-
signing_key:
|
118
|
+
rubygems_version: 3.6.2
|
119
119
|
specification_version: 4
|
120
120
|
summary: parser dsl
|
121
121
|
test_files: []
|