diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index bbd62437..5a3fe290 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -17,7 +17,6 @@ Lint/AssignmentInCondition: Exclude: - 'app/models/dump_file.rb' - 'app/services/language_service.rb' - - 'bin/spring' - 'lib/tasks/orangeindex.rake' - 'app/services/index_functions.rb' diff --git a/Gemfile b/Gemfile index f2b425b7..81b0a407 100644 --- a/Gemfile +++ b/Gemfile @@ -10,17 +10,17 @@ gem 'bcrypt_pbkdf' gem 'bixby', '~> 5.0' gem 'bootstrap-sass', '~> 3.4.1' gem 'capistrano-passenger' -gem 'capistrano-rails', '~> 1.1.1' +gem 'capistrano-rails' gem 'capistrano-rails-console', require: false gem 'capybara' gem 'change_the_subject', '~> 0.3.2' gem 'ddtrace', '~> 0.54.2' gem 'devise' gem 'ed25519' -gem 'faraday', '~> 1.0.1' -gem 'faraday_middleware', '~> 1.0.0' +gem 'faraday', '~> 1.0' +gem 'faraday_middleware', '~> 1.0' gem 'ffi', '>= 1.9.25' -gem 'friendly_id', '~> 5.1.0' +gem 'friendly_id' gem 'gyoku', '~> 1.0' gem 'high_voltage', '~> 3.0' gem 'honeybadger', '~> 4.0' @@ -29,18 +29,18 @@ gem 'jquery-rails' gem 'jquery-tablesorter', '~> 1.21' gem 'lcsort' gem 'library_stdnums' -gem 'lightly', '~> 0.2.1' +gem 'lightly', "~> 0.2.1" gem 'lograge' gem 'logstash-event' gem 'loofah', '>= 2.2.3' gem 'loops', github: 'kovyrin/loops', branch: 'master' gem 'marc', '~> 1.0' gem 'marc_cleanup', github: "pulibrary/marc_cleanup", tag: 'v0.7.0' -gem 'multi_json', '~> 1.10.1' +gem 'multi_json' gem 'net-imap', require: false gem 'net-ldap' gem 'net-pop', require: false -gem 'net-sftp', '~> 2.1', '>= 2.1.2' +gem 'net-sftp' gem 'net-smtp', require: false gem 'oj' gem 'omniauth-cas' @@ -49,7 +49,7 @@ gem 'pg' gem "rack", ">= 2.0.6" gem 'rack-conneg', '~> 0.1.5' gem 'rails', '~> 7.0' -gem 'responders', '~> 3.0' +gem 'responders' gem 'rest-client' gem 'rsolr' gem 'rspec-rails' @@ -68,10 +68,6 @@ gem 'turbolinks' gem 'whenever', "~> 0.10" gem 'yard' -group :development do - # gem 'spring' -end - group :development, :test do # bundler and rake come in from the voyager_helpers gemspec gem 'coveralls_reborn' @@ -82,7 +78,6 @@ group :development, :test do gem 'pry-rails' gem 'puma', '~> 5.6' gem 'rails-controller-testing' - gem 'rerun', '~> 0.10.0' gem 'simplecov' gem 'solargraph' gem 'solr_wrapper' diff --git a/Gemfile.lock b/Gemfile.lock index 61f33244..1989aee1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -121,14 +121,14 @@ GEM i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - addressable (2.8.5) + addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) - airbrussh (1.4.1) + airbrussh (1.5.0) sshkit (>= 1.6.1, != 1.7.0) ast (2.4.2) autoprefixer-rails (10.4.7.0) execjs (~> 2) - aws-eventstream (1.2.0) + aws-eventstream (1.3.0) aws-partitions (1.658.0) aws-sdk-core (3.166.0) aws-eventstream (~> 1, >= 1.0.2) @@ -161,7 +161,7 @@ GEM backport (1.2.0) bcrypt (3.1.18) bcrypt_pbkdf (1.1.0) - benchmark (0.2.0) + benchmark (0.3.0) bixby (5.0.2) rubocop (= 1.28.2) rubocop-ast @@ -173,18 +173,18 @@ GEM sassc (>= 2.0.0) builder (3.2.4) byebug (11.1.3) - capistrano (3.17.1) + capistrano (3.18.0) airbrussh (>= 1.0.0) i18n rake (>= 10.0.0) sshkit (>= 1.9.0) - capistrano-bundler (1.6.0) + capistrano-bundler (2.1.0) capistrano (~> 3.1) capistrano-passenger (0.2.1) capistrano (~> 3.0) - capistrano-rails (1.1.8) + capistrano-rails (1.6.3) capistrano (~> 3.1) - capistrano-bundler (~> 1.1) + capistrano-bundler (>= 1.1, < 3) capistrano-rails-console (2.3.0) capistrano (>= 3.5.0, < 4.0.0) sshkit-interactive (~> 0.3.0) @@ -197,8 +197,6 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - celluloid (0.16.0) - timers (~> 4.0.0) cgi (0.3.6) change_the_subject (0.3.3) yaml @@ -208,11 +206,11 @@ GEM descendants_tracker (~> 0.0.1) concurrent-ruby (1.2.2) connection_pool (2.4.1) - coveralls_reborn (0.25.0) - simplecov (>= 0.18.1, < 0.22.0) - term-ansicolor (~> 1.6) - thor (>= 0.20.3, < 2.0) - tins (~> 1.16) + coveralls_reborn (0.28.0) + simplecov (~> 0.22.0) + term-ansicolor (~> 1.7) + thor (~> 1.2) + tins (~> 1.32) crack (0.4.5) rexml crass (1.0.6) @@ -231,8 +229,7 @@ GEM warden (~> 1.2.3) diff-lcs (1.5.0) docile (1.4.0) - domain_name (0.5.20190701) - unf (>= 0.0.5, < 1.0.0) + domain_name (0.6.20231109) dot-properties (0.1.4) bundler (>= 2.2.33) dotenv (2.8.1) @@ -245,38 +242,58 @@ GEM erb (4.0.2) cgi (>= 0.3.3) erubi (1.12.0) - execjs (2.8.1) + execjs (2.9.1) ezwadl (0.1.0) httparty (~> 0.14) nokogiri (~> 1.6) - factory_bot (6.2.1) + factory_bot (6.4.2) activesupport (>= 5.0.0) - factory_bot_rails (6.2.0) - factory_bot (~> 6.2.0) + factory_bot_rails (6.4.2) + factory_bot (~> 6.4) railties (>= 5.0.0) faker (3.0.0) i18n (>= 1.8.11, < 2) - faraday (1.0.1) - multipart-post (>= 1.2, < 3) + faraday (1.10.3) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) + faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0) + faraday-multipart (~> 1.0) + faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.0) + faraday-patron (~> 1.0) + faraday-rack (~> 1.0) + faraday-retry (~> 1.0) + ruby2_keywords (>= 0.0.4) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) + faraday-excon (1.1.0) faraday-follow_redirects (0.3.0) faraday (>= 1, < 3) - faraday_middleware (1.0.0) + faraday-httpclient (1.0.1) + faraday-multipart (1.0.4) + multipart-post (~> 2) + faraday-net_http (1.0.1) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + faraday-rack (1.0.0) + faraday-retry (1.0.3) + faraday_middleware (1.2.0) faraday (~> 1.0) ffi (1.15.5) ffi-compiler (1.0.1) ffi (>= 1.0.0) rake - friendly_id (5.1.0) + friendly_id (5.5.1) activerecord (>= 4.0.0) globalid (1.2.1) activesupport (>= 6.1) gyoku (1.4.0) builder (>= 2.1.2) rexml (~> 3.0) - hashdiff (1.0.1) + hashdiff (1.1.0) hashie (5.0.0) high_voltage (3.1.2) - hitimes (2.0.0) honeybadger (4.12.2) http (5.1.0) addressable (~> 2.8) @@ -296,7 +313,7 @@ GEM concurrent-ruby (~> 1.0) ice_nine (0.11.2) iso-639 (0.3.6) - jaro_winkler (1.5.4) + jaro_winkler (1.5.6) jbuilder (2.11.5) actionview (>= 5.0.0) activesupport (>= 5.0.0) @@ -314,10 +331,6 @@ GEM lcsort (0.9.1) library_stdnums (1.6.0) lightly (0.2.1) - listen (2.10.1) - celluloid (~> 0.16.0) - rb-fsevent (>= 0.9.3) - rb-inotify (>= 0.9) llhttp-ffi (0.4.0) ffi-compiler (~> 1.0) rake (~> 13.0) @@ -327,7 +340,7 @@ GEM railties (>= 4) request_store (~> 1.0) logstash-event (1.2.02) - loofah (2.21.3) + loofah (2.22.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -344,15 +357,15 @@ GEM marcel (1.0.2) matrix (0.4.2) method_source (1.0.0) - mime-types (3.4.1) + mime-types (3.5.1) mime-types-data (~> 3.2015) - mime-types-data (3.2022.0105) + mime-types-data (3.2023.1205) mini_mime (1.1.5) - mini_portile2 (2.8.4) + mini_portile2 (2.8.5) minitar (0.9) minitest (5.20.0) msgpack (1.6.0) - multi_json (1.10.1) + multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.3.0) net-imap (0.3.7) @@ -365,14 +378,14 @@ GEM timeout net-scp (4.0.0) net-ssh (>= 2.6.5, < 8.0.0) - net-sftp (2.1.2) - net-ssh (>= 2.6.5) + net-sftp (4.0.0) + net-ssh (>= 5.0.0, < 8.0.0) net-smtp (0.3.3) net-protocol - net-ssh (7.0.1) + net-ssh (7.2.1) netrc (0.11.0) nio4r (2.5.9) - nokogiri (1.15.4) + nokogiri (1.15.5) mini_portile2 (~> 2.8.2) racc (~> 1.4) oai (1.2.1) @@ -392,9 +405,10 @@ GEM omniauth (>= 1.3.1) open3 (0.1.2) orm_adapter (0.5.0) - parallel (1.22.1) - parser (3.1.2.1) + parallel (1.24.0) + parser (3.2.2.4) ast (~> 2.4.1) + racc pg (1.4.4) pry (0.14.1) coderay (~> 1.1) @@ -404,10 +418,10 @@ GEM pry (>= 0.13, < 0.15) pry-rails (0.3.9) pry (>= 0.10.4) - public_suffix (5.0.3) + public_suffix (5.0.4) puma (5.6.7) nio4r (~> 2.0) - racc (1.7.1) + racc (1.7.3) rack (2.2.8) rack-conneg (0.1.6) rack (>= 1.0) @@ -446,19 +460,14 @@ GEM thor (~> 1.0) zeitwerk (~> 2.5) rainbow (3.1.1) - rake (13.0.6) - rb-fsevent (0.11.2) - rb-inotify (0.10.1) - ffi (~> 1.0) + rake (13.1.0) redis (4.8.1) - regexp_parser (2.8.1) + regexp_parser (2.8.3) request_store (1.5.1) rack (>= 1.4) - rerun (0.10.0) - listen (~> 2.7, >= 2.7.3) - responders (3.0.1) - actionpack (>= 5.0) - railties (>= 5.0) + responders (3.1.1) + actionpack (>= 5.2) + railties (>= 5.2) rest-client (2.1.0) http-accept (>= 1.7.0, < 2.0) http-cookie (>= 1.0.2, < 2.0) @@ -497,8 +506,8 @@ GEM rubocop-ast (>= 1.17.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.23.0) - parser (>= 3.1.1.0) + rubocop-ast (1.30.0) + parser (>= 3.2.1.0) rubocop-performance (1.15.0) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) @@ -508,7 +517,8 @@ GEM rubocop (>= 1.7.0, < 2.0) rubocop-rspec (2.11.1) rubocop (~> 1.19) - ruby-progressbar (1.11.0) + ruby-progressbar (1.13.0) + ruby2_keywords (0.0.5) rubyXL (3.4.25) nokogiri (>= 1.10.8) rubyzip (>= 1.3.0) @@ -532,14 +542,14 @@ GEM connection_pool (>= 2.2.5, < 3) rack (~> 2.0) redis (>= 4.5.0, < 5) - simplecov (0.21.2) + simplecov (0.22.0) docile (~> 1.1) simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) slop (4.9.3) - solargraph (0.47.2) + solargraph (0.48.0) backport (~> 1.2) benchmark bundler (>= 1.17.2) @@ -566,7 +576,7 @@ GEM actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - sshkit (1.21.3) + sshkit (1.21.6) net-scp (>= 1.1.2) net-ssh (>= 2.8.0) sshkit-interactive (0.3.0) @@ -577,14 +587,12 @@ GEM tins (~> 1.0) terser (1.1.18) execjs (>= 0.3.0, < 3) - thor (1.2.2) + thor (1.3.0) thread_safe (0.3.6) - tilt (2.0.11) + tilt (2.3.0) timecop (0.9.5) timeout (0.4.0) - timers (4.0.4) - hitimes - tins (1.31.1) + tins (1.32.1) sync traject (3.7.0) concurrent-ruby (>= 0.8.0) @@ -604,8 +612,8 @@ GEM concurrent-ruby (~> 1.0) unf (0.1.4) unf_ext - unf_ext (0.0.8.2) - unicode-display_width (2.3.0) + unf_ext (0.0.9.1) + unicode-display_width (2.5.0) virtus (2.0.0) axiom-types (~> 0.1) coercible (~> 1.0) @@ -616,8 +624,7 @@ GEM addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - webrick (1.7.0) - websocket (1.2.9) + websocket (1.2.10) websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) @@ -628,10 +635,9 @@ GEM xpath (3.2.0) nokogiri (~> 1.8) yaml (0.2.1) - yard (0.9.28) - webrick (~> 1.7.0) + yard (0.9.34) yell (2.2.2) - zeitwerk (2.6.11) + zeitwerk (2.6.12) PLATFORMS ruby @@ -646,7 +652,7 @@ DEPENDENCIES bixby (~> 5.0) bootstrap-sass (~> 3.4.1) capistrano-passenger - capistrano-rails (~> 1.1.1) + capistrano-rails capistrano-rails-console capybara change_the_subject (~> 0.3.2) @@ -657,10 +663,10 @@ DEPENDENCIES ed25519 factory_bot_rails faker - faraday (~> 1.0.1) - faraday_middleware (~> 1.0.0) + faraday (~> 1.0) + faraday_middleware (~> 1.0) ffi (>= 1.9.25) - friendly_id (~> 5.1.0) + friendly_id gyoku (~> 1.0) high_voltage (~> 3.0) honeybadger (~> 4.0) @@ -677,11 +683,11 @@ DEPENDENCIES loops! marc (~> 1.0) marc_cleanup! - multi_json (~> 1.10.1) + multi_json net-imap net-ldap net-pop - net-sftp (~> 2.1, >= 2.1.2) + net-sftp net-smtp oj omniauth-cas @@ -696,8 +702,7 @@ DEPENDENCIES rack-conneg (~> 0.1.5) rails (~> 7.0) rails-controller-testing - rerun (~> 0.10.0) - responders (~> 3.0) + responders rest-client rsolr rspec-rails diff --git a/bin/spring b/bin/spring deleted file mode 100755 index 7b45d374..00000000 --- a/bin/spring +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env ruby - -# This file loads spring without using Bundler, in order to be fast. -# It gets overwritten when you run the `spring binstub` command. - -unless defined?(Spring) - require "rubygems" - require "bundler" - - if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m) - Gem.paths = { "GEM_PATH" => [Bundler.bundle_path.to_s, *Gem.path].uniq } - gem "spring", match[1] - require "spring/binstub" - end -end diff --git a/spec/adapters/alma_adapter_spec.rb b/spec/adapters/alma_adapter_spec.rb index 2cd0543d..51002fa7 100644 --- a/spec/adapters/alma_adapter_spec.rb +++ b/spec/adapters/alma_adapter_spec.rb @@ -14,8 +14,7 @@ .to_return(status: 200, body: unsuppressed_two_holdings_fixture, headers: { 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type' => 'application/xml;charset=UTF-8', - 'Accept' => 'application/xml', - 'User-Agent' => 'Faraday v1.0.1' + 'Accept' => 'application/xml' }) stub_alma_bib_items( mms_id: unsuppressed, diff --git a/spec/models/scsb_lookup_spec.rb b/spec/models/scsb_lookup_spec.rb index b7846d60..91030c2c 100644 --- a/spec/models/scsb_lookup_spec.rb +++ b/spec/models/scsb_lookup_spec.rb @@ -11,8 +11,7 @@ 'Accept' => 'application/json', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Api-Key' => 'TESTME', - 'Content-Type' => 'application/json', - 'User-Agent' => 'Faraday v1.0.1' + 'Content-Type' => 'application/json' } ) .to_raise(Faraday::ConnectionFailed) @@ -35,8 +34,7 @@ 'Accept' => 'application/json', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Api-Key' => 'TESTME', - 'Content-Type' => 'application/json', - 'User-Agent' => 'Faraday v1.0.1' + 'Content-Type' => 'application/json' } ) .to_raise(Faraday::ConnectionFailed) diff --git a/spec/services/index_functions_spec.rb b/spec/services/index_functions_spec.rb index 4f31e68c..7416d47c 100644 --- a/spec/services/index_functions_spec.rb +++ b/spec/services/index_functions_spec.rb @@ -6,7 +6,7 @@ { 'ids' => { 'delete_ids' => ['134', '234'] } } end - it 'reuturns an array of bib ids for deletion' do + it 'returns an array of bib ids for deletion' do expect(described_class.delete_ids(dump)).to eq ['134', '234'] end end