Bump rubocop from 1.35.1 to 1.56.2

Among many things, this version includes updates in the
`Layout/ExtraSpacing`, `Layout/SpaceAroundOperators` and
`Style/RedundantReturn` rules, which means we need to update the code in
some places in order to follow these rules.

Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.35.1 to 1.56.2.
- [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.35.1...v1.56.2)

---
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:
dependabot[bot]
2023-09-04 15:24:28 +00:00
committed by Javi Martín
parent c3d666ddce
commit ff04009e4a
7 changed files with 15 additions and 11 deletions

View File

@@ -106,7 +106,7 @@ group :development do
gem "pronto-eslint", "~> 0.11.1", require: false gem "pronto-eslint", "~> 0.11.1", require: false
gem "pronto-rubocop", "~> 0.11.5", require: false gem "pronto-rubocop", "~> 0.11.5", require: false
gem "pronto-scss", "~> 0.11.0", require: false gem "pronto-scss", "~> 0.11.0", require: false
gem "rubocop", "~> 1.35.1", require: false gem "rubocop", "~> 1.56.2", require: false
gem "rubocop-performance", "~> 1.19.0", require: false gem "rubocop-performance", "~> 1.19.0", require: false
gem "rubocop-rails", "~> 2.20.2", require: false gem "rubocop-rails", "~> 2.20.2", require: false
gem "rubocop-rspec", "~> 2.17.1", require: false gem "rubocop-rspec", "~> 2.17.1", require: false

View File

@@ -91,6 +91,7 @@ GEM
babel-transpiler (0.7.0) babel-transpiler (0.7.0)
babel-source (>= 4.0, < 6) babel-source (>= 4.0, < 6)
execjs (~> 2.0) execjs (~> 2.0)
base64 (0.1.1)
bcrypt (3.1.19) bcrypt (3.1.19)
better_html (2.0.2) better_html (2.0.2)
actionview (>= 6.0) actionview (>= 6.0)
@@ -306,6 +307,7 @@ GEM
rexml rexml
kramdown-parser-gfm (1.1.0) kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0) kramdown (~> 2.0)
language_server-protocol (3.17.0.3)
launchy (2.5.2) launchy (2.5.2)
addressable (~> 2.8) addressable (~> 2.8)
leaflet-rails (1.9.3) leaflet-rails (1.9.3)
@@ -513,16 +515,18 @@ GEM
rspec-mocks (~> 3.10) rspec-mocks (~> 3.10)
rspec-support (~> 3.10) rspec-support (~> 3.10)
rspec-support (3.11.0) rspec-support (3.11.0)
rubocop (1.35.1) rubocop (1.56.2)
base64 (~> 0.1.1)
json (~> 2.3) json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10) parallel (~> 1.10)
parser (>= 3.1.2.1) parser (>= 3.2.2.3)
rainbow (>= 2.2.2, < 4.0) rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0) regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0) rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.20.1, < 2.0) rubocop-ast (>= 1.28.1, < 2.0)
ruby-progressbar (~> 1.7) ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0) unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.29.0) rubocop-ast (1.29.0)
parser (>= 3.2.1.0) parser (>= 3.2.1.0)
rubocop-performance (1.19.0) rubocop-performance (1.19.0)
@@ -742,7 +746,7 @@ DEPENDENCIES
rinku (~> 2.0.6) rinku (~> 2.0.6)
ros-apartment (~> 2.11.0) ros-apartment (~> 2.11.0)
rspec-rails (~> 5.1.2) rspec-rails (~> 5.1.2)
rubocop (~> 1.35.1) rubocop (~> 1.56.2)
rubocop-performance (~> 1.19.0) rubocop-performance (~> 1.19.0)
rubocop-rails (~> 2.20.2) rubocop-rails (~> 2.20.2)
rubocop-rspec (~> 2.17.1) rubocop-rspec (~> 2.17.1)

View File

@@ -270,7 +270,7 @@ class Budget
return permission_problem(user) if permission_problem?(user) return permission_problem(user) if permission_problem?(user)
return :different_heading_assigned unless valid_heading?(user) return :different_heading_assigned unless valid_heading?(user)
return :no_selecting_allowed unless budget.selecting? :no_selecting_allowed unless budget.selecting?
end end
def reason_for_not_being_ballotable_by(user, ballot) def reason_for_not_being_ballotable_by(user, ballot)

View File

@@ -73,7 +73,7 @@ class Legislation::Proposal < ApplicationRecord
def self.search_by_code(terms) def self.search_by_code(terms)
matched_code = match_code(terms) matched_code = match_code(terms)
results = where(id: matched_code[1]) if matched_code results = where(id: matched_code[1]) if matched_code
return results if results.present? && results.first.code == terms results if results.present? && results.first.code == terms
end end
def self.match_code(terms) def self.match_code(terms)

View File

@@ -145,7 +145,7 @@ class Proposal < ApplicationRecord
def self.search_by_code(terms) def self.search_by_code(terms)
matched_code = match_code(terms) matched_code = match_code(terms)
results = where(id: matched_code[1]) if matched_code results = where(id: matched_code[1]) if matched_code
return results if results.present? && results.first.code == terms results if results.present? && results.first.code == terms
end end
def self.match_code(terms) def self.match_code(terms)