diff --git a/CHANGELOG.md b/CHANGELOG.md index eb445931d..2dd03a664 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ New entries in this file should aim to provide a meaningful amount of informatio ## [Unreleased] +### Chores +- Bump rubocop from 1.57.2 to 1.58.0 [PR#3299](https://github.com/ualbertalib/jupiter/pull/3299) + ## [2.6.1] - 2023-10-17 ### Added diff --git a/Gemfile b/Gemfile index b4a811319..7b03b3d07 100644 --- a/Gemfile +++ b/Gemfile @@ -93,7 +93,7 @@ group :development, :test do gem 'pry-byebug' gem 'pry-rails' - gem 'rubocop', '~> 1.57.2', require: false + gem 'rubocop', '~> 1.58.0', require: false gem 'rubocop-minitest', require: false gem 'rubocop-performance', require: false gem 'rubocop-rails', require: false diff --git a/Gemfile.lock b/Gemfile.lock index a027af48c..3ba9d5ada 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -293,7 +293,7 @@ GEM jbuilder (2.11.5) actionview (>= 5.0.0) activesupport (>= 5.0.0) - json (2.6.3) + json (2.7.0) json-schema (4.1.1) addressable (>= 2.8) jwt (2.2.3) @@ -479,7 +479,7 @@ GEM rsolr (2.5.0) builder (>= 2.1.2) faraday (>= 0.9, < 3, != 2.0.0) - rubocop (1.57.2) + rubocop (1.58.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) @@ -487,7 +487,7 @@ GEM 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.30.0) @@ -679,7 +679,7 @@ DEPENDENCIES redis (~> 4.8) rollbar rsolr - rubocop (~> 1.57.2) + rubocop (~> 1.58.0) rubocop-minitest rubocop-performance rubocop-rails diff --git a/app/controllers/concerns/draft_actions.rb b/app/controllers/concerns/draft_actions.rb index d55e8be26..038bc9ea3 100644 --- a/app/controllers/concerns/draft_actions.rb +++ b/app/controllers/concerns/draft_actions.rb @@ -124,11 +124,11 @@ def item_class end def describe_step_name - "describe_#{item_class.model_name.singular}".to_sym + :"describe_#{item_class.model_name.singular}" end def review_step_name - "review_and_deposit_#{item_class.model_name.singular}".to_sym + :"review_and_deposit_#{item_class.model_name.singular}" end def draft_param @@ -136,7 +136,7 @@ def draft_param end def draft_id_param - "#{item_class.model_name.singular}_id".to_sym + :"#{item_class.model_name.singular}_id" end def set_draft diff --git a/app/controllers/concerns/draft_files_actions.rb b/app/controllers/concerns/draft_files_actions.rb index 2353dc931..cfbb25bf5 100644 --- a/app/controllers/concerns/draft_files_actions.rb +++ b/app/controllers/concerns/draft_files_actions.rb @@ -58,7 +58,7 @@ def item_class end def draft_id_param - "#{item_class.model_name.singular}_id".to_sym + :"#{item_class.model_name.singular}_id" end def set_draft diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index 46d757506..b5f06f549 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -5,7 +5,7 @@ class SearchController < ApplicationController skip_after_action :verify_authorized def index - models = case (params[:tab] || DEFAULT_TAB) + models = case params[:tab] || DEFAULT_TAB when 'item' [Item, Thesis] when 'collection' diff --git a/app/models/item.rb b/app/models/item.rb index b6da36884..f3a5484b7 100644 --- a/app/models/item.rb +++ b/app/models/item.rb @@ -64,7 +64,7 @@ def item_type_with_status_code publication_status_code = ControlledVocabulary.era.publication_status.from_uri(publication_status.first) # Next line of code means that 'article_submitted' exists, but 'article_draft' doesn't ("There can be only one!") publication_status_code = :submitted if publication_status_code == :draft - "#{item_type_code}_#{publication_status_code}".to_sym + :"#{item_type_code}_#{publication_status_code}" rescue ArgumentError nil end diff --git a/app/models/jupiter_core/solr_services/deferred_faceted_solr_query.rb b/app/models/jupiter_core/solr_services/deferred_faceted_solr_query.rb index 60db7180b..2631b057e 100644 --- a/app/models/jupiter_core/solr_services/deferred_faceted_solr_query.rb +++ b/app/models/jupiter_core/solr_services/deferred_faceted_solr_query.rb @@ -168,9 +168,9 @@ def limit_value end # Kaminari integration - define_method Kaminari.config.page_method_name, (proc { |num| + define_method Kaminari.config.page_method_name, proc { |num| limit(default_per_page).offset(default_per_page * ([num.to_i, 1].max - 1)) - }) + } def count @count_cache ||= super