language-ruby 1.0.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +3 -3
- data/.prettierignore +2 -0
- data/.rubocop.yml +123 -5
- data/.ruby-version +1 -1
- data/.tool-versions +1 -1
- data/Gemfile +12 -2
- data/Gemfile.lock +35 -27
- 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/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: c29e7af1daadab0c370fe551f61803a231fd8dc46481ca6c87b11867f21040ae
|
4
|
+
data.tar.gz: 412873f0510761217a84caf98d5cde6126e81e2f734c188ad02afdf00c341f61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 654ab22a998ca7eae204f9a8f546cd5d348e377d8080135dcabde49ebc3374a863d09be0d6f62b9e4f3ff759f3fd9af27f190b487adad780d1d51a35c9afad82
|
7
|
+
data.tar.gz: c42f9574203f55af50f4dc2fa08b62287e9f7aa7341cec1f60878c8c384c629522eb7bff684e1b32deb217c13a0d5d39ce60e533ce2042fb24c9cfb050e41d8b
|
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,126 @@
|
|
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/NestedTernaryOperator:
|
112
|
+
Enabled: false
|
113
|
+
Style/QuotedSymbols:
|
114
|
+
Enabled: false
|
115
|
+
Style/StringLiterals:
|
116
|
+
Enabled: false
|
117
|
+
Style/StringLiteralsInInterpolation:
|
118
|
+
Enabled: false
|
119
|
+
require:
|
120
|
+
- rubocop-factory_bot
|
121
|
+
- rubocop-performance
|
122
|
+
- rubocop-rails
|
123
|
+
- rubocop-rake
|
124
|
+
- rubocop-rspec
|
125
|
+
- rubocop-rspec_rails
|
126
|
+
- rubocop-capybara
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.3.
|
1
|
+
3.3.5
|
data/.tool-versions
CHANGED
data/Gemfile
CHANGED
@@ -4,7 +4,17 @@ source "https://rubygems.org"
|
|
4
4
|
|
5
5
|
gemspec
|
6
6
|
|
7
|
-
ruby "3.3.
|
7
|
+
ruby "3.3.5"
|
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.
|
4
|
+
language-ruby (1.1.2)
|
5
5
|
dorian-arguments
|
6
6
|
zeitwerk
|
7
7
|
|
@@ -22,36 +22,34 @@ 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.2.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)
|
36
36
|
json (2.7.2)
|
37
37
|
language_server-protocol (3.17.0.3)
|
38
|
-
logger (1.6.
|
38
|
+
logger (1.6.1)
|
39
39
|
minitest (5.25.1)
|
40
40
|
parallel (1.26.3)
|
41
|
-
parser (3.3.
|
41
|
+
parser (3.3.5.0)
|
42
42
|
ast (~> 2.4.1)
|
43
43
|
racc
|
44
44
|
racc (1.8.1)
|
45
45
|
rack (3.1.7)
|
46
46
|
rainbow (3.1.1)
|
47
47
|
regexp_parser (2.9.2)
|
48
|
-
rexml (3.3.6)
|
49
|
-
strscan
|
50
48
|
rspec (3.13.0)
|
51
49
|
rspec-core (~> 3.13.0)
|
52
50
|
rspec-expectations (~> 3.13.0)
|
53
51
|
rspec-mocks (~> 3.13.0)
|
54
|
-
rspec-core (3.13.
|
52
|
+
rspec-core (3.13.1)
|
55
53
|
rspec-support (~> 3.13.0)
|
56
54
|
rspec-expectations (3.13.2)
|
57
55
|
diff-lcs (>= 1.2.0, < 2.0)
|
@@ -60,22 +58,22 @@ GEM
|
|
60
58
|
diff-lcs (>= 1.2.0, < 2.0)
|
61
59
|
rspec-support (~> 3.13.0)
|
62
60
|
rspec-support (3.13.1)
|
63
|
-
rubocop (1.
|
61
|
+
rubocop (1.66.1)
|
64
62
|
json (~> 2.3)
|
65
63
|
language_server-protocol (>= 3.17.0)
|
66
64
|
parallel (~> 1.10)
|
67
65
|
parser (>= 3.3.0.2)
|
68
66
|
rainbow (>= 2.2.2, < 4.0)
|
69
67
|
regexp_parser (>= 2.4, < 3.0)
|
70
|
-
|
71
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
68
|
+
rubocop-ast (>= 1.32.2, < 2.0)
|
72
69
|
ruby-progressbar (~> 1.7)
|
73
70
|
unicode-display_width (>= 2.4.0, < 3.0)
|
74
|
-
rubocop-ast (1.32.
|
71
|
+
rubocop-ast (1.32.3)
|
75
72
|
parser (>= 3.3.1.0)
|
76
|
-
rubocop-
|
77
|
-
rubocop (
|
78
|
-
|
73
|
+
rubocop-capybara (2.21.0)
|
74
|
+
rubocop (~> 1.41)
|
75
|
+
rubocop-factory_bot (2.26.1)
|
76
|
+
rubocop (~> 1.61)
|
79
77
|
rubocop-performance (1.21.1)
|
80
78
|
rubocop (>= 1.48.1, < 2.0)
|
81
79
|
rubocop-ast (>= 1.31.1, < 2.0)
|
@@ -84,30 +82,40 @@ GEM
|
|
84
82
|
rack (>= 1.1)
|
85
83
|
rubocop (>= 1.52.0, < 2.0)
|
86
84
|
rubocop-ast (>= 1.31.1, < 2.0)
|
87
|
-
rubocop-
|
88
|
-
rubocop
|
89
|
-
|
90
|
-
rubocop
|
91
|
-
|
85
|
+
rubocop-rake (0.6.0)
|
86
|
+
rubocop (~> 1.0)
|
87
|
+
rubocop-rspec (3.0.4)
|
88
|
+
rubocop (~> 1.61)
|
89
|
+
rubocop-rspec_rails (2.30.0)
|
90
|
+
rubocop (~> 1.61)
|
91
|
+
rubocop-rspec (~> 3, >= 3.0.1)
|
92
92
|
ruby-progressbar (1.13.0)
|
93
93
|
securerandom (0.3.1)
|
94
|
-
|
94
|
+
thor (1.3.2)
|
95
95
|
tzinfo (2.0.6)
|
96
96
|
concurrent-ruby (~> 1.0)
|
97
97
|
unicode-display_width (2.5.0)
|
98
|
-
zeitwerk (2.6.
|
98
|
+
zeitwerk (2.6.18)
|
99
99
|
|
100
100
|
PLATFORMS
|
101
101
|
arm64-darwin-22
|
102
102
|
arm64-darwin-23
|
103
|
+
x86_64-linux
|
103
104
|
|
104
105
|
DEPENDENCIES
|
106
|
+
bundler-audit
|
105
107
|
language-ruby!
|
106
108
|
rspec
|
107
|
-
rubocop-
|
109
|
+
rubocop-capybara
|
110
|
+
rubocop-factory_bot
|
111
|
+
rubocop-performance
|
112
|
+
rubocop-rails
|
113
|
+
rubocop-rake
|
114
|
+
rubocop-rspec
|
115
|
+
rubocop-rspec_rails
|
108
116
|
|
109
117
|
RUBY VERSION
|
110
|
-
ruby 3.3.
|
118
|
+
ruby 3.3.5p100
|
111
119
|
|
112
120
|
BUNDLED WITH
|
113
|
-
2.5.
|
121
|
+
2.5.18
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.1.2
|
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.0"
|
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/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.
|
4
|
+
version: 1.1.2
|
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-
|
11
|
+
date: 2024-09-05 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,14 +90,15 @@ 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:
|
@@ -101,14 +107,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
101
107
|
requirements:
|
102
108
|
- - ">="
|
103
109
|
- !ruby/object:Gem::Version
|
104
|
-
version:
|
110
|
+
version: 3.3.0
|
105
111
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
112
|
requirements:
|
107
113
|
- - ">="
|
108
114
|
- !ruby/object:Gem::Version
|
109
115
|
version: '0'
|
110
116
|
requirements: []
|
111
|
-
rubygems_version: 3.5.
|
117
|
+
rubygems_version: 3.5.16
|
112
118
|
signing_key:
|
113
119
|
specification_version: 4
|
114
120
|
summary: parser dsl
|
data/yarn.lock
DELETED