diff --git a/Gemfile.lock b/Gemfile.lock index 564dfc527..6c6c9f9a7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -301,14 +301,14 @@ GEM i18n (1.14.1) concurrent-ruby (~> 1.0) io-console (0.6.0) - irb (1.9.1) + irb (1.10.0) rdoc reline (>= 0.3.8) iso-639 (0.3.6) jbuilder (2.11.5) actionview (>= 5.0.0) activesupport (>= 5.0.0) - json (2.6.3) + json (2.7.0) jwt (2.7.1) kaminari (1.2.2) activesupport (>= 4.1.0) @@ -375,7 +375,7 @@ GEM namae (1.1.1) net-http-persistent (4.0.2) connection_pool (~> 2.2) - net-imap (0.4.6) + net-imap (0.4.7) date net-protocol net-pop (0.1.2) @@ -389,7 +389,7 @@ GEM net-ssh (7.2.0) newrelic_rpm (9.6.0) base64 - nio4r (2.6.1) + nio4r (2.7.0) nokogiri (1.15.5-x86_64-darwin) racc (~> 1.4) nokogiri (1.15.5-x86_64-linux) @@ -473,7 +473,7 @@ GEM psych (>= 4.0.0) recaptcha (5.16.0) regexp_parser (2.8.2) - reline (0.4.0) + reline (0.4.1) io-console (~> 0.5) responders (3.1.1) actionpack (>= 5.2) @@ -507,7 +507,7 @@ GEM rspec-mocks (~> 3.10) rspec-support (~> 3.10) rspec-support (3.12.1) - rubocop (1.57.2) + rubocop (1.58.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) @@ -515,7 +515,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) @@ -583,10 +583,10 @@ GEM sshkit (1.21.6) net-scp (>= 1.1.2) net-ssh (>= 2.8.0) - stanford-mods (3.3.7) + stanford-mods (3.3.9) activesupport mods (~> 3.0, >= 3.0.4) - stringio (3.0.9) + stringio (3.1.0) thor (1.3.0) tilt (2.3.0) timeout (0.4.1) diff --git a/app/controllers/articles_controller.rb b/app/controllers/articles_controller.rb index 9baf09e53..1e90c0a4f 100644 --- a/app/controllers/articles_controller.rb +++ b/app/controllers/articles_controller.rb @@ -148,7 +148,7 @@ def eds_init } # Register section fields with show/index presenters to leverage rendering pipeline - config.show.sections.each do |_section, fields| + config.show.sections.each_value do |fields| fields.each do |field, options| config.add_show_field field.to_s, options end diff --git a/app/controllers/concerns/all_caps_params.rb b/app/controllers/concerns/all_caps_params.rb index 3119397ef..4c9b0ff02 100644 --- a/app/controllers/concerns/all_caps_params.rb +++ b/app/controllers/concerns/all_caps_params.rb @@ -12,7 +12,7 @@ module AllCapsParams def downcase_all_caps_params downcase_all_caps_param params, :q - params[:clause]&.each do |key, clause_hash| + params[:clause]&.each_value do |clause_hash| downcase_all_caps_param clause_hash, :query end end diff --git a/app/controllers/concerns/replace_special_quotes.rb b/app/controllers/concerns/replace_special_quotes.rb index ea5a5b9ed..4c6901105 100644 --- a/app/controllers/concerns/replace_special_quotes.rb +++ b/app/controllers/concerns/replace_special_quotes.rb @@ -17,7 +17,7 @@ module ReplaceSpecialQuotes def replace_special_quotes replace_single_quotes_from_hash params, :q - params[:clause]&.each do |key, value| + params[:clause]&.each_value do |value| replace_single_quotes_from_hash value, :query end end diff --git a/app/controllers/course_reserves_controller.rb b/app/controllers/course_reserves_controller.rb index 5858fa9d5..ca276e5bd 100644 --- a/app/controllers/course_reserves_controller.rb +++ b/app/controllers/course_reserves_controller.rb @@ -8,7 +8,7 @@ def index facet = "crez_course_info" p = {} p[:"facet.field"] = facet - p[:"f.#{facet}.facet.limit"] = "-1" # this implies lexical sort + p[:"f.#{facet}.facet.limit"] = "-1" # this implies lexical sort p[:rows] = 0 response = blacklight_config.repository.search(p) course_reserves = [] diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 14cc8c440..6b7586994 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -51,7 +51,7 @@ def link_to_data_with_label(doc, label, field_string, url) end end end - { label:, fields: items, vernacular: vern } unless (items.empty? and vern.empty?) + { label:, fields: items, vernacular: vern } unless items.empty? and vern.empty? end def get_indexed_vernacular(doc, field) diff --git a/app/mailers/search_works_record_mailer.rb b/app/mailers/search_works_record_mailer.rb index 97519718a..3c61bc63e 100644 --- a/app/mailers/search_works_record_mailer.rb +++ b/app/mailers/search_works_record_mailer.rb @@ -56,7 +56,7 @@ def subject_from_details(details, documents) I18n.t( 'blacklight.email.text.subject', count: documents.length, - title: (documents.first.to_semantic_values[:title].try(:first) || 'N/A') + title: documents.first.to_semantic_values[:title].try(:first) || 'N/A' ) end end diff --git a/app/policies/item_request_link_policy.rb b/app/policies/item_request_link_policy.rb index 48d8265f7..f8dbe13de 100644 --- a/app/policies/item_request_link_policy.rb +++ b/app/policies/item_request_link_policy.rb @@ -21,8 +21,8 @@ def show? def folio_holdable? return false unless Settings.folio_hold_recall_statuses.include?(item.folio_status) - (item.allowed_request_types.include?('Hold') || - item.allowed_request_types.include?('Recall')) + item.allowed_request_types.include?('Hold') || + item.allowed_request_types.include?('Recall') end def current_location diff --git a/app/services/folio/circulation_rules/transform.rb b/app/services/folio/circulation_rules/transform.rb index fbac7ca5a..42730eaf9 100644 --- a/app/services/folio/circulation_rules/transform.rb +++ b/app/services/folio/circulation_rules/transform.rb @@ -58,7 +58,6 @@ class Transform < Parslet::Transform tree = [] statements = statement.map do |s| if s[:indent].zero? - s[:criteria] = s[:criteria] tree = [s] else tree.pop while tree.last[:indent] >= s[:indent] diff --git a/app/services/folio/locations.rb b/app/services/folio/locations.rb index 5bc27371c..b0c5c91b3 100644 --- a/app/services/folio/locations.rb +++ b/app/services/folio/locations.rb @@ -48,7 +48,7 @@ def self.to_csv location['servicePointCodes'] = location['servicePointIds']&.map { |id| Folio::Types.service_points.dig(id, 'code') } # remove fields that are now unused - location.each { |key, _val| key.match?(/Ids?$/) && location.delete(key) } + location.each_key { |key| key.match?(/Ids?$/) && location.delete(key) } location.delete('primaryServicePoint') # is a UUID, despite how FOLIO named it location.delete('servicePoints') # always empty location.delete('metadata') diff --git a/app/views/catalog/_index_default.mobile.builder b/app/views/catalog/_index_default.mobile.builder index 36a408a9f..a5a1c5eb1 100644 --- a/app/views/catalog/_index_default.mobile.builder +++ b/app/views/catalog/_index_default.mobile.builder @@ -2,7 +2,7 @@ xml.item_id(doc[:id]) xml.title(doc["vern_" << document_show_link_field.to_s] ? doc["vern_" << document_show_link_field.to_s] : doc[document_show_link_field.to_s]) xml.pub_date(doc[:pub_date]) if doc[:pub_date] -xml.author(doc[:vern_title_245c_display] ? doc[:vern_title_245c_display] : doc[:title_245c_display] ? doc[:title_245c_display] : nil) if (doc[:title_245c_display] or doc[:vern_title_245c_display]) +xml.author(doc[:vern_title_245c_display] ? doc[:vern_title_245c_display] : doc[:title_245c_display] ? doc[:title_245c_display] : nil) if doc[:title_245c_display] or doc[:vern_title_245c_display] record_url = solr_document_url(doc[:id]) record_url << ".mobile" unless drupal_api? xml.mobile_record(record_url) diff --git a/lib/holdings/item.rb b/lib/holdings/item.rb index 4dcb7b301..fea172f53 100644 --- a/lib/holdings/item.rb +++ b/lib/holdings/item.rb @@ -210,7 +210,7 @@ def eresv? private def standard_or_zombie_library - (item_display[:library].presence || 'ZOMBIE') + item_display[:library].presence || 'ZOMBIE' end def current_location_is_reserve_desk? diff --git a/spec/views/marc_fields/_linked_author.html.erb_spec.rb b/spec/views/marc_fields/_linked_author.html.erb_spec.rb index cb5f41f20..0099d0889 100644 --- a/spec/views/marc_fields/_linked_author.html.erb_spec.rb +++ b/spec/views/marc_fields/_linked_author.html.erb_spec.rb @@ -2,7 +2,7 @@ RSpec.describe 'marc_fields/_linked_author' do include MarcMetadataFixtures - let(:document) { SolrDocument.new(marc_json_struct: send("linked_author_#{target}_fixture".to_sym)) } + let(:document) { SolrDocument.new(marc_json_struct: send(:"linked_author_#{target}_fixture")) } before do allow(view).to receive_messages(linked_author: LinkedAuthor.new(document, target))