language-ruby 1.0.1 → 1.1.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/workflows/ci.yml +3 -3
- data/.prettierignore +2 -0
- data/.rubocop.yml +121 -5
- data/Gemfile +11 -1
- data/Gemfile.lock +27 -15
- data/VERSION +1 -1
- data/bin/bundle +123 -0
- data/bin/bundle-audit +31 -0
- data/bin/bundler-audit +31 -0
- data/bin/rubocop +31 -0
- data/language-ruby.gemspec +3 -1
- data/lib/language/atom/repeat.rb +1 -1
- data/lib/language/output.rb +7 -25
- data/lib/language/parser/interuption.rb +1 -1
- data/lib/language/parser.rb +5 -1
- data/lib/language/version.rb +1 -1
- data/package-lock.json +14 -0
- data/package.json +0 -1
- metadata +14 -8
- data/yarn.lock +0 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 43e7dbe99b9eae36dbcc0d289c7cd4c18da4acaafb1c1bfa96c2fd752d47d94c
|
|
4
|
+
data.tar.gz: dc14e49d2559be9d59b9538e2800552d1dfffc5dd67c2452e60efeb7470e17e9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a16d61fbd9e957d1472d2821f1e2c203d82e2d201f18739bb47c10454a37d33c4346a82a147cdd84195031682f6e41495df99f91f82f90450485c4ada5f1eefb
|
|
7
|
+
data.tar.gz: d1c61b3b13c4ac9d3e4dae2cbb8d44dccda376f0971665966a44fd3cf260a3b7f4a35afe04c174bd8ff8e690d61deb452137dcaf6b66068308727c87834dd900
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -28,10 +28,10 @@ jobs:
|
|
|
28
28
|
with:
|
|
29
29
|
bundler-cache: true
|
|
30
30
|
- run: bin/rubocop
|
|
31
|
-
|
|
32
|
-
name:
|
|
31
|
+
npm-audit:
|
|
32
|
+
name: npm Audit
|
|
33
33
|
runs-on: ubuntu-latest
|
|
34
34
|
steps:
|
|
35
35
|
- uses: actions/checkout@v4
|
|
36
36
|
- uses: actions/setup-node@v4
|
|
37
|
-
- run:
|
|
37
|
+
- run: npm audit
|
data/.prettierignore
ADDED
data/.rubocop.yml
CHANGED
|
@@ -1,8 +1,124 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
---
|
|
2
|
+
AllCops:
|
|
3
|
+
Exclude:
|
|
4
|
+
- "*/node_modules/**/*"
|
|
5
|
+
- "*/vendor/**/*"
|
|
6
|
+
- node_modules/**/*
|
|
7
|
+
- vendor/**/*
|
|
8
|
+
NewCops: enable
|
|
9
|
+
Layout/ClosingHeredocIndentation:
|
|
10
|
+
Enabled: false
|
|
11
|
+
Layout/FirstArgumentIndentation:
|
|
12
|
+
Enabled: false
|
|
13
|
+
Layout/HashAlignment:
|
|
14
|
+
Enabled: false
|
|
15
|
+
Layout/HeredocIndentation:
|
|
16
|
+
Enabled: false
|
|
17
|
+
Layout/LineEndStringConcatenationIndentation:
|
|
18
|
+
Enabled: false
|
|
19
|
+
Layout/LineLength:
|
|
20
|
+
Enabled: false
|
|
21
|
+
Layout/MultilineMethodCallIndentation:
|
|
22
|
+
Enabled: false
|
|
23
|
+
Layout/MultilineOperationIndentation:
|
|
24
|
+
Enabled: false
|
|
25
|
+
Lint/EmptyClass:
|
|
26
|
+
Enabled: false
|
|
27
|
+
Lint/MissingSuper:
|
|
28
|
+
Enabled: false
|
|
29
|
+
Lint/PercentStringArray:
|
|
30
|
+
Enabled: false
|
|
31
|
+
Lint/ShadowingOuterLocalVariable:
|
|
32
|
+
Enabled: false
|
|
33
|
+
Lint/SuppressedException:
|
|
34
|
+
Enabled: false
|
|
35
|
+
Lint/UnusedBlockArgument:
|
|
36
|
+
Enabled: false
|
|
37
|
+
Lint/UselessAssignment:
|
|
38
|
+
Enabled: false
|
|
39
|
+
Metrics/AbcSize:
|
|
40
|
+
Enabled: false
|
|
41
|
+
Metrics/BlockLength:
|
|
42
|
+
Enabled: false
|
|
43
|
+
Metrics/ClassLength:
|
|
44
|
+
Enabled: false
|
|
45
|
+
Metrics/CyclomaticComplexity:
|
|
46
|
+
Enabled: false
|
|
47
|
+
Metrics/MethodLength:
|
|
48
|
+
Enabled: false
|
|
49
|
+
Metrics/ModuleLength:
|
|
50
|
+
Enabled: false
|
|
51
|
+
Metrics/ParameterLists:
|
|
52
|
+
Enabled: false
|
|
53
|
+
Metrics/PerceivedComplexity:
|
|
54
|
+
Enabled: false
|
|
55
|
+
Naming/FileName:
|
|
56
|
+
Enabled: false
|
|
57
|
+
Naming/MethodParameterName:
|
|
58
|
+
Enabled: false
|
|
59
|
+
Naming/VariableNumber:
|
|
5
60
|
Enabled: false
|
|
6
|
-
|
|
7
61
|
Performance/UnfreezeString:
|
|
8
62
|
Enabled: false
|
|
63
|
+
RSpec/AnyInstance:
|
|
64
|
+
Enabled: false
|
|
65
|
+
RSpec/ContextWording:
|
|
66
|
+
Enabled: false
|
|
67
|
+
RSpec/DescribeClass:
|
|
68
|
+
Enabled: false
|
|
69
|
+
RSpec/ExampleLength:
|
|
70
|
+
Enabled: false
|
|
71
|
+
RSpec/ExampleWording:
|
|
72
|
+
Enabled: false
|
|
73
|
+
RSpec/MultipleExpectations:
|
|
74
|
+
Enabled: false
|
|
75
|
+
RSpec/NoExpectationExample:
|
|
76
|
+
Enabled: false
|
|
77
|
+
RSpec/PendingWithoutReason:
|
|
78
|
+
Enabled: false
|
|
79
|
+
Rails/Delegate:
|
|
80
|
+
Enabled: false
|
|
81
|
+
Rails/DynamicFindBy:
|
|
82
|
+
Enabled: false
|
|
83
|
+
Rails/HelperInstanceVariable:
|
|
84
|
+
Enabled: false
|
|
85
|
+
Rails/NegateInclude:
|
|
86
|
+
Enabled: false
|
|
87
|
+
Rails/Output:
|
|
88
|
+
Enabled: false
|
|
89
|
+
Rails/Presence:
|
|
90
|
+
Enabled: false
|
|
91
|
+
Rails/Present:
|
|
92
|
+
Enabled: false
|
|
93
|
+
Rails/ThreeStateBooleanColumn:
|
|
94
|
+
Enabled: false
|
|
95
|
+
Rails/TimeZone:
|
|
96
|
+
Enabled: false
|
|
97
|
+
Security/Eval:
|
|
98
|
+
Enabled: false
|
|
99
|
+
Style/CaseEquality:
|
|
100
|
+
Enabled: false
|
|
101
|
+
Style/Documentation:
|
|
102
|
+
Enabled: false
|
|
103
|
+
Style/DoubleNegation:
|
|
104
|
+
Enabled: false
|
|
105
|
+
Style/EmptyMethod:
|
|
106
|
+
Enabled: false
|
|
107
|
+
Style/IfUnlessModifier:
|
|
108
|
+
Enabled: false
|
|
109
|
+
Style/MultilineBlockChain:
|
|
110
|
+
Enabled: false
|
|
111
|
+
Style/QuotedSymbols:
|
|
112
|
+
Enabled: false
|
|
113
|
+
Style/StringLiterals:
|
|
114
|
+
Enabled: false
|
|
115
|
+
Style/StringLiteralsInInterpolation:
|
|
116
|
+
Enabled: false
|
|
117
|
+
require:
|
|
118
|
+
- rubocop-factory_bot
|
|
119
|
+
- rubocop-performance
|
|
120
|
+
- rubocop-rails
|
|
121
|
+
- rubocop-rake
|
|
122
|
+
- rubocop-rspec
|
|
123
|
+
- rubocop-rspec_rails
|
|
124
|
+
- rubocop-capybara
|
data/Gemfile
CHANGED
|
@@ -7,4 +7,14 @@ gemspec
|
|
|
7
7
|
ruby "3.3.4"
|
|
8
8
|
|
|
9
9
|
gem "rspec"
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
gem "bundler-audit"
|
|
12
|
+
|
|
13
|
+
gem "rubocop-factory_bot"
|
|
14
|
+
gem "rubocop-performance"
|
|
15
|
+
gem "rubocop-rails"
|
|
16
|
+
gem "rubocop-rake"
|
|
17
|
+
gem "rubocop-rspec"
|
|
18
|
+
gem "rubocop-rspec_rails"
|
|
19
|
+
|
|
20
|
+
gem "rubocop-capybara"
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
language-ruby (1.0
|
|
4
|
+
language-ruby (1.1.0)
|
|
5
5
|
dorian-arguments
|
|
6
6
|
zeitwerk
|
|
7
7
|
|
|
@@ -22,14 +22,14 @@ GEM
|
|
|
22
22
|
ast (2.4.2)
|
|
23
23
|
base64 (0.2.0)
|
|
24
24
|
bigdecimal (3.1.8)
|
|
25
|
+
bundler-audit (0.9.2)
|
|
26
|
+
bundler (>= 1.2.0, < 3)
|
|
27
|
+
thor (~> 1.0)
|
|
25
28
|
concurrent-ruby (1.3.4)
|
|
26
29
|
connection_pool (2.4.1)
|
|
27
30
|
diff-lcs (1.5.1)
|
|
28
|
-
dorian-arguments (
|
|
29
|
-
activesupport
|
|
31
|
+
dorian-arguments (1.1.1)
|
|
30
32
|
bigdecimal
|
|
31
|
-
dorian-to_struct
|
|
32
|
-
dorian-to_struct (0.6.0)
|
|
33
33
|
drb (2.2.1)
|
|
34
34
|
i18n (1.14.5)
|
|
35
35
|
concurrent-ruby (~> 1.0)
|
|
@@ -73,9 +73,10 @@ GEM
|
|
|
73
73
|
unicode-display_width (>= 2.4.0, < 3.0)
|
|
74
74
|
rubocop-ast (1.32.1)
|
|
75
75
|
parser (>= 3.3.1.0)
|
|
76
|
-
rubocop-
|
|
77
|
-
rubocop (
|
|
78
|
-
|
|
76
|
+
rubocop-capybara (2.21.0)
|
|
77
|
+
rubocop (~> 1.41)
|
|
78
|
+
rubocop-factory_bot (2.26.1)
|
|
79
|
+
rubocop (~> 1.61)
|
|
79
80
|
rubocop-performance (1.21.1)
|
|
80
81
|
rubocop (>= 1.48.1, < 2.0)
|
|
81
82
|
rubocop-ast (>= 1.31.1, < 2.0)
|
|
@@ -84,14 +85,17 @@ GEM
|
|
|
84
85
|
rack (>= 1.1)
|
|
85
86
|
rubocop (>= 1.52.0, < 2.0)
|
|
86
87
|
rubocop-ast (>= 1.31.1, < 2.0)
|
|
87
|
-
rubocop-
|
|
88
|
-
rubocop
|
|
89
|
-
|
|
90
|
-
rubocop
|
|
91
|
-
|
|
88
|
+
rubocop-rake (0.6.0)
|
|
89
|
+
rubocop (~> 1.0)
|
|
90
|
+
rubocop-rspec (3.0.4)
|
|
91
|
+
rubocop (~> 1.61)
|
|
92
|
+
rubocop-rspec_rails (2.30.0)
|
|
93
|
+
rubocop (~> 1.61)
|
|
94
|
+
rubocop-rspec (~> 3, >= 3.0.1)
|
|
92
95
|
ruby-progressbar (1.13.0)
|
|
93
96
|
securerandom (0.3.1)
|
|
94
97
|
strscan (3.1.0)
|
|
98
|
+
thor (1.3.2)
|
|
95
99
|
tzinfo (2.0.6)
|
|
96
100
|
concurrent-ruby (~> 1.0)
|
|
97
101
|
unicode-display_width (2.5.0)
|
|
@@ -100,14 +104,22 @@ GEM
|
|
|
100
104
|
PLATFORMS
|
|
101
105
|
arm64-darwin-22
|
|
102
106
|
arm64-darwin-23
|
|
107
|
+
x86_64-linux
|
|
103
108
|
|
|
104
109
|
DEPENDENCIES
|
|
110
|
+
bundler-audit
|
|
105
111
|
language-ruby!
|
|
106
112
|
rspec
|
|
107
|
-
rubocop-
|
|
113
|
+
rubocop-capybara
|
|
114
|
+
rubocop-factory_bot
|
|
115
|
+
rubocop-performance
|
|
116
|
+
rubocop-rails
|
|
117
|
+
rubocop-rake
|
|
118
|
+
rubocop-rspec
|
|
119
|
+
rubocop-rspec_rails
|
|
108
120
|
|
|
109
121
|
RUBY VERSION
|
|
110
122
|
ruby 3.3.4p94
|
|
111
123
|
|
|
112
124
|
BUNDLED WITH
|
|
113
|
-
2.5.
|
|
125
|
+
2.5.18
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0
|
|
1
|
+
1.1.0
|
data/bin/bundle
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
#
|
|
5
|
+
# This file was generated by Bundler.
|
|
6
|
+
#
|
|
7
|
+
# The application 'bundle' is installed as part of a gem, and
|
|
8
|
+
# this file is here to facilitate running it.
|
|
9
|
+
#
|
|
10
|
+
|
|
11
|
+
require "rubygems"
|
|
12
|
+
|
|
13
|
+
m =
|
|
14
|
+
Module.new do
|
|
15
|
+
module_function
|
|
16
|
+
|
|
17
|
+
def invoked_as_script?
|
|
18
|
+
File.expand_path($PROGRAM_NAME) == File.expand_path(__FILE__)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def env_var_version
|
|
22
|
+
ENV.fetch("BUNDLER_VERSION", nil)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def cli_arg_version
|
|
26
|
+
return unless invoked_as_script? # don't want to hijack other binstubs
|
|
27
|
+
return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
|
|
28
|
+
|
|
29
|
+
bundler_version = nil
|
|
30
|
+
update_index = nil
|
|
31
|
+
ARGV.each_with_index do |a, i|
|
|
32
|
+
if update_index && update_index.succ == i &&
|
|
33
|
+
a.match?(Gem::Version::ANCHORED_VERSION_PATTERN)
|
|
34
|
+
bundler_version = a
|
|
35
|
+
end
|
|
36
|
+
unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/o
|
|
37
|
+
next
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
bundler_version = Regexp.last_match(1)
|
|
41
|
+
update_index = i
|
|
42
|
+
end
|
|
43
|
+
bundler_version
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def gemfile
|
|
47
|
+
gemfile = ENV.fetch("BUNDLE_GEMFILE", nil)
|
|
48
|
+
return gemfile if gemfile && !gemfile.empty?
|
|
49
|
+
|
|
50
|
+
File.expand_path("../Gemfile", __dir__)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def lockfile
|
|
54
|
+
lockfile =
|
|
55
|
+
case File.basename(gemfile)
|
|
56
|
+
when "gems.rb"
|
|
57
|
+
gemfile.sub(/\.rb$/, ".locked")
|
|
58
|
+
else
|
|
59
|
+
"#{gemfile}.lock"
|
|
60
|
+
end
|
|
61
|
+
File.expand_path(lockfile)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def lockfile_version
|
|
65
|
+
return unless File.file?(lockfile)
|
|
66
|
+
|
|
67
|
+
lockfile_contents = File.read(lockfile)
|
|
68
|
+
unless lockfile_contents =~
|
|
69
|
+
/\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/o
|
|
70
|
+
return
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
Regexp.last_match(1)
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def bundler_requirement
|
|
77
|
+
@bundler_requirement ||=
|
|
78
|
+
env_var_version || cli_arg_version ||
|
|
79
|
+
bundler_requirement_for(lockfile_version)
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
def bundler_requirement_for(version)
|
|
83
|
+
return "#{Gem::Requirement.default}.a" unless version
|
|
84
|
+
|
|
85
|
+
bundler_gem_version = Gem::Version.new(version)
|
|
86
|
+
|
|
87
|
+
bundler_gem_version.approximate_recommendation
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def load_bundler!
|
|
91
|
+
ENV["BUNDLE_GEMFILE"] ||= gemfile
|
|
92
|
+
|
|
93
|
+
activate_bundler
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
def activate_bundler
|
|
97
|
+
gem_error =
|
|
98
|
+
activation_error_handling { gem "bundler", bundler_requirement }
|
|
99
|
+
return if gem_error.nil?
|
|
100
|
+
|
|
101
|
+
require_error = activation_error_handling { require "bundler/version" }
|
|
102
|
+
if require_error.nil? &&
|
|
103
|
+
Gem::Requirement.new(bundler_requirement).satisfied_by?(
|
|
104
|
+
Gem::Version.new(Bundler::VERSION)
|
|
105
|
+
)
|
|
106
|
+
return
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`"
|
|
110
|
+
exit 42
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
def activation_error_handling
|
|
114
|
+
yield
|
|
115
|
+
nil
|
|
116
|
+
rescue StandardError, LoadError => e
|
|
117
|
+
e
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
m.load_bundler!
|
|
122
|
+
|
|
123
|
+
load Gem.bin_path("bundler", "bundle") if m.invoked_as_script?
|
data/bin/bundle-audit
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 'bundle-audit' 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("bundler-audit", "bundle-audit")
|
data/bin/bundler-audit
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 'bundler-audit' 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("bundler-audit", "bundler-audit")
|
data/bin/rubocop
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 'rubocop' 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("rubocop", "rubocop")
|
data/language-ruby.gemspec
CHANGED
|
@@ -12,6 +12,8 @@ Gem::Specification.new do |s|
|
|
|
12
12
|
s.executables << "language"
|
|
13
13
|
s.homepage = "https://github.com/dorianmariecom/language-ruby"
|
|
14
14
|
s.license = "MIT"
|
|
15
|
-
s.add_dependency "zeitwerk"
|
|
16
15
|
s.add_dependency "dorian-arguments"
|
|
16
|
+
s.add_dependency "zeitwerk"
|
|
17
|
+
s.metadata["rubygems_mfa_required"] = "true"
|
|
18
|
+
s.required_ruby_version = "3.3.4"
|
|
17
19
|
end
|
data/lib/language/atom/repeat.rb
CHANGED
|
@@ -30,7 +30,7 @@ class Language
|
|
|
30
30
|
minimum = @minimum.zero? ? "" : @minimum.to_s
|
|
31
31
|
maximum = @maximum.nil? ? "" : ", #{@maximum}"
|
|
32
32
|
parenthesis =
|
|
33
|
-
|
|
33
|
+
minimum.empty? && maximum.empty? ? "" : "(#{minimum}#{maximum})"
|
|
34
34
|
|
|
35
35
|
@parent ? "(#{@parent}).repeat#{parenthesis}" : "repeat#{parenthesis}"
|
|
36
36
|
end
|
data/lib/language/output.rb
CHANGED
|
@@ -26,11 +26,7 @@ class Language
|
|
|
26
26
|
case @raw
|
|
27
27
|
when NilClass
|
|
28
28
|
true
|
|
29
|
-
when String
|
|
30
|
-
raw.empty?
|
|
31
|
-
when Array
|
|
32
|
-
raw.empty?
|
|
33
|
-
when Hash
|
|
29
|
+
when String, Array, Hash
|
|
34
30
|
raw.empty?
|
|
35
31
|
end
|
|
36
32
|
end
|
|
@@ -67,9 +63,7 @@ class Language
|
|
|
67
63
|
|
|
68
64
|
def []=(key, value)
|
|
69
65
|
case @raw
|
|
70
|
-
when NilClass
|
|
71
|
-
@raw = { key => value }
|
|
72
|
-
when String
|
|
66
|
+
when NilClass, String
|
|
73
67
|
@raw = { key => value }
|
|
74
68
|
when Array
|
|
75
69
|
@raw << Output.new({ key => value })
|
|
@@ -86,9 +80,7 @@ class Language
|
|
|
86
80
|
case other.raw
|
|
87
81
|
when String
|
|
88
82
|
@raw += other.raw
|
|
89
|
-
when Array
|
|
90
|
-
@raw = other.raw
|
|
91
|
-
when Hash
|
|
83
|
+
when Array, Hash
|
|
92
84
|
@raw = other.raw
|
|
93
85
|
end
|
|
94
86
|
when Array
|
|
@@ -102,9 +94,7 @@ class Language
|
|
|
102
94
|
end
|
|
103
95
|
when Hash
|
|
104
96
|
case other.raw
|
|
105
|
-
when String
|
|
106
|
-
nil
|
|
107
|
-
when Array
|
|
97
|
+
when String, Array
|
|
108
98
|
nil
|
|
109
99
|
when Hash
|
|
110
100
|
@raw.merge!(other.raw)
|
|
@@ -116,29 +106,21 @@ class Language
|
|
|
116
106
|
case @raw
|
|
117
107
|
when NilClass
|
|
118
108
|
case other.raw
|
|
119
|
-
when String
|
|
120
|
-
@raw = [other]
|
|
121
|
-
when Array
|
|
122
|
-
@raw = [other]
|
|
123
|
-
when Hash
|
|
109
|
+
when String, Array, Hash
|
|
124
110
|
@raw = [other]
|
|
125
111
|
end
|
|
126
112
|
when String
|
|
127
113
|
case other.raw
|
|
128
114
|
when String
|
|
129
115
|
@raw += other.raw
|
|
130
|
-
when Array
|
|
131
|
-
@raw = [other]
|
|
132
|
-
when Hash
|
|
116
|
+
when Array, Hash
|
|
133
117
|
@raw = [other]
|
|
134
118
|
end
|
|
135
119
|
when Array
|
|
136
120
|
@raw << other
|
|
137
121
|
when Hash
|
|
138
122
|
case other.raw
|
|
139
|
-
when String
|
|
140
|
-
nil
|
|
141
|
-
when Array
|
|
123
|
+
when String, Array
|
|
142
124
|
nil
|
|
143
125
|
when Hash
|
|
144
126
|
@raw.merge!(other.raw)
|
data/lib/language/parser.rb
CHANGED
|
@@ -19,7 +19,11 @@ class Language
|
|
|
19
19
|
raise NotEndOfInput, self
|
|
20
20
|
end
|
|
21
21
|
|
|
22
|
-
@output.present?
|
|
22
|
+
if @output.present?
|
|
23
|
+
@output
|
|
24
|
+
else
|
|
25
|
+
Output.new(@buffer.empty? ? nil : @buffer)
|
|
26
|
+
end
|
|
23
27
|
end
|
|
24
28
|
|
|
25
29
|
def consume(n)
|
data/lib/language/version.rb
CHANGED
data/package-lock.json
ADDED
data/package.json
CHANGED
metadata
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: language-ruby
|
|
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
|
- Dorian Marié
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-08-
|
|
11
|
+
date: 2024-08-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
|
-
name:
|
|
14
|
+
name: dorian-arguments
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
@@ -25,7 +25,7 @@ dependencies:
|
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '0'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
|
-
name:
|
|
28
|
+
name: zeitwerk
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
31
|
- - ">="
|
|
@@ -49,6 +49,7 @@ files:
|
|
|
49
49
|
- ".github/workflows/ci.yml"
|
|
50
50
|
- ".gitignore"
|
|
51
51
|
- ".node-version"
|
|
52
|
+
- ".prettierignore"
|
|
52
53
|
- ".rspec"
|
|
53
54
|
- ".rubocop.yml"
|
|
54
55
|
- ".ruby-version"
|
|
@@ -58,8 +59,12 @@ files:
|
|
|
58
59
|
- LICENSE
|
|
59
60
|
- README.md
|
|
60
61
|
- VERSION
|
|
62
|
+
- bin/bundle
|
|
63
|
+
- bin/bundle-audit
|
|
64
|
+
- bin/bundler-audit
|
|
61
65
|
- bin/language
|
|
62
66
|
- bin/rspec
|
|
67
|
+
- bin/rubocop
|
|
63
68
|
- bin/test
|
|
64
69
|
- language-ruby.gemspec
|
|
65
70
|
- lib/language-ruby.rb
|
|
@@ -85,23 +90,24 @@ files:
|
|
|
85
90
|
- lib/language/parser/str.rb
|
|
86
91
|
- lib/language/parser/str/not_found.rb
|
|
87
92
|
- lib/language/version.rb
|
|
93
|
+
- package-lock.json
|
|
88
94
|
- package.json
|
|
89
95
|
- spec/language_spec.rb
|
|
90
96
|
- spec/spec_helper.rb
|
|
91
|
-
- yarn.lock
|
|
92
97
|
homepage: https://github.com/dorianmariecom/language-ruby
|
|
93
98
|
licenses:
|
|
94
99
|
- MIT
|
|
95
|
-
metadata:
|
|
100
|
+
metadata:
|
|
101
|
+
rubygems_mfa_required: 'true'
|
|
96
102
|
post_install_message:
|
|
97
103
|
rdoc_options: []
|
|
98
104
|
require_paths:
|
|
99
105
|
- lib
|
|
100
106
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
101
107
|
requirements:
|
|
102
|
-
- -
|
|
108
|
+
- - '='
|
|
103
109
|
- !ruby/object:Gem::Version
|
|
104
|
-
version:
|
|
110
|
+
version: 3.3.4
|
|
105
111
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
112
|
requirements:
|
|
107
113
|
- - ">="
|
data/yarn.lock
DELETED