Bump rubocop from 1.56.4 to 1.61.0
This version fixes false negatives for Lint/SymbolConversion when using string interpolation, for Style/RedundantArgument when using the safe navigation operator, for Style/RedundantParentheses when logical operators are involved and for Style/RedundantReturn with lambda ending with return. We're applying the new rules. Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.56.4 to 1.61.0. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.56.4...v1.61.0) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
Javi Martín
parent
e24ebf9406
commit
f4203909db
2
Gemfile
2
Gemfile
@@ -99,7 +99,7 @@ group :development do
|
||||
gem "pronto-eslint", "~> 0.11.1", require: false
|
||||
gem "pronto-rubocop", "~> 0.11.5", require: false
|
||||
gem "pronto-scss", "~> 0.11.0", require: false
|
||||
gem "rubocop", "~> 1.56.4", require: false
|
||||
gem "rubocop", "~> 1.61.0", require: false
|
||||
gem "rubocop-capybara", "~> 2.20.0", require: false
|
||||
gem "rubocop-factory_bot", "~> 2.25.1", require: false
|
||||
gem "rubocop-performance", "~> 1.20.2", require: false
|
||||
|
||||
@@ -526,16 +526,15 @@ GEM
|
||||
rspec-mocks (~> 3.13)
|
||||
rspec-support (~> 3.13)
|
||||
rspec-support (3.13.1)
|
||||
rubocop (1.56.4)
|
||||
base64 (~> 0.1.1)
|
||||
rubocop (1.61.0)
|
||||
json (~> 2.3)
|
||||
language_server-protocol (>= 3.17.0)
|
||||
parallel (~> 1.10)
|
||||
parser (>= 3.2.2.3)
|
||||
parser (>= 3.3.0.2)
|
||||
rainbow (>= 2.2.2, < 4.0)
|
||||
regexp_parser (>= 1.8, < 3.0)
|
||||
rexml (>= 3.2.5, < 4.0)
|
||||
rubocop-ast (>= 1.28.1, < 2.0)
|
||||
rubocop-ast (>= 1.30.0, < 2.0)
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (>= 2.4.0, < 3.0)
|
||||
rubocop-ast (1.31.2)
|
||||
@@ -758,7 +757,7 @@ DEPENDENCIES
|
||||
rinku (~> 2.0.6)
|
||||
ros-apartment (~> 2.11.0)
|
||||
rspec-rails (~> 6.1.2)
|
||||
rubocop (~> 1.56.4)
|
||||
rubocop (~> 1.61.0)
|
||||
rubocop-capybara (~> 2.20.0)
|
||||
rubocop-factory_bot (~> 2.25.1)
|
||||
rubocop-performance (~> 1.20.2)
|
||||
|
||||
@@ -64,10 +64,10 @@ class Budgets::Investments::VotesComponent < ApplicationComponent
|
||||
t("votes.budget_investments.#{reason}",
|
||||
count: investment.group.max_votable_headings,
|
||||
verify_account: link_to_verify_account,
|
||||
supported_headings: (current_user && current_user.headings_voted_within_group(investment.group)
|
||||
.map(&:name)
|
||||
.sort
|
||||
.to_sentence))
|
||||
supported_headings: current_user && current_user.headings_voted_within_group(investment.group)
|
||||
.map(&:name)
|
||||
.sort
|
||||
.to_sentence)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -9,7 +9,7 @@ class Admin::Legislation::HomepagesController < Admin::Legislation::BaseControll
|
||||
def update
|
||||
if @process.update(process_params)
|
||||
link = legislation_process_path(@process)
|
||||
redirect_back(fallback_location: (request.referer || root_path),
|
||||
redirect_back(fallback_location: request.referer || root_path,
|
||||
notice: t("admin.legislation.processes.update.notice", link: link))
|
||||
else
|
||||
flash.now[:error] = t("admin.legislation.processes.update.error")
|
||||
|
||||
@@ -27,7 +27,7 @@ class Admin::Legislation::ProcessesController < Admin::Legislation::BaseControll
|
||||
def update
|
||||
if @process.update(process_params)
|
||||
link = legislation_process_path(@process)
|
||||
redirect_back(fallback_location: (request.referer || root_path),
|
||||
redirect_back(fallback_location: request.referer || root_path,
|
||||
notice: t("admin.legislation.processes.update.notice", link: link))
|
||||
else
|
||||
flash.now[:error] = t("admin.legislation.processes.update.error")
|
||||
|
||||
@@ -57,7 +57,7 @@ class Admin::Poll::ShiftsController < Admin::Poll::BaseController
|
||||
|
||||
def shift_params
|
||||
shift_params = params.require(:shift).permit(allowed_params)
|
||||
shift_params.merge(date: shift_params[:date]["#{shift_params[:task]}_date".to_sym])
|
||||
shift_params.merge(date: shift_params[:date][:"#{shift_params[:task]}_date"])
|
||||
end
|
||||
|
||||
def allowed_params
|
||||
|
||||
@@ -75,7 +75,7 @@ module CommentableActions
|
||||
private
|
||||
|
||||
def track_event
|
||||
ahoy.track "#{resource_name}_created".to_sym, "#{resource_name}_id": resource.id
|
||||
ahoy.track :"#{resource_name}_created", "#{resource_name}_id": resource.id
|
||||
end
|
||||
|
||||
def tag_cloud
|
||||
|
||||
@@ -16,7 +16,7 @@ module Documentable
|
||||
end
|
||||
|
||||
def accepted_content_types
|
||||
Setting["uploads.documents.content_types"]&.split(" ") || ["application/pdf"]
|
||||
Setting["uploads.documents.content_types"]&.split || ["application/pdf"]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -34,10 +34,10 @@ class Dashboard::Action < ApplicationRecord
|
||||
scope :resources, -> { where(action_type: 1) }
|
||||
scope :proposed_actions, -> { where(action_type: 0) }
|
||||
scope :by_proposal, lambda { |proposal|
|
||||
return where(published_proposal: false) if proposal.draft?
|
||||
where(published_proposal: false) if proposal.draft?
|
||||
}
|
||||
scope :by_published_proposal, lambda { |published|
|
||||
return where(published_proposal: published)
|
||||
where(published_proposal: published)
|
||||
}
|
||||
|
||||
def self.active_for(proposal)
|
||||
|
||||
@@ -24,7 +24,7 @@ class Image < ApplicationRecord
|
||||
end
|
||||
|
||||
def self.accepted_content_types
|
||||
Setting["uploads.images.content_types"]&.split(" ") || ["image/jpeg"]
|
||||
Setting["uploads.images.content_types"]&.split || ["image/jpeg"]
|
||||
end
|
||||
|
||||
def self.humanized_accepted_content_types
|
||||
|
||||
@@ -40,7 +40,7 @@ class Setting < ApplicationRecord
|
||||
end
|
||||
|
||||
def accepted_content_types_for(group)
|
||||
mime_content_types = Setting["uploads.#{group}.content_types"]&.split(" ") || []
|
||||
mime_content_types = Setting["uploads.#{group}.content_types"]&.split || []
|
||||
Setting.mime_types[group].select { |_, content_type| mime_content_types.include?(content_type) }.keys
|
||||
end
|
||||
|
||||
|
||||
@@ -18,9 +18,9 @@ module Emails
|
||||
|
||||
def fill_in_newsletter_form(options = {})
|
||||
select (options[:segment_recipient] || "All users"), from: "Recipients"
|
||||
fill_in "Subject", with: (options[:subject] || "This is a different subject")
|
||||
fill_in "Subject", with: options[:subject] || "This is a different subject"
|
||||
fill_in "E-mail address that will appear as sending the newsletter",
|
||||
with: (options[:from] || "no-reply@consul.dev")
|
||||
fill_in_ckeditor "Email content", with: (options[:body] || "This is a different body")
|
||||
with: options[:from] || "no-reply@consul.dev"
|
||||
fill_in_ckeditor "Email content", with: options[:body] || "This is a different body"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -61,8 +61,8 @@ module Notifications
|
||||
|
||||
def fill_in_admin_notification_form(options = {})
|
||||
select (options[:segment_recipient] || "All users"), from: :admin_notification_segment_recipient
|
||||
fill_in "Title", with: (options[:title] || "This is the notification title")
|
||||
fill_in "Text", with: (options[:body] || "This is the notification body")
|
||||
fill_in :admin_notification_link, with: (options[:link] || "https://www.decide.madrid.es/vota")
|
||||
fill_in "Title", with: options[:title] || "This is the notification title"
|
||||
fill_in "Text", with: options[:body] || "This is the notification body"
|
||||
fill_in :admin_notification_link, with: options[:link] || "https://www.decide.madrid.es/vota"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user