From 204704da06c9fb4a260d820203fb674fed96eb08 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2025 16:25:44 +0000 Subject: [PATCH] Bump rubocop from 1.66.1 to 1.71.2 Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.66.1 to 1.71.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.66.1...v1.71.2) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Note: Fix SafeNavigation offense detected by RuboCop 1.67.0 Remove redundant condition that became unnecessary after updating RuboCop. --- Gemfile | 2 +- Gemfile.lock | 10 +++++----- app/controllers/legislation/annotations_controller.rb | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Gemfile b/Gemfile index 65e387b36..769d0f262 100644 --- a/Gemfile +++ b/Gemfile @@ -101,7 +101,7 @@ group :development do gem "pronto-eslint", "~> 0.11.1", require: false gem "pronto-rubocop", "~> 0.11.6", require: false gem "pronto-stylelint", "~> 0.11.0", require: false - gem "rubocop", "~> 1.66.1", require: false + gem "rubocop", "~> 1.71.2", require: false gem "rubocop-capybara", "~> 2.21.0", require: false gem "rubocop-factory_bot", "~> 2.26.1", require: false gem "rubocop-performance", "~> 1.23.1", require: false diff --git a/Gemfile.lock b/Gemfile.lock index 79d29584a..deaf13268 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -553,16 +553,16 @@ GEM rspec-mocks (~> 3.13) rspec-support (~> 3.13) rspec-support (3.13.1) - rubocop (1.66.1) + rubocop (1.71.2) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 2.4, < 3.0) - rubocop-ast (>= 1.32.2, < 2.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.38.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 2.4.0, < 3.0) + unicode-display_width (>= 2.4.0, < 4.0) rubocop-ast (1.38.1) parser (>= 3.3.1.0) rubocop-capybara (2.21.0) @@ -786,7 +786,7 @@ DEPENDENCIES rinku (~> 2.0.6) ros-apartment (~> 2.11.0) rspec-rails (~> 7.0.1) - rubocop (~> 1.66.1) + rubocop (~> 1.71.2) rubocop-capybara (~> 2.21.0) rubocop-factory_bot (~> 2.26.1) rubocop-performance (~> 1.23.1) diff --git a/app/controllers/legislation/annotations_controller.rb b/app/controllers/legislation/annotations_controller.rb index ce83d684b..ccc577320 100644 --- a/app/controllers/legislation/annotations_controller.rb +++ b/app/controllers/legislation/annotations_controller.rb @@ -101,7 +101,7 @@ class Legislation::AnnotationsController < Legislation::BaseController def convert_ranges_parameters annotation = params[:legislation_annotation] - if annotation && annotation[:ranges] && annotation[:ranges].is_a?(String) + if annotation && annotation[:ranges]&.is_a?(String) params[:legislation_annotation][:ranges] = JSON.parse(annotation[:ranges]) end rescue JSON::ParserError