diff --git a/.circleci/config.yml b/.circleci/config.yml index 544a91cd..1f446608 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,7 +7,7 @@ jobs: # Primary command image where all commands run docker: - - image: cimg/ruby:3.2-browsers + - image: cimg/ruby:3.3.6-browsers environment: RAILS_ENV: test PGHOST: localhost @@ -66,7 +66,7 @@ jobs: working_directory: ~/bibdata docker: - - image: cimg/ruby:3.2-browsers + - image: cimg/ruby:3.3.6-browsers environment: RAILS_ENV: test PGHOST: localhost @@ -96,7 +96,7 @@ jobs: working_directory: ~/bibdata docker: - - image: cimg/ruby:3.2-browsers + - image: cimg/ruby:3.3.6-browsers environment: RAILS_ENV: test PGHOST: localhost @@ -165,7 +165,7 @@ jobs: working_directory: ~/bibdata docker: - - image: cimg/ruby:3.1-browsers + - image: cimg/ruby:3.3.6-browsers environment: RAILS_ENV: test PGHOST: localhost @@ -198,7 +198,7 @@ jobs: # Primary command image where all commands run docker: - - image: cimg/ruby:3.2-browsers + - image: cimg/ruby:3.3.6-browsers steps: - checkout - run: gem install bundler -v '~> 2.0' diff --git a/.rubocop.yml b/.rubocop.yml index 00b2e35f..ee49b88e 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -38,7 +38,6 @@ Rails/UnknownEnv: AllCops: DisplayCopNames: true NewCops: enable - TargetRubyVersion: 3.2 Exclude: - 'db/**/*' - 'bin/*' diff --git a/.tool-versions b/.tool-versions index 83088a51..6bc216e0 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ -ruby 3.2.0 +ruby 3.3.6 nodejs 18.19.1 diff --git a/Gemfile b/Gemfile index ee64b557..ad10194b 100644 --- a/Gemfile +++ b/Gemfile @@ -51,10 +51,10 @@ gem 'open3' gem 'orangetheses', github: 'pulibrary/orangetheses', tag: 'v1.4.4' gem 'pg' gem "rack" -gem 'rails', '~> 7.1' +gem 'rails', '~> 7.1.0' gem 'responders' gem 'rest-client' -gem 'rsolr' +gem 'rsolr', '~> 2.5.0' gem 'rspec-rails' gem 'rubocop' gem 'rubocop-rspec' diff --git a/Gemfile.lock b/Gemfile.lock index 790a3989..d711e7d8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -34,8 +34,8 @@ GIT GEM remote: https://gems.contribsys.com/ specs: - sidekiq-pro (7.2.0) - sidekiq (>= 7.2.0, < 8) + sidekiq-pro (7.3.4) + sidekiq (>= 7.3.7, < 8) GEM remote: https://rubygems.org/ @@ -129,30 +129,32 @@ GEM autoprefixer-rails (10.4.19.0) execjs (~> 2) aws-eventstream (1.3.0) - aws-partitions (1.993.0) - aws-sdk-core (3.211.0) + aws-partitions (1.1027.0) + aws-sdk-core (3.214.0) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.992.0) aws-sigv4 (~> 1.9) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.94.0) - aws-sdk-core (~> 3, >= 3.207.0) + aws-sdk-kms (1.96.0) + aws-sdk-core (~> 3, >= 3.210.0) aws-sigv4 (~> 1.5) - aws-sdk-s3 (1.117.1) - aws-sdk-core (~> 3, >= 3.165.0) + aws-sdk-s3 (1.176.1) + aws-sdk-core (~> 3, >= 3.210.0) aws-sdk-kms (~> 1) - aws-sigv4 (~> 1.4) - aws-sdk-sqs (1.87.0) + aws-sigv4 (~> 1.5) + aws-sdk-sqs (1.89.0) aws-sdk-core (~> 3, >= 3.210.0) aws-sigv4 (~> 1.5) aws-sigv4 (1.10.1) aws-eventstream (~> 1, >= 1.0.2) - axe-core-api (4.7.0) + axe-core-api (4.10.2) dumb_delegator + ostruct virtus - axe-core-rspec (4.7.0) - axe-core-api + axe-core-rspec (4.10.2) + axe-core-api (= 4.10.2) dumb_delegator + ostruct virtus axiom-types (0.1.1) descendants_tracker (~> 0.0.4) @@ -161,8 +163,8 @@ GEM backport (1.2.0) base64 (0.2.0) bcrypt (3.1.20) - bcrypt_pbkdf (1.1.0) - benchmark (0.3.0) + bcrypt_pbkdf (1.1.1) + benchmark (0.4.0) bigdecimal (3.1.8) bixby (5.0.2) rubocop (= 1.28.2) @@ -175,7 +177,7 @@ GEM sassc (>= 2.0.0) builder (3.3.0) byebug (11.1.3) - capistrano (3.19.1) + capistrano (3.19.2) airbrussh (>= 1.0.0) i18n rake (>= 10.0.0) @@ -216,10 +218,10 @@ GEM bigdecimal rexml crass (1.0.6) - csv (3.3.0) + csv (3.3.2) datadog-ci (0.8.3) msgpack - date (3.3.4) + date (3.4.1) ddtrace (1.23.3) datadog-ci (~> 0.8.1) debase-ruby_core_source (= 3.3.1) @@ -229,7 +231,7 @@ GEM debase-ruby_core_source (3.3.1) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) - devise (4.8.1) + devise (4.9.4) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) @@ -240,26 +242,26 @@ GEM domain_name (0.6.20240107) dot-properties (0.1.4) bundler (>= 2.2.33) - dotenv (3.1.4) - dotenv-rails (3.1.4) - dotenv (= 3.1.4) + dotenv (3.1.7) + dotenv-rails (3.1.7) + dotenv (= 3.1.7) railties (>= 6.1) drb (2.2.1) - dumb_delegator (1.0.0) + dumb_delegator (1.1.0) e2mmap (0.1.0) ed25519 (1.3.0) erb (4.0.4) cgi (>= 0.3.3) - erubi (1.13.0) - execjs (2.9.1) + erubi (1.13.1) + execjs (2.10.0) factory_bot (6.5.0) activesupport (>= 5.0.0) - factory_bot_rails (6.4.3) - factory_bot (~> 6.4) + factory_bot_rails (6.4.4) + factory_bot (~> 6.5) railties (>= 5.0.0) - faker (3.2.3) + faker (3.5.1) i18n (>= 1.8.11, < 2) - faraday (1.10.3) + faraday (1.10.4) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) @@ -277,14 +279,14 @@ GEM faraday-follow_redirects (0.3.0) faraday (>= 1, < 3) faraday-httpclient (1.0.1) - faraday-multipart (1.0.4) - multipart-post (~> 2) + faraday-multipart (1.1.0) + multipart-post (~> 2.0) faraday-net_http (1.0.2) 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_middleware (1.2.1) faraday (~> 1.0) ffi (1.17.0) ffi-compiler (1.3.2) @@ -297,12 +299,13 @@ GEM gyoku (1.4.0) builder (>= 2.1.2) rexml (~> 3.0) - hashdiff (1.1.1) + hashdiff (1.1.2) hashie (5.0.0) health-monitor-rails (12.4.0) railties (>= 6.1) high_voltage (3.1.2) - honeybadger (5.4.1) + honeybadger (5.26.1) + logger http (5.2.0) addressable (~> 2.8) base64 (~> 0.1) @@ -310,7 +313,7 @@ GEM http-form_data (~> 2.2) llhttp-ffi (~> 0.5.0) http-accept (1.7.0) - http-cookie (1.0.7) + http-cookie (1.0.8) domain_name (~> 0.5) http-form_data (2.3.0) httparty (0.22.0) @@ -318,29 +321,29 @@ GEM mini_mime (>= 1.0.0) multi_xml (>= 0.5.2) httpclient (2.8.3) - human_languages (0.7.0) + human_languages (0.9.1) i18n (1.14.6) concurrent-ruby (~> 1.0) ice_nine (0.11.2) - io-console (0.7.2) - irb (1.14.1) + io-console (0.8.0) + irb (1.14.3) rdoc (>= 4.0.0) reline (>= 0.4.2) iso-639 (0.3.8) csv jaro_winkler (1.6.0) - jbuilder (2.11.5) + jbuilder (2.13.0) actionview (>= 5.0.0) activesupport (>= 5.0.0) jmespath (1.6.2) - jquery-rails (4.5.0) + jquery-rails (4.6.0) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) jquery-tablesorter (1.27.2) railties (>= 3.2) - kramdown (2.4.0) - rexml + kramdown (2.5.1) + rexml (>= 3.3.9) kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) lcsort (0.9.1) @@ -352,14 +355,14 @@ GEM llhttp-ffi (0.5.0) ffi-compiler (~> 1.0) rake (~> 13.0) - logger (1.6.1) - lograge (0.12.0) + logger (1.6.4) + lograge (0.14.0) actionpack (>= 4) activesupport (>= 4) railties (>= 4) request_store (~> 1.0) logstash-event (1.2.02) - loofah (2.22.0) + loofah (2.23.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -378,21 +381,21 @@ GEM mime-types (3.6.0) logger mime-types-data (~> 3.2015) - mime-types-data (3.2024.1001) + mime-types-data (3.2024.1203) mini_mime (1.1.5) mini_portile2 (2.8.8) minitar (1.0.2) minitest (5.25.4) - msgpack (1.7.3) + msgpack (1.7.5) multi_json (1.15.0) multi_xml (0.7.1) bigdecimal (~> 3.1) multipart-post (2.4.1) mutex_m (0.3.0) - net-imap (0.4.14) + net-imap (0.5.4) date net-protocol - net-ldap (0.17.1) + net-ldap (0.19.0) net-pop (0.1.2) net-protocol net-protocol (0.2.2) @@ -405,15 +408,17 @@ GEM net-protocol net-ssh (7.3.0) netrc (0.11.0) - nio4r (2.7.3) - nokogiri (1.17.1) + nio4r (2.7.4) + nokogiri (1.17.2) mini_portile2 (~> 2.8.2) racc (~> 1.4) oai (1.2.1) builder (>= 3.1.0) faraday (< 3) faraday-follow_redirects (>= 0.3.0, < 2) - oj (3.13.23) + oj (3.16.8) + bigdecimal (>= 3.0) + ostruct (>= 0.2) omniauth (2.1.2) hashie (>= 3.4.6) rack (>= 2.2.3) @@ -427,29 +432,30 @@ GEM omniauth (~> 2.0) open3 (0.2.1) orm_adapter (0.5.0) - ostruct (0.6.0) + ostruct (0.6.1) parallel (1.26.3) - parser (3.3.5.0) + parser (3.3.6.0) ast (~> 2.4.1) racc - pg (1.5.7) - psych (5.1.2) + pg (1.5.9) + psych (5.2.2) + date stringio public_suffix (6.0.1) - puma (6.4.3) + puma (6.5.0) nio4r (~> 2.0) racc (1.8.1) - rack (3.1.7) - rack-protection (4.0.0) + rack (3.1.8) + rack-protection (4.1.1) base64 (>= 0.1.0) + logger (>= 1.6.0) rack (>= 3.0.0, < 4) rack-session (2.0.0) rack (>= 3.0.0) rack-test (2.1.0) rack (>= 1.3) - rackup (2.1.0) + rackup (2.2.1) rack (>= 3) - webrick (~> 1.8) rails (7.1.5.1) actioncable (= 7.1.5.1) actionmailbox (= 7.1.5.1) @@ -472,7 +478,7 @@ GEM activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.6.1) + rails-html-sanitizer (1.6.2) loofah (~> 2.21) nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) railties (7.1.5.1) @@ -485,12 +491,12 @@ GEM zeitwerk (~> 2.6) rainbow (3.1.1) rake (13.2.1) - rdoc (6.7.0) + rdoc (6.10.0) psych (>= 4.0.0) - redis-client (0.22.2) + redis-client (0.23.0) connection_pool - regexp_parser (2.9.2) - reline (0.5.10) + regexp_parser (2.9.3) + reline (0.6.0) io-console (~> 0.5) request_store (1.7.0) rack (>= 1.4) @@ -505,11 +511,11 @@ GEM retriable (3.1.2) reverse_markdown (2.1.1) nokogiri - rexml (3.3.9) + rexml (3.4.0) rsolr (2.5.0) builder (>= 2.1.2) faraday (>= 0.9, < 3, != 2.0.0) - rspec-core (3.13.1) + rspec-core (3.13.2) rspec-support (~> 3.13.0) rspec-expectations (3.13.3) diff-lcs (>= 1.2.0, < 2.0) @@ -517,15 +523,15 @@ GEM rspec-mocks (3.13.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-rails (6.1.3) - actionpack (>= 6.1) - activesupport (>= 6.1) - railties (>= 6.1) + rspec-rails (7.1.0) + actionpack (>= 7.0) + activesupport (>= 7.0) + railties (>= 7.0) rspec-core (~> 3.13) rspec-expectations (~> 3.13) rspec-mocks (~> 3.13) rspec-support (~> 3.13) - rspec-support (3.13.1) + rspec-support (3.13.2) rubocop (1.28.2) parallel (~> 1.10) parser (>= 3.1.0.0) @@ -535,7 +541,7 @@ GEM rubocop-ast (>= 1.17.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.32.3) + rubocop-ast (1.37.0) parser (>= 3.3.1.0) rubocop-performance (1.19.1) rubocop (>= 1.7.0, < 2.0) @@ -548,7 +554,7 @@ GEM rubocop (~> 1.19) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) - rubyXL (3.4.25) + rubyXL (3.4.33) nokogiri (>= 1.10.8) rubyzip (>= 1.3.0) rubyzip (2.3.2) @@ -563,13 +569,14 @@ GEM sprockets-rails tilt scrub_rb (1.0.1) - securerandom (0.4.0) - selenium-webdriver (4.16.0) + securerandom (0.4.1) + selenium-webdriver (4.27.0) + base64 (~> 0.2) + logger (~> 1.4) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) - sidekiq (7.3.0) - concurrent-ruby (< 2) + sidekiq (7.3.7) connection_pool (>= 2.3.0) logger rack (>= 2.2.4) @@ -596,9 +603,11 @@ GEM thor (~> 1.0) tilt (~> 2.0) yard (~> 0.9, >= 0.9.24) - solr_wrapper (4.0.2) - http + solr_wrapper (4.1.0) + faraday + faraday-follow_redirects minitar + ostruct retriable ruby-progressbar sprockets (4.2.1) @@ -617,21 +626,21 @@ GEM sshkit-interactive (0.3.0) sshkit (~> 1.12) stomp (1.4.10) - stringio (3.1.1) + stringio (3.1.2) sync (0.5.0) term-ansicolor (1.11.2) tins (~> 1.0) - terser (1.1.20) + terser (1.2.4) execjs (>= 0.3.0, < 3) thor (1.3.2) thread_safe (0.3.6) - tilt (2.4.0) - timecop (0.9.8) - timeout (0.4.1) - tins (1.36.1) + tilt (2.5.0) + timecop (0.9.10) + timeout (0.4.3) + tins (1.37.1) bigdecimal sync - traject (3.8.1) + traject (3.8.2) concurrent-ruby (>= 0.8.0) dot-properties (>= 0.1.1) hashie (>= 3.1, < 6) @@ -655,11 +664,10 @@ GEM descendants_tracker (~> 0.0, >= 0.0.3) warden (1.2.9) rack (>= 2.0.9) - webmock (3.19.1) + webmock (3.24.0) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - webrick (1.8.2) websocket (1.2.11) websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) @@ -671,9 +679,9 @@ GEM xpath (3.2.0) nokogiri (~> 1.8) yaml (0.4.0) - yard (0.9.36) + yard (0.9.37) yell (2.2.2) - zeitwerk (2.7.0) + zeitwerk (2.7.1) PLATFORMS ruby @@ -734,11 +742,11 @@ DEPENDENCIES pg puma rack - rails (~> 7.1) + rails (~> 7.1.0) rails-controller-testing responders rest-client - rsolr + rsolr (~> 2.5.0) rspec-rails rubocop rubocop-rspec @@ -762,4 +770,4 @@ DEPENDENCIES yard BUNDLED WITH - 2.5.17 + 2.5.22 diff --git a/marc_to_solr/lib/uri_ark.rb b/marc_to_solr/lib/uri_ark.rb index 4f55fe57..60797556 100644 --- a/marc_to_solr/lib/uri_ark.rb +++ b/marc_to_solr/lib/uri_ark.rb @@ -3,8 +3,8 @@ class URI::ARK < URI::Generic attr_reader :nmah, :naan, :name - ARK_REGEX = /\:\/\/(.+)\/ark\:\/(.+)\/(.+)\/?/ - PRINCETON_ARK_REGEX = /[\/?]ark\:\/88435\/(.+)\/?/ + ARK_REGEX = /\:\/\/(.+)\/ark\:\/(.+)\/(.+)\/?/.freeze + PRINCETON_ARK_REGEX = /[\/?]ark\:\/88435\/(.+)\/?/.freeze # Constructs an ARK from a URL # @param url [URI::Generic] the URL for the ARK resource