Skip to content

Commit 4d9b297

Browse files
Rubocop v1.68 Upgrade (#37)
* Revamp * Pipeline fix * upgrade autocorrects * cop --------- Co-authored-by: fedetaglia <[email protected]>
1 parent 116b415 commit 4d9b297

File tree

56 files changed

+174
-176
lines changed

Some content is hidden

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

56 files changed

+174
-176
lines changed

β€Ž.github/workflows/build_and_test.ymlβ€Ž

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
ruby: [ '2.6', '2.7', '2' ]
10+
ruby: ["3", "3.1", "3.2"]
1111
name: Test gem in ruby version ${{ matrix.ruby }}
1212
steps:
13-
- uses: actions/checkout@v1
14-
- name: Set up Ruby ${{ matrix.ruby }}
15-
uses: ruby/setup-ruby@v1
16-
with:
17-
ruby-version: ${{ matrix.ruby }}
18-
- name: Build with dependencies
19-
run: |
20-
gem install bundler -v 2.1.4
21-
bundle install
22-
- name: Test with rspec
23-
run: |
24-
bundle exec rspec
25-
- name: Lint with rubocop
26-
run: |
27-
bundle exec rubocop
13+
- uses: actions/checkout@v1
14+
- name: Set up Ruby ${{ matrix.ruby }}
15+
uses: ruby/setup-ruby@v1
16+
with:
17+
ruby-version: ${{ matrix.ruby }}
18+
- name: Build with dependencies
19+
run: |
20+
gem install bundler -v 2.5.16
21+
bundle install
22+
- name: Test with rspec
23+
run: |
24+
bundle exec rspec
25+
- name: Lint with rubocop
26+
run: |
27+
bundle exec rubocop

β€Ž.ruby-versionβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7.2
1+
3.3.2

β€ŽGemfile.lockβ€Ž

Lines changed: 44 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,70 @@
11
PATH
22
remote: .
33
specs:
4-
rubocop-bugcrowd (0.1.0)
5-
rubocop
4+
rubocop-bugcrowd (1.0.0)
5+
rubocop (= 1.68.0)
66

77
GEM
88
remote: https://rubygems.org/
99
specs:
1010
ast (2.4.2)
11-
byebug (11.1.1)
12-
coderay (1.1.2)
13-
diff-lcs (1.3)
14-
method_source (0.9.2)
15-
parallel (1.23.0)
16-
parser (3.2.2.3)
11+
byebug (11.1.3)
12+
coderay (1.1.3)
13+
diff-lcs (1.5.1)
14+
json (2.8.1)
15+
language_server-protocol (3.17.0.3)
16+
method_source (1.1.0)
17+
parallel (1.26.3)
18+
parser (3.3.6.0)
1719
ast (~> 2.4.1)
1820
racc
19-
pry (0.12.2)
20-
coderay (~> 1.1.0)
21-
method_source (~> 0.9.0)
22-
pry-byebug (3.8.0)
21+
pry (0.14.2)
22+
coderay (~> 1.1)
23+
method_source (~> 1.0)
24+
pry-byebug (3.10.1)
2325
byebug (~> 11.0)
24-
pry (~> 0.10)
25-
racc (1.7.1)
26+
pry (>= 0.13, < 0.15)
27+
racc (1.8.1)
2628
rainbow (3.1.1)
27-
rake (13.0.1)
28-
regexp_parser (2.8.1)
29-
rexml (3.2.6)
30-
rspec (3.9.0)
31-
rspec-core (~> 3.9.0)
32-
rspec-expectations (~> 3.9.0)
33-
rspec-mocks (~> 3.9.0)
34-
rspec-core (3.9.1)
35-
rspec-support (~> 3.9.1)
36-
rspec-expectations (3.9.0)
29+
rake (13.2.1)
30+
regexp_parser (2.9.2)
31+
rspec (3.13.0)
32+
rspec-core (~> 3.13.0)
33+
rspec-expectations (~> 3.13.0)
34+
rspec-mocks (~> 3.13.0)
35+
rspec-core (3.13.2)
36+
rspec-support (~> 3.13.0)
37+
rspec-expectations (3.13.3)
3738
diff-lcs (>= 1.2.0, < 2.0)
38-
rspec-support (~> 3.9.0)
39-
rspec-mocks (3.9.1)
39+
rspec-support (~> 3.13.0)
40+
rspec-mocks (3.13.2)
4041
diff-lcs (>= 1.2.0, < 2.0)
41-
rspec-support (~> 3.9.0)
42-
rspec-support (3.9.2)
43-
rubocop (0.93.1)
42+
rspec-support (~> 3.13.0)
43+
rspec-support (3.13.1)
44+
rubocop (1.68.0)
45+
json (~> 2.3)
46+
language_server-protocol (>= 3.17.0)
4447
parallel (~> 1.10)
45-
parser (>= 2.7.1.5)
48+
parser (>= 3.3.0.2)
4649
rainbow (>= 2.2.2, < 4.0)
47-
regexp_parser (>= 1.8)
48-
rexml
49-
rubocop-ast (>= 0.6.0)
50+
regexp_parser (>= 2.4, < 3.0)
51+
rubocop-ast (>= 1.32.2, < 2.0)
5052
ruby-progressbar (~> 1.7)
51-
unicode-display_width (>= 1.4.0, < 2.0)
52-
rubocop-ast (1.29.0)
53-
parser (>= 3.2.1.0)
53+
unicode-display_width (>= 2.4.0, < 3.0)
54+
rubocop-ast (1.34.1)
55+
parser (>= 3.3.1.0)
5456
ruby-progressbar (1.13.0)
55-
unicode-display_width (1.8.0)
57+
unicode-display_width (2.6.0)
5658

5759
PLATFORMS
5860
ruby
5961

6062
DEPENDENCIES
61-
pry-byebug
62-
rake (~> 13.0)
63-
rspec (~> 3.0)
64-
rubocop (~> 0.93)
63+
pry-byebug (= 3.10.1)
64+
rake
65+
rspec
66+
rubocop (= 1.68.0)
6567
rubocop-bugcrowd!
6668

6769
BUNDLED WITH
68-
2.1.4
70+
2.5.16

β€ŽRakefileβ€Ž

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ RSpec::Core::RakeTask.new(:spec)
77

88
task default: :spec
99

10-
require 'rspec/core/rake_task'
11-
1210
RSpec::Core::RakeTask.new(:spec) do |spec|
1311
spec.pattern = FileList['spec/**/*_spec.rb']
1412
end

β€Žlib/rubocop/bugcrowd/version.rbβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
module RuboCop
44
module Bugcrowd
5-
VERSION = '0.1.0'
5+
VERSION = '1.0.0'
66
end
77
end

β€Žlib/rubocop/cop/bugcrowd/add_index_non_concurrently.rbβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module Bugcrowd
1616
#
1717
# # good
1818
# add_index :table_name, :column, zibble: :bibble, algorithm: :concurrently
19-
class AddIndexNonConcurrently < Cop
19+
class AddIndexNonConcurrently < Base
2020
include Database
2121

2222
MSG = 'By default, Postgres locks writes to a table while creating an index on it ' \

β€Žlib/rubocop/cop/bugcrowd/avoid_sample_in_specs.rbβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module Bugcrowd
1818
# expect(thing).to have_some_property
1919
# expect(thing1).to have_some_property
2020
#
21-
class AvoidSampleInSpecs < Cop
21+
class AvoidSampleInSpecs < Base
2222
MSG = 'Avoid using sample in spec as it can cause non-deterministic behavior'
2323

2424
def_node_matcher :sample?, <<~PATTERN

β€Žlib/rubocop/cop/bugcrowd/can_with_class_const.rbβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module RuboCop
44
module Cop
55
module Bugcrowd
6-
class CanWithClassConst < RuboCop::Cop::Cop
6+
class CanWithClassConst < Base
77
MSG = <<~COPCONTENT
88
🚨 Don't call can? with a class constant, as it will unexpectedly pass. Use an instance instead. (https://github.com/CanCanCommunity/cancancan/wiki/Defining-Abilities-with-Blocks#only-for-object-attributes) 🚨
99
COPCONTENT

β€Žlib/rubocop/cop/bugcrowd/constant_assignment_specs.rbβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module RuboCop
44
module Cop
55
module Bugcrowd
6-
class ConstantAssignmentSpecs < RuboCop::Cop::Cop
6+
class ConstantAssignmentSpecs < Base
77
MSG = <<~COPCONTENT
88
🚨 Constants persist across specs due to global nature 🚨
99
COPCONTENT

β€Žlib/rubocop/cop/bugcrowd/controller_specs.rbβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module RuboCop
44
module Cop
55
module Bugcrowd
6-
class ControllerSpecs < RuboCop::Cop::Cop
6+
class ControllerSpecs < Base
77
MSG = <<~COPCONTENT
88
🚨 Controller specs are deprecated, please create request specs instead 🚨
99
See https://everydayrails.com/2016/08/29/replace-rspec-controller-tests.html for an overview

0 commit comments

Comments
Β (0)