Skip to content

Commit 348d4fa

Browse files
committed
Update rubocop to 1.55.1 and ruby to 3.2.2
Ruby 2 is EOL, and can have trouble installnig on modern systems. - Updated ruby in .ruby-version and Dockerfile. - No need to install an old version of bundler in Dockerfile. - Removeed the standard gem (see codeclimate#357). - General bundle update. - Updated docs.
1 parent 95784bc commit 348d4fa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+465
-134
lines changed

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7.6
1+
3.2.2

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
FROM ruby:2.7-alpine3.11
1+
FROM ruby:3.2-alpine3.18
22

3-
LABEL name="Ruby-2.7" \
3+
LABEL name="Ruby-3.2" \
44
version="1.0"
55

66
WORKDIR /usr/src/app
@@ -10,7 +10,6 @@ RUN adduser -u 9000 -D app
1010
COPY Gemfile Gemfile.lock /usr/src/app/
1111

1212
RUN apk add --update build-base git && \
13-
gem install bundler -v 2.0.2 && \
1413
bundle install --quiet -j 4 && \
1514
chown -R app:app /usr/local/bundle && \
1615
rm -fr ~/.gem ~/.bundle ~/.wh..gem && \

Gemfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ source 'https://rubygems.org'
55
gem "activesupport", require: false
66
gem "parser"
77
gem "pry", require: false
8-
gem "rubocop", "1.50.2", require: false
8+
gem "rubocop", "1.55.1", require: false
99
gem "rubocop-i18n", require: false
1010
gem "rubocop-graphql", require: false
1111
gem "rubocop-minitest", require: false
@@ -17,7 +17,6 @@ gem "rubocop-sequel", require: false
1717
gem "rubocop-shopify", require: false
1818
gem "rubocop-sorbet", require: false
1919
gem "rubocop-thread_safety", require: false
20-
gem "standard", ">= 1.0", require: false
2120
gem "test-prof", require: false
2221

2322
group :test do

Gemfile.lock

Lines changed: 26 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
activesupport (7.0.4.3)
4+
activesupport (7.0.6)
55
concurrent-ruby (~> 1.0, >= 1.0.2)
66
i18n (>= 1.6, < 2)
77
minitest (>= 5.1)
@@ -10,24 +10,25 @@ GEM
1010
coderay (1.1.3)
1111
concurrent-ruby (1.2.2)
1212
diff-lcs (1.5.0)
13-
i18n (1.13.0)
13+
i18n (1.14.1)
1414
concurrent-ruby (~> 1.0)
1515
json (2.6.3)
1616
language_server-protocol (3.17.0.3)
17-
lint_roller (1.0.0)
1817
method_source (1.0.0)
19-
minitest (5.18.0)
18+
minitest (5.19.0)
2019
parallel (1.23.0)
21-
parser (3.2.2.1)
20+
parser (3.2.2.3)
2221
ast (~> 2.4.1)
22+
racc
2323
pry (0.14.2)
2424
coderay (~> 1.1)
2525
method_source (~> 1.0)
26-
rack (3.0.7)
26+
racc (1.7.1)
27+
rack (3.0.8)
2728
rainbow (3.1.1)
2829
rake (13.0.6)
29-
regexp_parser (2.8.0)
30-
rexml (3.2.5)
30+
regexp_parser (2.8.1)
31+
rexml (3.2.6)
3132
rspec (3.12.0)
3233
rspec-core (~> 3.12.0)
3334
rspec-expectations (~> 3.12.0)
@@ -37,66 +38,56 @@ GEM
3738
rspec-expectations (3.12.3)
3839
diff-lcs (>= 1.2.0, < 2.0)
3940
rspec-support (~> 3.12.0)
40-
rspec-mocks (3.12.5)
41+
rspec-mocks (3.12.6)
4142
diff-lcs (>= 1.2.0, < 2.0)
4243
rspec-support (~> 3.12.0)
43-
rspec-support (3.12.0)
44-
rubocop (1.50.2)
44+
rspec-support (3.12.1)
45+
rubocop (1.55.1)
4546
json (~> 2.3)
47+
language_server-protocol (>= 3.17.0)
4648
parallel (~> 1.10)
47-
parser (>= 3.2.0.0)
49+
parser (>= 3.2.2.3)
4850
rainbow (>= 2.2.2, < 4.0)
4951
regexp_parser (>= 1.8, < 3.0)
5052
rexml (>= 3.2.5, < 4.0)
51-
rubocop-ast (>= 1.28.0, < 2.0)
53+
rubocop-ast (>= 1.28.1, < 2.0)
5254
ruby-progressbar (~> 1.7)
5355
unicode-display_width (>= 2.4.0, < 3.0)
54-
rubocop-ast (1.28.1)
56+
rubocop-ast (1.29.0)
5557
parser (>= 3.2.1.0)
5658
rubocop-capybara (2.18.0)
5759
rubocop (~> 1.41)
58-
rubocop-factory_bot (2.22.0)
60+
rubocop-factory_bot (2.23.1)
5961
rubocop (~> 1.33)
60-
rubocop-graphql (1.1.1)
62+
rubocop-graphql (1.3.0)
6163
rubocop (>= 0.87, < 2)
6264
rubocop-i18n (3.0.0)
6365
rubocop (~> 1.0)
6466
rubocop-minitest (0.31.0)
6567
rubocop (>= 1.39, < 2.0)
66-
rubocop-performance (1.16.0)
68+
rubocop-performance (1.18.0)
6769
rubocop (>= 1.7.0, < 2.0)
6870
rubocop-ast (>= 0.4.0)
69-
rubocop-rails (2.19.1)
71+
rubocop-rails (2.20.2)
7072
activesupport (>= 4.2.0)
7173
rack (>= 1.1)
7274
rubocop (>= 1.33.0, < 2.0)
7375
rubocop-rake (0.6.0)
7476
rubocop (~> 1.0)
75-
rubocop-rspec (2.22.0)
77+
rubocop-rspec (2.23.0)
7678
rubocop (~> 1.33)
7779
rubocop-capybara (~> 2.17)
7880
rubocop-factory_bot (~> 2.22)
7981
rubocop-sequel (0.3.4)
8082
rubocop (~> 1.0)
81-
rubocop-shopify (2.13.0)
82-
rubocop (~> 1.50)
83+
rubocop-shopify (2.14.0)
84+
rubocop (~> 1.51)
8385
rubocop-sorbet (0.7.0)
8486
rubocop (>= 0.90.0)
8587
rubocop-thread_safety (0.5.1)
8688
rubocop (>= 0.90.0)
8789
ruby-progressbar (1.13.0)
88-
standard (1.28.2)
89-
language_server-protocol (~> 3.17.0.2)
90-
lint_roller (~> 1.0)
91-
rubocop (~> 1.50.2)
92-
standard-custom (~> 1.0.0)
93-
standard-performance (~> 1.0.1)
94-
standard-custom (1.0.0)
95-
lint_roller (~> 1.0)
96-
standard-performance (1.0.1)
97-
lint_roller (~> 1.0)
98-
rubocop-performance (~> 1.16.0)
99-
test-prof (1.2.1)
90+
test-prof (1.2.2)
10091
tzinfo (2.0.6)
10192
concurrent-ruby (~> 1.0)
10293
unicode-display_width (2.4.2)
@@ -110,7 +101,7 @@ DEPENDENCIES
110101
pry
111102
rake
112103
rspec
113-
rubocop (= 1.50.2)
104+
rubocop (= 1.55.1)
114105
rubocop-graphql
115106
rubocop-i18n
116107
rubocop-minitest
@@ -122,8 +113,7 @@ DEPENDENCIES
122113
rubocop-shopify
123114
rubocop-sorbet
124115
rubocop-thread_safety
125-
standard (>= 1.0)
126116
test-prof
127117

128118
BUNDLED WITH
129-
2.1.4
119+
2.4.10

config/contents/bundler/ordered_gems.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,15 @@ Gems should be alphabetically sorted within groups.
1414

1515
gem 'rspec'
1616

17-
# good only if TreatCommentsAsGroupSeparators is true
17+
### Example: TreatCommentsAsGroupSeparators: true (default)
18+
# good
19+
# For code quality
20+
gem 'rubocop'
21+
# For tests
22+
gem 'rspec'
23+
24+
### Example: TreatCommentsAsGroupSeparators: false
25+
# bad
1826
# For code quality
1927
gem 'rubocop'
2028
# For tests

config/contents/gemspec/ordered_dependencies.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,15 @@ Dependencies in the gemspec should be alphabetically sorted.
4040

4141
spec.add_runtime_dependency 'rspec'
4242

43-
# good only if TreatCommentsAsGroupSeparators is true
43+
### Example: TreatCommentsAsGroupSeparators: true (default)
44+
# good
45+
# For code quality
46+
spec.add_dependency 'rubocop'
47+
# For tests
48+
spec.add_dependency 'rspec'
49+
50+
### Example: TreatCommentsAsGroupSeparators: false
51+
# bad
4452
# For code quality
4553
spec.add_dependency 'rubocop'
4654
# For tests

config/contents/layout/class_structure.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,14 @@ automatically.
6161
- extend
6262
```
6363
64+
### Safety:
65+
66+
Autocorrection is unsafe because class methods and module inclusion
67+
can behave differently, based on which methods or constants have
68+
already been defined.
69+
70+
Constants will only be moved when they are assigned with literals.
71+
6472
### Example:
6573
# bad
6674
# Expect extend be before constant

config/contents/layout/closing_heredoc_indentation.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
Checks the indentation of here document closings.
32

43
### Example:

config/contents/layout/space_around_method_call_operator.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Checks method call operators to not have spaces around them.
1414
foo &. bar
1515
foo &. bar&. buzz
1616
RuboCop:: Cop
17-
RuboCop:: Cop:: Cop
17+
RuboCop:: Cop:: Base
1818
:: RuboCop::Cop
1919

2020
# good
@@ -26,5 +26,5 @@ Checks method call operators to not have spaces around them.
2626
foo&.bar
2727
foo&.bar&.buzz
2828
RuboCop::Cop
29-
RuboCop::Cop::Cop
29+
RuboCop::Cop::Base
3030
::RuboCop::Cop

config/contents/lint/duplicate_hash_key.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Checks for duplicated keys in hash literals.
2+
This cop considers both primitive types and constants for the hash keys.
23

34
This cop mirrors a warning in Ruby 2.2.
45

0 commit comments

Comments
 (0)