Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Rubocop libraries #9201

Merged
merged 8 commits into from
May 3, 2022
Merged
144 changes: 144 additions & 0 deletions .rubocop-disabled.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
RSpec/SubjectDeclaration:
Enabled: false

RSpec/ExcessiveDocstringSpacing:
Enabled: false

RSpec/StubbedMock:
Enabled: false

Rails/DurationArithmetic:
Enabled: false

RSpec/FactoryBot/SyntaxMethods:
Enabled: false

Naming/VariableNumber:
Enabled: false

Lint/SymbolConversion:
Enabled: false

Lint/EmptyClass:
Enabled: false

Lint/RedundantSafeNavigation:
Enabled: false

Lint/EmptyBlock:
Enabled: false

Lint/NoReturnInBeginEndBlocks:
Enabled: false

Lint/RedundantCopDisableDirective:
Enabled: false

Style/RedundantArgument:
Enabled: false

Style/WordArray:
Enabled: false

Style/MapToHash:
Enabled: false

Style/HashConversion:
Enabled: false

Style/GlobalVars:
Enabled: false

Style/RedundantBegin:
Enabled: false

Style/QuotedSymbols:
Enabled: false

Style/FetchEnvVar:
Enabled: false

Style/RedundantParentheses:
Enabled: false

Style/DocumentDynamicEvalDefinition:
Enabled: false

Style/ClassEqualityComparison:
Enabled: false

Style/NegatedIfElseCondition:
Enabled: false

Style/OpenStructUse:
Enabled: false

Security/IoMethods:
Enabled: false

Layout/EmptyLineBetweenDefs:
Enabled: false

Layout/LineEndStringConcatenationIndentation:
Enabled: false

Rails/CompactBlank:
Enabled: false

Security/Open:
Enabled: false

Lint/DuplicateBranch:
Enabled: false

Layout/LeadingCommentSpace:
Enabled: false

Lint/AmbiguousOperatorPrecedence:
Enabled: false

Rails/EagerEvaluationLogMessage:
Enabled: false

Style/FileWrite:
Enabled: false
Rails/RedundantPresenceValidationOnBelongsTo:
Enabled: false

Rails/HasManyOrHasOneDependent:
Enabled: false

Lint/UnmodifiedReduceAccumulator:
Enabled: false

Gemspec/RequireMFA:
Enabled: false

Style/SelectByRegexp:
Enabled: false

Rails/DuplicateScope:
Enabled: false

RSpec/IdenticalEqualityAssertion:
Enabled: false
Style/StringChars:
Enabled: false
Rails/ExpandedDateRange:
Enabled: false

Rails/I18nLocaleTexts:
Enabled: false

Naming/MemoizedInstanceVariableName:
Enabled: false
RSpec/VerifiedDoubleReference:
Enabled: false
Rails/TransactionExitStatement:
Enabled: false

RSpec/BeNil:
Enabled: false

RSpec/BeEq:
Enabled: false
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
inherit_from:
- .rubocop_ruby.yml
- .rubocop_rails.yml
- .rubocop-disabled.yml
8 changes: 4 additions & 4 deletions .rubocop_ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ AllCops:
# Otherwise we fallback to the oldest officially supported Ruby version (2.0).
TargetRubyVersion: 2.7

RSpec:
Patterns:
- "(?:^|/)spec/"
- "(?:^|/)test/"
# RSpec:
# Patterns:
# - "(?:^|/)spec/"
# - "(?:^|/)test/"

# Indent private/protected/public as deep as method definitions
Layout/AccessModifierIndentation:
Expand Down
32 changes: 16 additions & 16 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ PATH
rspec-rails (~> 4.0)
rspec-retry (~> 0.6.2)
rspec_junit_formatter (~> 0.3.0)
rubocop (~> 0.92.0)
rubocop-rails (~> 2.8)
rubocop-rspec (= 1.43.2)
rubocop (~> 1.28.0)
rubocop-rails (~> 2.14)
rubocop-rspec (~> 2.10)
selenium-webdriver (~> 3.142)
simplecov (~> 0.19.0)
simplecov-cobertura (~> 1.3.1)
Expand Down Expand Up @@ -596,7 +596,7 @@ GEM
paper_trail (12.2.0)
activerecord (>= 5.2)
request_store (~> 1.1)
parallel (1.21.0)
parallel (1.22.1)
parallel_tests (3.7.3)
parallel
parser (3.1.2.0)
Expand Down Expand Up @@ -671,7 +671,7 @@ GEM
ffi (~> 1.0)
redcarpet (3.5.1)
redis (4.6.0)
regexp_parser (2.2.1)
regexp_parser (2.3.1)
request_store (1.5.1)
rack (>= 1.4)
responders (3.0.1)
Expand Down Expand Up @@ -709,26 +709,26 @@ GEM
rspec-support (3.11.0)
rspec_junit_formatter (0.3.0)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (0.92.0)
rubocop (1.28.2)
parallel (~> 1.10)
parser (>= 2.7.1.5)
parser (>= 3.1.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.7)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 0.5.0)
rubocop-ast (>= 1.17.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (1.16.0)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.17.0)
parser (>= 3.1.1.0)
rubocop-faker (1.1.0)
faker (>= 2.12.0)
rubocop (>= 0.82.0)
rubocop-rails (2.9.1)
rubocop-rails (2.14.2)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 0.90.0, < 2.0)
rubocop-rspec (1.43.2)
rubocop (~> 0.87)
rubocop (>= 1.7.0, < 2.0)
rubocop-rspec (2.10.0)
rubocop (~> 1.19)
ruby-progressbar (1.11.0)
ruby-vips (2.1.4)
ffi (~> 1.12)
Expand Down Expand Up @@ -778,7 +778,7 @@ GEM
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
uber (0.1.0)
unicode-display_width (1.8.0)
unicode-display_width (2.1.0)
valid_email2 (2.3.1)
activemodel (>= 3.2)
mail (~> 2.5)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

it "does not allow visiting component" do
expect(page).to have_content "You are not authorized"
# rubocop:disable Capybara/CurrentPathExpectation
# rubocop:disable RSpec/Capybara/CurrentPathExpectation
expect(page.current_path).not_to match main_component_path(component)
# rubocop:enable Capybara/CurrentPathExpectation
# rubocop:enable RSpec/Capybara/CurrentPathExpectation
end
end

Expand All @@ -34,9 +34,9 @@
context "when a valid share_token is provided" do
it "allows visiting component" do
expect(page).not_to have_content "You are not authorized"
# rubocop:disable Capybara/CurrentPathExpectation
# rubocop:disable RSpec/Capybara/CurrentPathExpectation
expect(page.current_path).to match main_component_path(component)
# rubocop:enable Capybara/CurrentPathExpectation
# rubocop:enable RSpec/Capybara/CurrentPathExpectation
end
end

Expand All @@ -45,9 +45,9 @@

it "does not allow visiting component" do
expect(page).to have_content "You are not authorized"
# rubocop:disable Capybara/CurrentPathExpectation
# rubocop:disable RSpec/Capybara/CurrentPathExpectation
expect(page.current_path).not_to match main_component_path(component)
# rubocop:enable Capybara/CurrentPathExpectation
# rubocop:enable RSpec/Capybara/CurrentPathExpectation
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions decidim-core/spec/commands/decidim/search_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
before do
create_list(:searchable_resource, 5, organization: current_organization, resource_type: resource_type, content_a: "Where's your crown king nothing?")

# rubocop:disable FactoryBot/CreateList
# rubocop:disable RSpec/FactoryBot/CreateList
3.times do
create(
:searchable_resource,
Expand All @@ -204,7 +204,7 @@
content_a: "Where's your crown king nothing?"
)
end
# rubocop:enable FactoryBot/CreateList
# rubocop:enable RSpec/FactoryBot/CreateList
end

context "when resource_type is setted" do
Expand Down
6 changes: 3 additions & 3 deletions decidim-dev/decidim-dev.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ Gem::Specification.new do |s|
s.add_dependency "rspec_junit_formatter", "~> 0.3.0"
s.add_dependency "rspec-rails", "~> 4.0"
s.add_dependency "rspec-retry", "~> 0.6.2"
s.add_dependency "rubocop", "~> 0.92.0"
s.add_dependency "rubocop-rails", "~> 2.8"
s.add_dependency "rubocop-rspec", "= 1.43.2"
s.add_dependency "rubocop", "~> 1.28.0"
s.add_dependency "rubocop-rails", "~> 2.14"
s.add_dependency "rubocop-rspec", "~> 2.10"
s.add_dependency "selenium-webdriver", "~> 3.142"
s.add_dependency "simplecov", "~> 0.19.0"
s.add_dependency "simplecov-cobertura", "~> 1.3.1"
Expand Down
32 changes: 16 additions & 16 deletions decidim-generators/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ PATH
rspec-rails (~> 4.0)
rspec-retry (~> 0.6.2)
rspec_junit_formatter (~> 0.3.0)
rubocop (~> 0.92.0)
rubocop-rails (~> 2.8)
rubocop-rspec (= 1.43.2)
rubocop (~> 1.28.0)
rubocop-rails (~> 2.14)
rubocop-rspec (~> 2.10)
selenium-webdriver (~> 3.142)
simplecov (~> 0.19.0)
simplecov-cobertura (~> 1.3.1)
Expand Down Expand Up @@ -596,7 +596,7 @@ GEM
paper_trail (12.2.0)
activerecord (>= 5.2)
request_store (~> 1.1)
parallel (1.21.0)
parallel (1.22.1)
parallel_tests (3.7.3)
parallel
parser (3.1.2.0)
Expand Down Expand Up @@ -671,7 +671,7 @@ GEM
ffi (~> 1.0)
redcarpet (3.5.1)
redis (4.6.0)
regexp_parser (2.2.1)
regexp_parser (2.3.1)
request_store (1.5.1)
rack (>= 1.4)
responders (3.0.1)
Expand Down Expand Up @@ -709,23 +709,23 @@ GEM
rspec-support (3.11.0)
rspec_junit_formatter (0.3.0)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (0.92.0)
rubocop (1.28.2)
parallel (~> 1.10)
parser (>= 2.7.1.5)
parser (>= 3.1.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.7)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 0.5.0)
rubocop-ast (>= 1.17.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (1.16.0)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.17.0)
parser (>= 3.1.1.0)
rubocop-rails (2.9.1)
rubocop-rails (2.14.2)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 0.90.0, < 2.0)
rubocop-rspec (1.43.2)
rubocop (~> 0.87)
rubocop (>= 1.7.0, < 2.0)
rubocop-rspec (2.10.0)
rubocop (~> 1.19)
ruby-progressbar (1.11.0)
ruby-vips (2.1.4)
ffi (~> 1.12)
Expand Down Expand Up @@ -775,7 +775,7 @@ GEM
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
uber (0.1.0)
unicode-display_width (1.8.0)
unicode-display_width (2.1.0)
valid_email2 (2.3.1)
activemodel (>= 3.2)
mail (~> 2.5)
Expand Down
2 changes: 1 addition & 1 deletion decidim-generators/lib/decidim/generators/app_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def add_queue_adapter
route <<~RUBY
authenticate :user, ->(u) { u.admin? } do
mount Sidekiq::Web => "/sidekiq"
end
end
RUBY

add_production_gems do
Expand Down