From 725d3dd097c50c89fabc21156081c6a86b3fad1d Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Mon, 19 Dec 2022 11:19:43 -0500 Subject: [PATCH 001/107] WIP --- .circleci/config.yml | 8 +- Dockerfile | 6 +- Gemfile | 15 +-- Gemfile.lock | 227 ++++++++++++++++++++++++++----------------- 4 files changed, 153 insertions(+), 103 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 39c1527ecb..737f856f7b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -31,7 +31,7 @@ jobs: parameters: ruby_ver: description: 'Ruby version' - default: '2.7' + default: '3.1' type: 'string' solr_port: type: string @@ -163,10 +163,10 @@ workflows: build_test_report: jobs: - build: - ruby_ver: '2.7' - name: 'Ruby2-7' + ruby_ver: '3.1' + name: 'Ruby3-1' parallelism: 4 - upload-coverage: parallelism: 4 requires: - - Ruby2-7 + - Ruby3-1 diff --git a/Dockerfile b/Dockerfile index 2463a6d1df..6fedeaa70f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Base stage for building gems -FROM ruby:2.7-bullseye as bundle +FROM ruby:3.1-bullseye as bundle LABEL stage=build LABEL project=avalon RUN apt-get update && apt-get upgrade -y build-essential && apt-get autoremove \ @@ -30,7 +30,7 @@ RUN bundle config set --local without 'production' \ # Download binaries in parallel -FROM ruby:2.7-bullseye as download +FROM ruby:3.1-bullseye as download LABEL stage=build LABEL project=avalon RUN curl -L https://github.com/jwilder/dockerize/releases/download/v0.6.1/dockerize-linux-amd64-v0.6.1.tar.gz | tar xvz -C /usr/bin/ @@ -43,7 +43,7 @@ RUN apt-get -y update && apt-get install -y ffmpeg # Base stage for building final images -FROM ruby:2.7-slim-bullseye as base +FROM ruby:3.1-slim-bullseye as base LABEL stage=build LABEL project=avalon RUN echo "deb http://ftp.us.debian.org/debian/ bullseye main contrib non-free" > /etc/apt/sources.list.d/bullseye.list \ diff --git a/Gemfile b/Gemfile index 0d4ffe2ce3..02bd4a2986 100644 --- a/Gemfile +++ b/Gemfile @@ -27,13 +27,16 @@ gem 'uglifier', '>= 1.3.0' gem 'webpacker' # Core Samvera -gem 'active-fedora', '~> 13.2', '>= 13.2.5' -gem 'active_fedora-datastreams', '~> 0.4' -gem 'hydra-head', '~> 12.0' -gem 'ldp', '~> 1.0.3' -gem 'noid-rails', '~> 3.0.1' +#gem 'active-fedora', '~> 13.2', '>= 13.2.5' +gem 'active-fedora', git: "https://github.com/samvera/active_fedora.git", branch: 'ruby3' +#gem 'active_fedora-datastreams', '~> 0.4' +gem 'active_fedora-datastreams', git: "https://github.com/samvera-labs/active_fedora-datastreams.git", branch: "ruby3" +#gem 'hydra-head', '~> 12.0' +gem 'hydra-head', git: "https://github.com/samvera/hydra-head.git", branch: 'ruby3' +gem 'ldp', '~> 1.1.0' +gem 'noid-rails', git: "https://github.com/samvera/noid-rails.git", branch: "cjcolvar-patch-1" gem 'rdf-rdfxml' -gem 'rdf-vocab', '< 3.1.5' +#gem 'rdf-vocab', '< 3.1.5' # Samvera version pins gem 'blacklight', '~> 7.25' diff --git a/Gemfile.lock b/Gemfile.lock index 6fb6a6a090..b9d54dc330 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -71,6 +71,63 @@ GIT fugit (~> 1.1) sidekiq (>= 4.2.1) +GIT + remote: https://github.com/samvera-labs/active_fedora-datastreams.git + revision: ce646cfa8014f9cee10cd5b957d23c47f1d40777 + branch: ruby3 + specs: + active_fedora-datastreams (0.4.0) + active-fedora (>= 11.0.0.pre, < 14) + activemodel (< 6.1) + nom-xml (>= 0.5.1) + om (~> 3.1) + rdf (~> 3.2) + rdf-rdfxml (~> 3.2) + +GIT + remote: https://github.com/samvera/active_fedora.git + revision: 5c00fa3b9e8a5abc803c76a92fe96f8acafc517c + branch: ruby3 + specs: + active-fedora (13.3.0) + active-triples (>= 0.11.0, < 2.0.0) + activemodel (>= 5.1) + activesupport (>= 5.1) + deprecation + faraday (~> 1.0) + faraday-encoding (>= 0.0.5) + ldp (>= 0.7.0, < 2) + rsolr (>= 1.1.2, < 3) + ruby-progressbar (~> 1.0) + +GIT + remote: https://github.com/samvera/hydra-head.git + revision: c824cb6c8de027f0fe6335f75f13da3cad2890d6 + branch: ruby3 + specs: + hydra-access-controls (12.0.2) + active-fedora (>= 10.0.0) + activesupport (>= 5.2, < 7) + blacklight-access_controls (~> 6.0) + cancancan (>= 1.8, < 4) + deprecation (~> 1.0) + hydra-core (12.0.2) + hydra-access-controls (= 12.0.2) + railties (>= 5.2, < 7) + hydra-head (12.0.2) + hydra-access-controls (= 12.0.2) + hydra-core (= 12.0.2) + rails (>= 5.2, < 7) + +GIT + remote: https://github.com/samvera/noid-rails.git + revision: f6ccd884be506acb69dd7be65991a95133bd45dd + branch: cjcolvar-patch-1 + specs: + noid-rails (3.0.3) + actionpack (>= 5.0.0, < 7.1) + noid (~> 0.9) + GEM remote: https://rubygems.org/ specs: @@ -110,16 +167,6 @@ GEM erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - active-fedora (13.3.0) - active-triples (>= 0.11.0, < 2.0.0) - activemodel (>= 5.1) - activesupport (>= 5.1) - deprecation - faraday (~> 0.12) - faraday-encoding (>= 0.0.5) - ldp (>= 0.7.0, < 2) - rsolr (>= 1.1.2, < 3) - ruby-progressbar (~> 1.0) active-triples (1.1.1) activemodel (>= 3.0.0) activesupport (>= 3.0.0) @@ -135,15 +182,8 @@ GEM active_encode (1.1.2) addressable (~> 2.8) rails - active_fedora-datastreams (0.4.0) - active-fedora (>= 11.0.0.pre, < 14) - activemodel (< 6.1) - nom-xml (>= 0.5.1) - om (~> 3.1) - rdf (< 3.2) - rdf-rdfxml (~> 2.0) - activejob (6.0.6.1) - activesupport (= 6.0.6.1) + activejob (6.0.5.1) + activesupport (= 6.0.5.1) globalid (>= 0.3.6) activejob-traffic_control (0.1.3) activejob (>= 4.2) @@ -384,13 +424,13 @@ GEM dry-core (~> 0.5, >= 0.5) dry-initializer (~> 3.0) dry-schema (~> 1.9, >= 1.9.1) - ebnf (2.2.1) - amazing_print (~> 1.2) + ebnf (2.3.1) + amazing_print (~> 1.4) htmlentities (~> 4.3) - rdf (~> 3.1) + rdf (~> 3.2) scanf (~> 1.0) - sxp (~> 1.1) - unicode-types (~> 1.6) + sxp (~> 1.2) + unicode-types (~> 1.7) edtf (3.1.0) activesupport (>= 3.0, < 8.0) email_spec (2.2.0) @@ -413,10 +453,31 @@ GEM fakefs (1.4.1) faker (2.19.0) i18n (>= 1.6, < 2) - faraday (0.17.5) - multipart-post (>= 1.2, < 3) + faraday (1.10.2) + 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-encoding (0.0.5) faraday + faraday-excon (1.1.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) fastimage (2.2.6) fcrepo_wrapper (0.9.0) ruby-progressbar @@ -453,8 +514,6 @@ GEM haml (5.2.2) temple (>= 0.8.0) tilt - hamster (3.0.0) - concurrent-ruby (~> 1.0) hashdiff (1.0.1) hashie (5.0.0) hooks (0.4.1) @@ -471,19 +530,6 @@ GEM http-form_data (2.3.0) http_logger (0.7.0) httpclient (2.8.3) - hydra-access-controls (12.0.1) - active-fedora (>= 10.0.0) - activesupport (>= 5.2, < 7) - blacklight-access_controls (~> 6.0) - cancancan (>= 1.8, < 4) - deprecation (~> 1.0) - hydra-core (12.0.1) - hydra-access-controls (= 12.0.1) - railties (>= 5.2, < 7) - hydra-head (12.0.1) - hydra-access-controls (= 12.0.1) - hydra-core (= 12.0.1) - rails (>= 5.2, < 7) i18n (1.12.0) concurrent-ruby (~> 1.0) iconv (1.0.8) @@ -504,14 +550,14 @@ GEM jquery-ui-rails (6.0.1) railties (>= 3.2.16) json (2.6.2) - json-canonicalization (0.3.0) - json-ld (3.1.10) + json-canonicalization (0.3.1) + json-ld (3.2.3) htmlentities (~> 4.3) - json-canonicalization (~> 0.2) + json-canonicalization (~> 0.3) link_header (~> 0.0, >= 0.0.8) - multi_json (~> 1.14) - rack (~> 2.0) - rdf (~> 3.1) + multi_json (~> 1.15) + rack (~> 2.2) + rdf (~> 3.2, >= 3.2.9) jwt (2.4.1) kaminari (1.2.2) activesupport (>= 4.1.0) @@ -527,13 +573,14 @@ GEM kaminari-core (1.2.2) launchy (2.5.0) addressable (~> 2.7) - ldp (1.0.3) + ldp (1.1.0) deprecation - faraday + faraday (>= 1) http_logger - json-ld - rdf (>= 1.1) + json-ld (~> 3.2) + rdf (~> 3.2) rdf-isomorphic + rdf-ldp rdf-turtle rdf-vocab (>= 0.8) slop @@ -592,10 +639,7 @@ GEM netrc (0.11.0) nio4r (2.5.8) noid (0.9.0) - noid-rails (3.0.3) - actionpack (>= 5.0.0, < 7) - noid (~> 0.9) - nokogiri (1.14.1) + nokogiri (1.13.10) mini_portile2 (~> 2.8.0) racc (~> 1.4) nom-xml (1.2.0) @@ -648,8 +692,8 @@ GEM puma (5.6.4) nio4r (~> 2.0) raabro (1.4.0) - racc (1.6.2) - rack (2.2.6.2) + racc (1.6.1) + rack (2.2.4) rack-cors (1.1.1) rack (>= 2.0.0) rack-protection (2.2.0) @@ -697,31 +741,34 @@ GEM rb-inotify (0.10.1) ffi (~> 1.0) rb-readline (0.5.5) - rdf (3.1.15) - hamster (~> 3.0) + rdf (3.2.9) link_header (~> 0.0, >= 0.0.8) - rdf-aggregate-repo (3.1.0) - rdf (~> 3.1) - rdf-isomorphic (3.1.1) - rdf (~> 3.1) - rdf-rdfa (3.1.0) - haml (~> 5.1) + rdf-aggregate-repo (3.2.1) + rdf (~> 3.2) + rdf-isomorphic (3.2.1) + rdf (~> 3.2) + rdf-ldp (0.1.0) + deprecation + rdf + rdf-rdfa (3.2.0) + haml (~> 5.2) htmlentities (~> 4.3) - rdf (~> 3.1) - rdf-aggregate-repo (~> 3.1) - rdf-xsd (~> 3.1) - rdf-rdfxml (2.2.1) + rdf (~> 3.2) + rdf-aggregate-repo (~> 3.2) + rdf-vocab (~> 3.2) + rdf-xsd (~> 3.2) + rdf-rdfxml (3.2.0) htmlentities (~> 4.3) - rdf (>= 2.2, < 4.0) - rdf-rdfa (>= 2.2, < 4.0) - rdf-xsd (>= 2.2, < 4.0) - rdf-turtle (3.1.3) - ebnf (~> 2.1) - rdf (~> 3.1, >= 3.1.8) - rdf-vocab (3.1.4) - rdf (~> 3.1) - rdf-xsd (3.1.1) - rdf (~> 3.1) + rdf (~> 3.2) + rdf-rdfa (~> 3.2) + rdf-xsd (~> 3.2) + rdf-turtle (3.2.1) + ebnf (~> 2.3) + rdf (~> 3.2) + rdf-vocab (3.2.3) + rdf (~> 3.2, >= 3.2.4) + rdf-xsd (3.2.1) + rdf (~> 3.2) rexml (~> 3.2) react-rails (2.6.1) babel-transpiler (>= 0.7.0) @@ -825,6 +872,7 @@ GEM ruby-saml (1.14.0) nokogiri (>= 1.10.5) rexml + ruby2_keywords (0.0.5) rubyzip (1.3.0) samvera-persona (0.3.0) devise (~> 4.6) @@ -899,13 +947,13 @@ GEM dalli msgpack redis - sxp (1.1.0) - rdf (~> 3.1) - temple (0.8.2) + sxp (1.2.3) + matrix (~> 0.4) + rdf (~> 3.2) + temple (0.9.1) thor (1.2.1) thread_safe (0.3.6) - tilt (2.0.10) - timeout (0.3.1) + tilt (2.0.11) trailblazer-option (0.1.2) twitter-typeahead-rails (0.11.1.pre.corejavascript) actionpack (>= 3.1) @@ -970,11 +1018,11 @@ PLATFORMS DEPENDENCIES about_page! - active-fedora (~> 13.2, >= 13.2.5) + active-fedora! active_annotations (~> 0.4) active_elastic_job active_encode (~> 1.0, >= 1.1.2) - active_fedora-datastreams (~> 0.4) + active_fedora-datastreams! activejob-traffic_control activejob-uniqueness activerecord-session_store (>= 2.0.0) @@ -1027,7 +1075,7 @@ DEPENDENCIES google-analytics-rails (= 1.1.0) hashdiff (>= 1.0) hooks - hydra-head (~> 12.0) + hydra-head! iconv (~> 1.0.6) iiif_manifest (~> 0.6) ims-lti (~> 1.1.13) @@ -1035,7 +1083,7 @@ DEPENDENCIES jquery-datatables jquery-rails jquery-ui-rails - ldp (~> 1.0.3) + ldp (~> 1.1.0) listen lograge mail (> 2.8.0.1) @@ -1044,7 +1092,7 @@ DEPENDENCIES mediainfo! mysql2 net-ldap - noid-rails (~> 3.0.1) + noid-rails! okcomputer omniauth (~> 2.0) omniauth-identity (>= 2.0.0) @@ -1062,7 +1110,6 @@ DEPENDENCIES rb-readline rdf (~> 3.1) rdf-rdfxml - rdf-vocab (< 3.1.5) react-rails recaptcha redis-rails From 93f350503dfc493c24b4ba9311c4bb6a53ea058b Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Mon, 19 Dec 2022 12:21:45 -0500 Subject: [PATCH 002/107] Naively change EBUCore.locator to EBUCore.Locator --- app/models/master_file.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/master_file.rb b/app/models/master_file.rb index 3d1e3e4621..52dd5feb52 100644 --- a/app/models/master_file.rb +++ b/app/models/master_file.rb @@ -57,7 +57,7 @@ class MasterFile < ActiveFedora::Base property :title, predicate: ::RDF::Vocab::EBUCore.title, multiple: false do |index| index.as :stored_searchable end - property :file_location, predicate: ::RDF::Vocab::EBUCore.locator, multiple: false do |index| + property :file_location, predicate: ::RDF::Vocab::EBUCore.Locator, multiple: false do |index| index.as :stored_sortable end property :file_checksum, predicate: ::RDF::Vocab::NFO.hashValue, multiple: false do |index| From 24303a03b5a4de57513d99a92637275147521f6e Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Mon, 19 Dec 2022 12:28:25 -0500 Subject: [PATCH 003/107] Naively change EBUCore.filename to EBUCore.resourceFilename --- app/models/master_file.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/master_file.rb b/app/models/master_file.rb index 52dd5feb52..b14298eac7 100644 --- a/app/models/master_file.rb +++ b/app/models/master_file.rb @@ -88,7 +88,7 @@ class MasterFile < ActiveFedora::Base property :physical_description, predicate: ::RDF::Vocab::EBUCore.hasFormat, multiple: false do |index| index.as :stored_sortable end - property :masterFile, predicate: ::RDF::Vocab::EBUCore.filename, multiple: false + property :masterFile, predicate: ::RDF::Vocab::EBUCore.resourceFilename, multiple: false property :identifier, predicate: ::RDF::Vocab::Identifiers.local, multiple: true do |index| index.as :symbol end From 7661b768c59273436b2d67209c7b9181b763c52c Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Mon, 19 Dec 2022 12:45:59 -0500 Subject: [PATCH 004/107] Apply same changes to Derivative model --- app/models/derivative.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/derivative.rb b/app/models/derivative.rb index a23033d0d5..abc1bceb68 100644 --- a/app/models/derivative.rb +++ b/app/models/derivative.rb @@ -22,7 +22,7 @@ class Derivative < ActiveFedora::Base belongs_to :master_file, class_name: 'MasterFile', predicate: ActiveFedora::RDF::Fcrepo::RelsExt.isDerivationOf - property :location_url, predicate: ::RDF::Vocab::EBUCore.locator, multiple: false do |index| + property :location_url, predicate: ::RDF::Vocab::EBUCore.Locator, multiple: false do |index| index.as :stored_sortable end property :hls_url, predicate: Avalon::RDFVocab::Derivative.hlsURL, multiple: false do |index| @@ -36,7 +36,7 @@ class Derivative < ActiveFedora::Base property :managed, predicate: Avalon::RDFVocab::Derivative.isManaged, multiple: false do |index| index.as ActiveFedora::Indexing::Descriptor.new(:boolean, :stored, :indexed) end - property :derivativeFile, predicate: ::RDF::Vocab::EBUCore.filename, multiple: false do |index| + property :derivativeFile, predicate: ::RDF::Vocab::EBUCore.resourceFilename, multiple: false do |index| index.as :stored_sortable end From 870bb6178bd4fa96213c1d21e18379b9b7f5c954 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Mon, 19 Dec 2022 12:49:49 -0500 Subject: [PATCH 005/107] Naively change EBUCore.identifier to EBUCore.Identifier --- app/models/derivative.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/derivative.rb b/app/models/derivative.rb index abc1bceb68..16101212bc 100644 --- a/app/models/derivative.rb +++ b/app/models/derivative.rb @@ -31,7 +31,7 @@ class Derivative < ActiveFedora::Base property :duration, predicate: ::RDF::Vocab::EBUCore.duration, multiple: false do |index| index.as :stored_sortable end - property :track_id, predicate: ::RDF::Vocab::EBUCore.identifier, multiple: false + property :track_id, predicate: ::RDF::Vocab::EBUCore.Identifier, multiple: false property :hls_track_id, predicate: Avalon::RDFVocab::Derivative.hlsTrackID, multiple: false property :managed, predicate: Avalon::RDFVocab::Derivative.isManaged, multiple: false do |index| index.as ActiveFedora::Indexing::Descriptor.new(:boolean, :stored, :indexed) From 368460a946ba53f9ce67d750556a358ef2c80c4d Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Mon, 19 Dec 2022 16:24:16 -0500 Subject: [PATCH 006/107] Test with ruby3 image --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 737f856f7b..b4cdb69580 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,7 +5,7 @@ jobs: build: docker: # Primary container image where all steps run. - - image: avalonmediasystem/avalon:develop + - image: avalonmediasystem/avalon:7.5.0-dev-ruby3 environment: - DATABASE_URL=postgresql://postgres@localhost:5432/postgres - FEDORA_URL=http://localhost:8080/fcrepo/rest @@ -46,7 +46,7 @@ jobs: type: string default: 'hydra-test' - working_directory: /home/app/avalon + working_directory: /home/circleci/project parallelism: << parameters.parallelism >> @@ -140,9 +140,9 @@ jobs: default: 4 docker: # Primary container image where all steps run. - - image: avalonmediasystem/avalon:develop + - image: avalonmediasystem/avalon:7.5.0-dev-ruby3 - working_directory: /home/app/avalon + working_directory: /home/circleci/project steps: - attach_workspace: From 5af033502ff16876d6da02b5dbf280f6d17bee71 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Mon, 19 Dec 2022 16:48:17 -0500 Subject: [PATCH 007/107] Add missing net-smtp dependency --- Gemfile | 3 ++- Gemfile.lock | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 02bd4a2986..637f34df2b 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,8 @@ source 'https://rubygems.org' # Core rails gem 'bootsnap', require: false gem 'listen' -gem 'rails', '=6.0.6.1' +gem 'net-smtp', require: false +gem 'rails', '=6.0.5.1' gem 'sprockets', '~>3.7.2' #gem 'sprockets-rails', require: 'sprockets/railtie' gem 'sqlite3' diff --git a/Gemfile.lock b/Gemfile.lock index b9d54dc330..c66423eab8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -627,8 +627,6 @@ GEM date net-protocol net-ldap (0.17.0) - net-pop (0.1.2) - net-protocol net-protocol (0.2.1) timeout net-scp (3.0.0) @@ -954,6 +952,7 @@ GEM thor (1.2.1) thread_safe (0.3.6) tilt (2.0.11) + timeout (0.3.1) trailblazer-option (0.1.2) twitter-typeahead-rails (0.11.1.pre.corejavascript) actionpack (>= 3.1) @@ -1092,6 +1091,7 @@ DEPENDENCIES mediainfo! mysql2 net-ldap + net-smtp noid-rails! okcomputer omniauth (~> 2.0) From db05df3d43b0892331f7e4a043ce89c9f0d10c75 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Mon, 19 Dec 2022 16:50:54 -0500 Subject: [PATCH 008/107] Pin psych to < 4 --- Gemfile | 1 + Gemfile.lock | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Gemfile b/Gemfile index 637f34df2b..72e31c2881 100644 --- a/Gemfile +++ b/Gemfile @@ -4,6 +4,7 @@ source 'https://rubygems.org' gem 'bootsnap', require: false gem 'listen' gem 'net-smtp', require: false +gem 'psych', '< 4' gem 'rails', '=6.0.5.1' gem 'sprockets', '~>3.7.2' #gem 'sprockets-rails', require: 'sprockets/railtie' diff --git a/Gemfile.lock b/Gemfile.lock index c66423eab8..19645291e8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -686,6 +686,7 @@ GEM pry (~> 0.13.0) pry-rails (0.3.9) pry (>= 0.10.4) + psych (3.3.4) public_suffix (5.0.0) puma (5.6.4) nio4r (~> 2.0) @@ -1102,6 +1103,7 @@ DEPENDENCIES pg pry-byebug pry-rails + psych (< 4) puma (>= 4.3.8) rack-cors rails (= 6.0.6.1) From 80f3418c093b9c88c3a8191e4dd5b5b4feaa4c84 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Mon, 19 Dec 2022 16:59:21 -0500 Subject: [PATCH 009/107] Upgrade webmock --- Gemfile | 2 +- Gemfile.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index 72e31c2881..b327bfcc30 100644 --- a/Gemfile +++ b/Gemfile @@ -149,7 +149,7 @@ group :test do gem 'shoulda-matchers' gem 'simplecov' gem 'webdrivers', '~> 3.0' - gem 'webmock', '~> 3.5.1' + gem 'webmock', '~> 3.5' end group :production do diff --git a/Gemfile.lock b/Gemfile.lock index 19645291e8..19cfded679 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -687,7 +687,7 @@ GEM pry-rails (0.3.9) pry (>= 0.10.4) psych (3.3.4) - public_suffix (5.0.0) + public_suffix (5.0.1) puma (5.6.4) nio4r (~> 2.0) raabro (1.4.0) @@ -987,10 +987,10 @@ GEM nokogiri (~> 1.6) rubyzip (~> 1.0) selenium-webdriver (~> 3.0) - webmock (3.5.1) - addressable (>= 2.3.6) + webmock (3.18.1) + addressable (>= 2.8.0) crack (>= 0.3.2) - hashdiff + hashdiff (>= 0.4.0, < 2.0.0) webpacker (5.4.3) activesupport (>= 5.2) rack-proxy (>= 0.6.1) @@ -1139,7 +1139,7 @@ DEPENDENCIES wavefile (~> 1.0.1) web-console webdrivers (~> 3.0) - webmock (~> 3.5.1) + webmock (~> 3.5) webpacker with_locking xray-rails From e00bdde8b3afad04a3ba51e4390a8a29e0a1df7d Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Tue, 20 Dec 2022 10:43:02 -0500 Subject: [PATCH 010/107] Use ActiveTriples branch for compatibility with newer ruby-rdf --- Gemfile | 1 + Gemfile.lock | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index b327bfcc30..0eae6d0533 100644 --- a/Gemfile +++ b/Gemfile @@ -33,6 +33,7 @@ gem 'webpacker' gem 'active-fedora', git: "https://github.com/samvera/active_fedora.git", branch: 'ruby3' #gem 'active_fedora-datastreams', '~> 0.4' gem 'active_fedora-datastreams', git: "https://github.com/samvera-labs/active_fedora-datastreams.git", branch: "ruby3" +gem 'active-triples', git: 'https://github.com/samvera-labs/activetriples.git', branch: 'merge-gitlab-upstream' #gem 'hydra-head', '~> 12.0' gem 'hydra-head', git: "https://github.com/samvera/hydra-head.git", branch: 'ruby3' gem 'ldp', '~> 1.1.0' diff --git a/Gemfile.lock b/Gemfile.lock index 19cfded679..6ef9f4a225 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -84,6 +84,17 @@ GIT rdf (~> 3.2) rdf-rdfxml (~> 3.2) +GIT + remote: https://github.com/samvera-labs/activetriples.git + revision: 22d239ec248f4619f1d9be4f16eedd80879ecf53 + branch: merge-gitlab-upstream + specs: + active-triples (1.1.1) + activemodel (>= 3.0.0) + activesupport (>= 3.0.0) + rdf (>= 2.0.2, < 4.0) + rdf-vocab (>= 2.0, < 4.0) + GIT remote: https://github.com/samvera/active_fedora.git revision: 5c00fa3b9e8a5abc803c76a92fe96f8acafc517c @@ -167,11 +178,6 @@ GEM erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - active-triples (1.1.1) - activemodel (>= 3.0.0) - activesupport (>= 3.0.0) - rdf (>= 2.0.2, < 4.0) - rdf-vocab (>= 2.0, < 4.0) active_annotations (0.4.0) json-ld rails (>= 5.2, < 7.1) @@ -1019,6 +1025,7 @@ PLATFORMS DEPENDENCIES about_page! active-fedora! + active-triples! active_annotations (~> 0.4) active_elastic_job active_encode (~> 1.0, >= 1.1.2) From db72017e7e29507f866f084020e7eddb05a2ff2c Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Mon, 9 Jan 2023 12:25:12 -0500 Subject: [PATCH 011/107] Use patched fork of edtf-ruby --- Gemfile | 2 +- Gemfile.lock | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 0eae6d0533..a383238828 100644 --- a/Gemfile +++ b/Gemfile @@ -89,7 +89,7 @@ gem 'roo' gem 'wavefile', '~> 1.0.1' # Data Translation & Normalization -gem 'edtf' +gem 'edtf', git: "https://github.com/cjcolvar/edtf-ruby.git", branch: "patch-1" gem 'iconv', '~> 1.0.6' gem 'marc' diff --git a/Gemfile.lock b/Gemfile.lock index 6ef9f4a225..7e3d49e4c1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -71,6 +71,14 @@ GIT fugit (~> 1.1) sidekiq (>= 4.2.1) +GIT + remote: https://github.com/cjcolvar/edtf-ruby.git + revision: 3097c47a8a527dfc574832570530b592ac5c71bb + branch: patch-1 + specs: + edtf (3.1.0) + activesupport (>= 3.0, < 8.0) + GIT remote: https://github.com/samvera-labs/active_fedora-datastreams.git revision: ce646cfa8014f9cee10cd5b957d23c47f1d40777 @@ -437,8 +445,6 @@ GEM scanf (~> 1.0) sxp (~> 1.2) unicode-types (~> 1.7) - edtf (3.1.0) - activesupport (>= 3.0, < 8.0) email_spec (2.2.0) htmlentities (~> 4.3.3) launchy (~> 2.1) @@ -1070,7 +1076,7 @@ DEPENDENCIES devise (~> 4.8) devise_invitable (~> 2.0) dotenv-rails - edtf + edtf! email_spec equivalent-xml factory_bot_rails From 0e496fa8b17a410ef8b7c9003fb2804602718e68 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Mon, 9 Jan 2023 13:24:50 -0500 Subject: [PATCH 012/107] Revert directory changes --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b4cdb69580..e9afcef175 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,7 +46,7 @@ jobs: type: string default: 'hydra-test' - working_directory: /home/circleci/project + working_directory: /home/app/avalon parallelism: << parameters.parallelism >> @@ -142,7 +142,7 @@ jobs: # Primary container image where all steps run. - image: avalonmediasystem/avalon:7.5.0-dev-ruby3 - working_directory: /home/circleci/project + working_directory: /home/app/avalon steps: - attach_workspace: From b8da6ca4629ac13b40067dd831dcc3fd5944baa3 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Mon, 30 Jan 2023 14:33:17 -0500 Subject: [PATCH 013/107] Use released versions of samvera gems (except om which is deprecated so use fork) --- Gemfile | 13 +-- Gemfile.lock | 297 +++++++++++++++++++++++++++++++++++---------------- 2 files changed, 206 insertions(+), 104 deletions(-) diff --git a/Gemfile b/Gemfile index a383238828..53527b7797 100644 --- a/Gemfile +++ b/Gemfile @@ -29,17 +29,12 @@ gem 'uglifier', '>= 1.3.0' gem 'webpacker' # Core Samvera -#gem 'active-fedora', '~> 13.2', '>= 13.2.5' -gem 'active-fedora', git: "https://github.com/samvera/active_fedora.git", branch: 'ruby3' -#gem 'active_fedora-datastreams', '~> 0.4' -gem 'active_fedora-datastreams', git: "https://github.com/samvera-labs/active_fedora-datastreams.git", branch: "ruby3" -gem 'active-triples', git: 'https://github.com/samvera-labs/activetriples.git', branch: 'merge-gitlab-upstream' -#gem 'hydra-head', '~> 12.0' -gem 'hydra-head', git: "https://github.com/samvera/hydra-head.git", branch: 'ruby3' +gem 'active-fedora', '~> 14.0' +gem 'active_fedora-datastreams', '~> 0.5' +gem 'hydra-head', '~> 12.0' gem 'ldp', '~> 1.1.0' -gem 'noid-rails', git: "https://github.com/samvera/noid-rails.git", branch: "cjcolvar-patch-1" +gem 'om', git: 'https://github.com/avalonmediasystem/om.git', branch: 'ruby3' gem 'rdf-rdfxml' -#gem 'rdf-vocab', '< 3.1.5' # Samvera version pins gem 'blacklight', '~> 7.25' diff --git a/Gemfile.lock b/Gemfile.lock index 7e3d49e4c1..813494976c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,6 +53,17 @@ GIT specs: mediainfo (0.7.1) +GIT + remote: https://github.com/avalonmediasystem/om.git + revision: ffde890b4187a7d8be41ae387264cd6eb20b6ba8 + branch: ruby3 + specs: + om (3.2.0) + activemodel (>= 5.1) + activesupport + nokogiri (>= 1.4.2) + solrizer (~> 3.3) + GIT remote: https://github.com/avalonmediasystem/omniauth-lti.git revision: 7534c44fc5a3c927aec57bbd3a15cbad37feec74 @@ -79,74 +90,6 @@ GIT edtf (3.1.0) activesupport (>= 3.0, < 8.0) -GIT - remote: https://github.com/samvera-labs/active_fedora-datastreams.git - revision: ce646cfa8014f9cee10cd5b957d23c47f1d40777 - branch: ruby3 - specs: - active_fedora-datastreams (0.4.0) - active-fedora (>= 11.0.0.pre, < 14) - activemodel (< 6.1) - nom-xml (>= 0.5.1) - om (~> 3.1) - rdf (~> 3.2) - rdf-rdfxml (~> 3.2) - -GIT - remote: https://github.com/samvera-labs/activetriples.git - revision: 22d239ec248f4619f1d9be4f16eedd80879ecf53 - branch: merge-gitlab-upstream - specs: - active-triples (1.1.1) - activemodel (>= 3.0.0) - activesupport (>= 3.0.0) - rdf (>= 2.0.2, < 4.0) - rdf-vocab (>= 2.0, < 4.0) - -GIT - remote: https://github.com/samvera/active_fedora.git - revision: 5c00fa3b9e8a5abc803c76a92fe96f8acafc517c - branch: ruby3 - specs: - active-fedora (13.3.0) - active-triples (>= 0.11.0, < 2.0.0) - activemodel (>= 5.1) - activesupport (>= 5.1) - deprecation - faraday (~> 1.0) - faraday-encoding (>= 0.0.5) - ldp (>= 0.7.0, < 2) - rsolr (>= 1.1.2, < 3) - ruby-progressbar (~> 1.0) - -GIT - remote: https://github.com/samvera/hydra-head.git - revision: c824cb6c8de027f0fe6335f75f13da3cad2890d6 - branch: ruby3 - specs: - hydra-access-controls (12.0.2) - active-fedora (>= 10.0.0) - activesupport (>= 5.2, < 7) - blacklight-access_controls (~> 6.0) - cancancan (>= 1.8, < 4) - deprecation (~> 1.0) - hydra-core (12.0.2) - hydra-access-controls (= 12.0.2) - railties (>= 5.2, < 7) - hydra-head (12.0.2) - hydra-access-controls (= 12.0.2) - hydra-core (= 12.0.2) - rails (>= 5.2, < 7) - -GIT - remote: https://github.com/samvera/noid-rails.git - revision: f6ccd884be506acb69dd7be65991a95133bd45dd - branch: cjcolvar-patch-1 - specs: - noid-rails (3.0.3) - actionpack (>= 5.0.0, < 7.1) - noid (~> 0.9) - GEM remote: https://rubygems.org/ specs: @@ -186,6 +129,21 @@ GEM erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) + active-fedora (14.0.0) + active-triples (>= 0.11.0, < 2.0.0) + activemodel (>= 5.1) + activesupport (>= 5.1) + deprecation + faraday (~> 1.0) + faraday-encoding (>= 0.0.5) + ldp (>= 0.7.0, < 2) + rsolr (>= 1.1.2, < 3) + ruby-progressbar (~> 1.0) + active-triples (1.2.0) + activemodel (>= 3.0.0) + activesupport (>= 3.0.0) + rdf (>= 2.0.2, < 4.0) + rdf-vocab (>= 2.0, < 4.0) active_annotations (0.4.0) json-ld rails (>= 5.2, < 7.1) @@ -196,6 +154,13 @@ GEM active_encode (1.1.2) addressable (~> 2.8) rails + active_fedora-datastreams (0.5.0) + active-fedora (>= 11.0.0.pre) + activemodel (>= 5.2) + nom-xml (>= 0.5.1) + om (~> 3.1) + rdf (~> 3.2) + rdf-rdfxml (~> 3.2) activejob (6.0.5.1) activesupport (= 6.0.5.1) globalid (>= 0.3.6) @@ -288,6 +253,8 @@ GEM babel-transpiler (0.7.0) babel-source (>= 4.0, < 6) execjs (~> 2.0) + bcp47 (0.3.3) + i18n bcrypt (3.1.16) bindex (0.8.1) bixby (3.0.2) @@ -296,7 +263,7 @@ GEM rubocop-performance rubocop-rails rubocop-rspec - blacklight (7.28.0) + blacklight (7.33.0) deprecation globalid hashdiff @@ -305,7 +272,7 @@ GEM kaminari (>= 0.15) ostruct (>= 0.3.2) rails (>= 5.1, < 7.1) - view_component (~> 2.43) + view_component (~> 2.66) blacklight-access_controls (6.0.1) blacklight (> 6.0, < 8) cancancan (>= 1.8) @@ -322,7 +289,7 @@ GEM activemodel (>= 5.2) builder (3.2.4) byebug (11.1.3) - cancancan (3.3.0) + cancancan (3.4.0) capistrano (3.16.0) airbrussh (>= 1.0.0) i18n @@ -465,7 +432,7 @@ GEM fakefs (1.4.1) faker (2.19.0) i18n (>= 1.6, < 2) - faraday (1.10.2) + faraday (1.10.3) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) @@ -526,6 +493,8 @@ GEM haml (5.2.2) temple (>= 0.8.0) tilt + hamster (3.0.0) + concurrent-ruby (~> 1.0) hashdiff (1.0.1) hashie (5.0.0) hooks (0.4.1) @@ -542,6 +511,19 @@ GEM http-form_data (2.3.0) http_logger (0.7.0) httpclient (2.8.3) + hydra-access-controls (12.1.0) + active-fedora (>= 10.0.0) + activesupport (>= 5.2, < 7.1) + blacklight-access_controls (~> 6.0) + cancancan (>= 1.8, < 4) + deprecation (~> 1.0) + hydra-core (12.1.0) + hydra-access-controls (= 12.1.0) + railties (>= 5.2, < 7.1) + hydra-head (12.1.0) + hydra-access-controls (= 12.1.0) + hydra-core (= 12.1.0) + rails (>= 5.2, < 7.1) i18n (1.12.0) concurrent-ruby (~> 1.0) iconv (1.0.8) @@ -570,6 +552,9 @@ GEM multi_json (~> 1.15) rack (~> 2.2) rdf (~> 3.2, >= 3.2.9) + json-ld-preloaded (3.2.2) + json-ld (~> 3.2) + rdf (~> 3.2) jwt (2.4.1) kaminari (1.2.2) activesupport (>= 4.1.0) @@ -585,6 +570,12 @@ GEM kaminari-core (1.2.2) launchy (2.5.0) addressable (~> 2.7) + ld-patch (3.2.0) + ebnf (~> 2.2) + rdf (~> 3.2) + rdf-xsd (~> 3.2) + sparql (~> 3.2) + sxp (~> 1.2) ldp (1.1.0) deprecation faraday (>= 1) @@ -597,12 +588,41 @@ GEM rdf-vocab (>= 0.8) slop link_header (0.0.8) + linkeddata (3.2.1) + json-ld (~> 3.2, >= 3.2.3) + json-ld-preloaded (~> 3.2) + ld-patch (~> 3.2) + nokogiri (~> 1.13, >= 1.13.8) + rdf (~> 3.2, >= 3.2.9) + rdf-aggregate-repo (~> 3.2, >= 3.2.1) + rdf-hamster-repo (~> 3.2) + rdf-isomorphic (~> 3.2, >= 3.2.1) + rdf-json (~> 3.2) + rdf-microdata (~> 3.2, >= 3.2.1) + rdf-n3 (~> 3.2, >= 3.2.1) + rdf-normalize (~> 0.5) + rdf-ordered-repo (~> 3.2, >= 3.2.1) + rdf-rdfa (~> 3.2) + rdf-rdfxml (~> 3.2) + rdf-reasoner (~> 0.8) + rdf-tabular (~> 3.2, >= 3.2.1) + rdf-trig (~> 3.2) + rdf-trix (~> 3.2) + rdf-turtle (~> 3.2, >= 3.2.1) + rdf-vocab (~> 3.2, >= 3.2.1) + rdf-xsd (~> 3.2, >= 3.2.1) + shacl (~> 0.2, >= 0.2.1) + shex (~> 0.7, >= 0.7.1) + sparql (~> 3.2, >= 3.2.4) + sparql-client (~> 3.2, >= 3.2.1) + yaml-ld (~> 0.0) listen (3.7.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) llhttp-ffi (0.4.0) ffi-compiler (~> 1.0) rake (~> 13.0) + logger (1.5.3) lograge (0.11.2) actionpack (>= 4) activesupport (>= 4) @@ -611,7 +631,7 @@ GEM loofah (2.19.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) - mail (2.8.1.rc2) + mail (2.8.0.1) mini_mime (>= 0.1.1) net-imap net-pop @@ -633,12 +653,18 @@ GEM msgpack (1.4.5) multi_json (1.15.0) multi_xml (0.6.0) - multipart-post (2.2.3) + multipart-post (2.3.0) + mustermann (1.1.2) + ruby2_keywords (~> 0.0.1) mysql2 (0.5.3) + net-http-persistent (4.0.1) + connection_pool (~> 2.2) net-imap (0.3.4) date net-protocol net-ldap (0.17.0) + net-pop (0.1.2) + net-protocol net-protocol (0.2.1) timeout net-scp (3.0.0) @@ -648,8 +674,7 @@ GEM net-ssh (6.1.0) netrc (0.11.0) nio4r (2.5.8) - noid (0.9.0) - nokogiri (1.13.10) + nokogiri (1.14.0) mini_portile2 (~> 2.8.0) racc (~> 1.4) nom-xml (1.2.0) @@ -663,11 +688,6 @@ GEM multi_xml (~> 0.5) rack (>= 1.2, < 3) okcomputer (1.18.4) - om (3.2.0) - activemodel (>= 5.1, < 7) - activesupport - nokogiri (>= 1.4.2) - solrizer (~> 3.3) omniauth (2.0.4) hashie (>= 3.4.6) rack (>= 1.6.2, < 3) @@ -703,14 +723,21 @@ GEM puma (5.6.4) nio4r (~> 2.0) raabro (1.4.0) - racc (1.6.1) - rack (2.2.4) + racc (1.6.2) + rack (2.2.6.2) rack-cors (1.1.1) rack (>= 2.0.0) + rack-linkeddata (3.2.1) + linkeddata (~> 3.2) + rack (~> 2.1) + rack-rdf (~> 3.2) rack-protection (2.2.0) rack rack-proxy (0.7.2) rack + rack-rdf (3.2.0) + rack (~> 2.2) + rdf (~> 3.2) rack-test (2.0.2) rack (>= 1.3) rails (6.0.6.1) @@ -756,11 +783,38 @@ GEM link_header (~> 0.0, >= 0.0.8) rdf-aggregate-repo (3.2.1) rdf (~> 3.2) + rdf-hamster-repo (3.2.1) + hamster (~> 3.0) + rdf (~> 3.2, >= 3.2.1) rdf-isomorphic (3.2.1) rdf (~> 3.2) - rdf-ldp (0.1.0) - deprecation - rdf + rdf-json (3.2.0) + rdf (~> 3.2) + rdf-ldp (2.1.0) + json-ld (~> 3.2) + ld-patch (~> 3.2) + link_header (~> 0.0, >= 0.0.8) + rack (~> 2.2) + rack-linkeddata (~> 3.1) + rdf (~> 3.2) + rdf-turtle (~> 3.2) + rdf-vocab (~> 3.2) + sinatra (~> 2.1) + rdf-microdata (3.2.1) + htmlentities (~> 4.3) + nokogiri (~> 1.13) + rdf (~> 3.2) + rdf-rdfa (~> 3.2) + rdf-xsd (~> 3.2) + rdf-n3 (3.2.1) + ebnf (~> 2.2) + rdf (~> 3.2) + sparql (~> 3.2) + sxp (~> 1.2) + rdf-normalize (0.5.1) + rdf (~> 3.2) + rdf-ordered-repo (3.2.1) + rdf (~> 3.2, >= 3.2.1) rdf-rdfa (3.2.0) haml (~> 5.2) htmlentities (~> 4.3) @@ -773,6 +827,23 @@ GEM rdf (~> 3.2) rdf-rdfa (~> 3.2) rdf-xsd (~> 3.2) + rdf-reasoner (0.8.0) + rdf (~> 3.2) + rdf-xsd (~> 3.2) + rdf-tabular (3.2.1) + addressable (~> 2.8) + bcp47 (~> 0.3, >= 0.3.3) + json-ld (~> 3.2) + rdf (~> 3.2, >= 3.2.7) + rdf-vocab (~> 3.2) + rdf-xsd (~> 3.2) + rdf-trig (3.2.0) + ebnf (~> 2.2) + rdf (~> 3.2) + rdf-turtle (~> 3.2) + rdf-trix (3.2.0) + rdf (~> 3.2) + rdf-xsd (~> 3.2) rdf-turtle (3.2.1) ebnf (~> 2.3) rdf (~> 3.2) @@ -906,6 +977,20 @@ GEM childprocess (>= 0.5, < 4.0) rubyzip (>= 1.2.2) semantic_range (3.0.0) + shacl (0.3.0) + json-ld (~> 3.2) + rdf (~> 3.2, >= 3.2.8) + sparql (~> 3.2, >= 3.2.4) + sxp (~> 1.2) + shex (0.7.1) + ebnf (~> 2.2) + htmlentities (~> 4.3) + json-ld (~> 3.2) + json-ld-preloaded (~> 3.2) + rdf (~> 3.2) + rdf-xsd (~> 3.2) + sparql (~> 3.2) + sxp (~> 1.2) shoulda-matchers (5.1.0) activesupport (>= 5.2.0) sidekiq (6.4.1) @@ -923,6 +1008,11 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) + sinatra (2.2.0) + mustermann (~> 1.0) + rack (~> 2.2) + rack-protection (= 2.2.0) + tilt (~> 2.0) slop (4.9.3) solr_wrapper (3.1.2) http @@ -935,6 +1025,18 @@ GEM nokogiri stomp xml-simple + sparql (3.2.5) + builder (~> 3.2) + ebnf (~> 2.2, >= 2.3.1) + logger (~> 1.5) + rdf (~> 3.2, >= 3.2.8) + rdf-aggregate-repo (~> 3.2) + rdf-xsd (~> 3.2) + sparql-client (~> 3.2, >= 3.2.1) + sxp (~> 1.2, >= 1.2.2) + sparql-client (3.2.1) + net-http-persistent (~> 4.0, >= 4.0.1) + rdf (~> 3.2, >= 3.2.6) speedy-af (0.3.0) active-fedora (>= 11.0.0) activesupport (> 5.2) @@ -961,7 +1063,7 @@ GEM sxp (1.2.3) matrix (~> 0.4) rdf (~> 3.2) - temple (0.9.1) + temple (0.10.0) thor (1.2.1) thread_safe (0.3.6) tilt (2.0.11) @@ -984,8 +1086,9 @@ GEM unicode-display_width (1.8.0) unicode-types (1.8.0) user_agent_parser (2.9.0) - view_component (2.58.0) - activesupport (>= 5.0.0, < 8.0) + view_component (2.82.0) + activesupport (>= 5.2.0, < 8.0) + concurrent-ruby (~> 1.0) method_source (~> 1.0) warden (1.2.9) rack (>= 2.0.9) @@ -1019,10 +1122,15 @@ GEM nokogiri (~> 1.8) xray-rails (0.3.2) rails (>= 3.1.0) + yaml-ld (0.0.2) + json-ld (~> 3.2, >= 3.2.3) + psych (>= 3.3) + rdf (~> 3.2, >= 3.2.9) + rdf-xsd (~> 3.2) zeitwerk (2.6.6) zk (1.10.0) zookeeper (~> 1.5.0) - zookeeper (1.5.1) + zookeeper (1.5.5) zoom (0.5.0) PLATFORMS @@ -1030,12 +1138,11 @@ PLATFORMS DEPENDENCIES about_page! - active-fedora! - active-triples! + active-fedora (~> 14.0) active_annotations (~> 0.4) active_elastic_job active_encode (~> 1.0, >= 1.1.2) - active_fedora-datastreams! + active_fedora-datastreams (~> 0.5) activejob-traffic_control activejob-uniqueness activerecord-session_store (>= 2.0.0) @@ -1088,7 +1195,7 @@ DEPENDENCIES google-analytics-rails (= 1.1.0) hashdiff (>= 1.0) hooks - hydra-head! + hydra-head (~> 12.0) iconv (~> 1.0.6) iiif_manifest (~> 0.6) ims-lti (~> 1.1.13) @@ -1106,8 +1213,8 @@ DEPENDENCIES mysql2 net-ldap net-smtp - noid-rails! okcomputer + om! omniauth (~> 2.0) omniauth-identity (>= 2.0.0) omniauth-lti! From ca01e9870ce346caafba610e411365618f0a88cf Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Mon, 30 Jan 2023 14:33:50 -0500 Subject: [PATCH 014/107] Test with ruby 3.2 --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e9afcef175..aa02b113da 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -163,10 +163,10 @@ workflows: build_test_report: jobs: - build: - ruby_ver: '3.1' - name: 'Ruby3-1' + ruby_ver: '3.2' + name: 'Ruby3-2' parallelism: 4 - upload-coverage: parallelism: 4 requires: - - Ruby3-1 + - Ruby3-2 From d9dcc52f7cef701df5cbabac70d5b744e9e830e7 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Mon, 30 Jan 2023 14:38:11 -0500 Subject: [PATCH 015/107] Add back in noid-rails dependency --- Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Gemfile b/Gemfile index 53527b7797..b37ea13ecf 100644 --- a/Gemfile +++ b/Gemfile @@ -33,6 +33,7 @@ gem 'active-fedora', '~> 14.0' gem 'active_fedora-datastreams', '~> 0.5' gem 'hydra-head', '~> 12.0' gem 'ldp', '~> 1.1.0' +gem 'noid-rails', '~> 3.1' gem 'om', git: 'https://github.com/avalonmediasystem/om.git', branch: 'ruby3' gem 'rdf-rdfxml' From b60141a962d74ef75a71db78b32f758de53312ca Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Tue, 31 Jan 2023 11:59:17 -0500 Subject: [PATCH 016/107] Use released version of edtf-ruby --- Gemfile | 2 +- Gemfile.lock | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Gemfile b/Gemfile index b37ea13ecf..56536eb85f 100644 --- a/Gemfile +++ b/Gemfile @@ -85,7 +85,7 @@ gem 'roo' gem 'wavefile', '~> 1.0.1' # Data Translation & Normalization -gem 'edtf', git: "https://github.com/cjcolvar/edtf-ruby.git", branch: "patch-1" +gem 'edtf', '>= 3.1.1' gem 'iconv', '~> 1.0.6' gem 'marc' diff --git a/Gemfile.lock b/Gemfile.lock index 813494976c..957fb252ec 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -82,14 +82,6 @@ GIT fugit (~> 1.1) sidekiq (>= 4.2.1) -GIT - remote: https://github.com/cjcolvar/edtf-ruby.git - revision: 3097c47a8a527dfc574832570530b592ac5c71bb - branch: patch-1 - specs: - edtf (3.1.0) - activesupport (>= 3.0, < 8.0) - GEM remote: https://rubygems.org/ specs: @@ -412,6 +404,8 @@ GEM scanf (~> 1.0) sxp (~> 1.2) unicode-types (~> 1.7) + edtf (3.1.1) + activesupport (>= 3.0, < 8.0) email_spec (2.2.0) htmlentities (~> 4.3.3) launchy (~> 2.1) @@ -674,6 +668,10 @@ GEM net-ssh (6.1.0) netrc (0.11.0) nio4r (2.5.8) + noid (0.9.0) + noid-rails (3.1.0) + actionpack (>= 5.0.0, < 7.1) + noid (~> 0.9) nokogiri (1.14.0) mini_portile2 (~> 2.8.0) racc (~> 1.4) @@ -1183,7 +1181,7 @@ DEPENDENCIES devise (~> 4.8) devise_invitable (~> 2.0) dotenv-rails - edtf! + edtf (>= 3.1.1) email_spec equivalent-xml factory_bot_rails @@ -1213,6 +1211,7 @@ DEPENDENCIES mysql2 net-ldap net-smtp + noid-rails (~> 3.1) okcomputer om! omniauth (~> 2.0) From 7e522cf0277c38e3625f35e3761175a633453a02 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Tue, 31 Jan 2023 12:06:48 -0500 Subject: [PATCH 017/107] Upgrade sinatra for security patch --- Gemfile.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 957fb252ec..320829f409 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -648,7 +648,7 @@ GEM multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.3.0) - mustermann (1.1.2) + mustermann (2.0.2) ruby2_keywords (~> 0.0.1) mysql2 (0.5.3) net-http-persistent (4.0.1) @@ -729,7 +729,7 @@ GEM linkeddata (~> 3.2) rack (~> 2.1) rack-rdf (~> 3.2) - rack-protection (2.2.0) + rack-protection (2.2.4) rack rack-proxy (0.7.2) rack @@ -1006,10 +1006,10 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) - sinatra (2.2.0) - mustermann (~> 1.0) + sinatra (2.2.4) + mustermann (~> 2.0) rack (~> 2.2) - rack-protection (= 2.2.0) + rack-protection (= 2.2.4) tilt (~> 2.0) slop (4.9.3) solr_wrapper (3.1.2) From 682033737d0f8ac134d4e1cca1e701bfbbff9fa6 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Tue, 7 Feb 2023 14:29:36 -0500 Subject: [PATCH 018/107] Test with rails 6.1 --- Gemfile | 5 +- Gemfile.lock | 153 +++++++++++++++++++++++++++------------------------ 2 files changed, 84 insertions(+), 74 deletions(-) diff --git a/Gemfile b/Gemfile index 56536eb85f..acd94897ad 100644 --- a/Gemfile +++ b/Gemfile @@ -5,7 +5,7 @@ gem 'bootsnap', require: false gem 'listen' gem 'net-smtp', require: false gem 'psych', '< 4' -gem 'rails', '=6.0.5.1' +gem 'rails', '=6.1.7.2' gem 'sprockets', '~>3.7.2' #gem 'sprockets-rails', require: 'sprockets/railtie' gem 'sqlite3' @@ -57,7 +57,8 @@ gem 'iiif_manifest', '~> 0.6' gem 'rack-cors', require: 'rack/cors' gem 'rails_same_site_cookie' gem 'recaptcha', require: 'recaptcha/rails' -gem 'samvera-persona', '~> 0.3' +#gem 'samvera-persona', '~> 0.3' +gem 'samvera-persona', git: "https://github.com/samvera-labs/samvera-persona.git", branch: "newer_rails" gem 'speedy-af', '~> 0.3' # Avalon Components diff --git a/Gemfile.lock b/Gemfile.lock index 320829f409..68b4ad75e4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -82,41 +82,55 @@ GIT fugit (~> 1.1) sidekiq (>= 4.2.1) +GIT + remote: https://github.com/samvera-labs/samvera-persona.git + revision: 0d8895176f60c28d9731ed65b3a73809b6234691 + branch: newer_rails + specs: + samvera-persona (0.3.0) + devise (~> 4.6) + devise_invitable (>= 1.7, < 3.0) + paranoia (~> 2.2) + pretender + rails (>= 5.2.4.3, < 7.1) + GEM remote: https://rubygems.org/ specs: - actioncable (6.0.6.1) - actionpack (= 6.0.6.1) + actioncable (6.1.7.2) + actionpack (= 6.1.7.2) + activesupport (= 6.1.7.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.0.6.1) - actionpack (= 6.0.6.1) - activejob (= 6.0.6.1) - activerecord (= 6.0.6.1) - activestorage (= 6.0.6.1) - activesupport (= 6.0.6.1) + actionmailbox (6.1.7.2) + actionpack (= 6.1.7.2) + activejob (= 6.1.7.2) + activerecord (= 6.1.7.2) + activestorage (= 6.1.7.2) + activesupport (= 6.1.7.2) mail (>= 2.7.1) - actionmailer (6.0.6.1) - actionpack (= 6.0.6.1) - actionview (= 6.0.6.1) - activejob (= 6.0.6.1) + actionmailer (6.1.7.2) + actionpack (= 6.1.7.2) + actionview (= 6.1.7.2) + activejob (= 6.1.7.2) + activesupport (= 6.1.7.2) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.0.6.1) - actionview (= 6.0.6.1) - activesupport (= 6.0.6.1) - rack (~> 2.0, >= 2.0.8) + actionpack (6.1.7.2) + actionview (= 6.1.7.2) + activesupport (= 6.1.7.2) + rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.0.6.1) - actionpack (= 6.0.6.1) - activerecord (= 6.0.6.1) - activestorage (= 6.0.6.1) - activesupport (= 6.0.6.1) + actiontext (6.1.7.2) + actionpack (= 6.1.7.2) + activerecord (= 6.1.7.2) + activestorage (= 6.1.7.2) + activesupport (= 6.1.7.2) nokogiri (>= 1.8.5) - actionview (6.0.6.1) - activesupport (= 6.0.6.1) + actionview (6.1.7.2) + activesupport (= 6.1.7.2) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -153,8 +167,8 @@ GEM om (~> 3.1) rdf (~> 3.2) rdf-rdfxml (~> 3.2) - activejob (6.0.5.1) - activesupport (= 6.0.5.1) + activejob (6.1.7.2) + activesupport (= 6.1.7.2) globalid (>= 0.3.6) activejob-traffic_control (0.1.3) activejob (>= 4.2) @@ -163,28 +177,30 @@ GEM activejob-uniqueness (0.2.2) activejob (>= 4.2, < 7) redlock (>= 1.2, < 2) - activemodel (6.0.6.1) - activesupport (= 6.0.6.1) - activerecord (6.0.6.1) - activemodel (= 6.0.6.1) - activesupport (= 6.0.6.1) + activemodel (6.1.7.2) + activesupport (= 6.1.7.2) + activerecord (6.1.7.2) + activemodel (= 6.1.7.2) + activesupport (= 6.1.7.2) activerecord-session_store (2.0.0) actionpack (>= 5.2.4.1) activerecord (>= 5.2.4.1) multi_json (~> 1.11, >= 1.11.2) rack (>= 2.0.8, < 3) railties (>= 5.2.4.1) - activestorage (6.0.6.1) - actionpack (= 6.0.6.1) - activejob (= 6.0.6.1) - activerecord (= 6.0.6.1) + activestorage (6.1.7.2) + actionpack (= 6.1.7.2) + activejob (= 6.1.7.2) + activerecord (= 6.1.7.2) + activesupport (= 6.1.7.2) marcel (~> 1.0) - activesupport (6.0.6.1) + mini_mime (>= 1.1.0) + activesupport (6.1.7.2) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) - zeitwerk (~> 2.2, >= 2.2.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) acts_as_list (1.0.4) activerecord (>= 4.2) addressable (2.8.1) @@ -625,7 +641,7 @@ GEM loofah (2.19.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) - mail (2.8.0.1) + mail (2.8.1) mini_mime (>= 0.1.1) net-imap net-pop @@ -672,7 +688,7 @@ GEM noid-rails (3.1.0) actionpack (>= 5.0.0, < 7.1) noid (~> 0.9) - nokogiri (1.14.0) + nokogiri (1.14.1) mini_portile2 (~> 2.8.0) racc (~> 1.4) nom-xml (1.2.0) @@ -700,7 +716,7 @@ GEM os (1.1.4) ostruct (0.5.5) parallel (1.21.0) - paranoia (2.5.2) + paranoia (2.6.1) activerecord (>= 5.1, < 7.1) parser (3.1.0.0) ast (~> 2.4.1) @@ -738,20 +754,20 @@ GEM rdf (~> 3.2) rack-test (2.0.2) rack (>= 1.3) - rails (6.0.6.1) - actioncable (= 6.0.6.1) - actionmailbox (= 6.0.6.1) - actionmailer (= 6.0.6.1) - actionpack (= 6.0.6.1) - actiontext (= 6.0.6.1) - actionview (= 6.0.6.1) - activejob (= 6.0.6.1) - activemodel (= 6.0.6.1) - activerecord (= 6.0.6.1) - activestorage (= 6.0.6.1) - activesupport (= 6.0.6.1) - bundler (>= 1.3.0) - railties (= 6.0.6.1) + rails (6.1.7.2) + actioncable (= 6.1.7.2) + actionmailbox (= 6.1.7.2) + actionmailer (= 6.1.7.2) + actionpack (= 6.1.7.2) + actiontext (= 6.1.7.2) + actionview (= 6.1.7.2) + activejob (= 6.1.7.2) + activemodel (= 6.1.7.2) + activerecord (= 6.1.7.2) + activestorage (= 6.1.7.2) + activesupport (= 6.1.7.2) + bundler (>= 1.15.0) + railties (= 6.1.7.2) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -765,12 +781,12 @@ GEM rails_same_site_cookie (0.1.9) rack (>= 1.5) user_agent_parser (~> 2.6) - railties (6.0.6.1) - actionpack (= 6.0.6.1) - activesupport (= 6.0.6.1) + railties (6.1.7.2) + actionpack (= 6.1.7.2) + activesupport (= 6.1.7.2) method_source - rake (>= 0.8.7) - thor (>= 0.20.3, < 2.0) + rake (>= 12.2) + thor (~> 1.0) rainbow (3.1.1) rake (13.0.6) rb-fsevent (0.11.1) @@ -954,12 +970,6 @@ GEM rexml ruby2_keywords (0.0.5) rubyzip (1.3.0) - samvera-persona (0.3.0) - devise (~> 4.6) - devise_invitable (>= 1.7, < 3.0) - paranoia (~> 2.2) - pretender - rails (>= 5.2.4.3, < 6.1) sass (3.4.22) sassc (2.4.0) ffi (~> 1.9) @@ -1063,7 +1073,6 @@ GEM rdf (~> 3.2) temple (0.10.0) thor (1.2.1) - thread_safe (0.3.6) tilt (2.0.11) timeout (0.3.1) trailblazer-option (0.1.2) @@ -1073,8 +1082,8 @@ GEM railties (>= 3.1) typhoeus (1.4.0) ethon (>= 0.9.0) - tzinfo (1.2.11) - thread_safe (~> 0.1) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) uber (0.0.15) uglifier (4.2.0) execjs (>= 0.3.0, < 3) @@ -1225,7 +1234,7 @@ DEPENDENCIES psych (< 4) puma (>= 4.3.8) rack-cors - rails (= 6.0.6.1) + rails (= 6.1.7.2) rails-controller-testing rails_same_site_cookie rb-readline @@ -1241,7 +1250,7 @@ DEPENDENCIES rspec-rails rspec-retry rspec_junit_formatter - samvera-persona (~> 0.3) + samvera-persona! sass (= 3.4.22) selenium-webdriver shoulda-matchers From 5570832abd2e2d66929f623ebdbd45c3fb7947bf Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Tue, 7 Feb 2023 14:38:05 -0500 Subject: [PATCH 019/107] Fix mediainfo fork --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index acd94897ad..0fa1ab6f58 100644 --- a/Gemfile +++ b/Gemfile @@ -80,7 +80,7 @@ gem 'audio_waveform-ruby', '~> 1.0.7', require: 'audio_waveform' gem 'browse-everything', git: "https://github.com/avalonmediasystem/browse-everything.git", branch: 'v1.2-avalon' gem 'fastimage' gem 'media_element_add_to_playlist', git: 'https://github.com/avalonmediasystem/media-element-add-to-playlist.git', tag: 'avalon-r6.5' -gem 'mediainfo', git: "https://github.com/avalonmediasystem/mediainfo.git", branch: 'avalon_fixes' +gem 'mediainfo', git: "https://github.com/avalonmediasystem/mediainfo.git", branch: 'rails6.1' gem 'rest-client', '~> 2.0' gem 'roo' gem 'wavefile', '~> 1.0.1' diff --git a/Gemfile.lock b/Gemfile.lock index 68b4ad75e4..aea570b15a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -48,8 +48,8 @@ GIT GIT remote: https://github.com/avalonmediasystem/mediainfo.git - revision: 11504137076169863509c1caaf3555ab65a4a64b - branch: avalon_fixes + revision: 25357312337947af0f4a574fb85fb6778cc0fa2a + branch: rails6.1 specs: mediainfo (0.7.1) From 0d5e3fc37b1a2df7447f5f1997163bf54d770934 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Tue, 7 Feb 2023 14:41:32 -0500 Subject: [PATCH 020/107] Upgrade pry --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index aea570b15a..a7948ecc30 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -724,12 +724,12 @@ GEM popper_js (1.16.0) pretender (0.4.0) actionpack (>= 5.2) - pry (0.13.1) + pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) - pry-byebug (3.9.0) + pry-byebug (3.10.1) byebug (~> 11.0) - pry (~> 0.13.0) + pry (>= 0.13, < 0.15) pry-rails (0.3.9) pry (>= 0.10.4) psych (3.3.4) From 1432008054f679ccb88121d17e3752366f657752 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Tue, 7 Feb 2023 14:48:52 -0500 Subject: [PATCH 021/107] Updated samvera-persona --- Gemfile.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index a7948ecc30..28028192ea 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -84,7 +84,7 @@ GIT GIT remote: https://github.com/samvera-labs/samvera-persona.git - revision: 0d8895176f60c28d9731ed65b3a73809b6234691 + revision: 044973c6f08f36c3cce5ff3014eb9d23938afdc7 branch: newer_rails specs: samvera-persona (0.3.0) @@ -263,7 +263,7 @@ GEM execjs (~> 2.0) bcp47 (0.3.3) i18n - bcrypt (3.1.16) + bcrypt (3.1.18) bindex (0.8.1) bixby (3.0.2) rubocop (= 0.85.1) @@ -367,7 +367,7 @@ GEM railties (>= 4.1.0) responders warden (~> 1.2.3) - devise_invitable (2.0.6) + devise_invitable (2.0.7) actionmailer (>= 5.0) devise (>= 4.6) diff-lcs (1.5.0) @@ -900,9 +900,9 @@ GEM uber (< 0.2.0) request_store (1.5.1) rack (>= 1.4) - responders (3.0.1) - actionpack (>= 5.0) - railties (>= 5.0) + responders (3.1.0) + 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) From 0c6be64ee37eed5ffd61b86171b05060fc6c1474 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Tue, 7 Feb 2023 17:55:43 -0500 Subject: [PATCH 022/107] File#exists? -> File#exist? --- app/models/language_term.rb | 2 +- app/models/master_file.rb | 2 +- spec/jobs/master_file_management_jobs_spec.rb | 14 +++++++------- spec/lib/avalon/batch_ingest_spec.rb | 2 +- spec/models/master_file_spec.rb | 4 ++-- spec/models/working_file_path_spec.rb | 14 +++++++------- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/app/models/language_term.rb b/app/models/language_term.rb index fefa8485f7..1460c42418 100644 --- a/app/models/language_term.rb +++ b/app/models/language_term.rb @@ -36,7 +36,7 @@ def autocomplete(query) end def load! - if File.exists?(Store) + if File.exist?(Store) YAML.load(File.read(Store)) else harvest! diff --git a/app/models/master_file.rb b/app/models/master_file.rb index b14298eac7..04f388143f 100644 --- a/app/models/master_file.rb +++ b/app/models/master_file.rb @@ -567,7 +567,7 @@ def find_frame_source(options={}) response = { source: source&.location }.merge(options) return response if response[:source].to_s =~ %r(^https?://) - unless File.exists?(response[:source]) + unless File.exist?(response[:source]) Rails.logger.warn("Masterfile `#{file_location}` not found. Extracting via HLS.") hls_temp_file, new_offset = create_frame_source_hls_temp_file(options[:offset]) response = { source: hls_temp_file, offset: new_offset, non_temp_file: false } diff --git a/spec/jobs/master_file_management_jobs_spec.rb b/spec/jobs/master_file_management_jobs_spec.rb index 876e5a18b0..575d4cc5ad 100644 --- a/spec/jobs/master_file_management_jobs_spec.rb +++ b/spec/jobs/master_file_management_jobs_spec.rb @@ -32,7 +32,7 @@ describe "delete_masterfile" do it "should delete masterfile" do MasterFileManagementJobs::Delete.perform_now(master_file.id) - expect(File.exists? location).to be false + expect(File.exist? location).to be false expect(MasterFile.find(master_file.id).file_location).to be_blank end end @@ -41,16 +41,16 @@ it "should move masterfile" do newpath = "/path/to/new/file.mp4" MasterFileManagementJobs::Move.perform_now(master_file.id, newpath) - expect(File.exists? location).to be false - expect(File.exists? newpath).to be true + expect(File.exist? location).to be false + expect(File.exist? newpath).to be true expect(newpath).to eq MasterFile.find(master_file.id).file_location end it 'does nothing if masterfile already moved' do newpath = master_file.file_location MasterFileManagementJobs::Move.perform_now(master_file.id, newpath) - expect(File.exists? location).to be true - expect(File.exists? newpath).to be true + expect(File.exist? location).to be true + expect(File.exist? newpath).to be true expect(newpath).to eq MasterFile.find(master_file.id).file_location end end @@ -60,8 +60,8 @@ it "should move masterfile with space in filename" do newpath = "/path/to/new/file with space.mp4" MasterFileManagementJobs::Move.perform_now(master_file.id, newpath) - expect(File.exists? location).to be false - expect(File.exists? newpath).to be true + expect(File.exist? location).to be false + expect(File.exist? newpath).to be true expect(newpath).to eq MasterFile.find(master_file.id).file_location end end diff --git a/spec/lib/avalon/batch_ingest_spec.rb b/spec/lib/avalon/batch_ingest_spec.rb index 13d683f7ad..c13f0263d0 100644 --- a/spec/lib/avalon/batch_ingest_spec.rb +++ b/spec/lib/avalon/batch_ingest_spec.rb @@ -112,7 +112,7 @@ expect { batch_ingest.scan_for_packages }.not_to raise_error expect { batch_ingest.scan_for_packages }.not_to change{BatchRegistries.count} error_file = File.join(@dropbox_dir,'example_batch_ingest','bad_manifest.xlsx.error') - expect(File.exists?(error_file)).to be true + expect(File.exist?(error_file)).to be true expect(File.read(error_file)).to match(/^Invalid manifest/) end diff --git a/spec/models/master_file_spec.rb b/spec/models/master_file_spec.rb index 611f832bb4..657a2b3535 100644 --- a/spec/models/master_file_spec.rb +++ b/spec/models/master_file_spec.rb @@ -624,7 +624,7 @@ let(:high_derivative_locator) { FileLocator.new(video_master_file.derivatives.where(quality_ssi: 'high').first.absolute_location) } it 'uses high derivative' do - expect(File).to receive(:exists?).with(high_derivative_locator.location).and_return(true) + expect(File).to receive(:exist?).with(high_derivative_locator.location).and_return(true) expect(source[:source]).to eq high_derivative_locator.location expect(source[:non_temp_file]).to eq true end @@ -636,7 +636,7 @@ it 'falls back to HLS' do expect(video_master_file).to receive(:create_frame_source_hls_temp_file).and_return(hls_temp_file) - expect(File).to receive(:exists?).with(high_derivative_locator.location).and_return(false) + expect(File).to receive(:exist?).with(high_derivative_locator.location).and_return(false) expect(source[:source]).to eq '/tmp/temp_segment.ts' expect(source[:non_temp_file]).to eq false end diff --git a/spec/models/working_file_path_spec.rb b/spec/models/working_file_path_spec.rb index 2303235d8c..4921c87bde 100644 --- a/spec/models/working_file_path_spec.rb +++ b/spec/models/working_file_path_spec.rb @@ -94,7 +94,7 @@ it 'sends the working_file_path to active_encode' do MasterFileBuilder.build(media_object, params) master_file = media_object.reload.master_files.first - expect(File.exists? master_file.working_file_path.first).to be true + expect(File.exist? master_file.working_file_path.first).to be true input = FileLocator.new(master_file.working_file_path.first).uri.to_s expect(encoder_class).to have_received(:create).with(input, { headers: nil, master_file_id: master_file.id, preset: workflow }) end @@ -105,7 +105,7 @@ it 'sends the working_file_path to active_encode' do MasterFileBuilder.build(media_object, params) master_file = media_object.reload.master_files.first - expect(File.exists? master_file.working_file_path.first).to be true + expect(File.exist? master_file.working_file_path.first).to be true input_path = FileLocator.new(master_file.working_file_path.first).uri.to_s expect(encoder_class).to have_received(:create).with(input_path, master_file_id: master_file.id, outputs: [{ label: "high", url: input_path }], preset: "pass_through") end @@ -120,7 +120,7 @@ it 'sends the working_file_path to active_encode' do MasterFileBuilder.build(media_object, params) master_file = media_object.reload.master_files.first - expect(File.exists? master_file.working_file_path.first).to be true + expect(File.exist? master_file.working_file_path.first).to be true input = FileLocator.new(master_file.working_file_path.first).uri.to_s expect(encoder_class).to have_received(:create).with(input, { headers: nil, master_file_id: master_file.id, preset: workflow }) end @@ -131,7 +131,7 @@ it 'sends the working_file_path to active_encode' do MasterFileBuilder.build(media_object, params) master_file = media_object.reload.master_files.first - expect(File.exists? master_file.working_file_path.first).to be true + expect(File.exist? master_file.working_file_path.first).to be true input_path = FileLocator.new(master_file.working_file_path.first).uri.to_s expect(encoder_class).to have_received(:create).with(input_path, master_file_id: master_file.id, outputs: [{ label: "high", url: input_path }], preset: "pass_through") end @@ -153,7 +153,7 @@ it 'sends the working_file_path to active_encode' do entry.process! master_file = media_object.reload.master_files.first - expect(File.exists? master_file.working_file_path.first).to be true + expect(File.exist? master_file.working_file_path.first).to be true input = FileLocator.new(master_file.working_file_path.first).uri.to_s expect(encoder_class).to have_received(:create).with(input, { headers: nil, master_file_id: master_file.id, preset: workflow }) end @@ -164,7 +164,7 @@ it 'sends the working_file_path to active_encode' do entry.process! master_file = media_object.reload.master_files.first - expect(File.exists? master_file.working_file_path.first).to be true + expect(File.exist? master_file.working_file_path.first).to be true input_path = FileLocator.new(master_file.working_file_path.first).uri.to_s expect(encoder_class).to have_received(:create).with(input_path, master_file_id: master_file.id, outputs: [{ label: "high", url: input_path }], preset: "pass_through" ) end @@ -197,7 +197,7 @@ working_file_path_low = master_file.working_file_path.find { |file| file.include? "low" } [working_file_path_high, working_file_path_medium, working_file_path_low].each do |file| - expect(File.exists? file).to be true + expect(File.exist? file).to be true end input_path = FileLocator.new(working_file_path_high).uri.to_s From 1fb3dc9990fc59ebfd31ec93f7471195d7e45e10 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Wed, 8 Feb 2023 08:09:39 -0500 Subject: [PATCH 023/107] Fix rspec-rails config --- spec/rails_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 73f8c4048f..2bd5a18e6d 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -105,7 +105,7 @@ include Noid::Rails::RSpec # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures - config.fixture_path = "#{::Rails.root}/spec/fixtures" + config.file_fixture_path = "#{::Rails.root}/spec/fixtures" # If you're not using ActiveRecord, or you'd prefer not to run each of your # examples within a transaction, remove the following line or assign false From 3074b783413f8c447f9e438c53f939154183738e Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Wed, 8 Feb 2023 08:17:47 -0500 Subject: [PATCH 024/107] Mark order query as safe SQL --- app/controllers/encode_records_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/encode_records_controller.rb b/app/controllers/encode_records_controller.rb index cf45d291c1..4700c58041 100644 --- a/app/controllers/encode_records_controller.rb +++ b/app/controllers/encode_records_controller.rb @@ -59,7 +59,7 @@ def paged_index # Sort sort_column = columns[params['order']['0']['column'].to_i] sort_direction = params['order']['0']['dir'] == 'desc' ? 'desc' : 'asc' - @encode_records = @encode_records.order("lower(CAST(#{sort_column} as char)) #{sort_direction}, #{sort_column} #{sort_direction}") + @encode_records = @encode_records.order(Arel.sql("lower(CAST(#{sort_column} as char)) #{sort_direction}, #{sort_column} #{sort_direction}")) # Paginate page_num = (params['start'].to_i / params['length'].to_i).floor + 1 From 330140ad2b08c74323f23ed7e3b19870c112574c Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Wed, 8 Feb 2023 08:18:12 -0500 Subject: [PATCH 025/107] Dir#exists? -> Dir#exist? --- lib/avalon/dropbox.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/avalon/dropbox.rb b/lib/avalon/dropbox.rb index 24dce5d6f3..b12a9f51d5 100644 --- a/lib/avalon/dropbox.rb +++ b/lib/avalon/dropbox.rb @@ -25,7 +25,7 @@ def initialize(root, collection) # Returns available files in the dropbox def all FileUtils.mkdir_p @base_directory - return nil if @base_directory.blank? or not Dir.exists?(@base_directory) + return nil if @base_directory.blank? or not Dir.exist?(@base_directory) contents = Dir.entries(@base_directory).reject { |fn| fn.start_with?('.') } open_files = find_open_files(contents) files = [] @@ -52,7 +52,7 @@ def all # Compares id against hash of each file's full path and return the path that matches # Pretty horrible, should destroy def find(id) - return nil if @base_directory.blank? or not Dir.exists?(@base_directory) + return nil if @base_directory.blank? or not Dir.exist?(@base_directory) Dir.entries(@base_directory).each do |path| full_path = File.join( @base_directory, path) From 53d0e06530dd6effdf91e20d05f3a99af6745270 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Wed, 8 Feb 2023 08:19:47 -0500 Subject: [PATCH 026/107] Don't modify frozen string, overwrite it --- app/controllers/users/omniauth_callbacks_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/users/omniauth_callbacks_controller.rb b/app/controllers/users/omniauth_callbacks_controller.rb index e1d65c88a1..af264b43ad 100644 --- a/app/controllers/users/omniauth_callbacks_controller.rb +++ b/app/controllers/users/omniauth_callbacks_controller.rb @@ -48,7 +48,7 @@ def login_popup? end def find_user(auth_type) - auth_type.downcase! + auth_type = auth_type.downcase find_method = "find_for_#{auth_type}".to_sym find_method = :find_for_generic unless User.respond_to?(find_method) logger.debug "#{auth_type} :: #{current_user.inspect}" From 6330050a3ee4eaee642522c8fa313242f39676bc Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Wed, 8 Feb 2023 08:26:56 -0500 Subject: [PATCH 027/107] Ensure params are strings instead of arrays --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index e66b002e46..6dc3684c10 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -30,7 +30,7 @@ class ApplicationController < ActionController::Base helper_method :render_bookmarks_control? around_action :handle_api_request, if: proc{|c| request.format.json? || request.format.atom? } - before_action :rewrite_v4_ids, if: proc{|c| request.method_symbol == :get && [params[:id], params[:content]].compact.any? { |i| i =~ /^[a-z]+:[0-9]+$/}} + before_action :rewrite_v4_ids, if: proc{|c| request.method_symbol == :get && [params[:id], params[:content]].flatten.compact.any? { |i| i =~ /^[a-z]+:[0-9]+$/}} before_action :set_no_cache_headers, if: proc{|c| request.xhr? } prepend_before_action :remove_zero_width_chars From 571108fde3332e955440149ff7f544f41c900f8f Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Wed, 8 Feb 2023 11:11:14 -0500 Subject: [PATCH 028/107] Fix issue with missing fixture_file_path method --- Gemfile.lock | 32 ++++++++++++++++---------------- spec/rails_helper.rb | 3 ++- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 28028192ea..c339dd50ee 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -434,7 +434,7 @@ GEM ethon (0.15.0) ffi (>= 1.15.0) execjs (2.8.1) - factory_bot (6.2.0) + factory_bot (6.2.1) activesupport (>= 5.0.0) factory_bot_rails (6.2.0) factory_bot (~> 6.2.0) @@ -916,28 +916,28 @@ GEM rsolr (2.5.0) builder (>= 2.1.2) faraday (>= 0.9, < 3, != 2.0.0) - rspec-core (3.11.0) - rspec-support (~> 3.11.0) - rspec-expectations (3.11.0) + rspec-core (3.12.1) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.2) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.11.0) + rspec-support (~> 3.12.0) rspec-its (1.3.0) rspec-core (>= 3.0.0) rspec-expectations (>= 3.0.0) - rspec-mocks (3.11.0) + rspec-mocks (3.12.3) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.11.0) - rspec-rails (5.1.0) - actionpack (>= 5.2) - activesupport (>= 5.2) - railties (>= 5.2) - rspec-core (~> 3.10) - rspec-expectations (~> 3.10) - rspec-mocks (~> 3.10) - rspec-support (~> 3.10) + rspec-support (~> 3.12.0) + rspec-rails (6.0.1) + actionpack (>= 6.1) + activesupport (>= 6.1) + railties (>= 6.1) + rspec-core (~> 3.11) + rspec-expectations (~> 3.11) + rspec-mocks (~> 3.11) + rspec-support (~> 3.11) rspec-retry (0.6.2) rspec-core (> 3.3) - rspec-support (3.11.0) + rspec-support (3.12.0) rspec_junit_formatter (0.5.1) rspec-core (>= 2, < 4, != 2.12.0) rubocop (0.85.1) diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 2bd5a18e6d..d5a3351fdc 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -195,5 +195,6 @@ end FactoryBot::SyntaxRunner.class_eval do - include ActionDispatch::TestProcess + include ActiveSupport::Testing::FileFixtures + include ActionDispatch::TestProcess::FixtureFile end From ed43dc178fd431c29333b2a39b9895b1a973a878 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Wed, 8 Feb 2023 11:27:02 -0500 Subject: [PATCH 029/107] Run rails app:update --- bin/rails | 4 +- bin/rake | 4 +- bin/setup | 8 +-- bin/yarn | 12 +++- config.ru | 4 +- config/boot.rb | 4 +- config/environment.rb | 2 +- config/environments/development.rb | 20 +++++- config/environments/production.rb | 16 +++-- config/environments/test.rb | 14 +++- config/initializers/backtrace_silencers.rb | 7 +- .../initializers/filter_parameter_logging.rb | 4 +- .../new_framework_defaults_6_1.rb | 67 +++++++++++++++++++ config/initializers/permissions_policy.rb | 11 +++ ..._to_active_storage_blobs.active_storage.rb | 22 ++++++ ..._storage_variant_records.active_storage.rb | 27 ++++++++ 16 files changed, 199 insertions(+), 27 deletions(-) create mode 100644 config/initializers/new_framework_defaults_6_1.rb create mode 100644 config/initializers/permissions_policy.rb create mode 100644 db/migrate/20230208162500_add_service_name_to_active_storage_blobs.active_storage.rb create mode 100644 db/migrate/20230208162501_create_active_storage_variant_records.active_storage.rb diff --git a/bin/rails b/bin/rails index 0739660237..6fb4e4051c 100755 --- a/bin/rails +++ b/bin/rails @@ -1,4 +1,4 @@ #!/usr/bin/env ruby APP_PATH = File.expand_path('../config/application', __dir__) -require_relative '../config/boot' -require 'rails/commands' +require_relative "../config/boot" +require "rails/commands" diff --git a/bin/rake b/bin/rake index 17240489f6..4fbf10b960 100755 --- a/bin/rake +++ b/bin/rake @@ -1,4 +1,4 @@ #!/usr/bin/env ruby -require_relative '../config/boot' -require 'rake' +require_relative "../config/boot" +require "rake" Rake.application.run diff --git a/bin/setup b/bin/setup index 5853b5ea87..90700ac4f9 100755 --- a/bin/setup +++ b/bin/setup @@ -1,5 +1,5 @@ #!/usr/bin/env ruby -require 'fileutils' +require "fileutils" # path to your application root. APP_ROOT = File.expand_path('..', __dir__) @@ -9,8 +9,8 @@ def system!(*args) end FileUtils.chdir APP_ROOT do - # This script is a way to setup or update your development environment automatically. - # This script is idempotent, so that you can run it at anytime and get an expectable outcome. + # This script is a way to set up or update your development environment automatically. + # This script is idempotent, so that you can run it at any time and get an expectable outcome. # Add necessary setup steps to this file. puts '== Installing dependencies ==' @@ -18,7 +18,7 @@ FileUtils.chdir APP_ROOT do system('bundle check') || system!('bundle install') # Install JavaScript dependencies - # system('bin/yarn') + system! 'bin/yarn' # puts "\n== Copying sample files ==" # unless File.exist?('config/database.yml') diff --git a/bin/yarn b/bin/yarn index 460dd565b4..9fab2c3507 100755 --- a/bin/yarn +++ b/bin/yarn @@ -1,9 +1,15 @@ #!/usr/bin/env ruby APP_ROOT = File.expand_path('..', __dir__) Dir.chdir(APP_ROOT) do - begin - exec "yarnpkg", *ARGV - rescue Errno::ENOENT + yarn = ENV["PATH"].split(File::PATH_SEPARATOR). + select { |dir| File.expand_path(dir) != __dir__ }. + product(["yarn", "yarn.cmd", "yarn.ps1"]). + map { |dir, file| File.expand_path(file, dir) }. + find { |file| File.executable?(file) } + + if yarn + exec yarn, *ARGV + else $stderr.puts "Yarn executable was not detected in the system." $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install" exit 1 diff --git a/config.ru b/config.ru index bd83b25412..4a3c09a688 100644 --- a/config.ru +++ b/config.ru @@ -1,4 +1,6 @@ # This file is used by Rack-based servers to start the application. -require ::File.expand_path('../config/environment', __FILE__) +require_relative "config/environment" + run Rails.application +Rails.application.load_server diff --git a/config/boot.rb b/config/boot.rb index b9e460cef3..3cda23b4db 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,4 +1,4 @@ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) -require 'bundler/setup' # Set up gems listed in the Gemfile. -require 'bootsnap/setup' # Speed up boot time by caching expensive operations. +require "bundler/setup" # Set up gems listed in the Gemfile. +require "bootsnap/setup" # Speed up boot time by caching expensive operations. diff --git a/config/environment.rb b/config/environment.rb index 426333bb46..cac5315775 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,5 +1,5 @@ # Load the Rails application. -require_relative 'application' +require_relative "application" # Initialize the Rails application. Rails.application.initialize! diff --git a/config/environments/development.rb b/config/environments/development.rb index d4290e00ce..54cd97563b 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,8 +1,10 @@ +require "active_support/core_ext/integer/time" + Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. - # In the development environment your application's code is reloaded on - # every request. This slows down response time but is perfect for development + # In the development environment your application's code is reloaded any time + # it changes. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. config.cache_classes = false @@ -41,6 +43,12 @@ # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log + # Raise exceptions for disallowed deprecations. + config.active_support.disallowed_deprecation = :raise + + # Tell Active Support which deprecation messages to disallow. + config.active_support.disallowed_deprecation_warnings = [] + # Raise an error on page load if there are pending migrations. config.active_record.migration_error = :page_load @@ -56,10 +64,16 @@ config.assets.quiet = true # Raises error for missing translations. - # config.action_view.raise_on_missing_translations = true + # config.i18n.raise_on_missing_translations = true + + # Annotate rendered view with file names. + # config.action_view.annotate_rendered_view_with_filenames = true # Do NOT use an evented file watcher to asynchronously detect changes in source code, # routes, locales, etc because this feature depends on the listen gem. # ActiveSupport::EventedFileUpdateChecker does not work with M1 Macs config.file_watcher = ActiveSupport::FileUpdateChecker + + # Uncomment if you wish to allow Action Cable access from any origin. + # config.action_cable.disable_request_forgery_protection = true end diff --git a/config/environments/production.rb b/config/environments/production.rb index ce735d9d25..be67a77d52 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,3 +1,5 @@ +require "active_support/core_ext/integer/time" + Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. @@ -35,7 +37,7 @@ config.assets.compile = true # Enable serving of images, stylesheets, and JavaScripts from an asset server. - # config.action_controller.asset_host = 'http://assets.example.com' + # config.asset_host = 'http://assets.example.com' # Specifies the header that your server uses for sending files. # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache @@ -52,8 +54,8 @@ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.force_ssl = true - # Use the lowest log level to ensure availability of diagnostic information - # when problems arise. + # Include generic and useful information about system operation, but avoid logging too much + # information to avoid inadvertent exposure of personally identifiable information (PII). config.log_level = :info # Suppress logger output for asset requests. @@ -84,11 +86,17 @@ # Send deprecation notices to registered listeners. config.active_support.deprecation = :notify + # Log disallowed deprecations. + config.active_support.disallowed_deprecation = :log + + # Tell Active Support which deprecation messages to disallow. + config.active_support.disallowed_deprecation_warnings = [] + # Use default logging formatter so that PID and timestamp are not suppressed. config.log_formatter = ::Logger::Formatter.new # Use a different logger for distributed setups. - # require 'syslog/logger' + # require "syslog/logger" # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') if ENV["RAILS_LOG_TO_STDOUT"].present? diff --git a/config/environments/test.rb b/config/environments/test.rb index d301e54903..17ce39cf3b 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -1,3 +1,5 @@ +require "active_support/core_ext/integer/time" + # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped @@ -22,6 +24,7 @@ # Show full error reports and disable caching. config.consider_all_requests_local = true config.action_controller.perform_caching = false + config.cache_store = :null_store # Raise exceptions instead of rendering exception templates. config.action_dispatch.show_exceptions = false @@ -42,6 +45,15 @@ # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr + # Raise exceptions for disallowed deprecations. + config.active_support.disallowed_deprecation = :raise + + # Tell Active Support which deprecation messages to disallow. + config.active_support.disallowed_deprecation_warnings = [] + # Raises error for missing translations. - # config.action_view.raise_on_missing_translations = true + # config.i18n.raise_on_missing_translations = true + + # Annotate rendered view with file names. + # config.action_view.annotate_rendered_view_with_filenames = true end diff --git a/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb index 59385cdf37..33699c3091 100644 --- a/config/initializers/backtrace_silencers.rb +++ b/config/initializers/backtrace_silencers.rb @@ -1,7 +1,8 @@ # Be sure to restart your server when you modify this file. # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. -# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } +# Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) } -# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. -# Rails.backtrace_cleaner.remove_silencers! +# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code +# by setting BACKTRACE=1 before calling your invocation, like "BACKTRACE=1 ./bin/rails runner 'MyClass.perform'". +Rails.backtrace_cleaner.remove_silencers! if ENV["BACKTRACE"] diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb index 4a994e1e7b..4b34a03668 100644 --- a/config/initializers/filter_parameter_logging.rb +++ b/config/initializers/filter_parameter_logging.rb @@ -1,4 +1,6 @@ # Be sure to restart your server when you modify this file. # Configure sensitive parameters which will be filtered from the log file. -Rails.application.config.filter_parameters += [:password] +Rails.application.config.filter_parameters += [ + :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn +] diff --git a/config/initializers/new_framework_defaults_6_1.rb b/config/initializers/new_framework_defaults_6_1.rb new file mode 100644 index 0000000000..9526b835ab --- /dev/null +++ b/config/initializers/new_framework_defaults_6_1.rb @@ -0,0 +1,67 @@ +# Be sure to restart your server when you modify this file. +# +# This file contains migration options to ease your Rails 6.1 upgrade. +# +# Once upgraded flip defaults one by one to migrate to the new default. +# +# Read the Guide for Upgrading Ruby on Rails for more info on each option. + +# Support for inversing belongs_to -> has_many Active Record associations. +# Rails.application.config.active_record.has_many_inversing = true + +# Track Active Storage variants in the database. +# Rails.application.config.active_storage.track_variants = true + +# Apply random variation to the delay when retrying failed jobs. +# Rails.application.config.active_job.retry_jitter = 0.15 + +# Stop executing `after_enqueue`/`after_perform` callbacks if +# `before_enqueue`/`before_perform` respectively halts with `throw :abort`. +# Rails.application.config.active_job.skip_after_callbacks_if_terminated = true + +# Specify cookies SameSite protection level: either :none, :lax, or :strict. +# +# This change is not backwards compatible with earlier Rails versions. +# It's best enabled when your entire app is migrated and stable on 6.1. +# Rails.application.config.action_dispatch.cookies_same_site_protection = :lax + +# Generate CSRF tokens that are encoded in URL-safe Base64. +# +# This change is not backwards compatible with earlier Rails versions. +# It's best enabled when your entire app is migrated and stable on 6.1. +# Rails.application.config.action_controller.urlsafe_csrf_tokens = true + +# Specify whether `ActiveSupport::TimeZone.utc_to_local` returns a time with an +# UTC offset or a UTC time. +# ActiveSupport.utc_to_local_returns_utc_offset_times = true + +# Change the default HTTP status code to `308` when redirecting non-GET/HEAD +# requests to HTTPS in `ActionDispatch::SSL` middleware. +# Rails.application.config.action_dispatch.ssl_default_redirect_status = 308 + +# Use new connection handling API. For most applications this won't have any +# effect. For applications using multiple databases, this new API provides +# support for granular connection swapping. +# Rails.application.config.active_record.legacy_connection_handling = false + +# Make `form_with` generate non-remote forms by default. +# Rails.application.config.action_view.form_with_generates_remote_forms = false + +# Set the default queue name for the analysis job to the queue adapter default. +# Rails.application.config.active_storage.queues.analysis = nil + +# Set the default queue name for the purge job to the queue adapter default. +# Rails.application.config.active_storage.queues.purge = nil + +# Set the default queue name for the incineration job to the queue adapter default. +# Rails.application.config.action_mailbox.queues.incineration = nil + +# Set the default queue name for the routing job to the queue adapter default. +# Rails.application.config.action_mailbox.queues.routing = nil + +# Set the default queue name for the mail deliver job to the queue adapter default. +# Rails.application.config.action_mailer.deliver_later_queue_name = nil + +# Generate a `Link` header that gives a hint to modern browsers about +# preloading assets when using `javascript_include_tag` and `stylesheet_link_tag`. +# Rails.application.config.action_view.preload_links_header = true diff --git a/config/initializers/permissions_policy.rb b/config/initializers/permissions_policy.rb new file mode 100644 index 0000000000..00f64d71b0 --- /dev/null +++ b/config/initializers/permissions_policy.rb @@ -0,0 +1,11 @@ +# Define an application-wide HTTP permissions policy. For further +# information see https://developers.google.com/web/updates/2018/06/feature-policy +# +# Rails.application.config.permissions_policy do |f| +# f.camera :none +# f.gyroscope :none +# f.microphone :none +# f.usb :none +# f.fullscreen :self +# f.payment :self, "https://secure.example.com" +# end diff --git a/db/migrate/20230208162500_add_service_name_to_active_storage_blobs.active_storage.rb b/db/migrate/20230208162500_add_service_name_to_active_storage_blobs.active_storage.rb new file mode 100644 index 0000000000..a15c6ce8e5 --- /dev/null +++ b/db/migrate/20230208162500_add_service_name_to_active_storage_blobs.active_storage.rb @@ -0,0 +1,22 @@ +# This migration comes from active_storage (originally 20190112182829) +class AddServiceNameToActiveStorageBlobs < ActiveRecord::Migration[6.0] + def up + return unless table_exists?(:active_storage_blobs) + + unless column_exists?(:active_storage_blobs, :service_name) + add_column :active_storage_blobs, :service_name, :string + + if configured_service = ActiveStorage::Blob.service.name + ActiveStorage::Blob.unscoped.update_all(service_name: configured_service) + end + + change_column :active_storage_blobs, :service_name, :string, null: false + end + end + + def down + return unless table_exists?(:active_storage_blobs) + + remove_column :active_storage_blobs, :service_name + end +end diff --git a/db/migrate/20230208162501_create_active_storage_variant_records.active_storage.rb b/db/migrate/20230208162501_create_active_storage_variant_records.active_storage.rb new file mode 100644 index 0000000000..94ac83af0b --- /dev/null +++ b/db/migrate/20230208162501_create_active_storage_variant_records.active_storage.rb @@ -0,0 +1,27 @@ +# This migration comes from active_storage (originally 20191206030411) +class CreateActiveStorageVariantRecords < ActiveRecord::Migration[6.0] + def change + return unless table_exists?(:active_storage_blobs) + + # Use Active Record's configured type for primary key + create_table :active_storage_variant_records, id: primary_key_type, if_not_exists: true do |t| + t.belongs_to :blob, null: false, index: false, type: blobs_primary_key_type + t.string :variation_digest, null: false + + t.index %i[ blob_id variation_digest ], name: "index_active_storage_variant_records_uniqueness", unique: true + t.foreign_key :active_storage_blobs, column: :blob_id + end + end + + private + def primary_key_type + config = Rails.configuration.generators + config.options[config.orm][:primary_key_type] || :primary_key + end + + def blobs_primary_key_type + pkey_name = connection.primary_key(:active_storage_blobs) + pkey_column = connection.columns(:active_storage_blobs).find { |c| c.name == pkey_name } + pkey_column.bigint? ? :bigint : pkey_column.type + end +end From a73a6dfdeb8cfb48a97768624b302e3d7b2bd8ab Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Wed, 8 Feb 2023 12:17:28 -0500 Subject: [PATCH 030/107] Use a non-null cache since some tests require it --- config/environments/test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/environments/test.rb b/config/environments/test.rb index 17ce39cf3b..670991f1ea 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -24,7 +24,7 @@ # Show full error reports and disable caching. config.consider_all_requests_local = true config.action_controller.perform_caching = false - config.cache_store = :null_store + config.cache_store = :memory_store # Raise exceptions instead of rendering exception templates. config.action_dispatch.show_exceptions = false From e8b6a657e04813c619055fc70e0951d830dbc0b2 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Wed, 8 Feb 2023 12:21:12 -0500 Subject: [PATCH 031/107] Explicitly make kwargs into hash for rspec --- spec/jobs/active_encode_job_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/jobs/active_encode_job_spec.rb b/spec/jobs/active_encode_job_spec.rb index e075de9198..fa4d4b6f92 100644 --- a/spec/jobs/active_encode_job_spec.rb +++ b/spec/jobs/active_encode_job_spec.rb @@ -22,7 +22,7 @@ describe "perform" do it 'creates the active_encode job' do - expect(encoder_class).to receive(:create).with(input, master_file_id: master_file.id, preset: master_file.workflow_name).once + expect(encoder_class).to receive(:create).with(input, { master_file_id: master_file.id, preset: master_file.workflow_name }).once ActiveEncodeJobs::CreateEncodeJob.perform_now(input, master_file.id) end From d0649de0b1e4c54d952b39e313a0836bd9a0140d Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Wed, 8 Feb 2023 12:23:49 -0500 Subject: [PATCH 032/107] Avoid negative truncation values --- app/helpers/application_helper.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index f48d62a201..7bb821bd91 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -217,6 +217,7 @@ def vgroup_display value def truncate_center label, output_label_length, end_length = 0 end_length = output_label_length / 2 - 3 if end_length == 0 + end_length = 0 if end_length < 0 truncate(label, length: output_label_length, omission: "...#{label.last(end_length)}") end From 604cf537911d3d8d428ec51e7f83809e8a9958c8 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Wed, 8 Feb 2023 12:39:48 -0500 Subject: [PATCH 033/107] Use active_fedora branch with fix; not sure why rdf-ldp was regressed --- Gemfile | 3 +- Gemfile.lock | 171 +++++++-------------------------------------------- 2 files changed, 24 insertions(+), 150 deletions(-) diff --git a/Gemfile b/Gemfile index 0fa1ab6f58..b9034e1806 100644 --- a/Gemfile +++ b/Gemfile @@ -29,7 +29,8 @@ gem 'uglifier', '>= 1.3.0' gem 'webpacker' # Core Samvera -gem 'active-fedora', '~> 14.0' +#gem 'active-fedora', '~> 14.0' +gem 'active-fedora', git: "https://github.com/samvera/active_fedora.git", branch: "errors_fix" gem 'active_fedora-datastreams', '~> 0.5' gem 'hydra-head', '~> 12.0' gem 'ldp', '~> 1.1.0' diff --git a/Gemfile.lock b/Gemfile.lock index c339dd50ee..9a63c23486 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -94,6 +94,22 @@ GIT pretender rails (>= 5.2.4.3, < 7.1) +GIT + remote: https://github.com/samvera/active_fedora.git + revision: e2c49c63db267a0f7f8aaa61f59bc9857020df63 + branch: errors_fix + specs: + active-fedora (14.0.0) + active-triples (>= 0.11.0, < 2.0.0) + activemodel (>= 5.1) + activesupport (>= 5.1) + deprecation + faraday (~> 1.0) + faraday-encoding (>= 0.0.5) + ldp (>= 0.7.0, < 2) + rsolr (>= 1.1.2, < 3) + ruby-progressbar (~> 1.0) + GEM remote: https://rubygems.org/ specs: @@ -135,16 +151,6 @@ GEM erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - active-fedora (14.0.0) - active-triples (>= 0.11.0, < 2.0.0) - activemodel (>= 5.1) - activesupport (>= 5.1) - deprecation - faraday (~> 1.0) - faraday-encoding (>= 0.0.5) - ldp (>= 0.7.0, < 2) - rsolr (>= 1.1.2, < 3) - ruby-progressbar (~> 1.0) active-triples (1.2.0) activemodel (>= 3.0.0) activesupport (>= 3.0.0) @@ -261,8 +267,6 @@ GEM babel-transpiler (0.7.0) babel-source (>= 4.0, < 6) execjs (~> 2.0) - bcp47 (0.3.3) - i18n bcrypt (3.1.18) bindex (0.8.1) bixby (3.0.2) @@ -344,7 +348,7 @@ GEM config (4.0.0) deep_merge (~> 1.2, >= 1.2.1) dry-validation (~> 1.0, >= 1.0.0) - connection_pool (2.2.5) + connection_pool (2.3.0) crack (0.4.5) rexml crass (1.0.6) @@ -503,8 +507,6 @@ GEM haml (5.2.2) temple (>= 0.8.0) tilt - hamster (3.0.0) - concurrent-ruby (~> 1.0) hashdiff (1.0.1) hashie (5.0.0) hooks (0.4.1) @@ -562,9 +564,6 @@ GEM multi_json (~> 1.15) rack (~> 2.2) rdf (~> 3.2, >= 3.2.9) - json-ld-preloaded (3.2.2) - json-ld (~> 3.2) - rdf (~> 3.2) jwt (2.4.1) kaminari (1.2.2) activesupport (>= 4.1.0) @@ -580,12 +579,6 @@ GEM kaminari-core (1.2.2) launchy (2.5.0) addressable (~> 2.7) - ld-patch (3.2.0) - ebnf (~> 2.2) - rdf (~> 3.2) - rdf-xsd (~> 3.2) - sparql (~> 3.2) - sxp (~> 1.2) ldp (1.1.0) deprecation faraday (>= 1) @@ -598,41 +591,12 @@ GEM rdf-vocab (>= 0.8) slop link_header (0.0.8) - linkeddata (3.2.1) - json-ld (~> 3.2, >= 3.2.3) - json-ld-preloaded (~> 3.2) - ld-patch (~> 3.2) - nokogiri (~> 1.13, >= 1.13.8) - rdf (~> 3.2, >= 3.2.9) - rdf-aggregate-repo (~> 3.2, >= 3.2.1) - rdf-hamster-repo (~> 3.2) - rdf-isomorphic (~> 3.2, >= 3.2.1) - rdf-json (~> 3.2) - rdf-microdata (~> 3.2, >= 3.2.1) - rdf-n3 (~> 3.2, >= 3.2.1) - rdf-normalize (~> 0.5) - rdf-ordered-repo (~> 3.2, >= 3.2.1) - rdf-rdfa (~> 3.2) - rdf-rdfxml (~> 3.2) - rdf-reasoner (~> 0.8) - rdf-tabular (~> 3.2, >= 3.2.1) - rdf-trig (~> 3.2) - rdf-trix (~> 3.2) - rdf-turtle (~> 3.2, >= 3.2.1) - rdf-vocab (~> 3.2, >= 3.2.1) - rdf-xsd (~> 3.2, >= 3.2.1) - shacl (~> 0.2, >= 0.2.1) - shex (~> 0.7, >= 0.7.1) - sparql (~> 3.2, >= 3.2.4) - sparql-client (~> 3.2, >= 3.2.1) - yaml-ld (~> 0.0) listen (3.7.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) llhttp-ffi (0.4.0) ffi-compiler (~> 1.0) rake (~> 13.0) - logger (1.5.3) lograge (0.11.2) actionpack (>= 4) activesupport (>= 4) @@ -664,11 +628,7 @@ GEM multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.3.0) - mustermann (2.0.2) - ruby2_keywords (~> 0.0.1) mysql2 (0.5.3) - net-http-persistent (4.0.1) - connection_pool (~> 2.2) net-imap (0.3.4) date net-protocol @@ -741,17 +701,10 @@ GEM rack (2.2.6.2) rack-cors (1.1.1) rack (>= 2.0.0) - rack-linkeddata (3.2.1) - linkeddata (~> 3.2) - rack (~> 2.1) - rack-rdf (~> 3.2) - rack-protection (2.2.4) + rack-protection (3.0.5) rack rack-proxy (0.7.2) rack - rack-rdf (3.2.0) - rack (~> 2.2) - rdf (~> 3.2) rack-test (2.0.2) rack (>= 1.3) rails (6.1.7.2) @@ -797,38 +750,11 @@ GEM link_header (~> 0.0, >= 0.0.8) rdf-aggregate-repo (3.2.1) rdf (~> 3.2) - rdf-hamster-repo (3.2.1) - hamster (~> 3.0) - rdf (~> 3.2, >= 3.2.1) rdf-isomorphic (3.2.1) rdf (~> 3.2) - rdf-json (3.2.0) - rdf (~> 3.2) - rdf-ldp (2.1.0) - json-ld (~> 3.2) - ld-patch (~> 3.2) - link_header (~> 0.0, >= 0.0.8) - rack (~> 2.2) - rack-linkeddata (~> 3.1) - rdf (~> 3.2) - rdf-turtle (~> 3.2) - rdf-vocab (~> 3.2) - sinatra (~> 2.1) - rdf-microdata (3.2.1) - htmlentities (~> 4.3) - nokogiri (~> 1.13) - rdf (~> 3.2) - rdf-rdfa (~> 3.2) - rdf-xsd (~> 3.2) - rdf-n3 (3.2.1) - ebnf (~> 2.2) - rdf (~> 3.2) - sparql (~> 3.2) - sxp (~> 1.2) - rdf-normalize (0.5.1) - rdf (~> 3.2) - rdf-ordered-repo (3.2.1) - rdf (~> 3.2, >= 3.2.1) + rdf-ldp (0.1.0) + deprecation + rdf rdf-rdfa (3.2.0) haml (~> 5.2) htmlentities (~> 4.3) @@ -841,23 +767,6 @@ GEM rdf (~> 3.2) rdf-rdfa (~> 3.2) rdf-xsd (~> 3.2) - rdf-reasoner (0.8.0) - rdf (~> 3.2) - rdf-xsd (~> 3.2) - rdf-tabular (3.2.1) - addressable (~> 2.8) - bcp47 (~> 0.3, >= 0.3.3) - json-ld (~> 3.2) - rdf (~> 3.2, >= 3.2.7) - rdf-vocab (~> 3.2) - rdf-xsd (~> 3.2) - rdf-trig (3.2.0) - ebnf (~> 2.2) - rdf (~> 3.2) - rdf-turtle (~> 3.2) - rdf-trix (3.2.0) - rdf (~> 3.2) - rdf-xsd (~> 3.2) rdf-turtle (3.2.1) ebnf (~> 2.3) rdf (~> 3.2) @@ -985,20 +894,6 @@ GEM childprocess (>= 0.5, < 4.0) rubyzip (>= 1.2.2) semantic_range (3.0.0) - shacl (0.3.0) - json-ld (~> 3.2) - rdf (~> 3.2, >= 3.2.8) - sparql (~> 3.2, >= 3.2.4) - sxp (~> 1.2) - shex (0.7.1) - ebnf (~> 2.2) - htmlentities (~> 4.3) - json-ld (~> 3.2) - json-ld-preloaded (~> 3.2) - rdf (~> 3.2) - rdf-xsd (~> 3.2) - sparql (~> 3.2) - sxp (~> 1.2) shoulda-matchers (5.1.0) activesupport (>= 5.2.0) sidekiq (6.4.1) @@ -1016,11 +911,6 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) - sinatra (2.2.4) - mustermann (~> 2.0) - rack (~> 2.2) - rack-protection (= 2.2.4) - tilt (~> 2.0) slop (4.9.3) solr_wrapper (3.1.2) http @@ -1033,18 +923,6 @@ GEM nokogiri stomp xml-simple - sparql (3.2.5) - builder (~> 3.2) - ebnf (~> 2.2, >= 2.3.1) - logger (~> 1.5) - rdf (~> 3.2, >= 3.2.8) - rdf-aggregate-repo (~> 3.2) - rdf-xsd (~> 3.2) - sparql-client (~> 3.2, >= 3.2.1) - sxp (~> 1.2, >= 1.2.2) - sparql-client (3.2.1) - net-http-persistent (~> 4.0, >= 4.0.1) - rdf (~> 3.2, >= 3.2.6) speedy-af (0.3.0) active-fedora (>= 11.0.0) activesupport (> 5.2) @@ -1129,11 +1007,6 @@ GEM nokogiri (~> 1.8) xray-rails (0.3.2) rails (>= 3.1.0) - yaml-ld (0.0.2) - json-ld (~> 3.2, >= 3.2.3) - psych (>= 3.3) - rdf (~> 3.2, >= 3.2.9) - rdf-xsd (~> 3.2) zeitwerk (2.6.6) zk (1.10.0) zookeeper (~> 1.5.0) @@ -1145,7 +1018,7 @@ PLATFORMS DEPENDENCIES about_page! - active-fedora (~> 14.0) + active-fedora! active_annotations (~> 0.4) active_elastic_job active_encode (~> 1.0, >= 1.1.2) From 1354aae4d709144a757c87a092cfb7d981857cea Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Wed, 8 Feb 2023 16:25:46 -0500 Subject: [PATCH 034/107] Test with rails 7 --- Gemfile | 2 +- Gemfile.lock | 130 +++++++++++++++++++++++++++------------------------ 2 files changed, 69 insertions(+), 63 deletions(-) diff --git a/Gemfile b/Gemfile index b9034e1806..b2c4f4aab5 100644 --- a/Gemfile +++ b/Gemfile @@ -5,7 +5,7 @@ gem 'bootsnap', require: false gem 'listen' gem 'net-smtp', require: false gem 'psych', '< 4' -gem 'rails', '=6.1.7.2' +gem 'rails', '=7.0.4.1' gem 'sprockets', '~>3.7.2' #gem 'sprockets-rails', require: 'sprockets/railtie' gem 'sqlite3' diff --git a/Gemfile.lock b/Gemfile.lock index 9a63c23486..5a1f781a81 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -113,40 +113,47 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (6.1.7.2) - actionpack (= 6.1.7.2) - activesupport (= 6.1.7.2) + actioncable (7.0.4.1) + actionpack (= 7.0.4.1) + activesupport (= 7.0.4.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.7.2) - actionpack (= 6.1.7.2) - activejob (= 6.1.7.2) - activerecord (= 6.1.7.2) - activestorage (= 6.1.7.2) - activesupport (= 6.1.7.2) + actionmailbox (7.0.4.1) + actionpack (= 7.0.4.1) + activejob (= 7.0.4.1) + activerecord (= 7.0.4.1) + activestorage (= 7.0.4.1) + activesupport (= 7.0.4.1) mail (>= 2.7.1) - actionmailer (6.1.7.2) - actionpack (= 6.1.7.2) - actionview (= 6.1.7.2) - activejob (= 6.1.7.2) - activesupport (= 6.1.7.2) + net-imap + net-pop + net-smtp + actionmailer (7.0.4.1) + actionpack (= 7.0.4.1) + actionview (= 7.0.4.1) + activejob (= 7.0.4.1) + activesupport (= 7.0.4.1) mail (~> 2.5, >= 2.5.4) + net-imap + net-pop + net-smtp rails-dom-testing (~> 2.0) - actionpack (6.1.7.2) - actionview (= 6.1.7.2) - activesupport (= 6.1.7.2) - rack (~> 2.0, >= 2.0.9) + actionpack (7.0.4.1) + actionview (= 7.0.4.1) + activesupport (= 7.0.4.1) + rack (~> 2.0, >= 2.2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.7.2) - actionpack (= 6.1.7.2) - activerecord (= 6.1.7.2) - activestorage (= 6.1.7.2) - activesupport (= 6.1.7.2) + actiontext (7.0.4.1) + actionpack (= 7.0.4.1) + activerecord (= 7.0.4.1) + activestorage (= 7.0.4.1) + activesupport (= 7.0.4.1) + globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (6.1.7.2) - activesupport (= 6.1.7.2) + actionview (7.0.4.1) + activesupport (= 7.0.4.1) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -173,40 +180,39 @@ GEM om (~> 3.1) rdf (~> 3.2) rdf-rdfxml (~> 3.2) - activejob (6.1.7.2) - activesupport (= 6.1.7.2) + activejob (7.0.4.1) + activesupport (= 7.0.4.1) globalid (>= 0.3.6) activejob-traffic_control (0.1.3) activejob (>= 4.2) activesupport (>= 4.2) suo - activejob-uniqueness (0.2.2) - activejob (>= 4.2, < 7) + activejob-uniqueness (0.2.5) + activejob (>= 4.2, < 7.1) redlock (>= 1.2, < 2) - activemodel (6.1.7.2) - activesupport (= 6.1.7.2) - activerecord (6.1.7.2) - activemodel (= 6.1.7.2) - activesupport (= 6.1.7.2) + activemodel (7.0.4.1) + activesupport (= 7.0.4.1) + activerecord (7.0.4.1) + activemodel (= 7.0.4.1) + activesupport (= 7.0.4.1) activerecord-session_store (2.0.0) actionpack (>= 5.2.4.1) activerecord (>= 5.2.4.1) multi_json (~> 1.11, >= 1.11.2) rack (>= 2.0.8, < 3) railties (>= 5.2.4.1) - activestorage (6.1.7.2) - actionpack (= 6.1.7.2) - activejob (= 6.1.7.2) - activerecord (= 6.1.7.2) - activesupport (= 6.1.7.2) + activestorage (7.0.4.1) + actionpack (= 7.0.4.1) + activejob (= 7.0.4.1) + activerecord (= 7.0.4.1) + activesupport (= 7.0.4.1) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (6.1.7.2) + activesupport (7.0.4.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - zeitwerk (~> 2.3) acts_as_list (1.0.4) activerecord (>= 4.2) addressable (2.8.1) @@ -707,21 +713,20 @@ GEM rack rack-test (2.0.2) rack (>= 1.3) - rails (6.1.7.2) - actioncable (= 6.1.7.2) - actionmailbox (= 6.1.7.2) - actionmailer (= 6.1.7.2) - actionpack (= 6.1.7.2) - actiontext (= 6.1.7.2) - actionview (= 6.1.7.2) - activejob (= 6.1.7.2) - activemodel (= 6.1.7.2) - activerecord (= 6.1.7.2) - activestorage (= 6.1.7.2) - activesupport (= 6.1.7.2) + rails (7.0.4.1) + actioncable (= 7.0.4.1) + actionmailbox (= 7.0.4.1) + actionmailer (= 7.0.4.1) + actionpack (= 7.0.4.1) + actiontext (= 7.0.4.1) + actionview (= 7.0.4.1) + activejob (= 7.0.4.1) + activemodel (= 7.0.4.1) + activerecord (= 7.0.4.1) + activestorage (= 7.0.4.1) + activesupport (= 7.0.4.1) bundler (>= 1.15.0) - railties (= 6.1.7.2) - sprockets-rails (>= 2.0.0) + railties (= 7.0.4.1) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -734,12 +739,13 @@ GEM rails_same_site_cookie (0.1.9) rack (>= 1.5) user_agent_parser (~> 2.6) - railties (6.1.7.2) - actionpack (= 6.1.7.2) - activesupport (= 6.1.7.2) + railties (7.0.4.1) + actionpack (= 7.0.4.1) + activesupport (= 7.0.4.1) method_source rake (>= 12.2) thor (~> 1.0) + zeitwerk (~> 2.5) rainbow (3.1.1) rake (13.0.6) rb-fsevent (0.11.1) @@ -783,7 +789,7 @@ GEM tilt recaptcha (5.8.1) json - redis (4.6.0) + redis (4.8.0) redis-actionpack (5.3.0) actionpack (>= 5, < 8) redis-rack (>= 2.1.0, < 3) @@ -800,8 +806,8 @@ GEM redis-store (>= 1.2, < 2) redis-store (1.9.1) redis (>= 4, < 5) - redlock (1.2.2) - redis (>= 3.0.0, < 5.0) + redlock (1.3.2) + redis (>= 3.0.0, < 6.0) regexp_parser (2.2.1) representable (3.2.0) declarative (< 0.1.0) @@ -1107,7 +1113,7 @@ DEPENDENCIES psych (< 4) puma (>= 4.3.8) rack-cors - rails (= 6.1.7.2) + rails (= 7.0.4.1) rails-controller-testing rails_same_site_cookie rb-readline From f5b9a84fd05648d6ba2499c692b3f6a1f7ae32ef Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Wed, 8 Feb 2023 18:00:55 -0500 Subject: [PATCH 035/107] Ran rails app:update --- bin/rails | 2 +- bin/setup | 21 ++- config/application.rb | 2 + config/boot.rb | 2 +- config/environments/development.rb | 7 +- config/environments/production.rb | 48 ++----- config/environments/test.rb | 11 +- config/initializers/assets.rb | 2 +- .../initializers/content_security_policy.rb | 47 +++--- .../initializers/filter_parameter_logging.rb | 4 +- config/initializers/inflections.rb | 6 +- .../new_framework_defaults_7_0.rb | 135 ++++++++++++++++++ 12 files changed, 196 insertions(+), 91 deletions(-) create mode 100644 config/initializers/new_framework_defaults_7_0.rb diff --git a/bin/rails b/bin/rails index 6fb4e4051c..efc0377492 100755 --- a/bin/rails +++ b/bin/rails @@ -1,4 +1,4 @@ #!/usr/bin/env ruby -APP_PATH = File.expand_path('../config/application', __dir__) +APP_PATH = File.expand_path("../config/application", __dir__) require_relative "../config/boot" require "rails/commands" diff --git a/bin/setup b/bin/setup index 90700ac4f9..ec47b79b3b 100755 --- a/bin/setup +++ b/bin/setup @@ -2,7 +2,7 @@ require "fileutils" # path to your application root. -APP_ROOT = File.expand_path('..', __dir__) +APP_ROOT = File.expand_path("..", __dir__) def system!(*args) system(*args) || abort("\n== Command #{args} failed ==") @@ -13,24 +13,21 @@ FileUtils.chdir APP_ROOT do # This script is idempotent, so that you can run it at any time and get an expectable outcome. # Add necessary setup steps to this file. - puts '== Installing dependencies ==' - system! 'gem install bundler --conservative' - system('bundle check') || system!('bundle install') - - # Install JavaScript dependencies - system! 'bin/yarn' + puts "== Installing dependencies ==" + system! "gem install bundler --conservative" + system("bundle check") || system!("bundle install") # puts "\n== Copying sample files ==" - # unless File.exist?('config/database.yml') - # FileUtils.cp 'config/database.yml.sample', 'config/database.yml' + # unless File.exist?("config/database.yml") + # FileUtils.cp "config/database.yml.sample", "config/database.yml" # end puts "\n== Preparing database ==" - system! 'bin/rails db:prepare' + system! "bin/rails db:prepare" puts "\n== Removing old logs and tempfiles ==" - system! 'bin/rails log:clear tmp:clear' + system! "bin/rails log:clear tmp:clear" puts "\n== Restarting application server ==" - system! 'bin/rails restart' + system! "bin/rails restart" end diff --git a/config/application.rb b/config/application.rb index 96f1bbfcb0..1d41ba160f 100644 --- a/config/application.rb +++ b/config/application.rb @@ -32,6 +32,8 @@ class Application < Rails::Application # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] # config.i18n.default_locale = :de + # config.eager_load_paths << Rails.root.join("extras") + config.active_job.queue_adapter = :sidekiq config.action_dispatch.default_headers = { 'X-Frame-Options' => 'ALLOWALL' } diff --git a/config/boot.rb b/config/boot.rb index 3cda23b4db..988a5ddc46 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,4 +1,4 @@ -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) require "bundler/setup" # Set up gems listed in the Gemfile. require "bootsnap/setup" # Speed up boot time by caching expensive operations. diff --git a/config/environments/development.rb b/config/environments/development.rb index 54cd97563b..067820227b 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -14,15 +14,18 @@ # Show full error reports. config.consider_all_requests_local = true + # Enable server timing + config.server_timing = true + # Enable/disable caching. By default caching is disabled. # Run rails dev:cache to toggle caching. - if Rails.root.join('tmp', 'caching-dev.txt').exist? + if Rails.root.join("tmp/caching-dev.txt").exist? config.action_controller.perform_caching = true config.action_controller.enable_fragment_cache_logging = true config.cache_store = :memory_store config.public_file_server.headers = { - 'Cache-Control' => "public, max-age=#{2.days.to_i}" + "Cache-Control" => "public, max-age=#{2.days.to_i}" } else config.action_controller.perform_caching = false diff --git a/config/environments/production.rb b/config/environments/production.rb index be67a77d52..3039ff56ad 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -25,7 +25,7 @@ # Disable serving static files from the `/public` folder by default since # Apache or NGINX already handles this. - config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? + config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? # Compress JavaScripts and CSS. config.assets.js_compressor = Uglifier.new(:harmony => true) @@ -37,19 +37,19 @@ config.assets.compile = true # Enable serving of images, stylesheets, and JavaScripts from an asset server. - # config.asset_host = 'http://assets.example.com' + # config.asset_host = "http://assets.example.com" # Specifies the header that your server uses for sending files. - # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache - # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX + # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache + # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX # Store uploaded files on the local file system (see config/storage.yml for options). #config.active_storage.service = :local # Mount Action Cable outside main process or domain. # config.action_cable.mount_path = nil - # config.action_cable.url = 'wss://example.com/cable' - # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] + # config.action_cable.url = "wss://example.com/cable" + # config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ] # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.force_ssl = true @@ -83,21 +83,15 @@ # the I18n.default_locale when a translation cannot be found). config.i18n.fallbacks = true - # Send deprecation notices to registered listeners. - config.active_support.deprecation = :notify - - # Log disallowed deprecations. - config.active_support.disallowed_deprecation = :log - - # Tell Active Support which deprecation messages to disallow. - config.active_support.disallowed_deprecation_warnings = [] + # Don't log any deprecations. + config.active_support.report_deprecations = false # Use default logging formatter so that PID and timestamp are not suppressed. config.log_formatter = ::Logger::Formatter.new # Use a different logger for distributed setups. # require "syslog/logger" - # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') + # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name") if ENV["RAILS_LOG_TO_STDOUT"].present? logger = ActiveSupport::Logger.new(STDOUT) @@ -107,28 +101,4 @@ # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false - - # Inserts middleware to perform automatic connection switching. - # The `database_selector` hash is used to pass options to the DatabaseSelector - # middleware. The `delay` is used to determine how long to wait after a write - # to send a subsequent read to the primary. - # - # The `database_resolver` class is used by the middleware to determine which - # database is appropriate to use based on the time delay. - # - # The `database_resolver_context` class is used by the middleware to set - # timestamps for the last write to the primary. The resolver uses the context - # class timestamps to determine how long to wait before reading from the - # replica. - # - # By default Rails will store a last write timestamp in the session. The - # DatabaseSelector middleware is designed as such you can define your own - # strategy for connection switching and pass that into the middleware through - # these configuration options. - # config.active_record.database_selector = { delay: 2.seconds } - # config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver - # config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session - - # Additional production specific initializers - Dir["config/environments/production/*.rb"].each {|file| load file } end diff --git a/config/environments/test.rb b/config/environments/test.rb index 670991f1ea..180c88aeaa 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -8,17 +8,18 @@ Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. + # Turn false under Spring and add config.action_view.cache_template_loading = true. config.cache_classes = true - # Do not eager load code on boot. This avoids loading your whole application - # just for the purpose of running a single test. If you are using a tool that - # preloads Rails for running tests, you may have to set it to true. - config.eager_load = false + # Eager loading loads your whole application. When running a single test locally, + # this probably isn't necessary. It's a good idea to do in a continuous integration + # system, or in some way before deploying your code. + config.eager_load = ENV["CI"].present? # Configure public file server for tests with Cache-Control for performance. config.public_file_server.enabled = true config.public_file_server.headers = { - 'Cache-Control' => "public, max-age=#{1.hour.to_i}" + "Cache-Control" => "public, max-age=#{1.hour.to_i}" } # Show full error reports and disable caching. diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index c60ea35e54..9fe6acd00d 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -1,7 +1,7 @@ # Be sure to restart your server when you modify this file. # Version of your assets, change this if you want to expire all your assets. -Rails.application.config.assets.version = '1.0' +Rails.application.config.assets.version = "1.0" # Add additional assets to the asset load path. # Rails.application.config.assets.paths << Emoji.images_path diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb index 35d0f26fcd..54f47cf15f 100644 --- a/config/initializers/content_security_policy.rb +++ b/config/initializers/content_security_policy.rb @@ -1,30 +1,25 @@ # Be sure to restart your server when you modify this file. -# Define an application-wide content security policy -# For further information see the following documentation -# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy +# Define an application-wide content security policy. +# See the Securing Rails Applications Guide for more information: +# https://guides.rubyonrails.org/security.html#content-security-policy-header -# Rails.application.config.content_security_policy do |policy| -# policy.default_src :self, :https -# policy.font_src :self, :https, :data -# policy.img_src :self, :https, :data -# policy.object_src :none -# policy.script_src :self, :https -# policy.style_src :self, :https -# # If you are using webpack-dev-server then specify webpack-dev-server host -# policy.connect_src :self, :https, "http://localhost:3035", "ws://localhost:3035" if Rails.env.development? - -# # Specify URI for violation reports -# # policy.report_uri "/csp-violation-report-endpoint" +# Rails.application.configure do +# config.content_security_policy do |policy| +# policy.default_src :self, :https +# policy.font_src :self, :https, :data +# policy.img_src :self, :https, :data +# policy.object_src :none +# policy.script_src :self, :https +# policy.style_src :self, :https +# # Specify URI for violation reports +# # policy.report_uri "/csp-violation-report-endpoint" +# end +# +# # Generate session nonces for permitted importmap and inline scripts +# config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s } +# config.content_security_policy_nonce_directives = %w(script-src) +# +# # Report violations without enforcing the policy. +# # config.content_security_policy_report_only = true # end - -# If you are using UJS then enable automatic nonce generation -# Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) } - -# Set the nonce only to specific directives -# Rails.application.config.content_security_policy_nonce_directives = %w(script-src) - -# Report CSP violations to a specified URI -# For further information see the following documentation: -# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only -# Rails.application.config.content_security_policy_report_only = true diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb index 4b34a03668..adc6568ce8 100644 --- a/config/initializers/filter_parameter_logging.rb +++ b/config/initializers/filter_parameter_logging.rb @@ -1,6 +1,8 @@ # Be sure to restart your server when you modify this file. -# Configure sensitive parameters which will be filtered from the log file. +# Configure parameters to be filtered from the log file. Use this to limit dissemination of +# sensitive information. See the ActiveSupport::ParameterFilter documentation for supported +# notations and behaviors. Rails.application.config.filter_parameters += [ :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn ] diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb index 65a790826f..81b2151426 100644 --- a/config/initializers/inflections.rb +++ b/config/initializers/inflections.rb @@ -4,9 +4,9 @@ # are locale specific, and you may define rules for as many different # locales as you wish. All of these examples are active by default: # ActiveSupport::Inflector.inflections(:en) do |inflect| -# inflect.plural /^(ox)$/i, '\1en' -# inflect.singular /^(ox)en/i, '\1' -# inflect.irregular 'person', 'people' +# inflect.plural /^(ox)$/i, "\\1en" +# inflect.singular /^(ox)en/i, "\\1" +# inflect.irregular "person", "people" # inflect.uncountable %w( fish sheep ) # end diff --git a/config/initializers/new_framework_defaults_7_0.rb b/config/initializers/new_framework_defaults_7_0.rb new file mode 100644 index 0000000000..4d580245a5 --- /dev/null +++ b/config/initializers/new_framework_defaults_7_0.rb @@ -0,0 +1,135 @@ +# Be sure to restart your server when you modify this file. +# +# This file eases your Rails 7.0 framework defaults upgrade. +# +# Uncomment each configuration one by one to switch to the new default. +# Once your application is ready to run with all new defaults, you can remove +# this file and set the `config.load_defaults` to `7.0`. +# +# Read the Guide for Upgrading Ruby on Rails for more info on each option. +# https://guides.rubyonrails.org/upgrading_ruby_on_rails.html + +# `button_to` view helper will render ` diff --git a/package.json b/package.json index fa2041f6ef..fd87de2ebc 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "react": "^16.8.4", "react-bootstrap": "^1.0.0", "react-dom": "^16.8.4", - "react-structural-metadata-editor": "https://github.com/avalonmediasystem/react-structural-metadata-editor", + "react-structural-metadata-editor": "https://github.com/avalonmediasystem/react-structural-metadata-editor#iiif-manifest", "react_ujs": "^2.4.4", "url-search-params-polyfill": "^7.0.1", "video.js": "^7.15.4", diff --git a/yarn.lock b/yarn.lock index 8e8d2663e9..1254376539 100644 --- a/yarn.lock +++ b/yarn.lock @@ -894,9 +894,9 @@ "@babel/plugin-transform-react-pure-annotations" "^7.14.5" "@babel/runtime@^7.1.2", "@babel/runtime@^7.15.4", "@babel/runtime@^7.2.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.8.3", "@babel/runtime@^7.9.2": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.9.tgz#b4fcfce55db3d2e5e080d2490f608a3b9f407f4a" - integrity sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw== + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.19.0.tgz#22b11c037b094d27a8a2504ea4dcff00f50e2259" + integrity sha512-eR8Lo9hnDS7tqkO7NsV+mKvCmv5boaXFSZ70DnfhcgiEne8hv9oCEd36Klw74EtizEqLsy4YnW8UWwpBVolHZA== dependencies: regenerator-runtime "^0.13.4" @@ -4832,6 +4832,16 @@ manifesto.js@^4.1.0: isomorphic-unfetch "^3.0.0" lodash "^4.17.21" +manifesto.js@^4.2.14: + version "4.2.14" + resolved "https://registry.yarnpkg.com/manifesto.js/-/manifesto.js-4.2.14.tgz#376fc73f9884646ff79168a67c4d3356cbd28b48" + integrity sha512-6lsgr3j/DyxlIQfqE+0VlNeKlb3MzJVv42Is9+Y8AC6pBfVIqKV4xfGrP7B1q9jX59elFR4grYGDMVWi71KwSQ== + dependencies: + "@edsilv/http-status-codes" "^1.0.3" + "@iiif/vocabulary" "^1.0.20" + isomorphic-unfetch "^3.0.0" + lodash "^4.17.21" + map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" @@ -6592,9 +6602,9 @@ react-redux@^7.2.6: prop-types "^15.7.2" react-is "^17.0.2" -"react-structural-metadata-editor@https://github.com/avalonmediasystem/react-structural-metadata-editor": +"react-structural-metadata-editor@https://github.com/avalonmediasystem/react-structural-metadata-editor#iiif-manifest": version "1.1.0" - resolved "https://github.com/avalonmediasystem/react-structural-metadata-editor#649f6e415a414c04e231e9f400bf268915209956" + resolved "https://github.com/avalonmediasystem/react-structural-metadata-editor#ec1e1306b9717ff711af4716f75c1aa0c2f8350c" dependencies: "@babel/runtime" "^7.4.4" "@fortawesome/fontawesome-svg-core" "^1.2.4" @@ -6606,6 +6616,7 @@ react-redux@^7.2.6: base-64 "^0.1.0" hls.js "^1.1.2" lodash "4.17.21" + manifesto.js "^4.2.14" peaks.js "^0.26.0" prop-types "^15.6.2" react-bootstrap "1.6.4" From 7a2dfac2025fb5afc34799d2aaaeb87f9c53a461 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Fri, 17 Feb 2023 16:34:39 -0500 Subject: [PATCH 061/107] Use main branch of SME --- package.json | 2 +- yarn.lock | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index fd87de2ebc..fa2041f6ef 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "react": "^16.8.4", "react-bootstrap": "^1.0.0", "react-dom": "^16.8.4", - "react-structural-metadata-editor": "https://github.com/avalonmediasystem/react-structural-metadata-editor#iiif-manifest", + "react-structural-metadata-editor": "https://github.com/avalonmediasystem/react-structural-metadata-editor", "react_ujs": "^2.4.4", "url-search-params-polyfill": "^7.0.1", "video.js": "^7.15.4", diff --git a/yarn.lock b/yarn.lock index 1254376539..9ab79d12d4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1892,11 +1892,6 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -base-64@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/base-64/-/base-64-0.1.0.tgz#780a99c84e7d600260361511c4877613bf24f6bb" - integrity sha512-Y5gU45svrR5tI2Vt/X9GPd3L0HNIKzGu202EjxrXMpuc2V2CiKgemAbUUsqYmZJvPtCXoUKjNZwBJzsNScUbXA== - base64-js@^1.0.2: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" @@ -6602,9 +6597,9 @@ react-redux@^7.2.6: prop-types "^15.7.2" react-is "^17.0.2" -"react-structural-metadata-editor@https://github.com/avalonmediasystem/react-structural-metadata-editor#iiif-manifest": +"react-structural-metadata-editor@https://github.com/avalonmediasystem/react-structural-metadata-editor": version "1.1.0" - resolved "https://github.com/avalonmediasystem/react-structural-metadata-editor#ec1e1306b9717ff711af4716f75c1aa0c2f8350c" + resolved "https://github.com/avalonmediasystem/react-structural-metadata-editor#ca1ed572f3104e6043e4b8fc60bf67f6a75259cd" dependencies: "@babel/runtime" "^7.4.4" "@fortawesome/fontawesome-svg-core" "^1.2.4" @@ -6613,7 +6608,6 @@ react-redux@^7.2.6: "@material-ui/core" "^4.12.0" "@material-ui/icons" "4.2.1" axios "^0.21.2" - base-64 "^0.1.0" hls.js "^1.1.2" lodash "4.17.21" manifesto.js "^4.2.14" From f441593a476cbf7ea3d66a5cb892a732741dc5d5 Mon Sep 17 00:00:00 2001 From: Mason Ballengee <68433277+masaball@users.noreply.github.com> Date: Tue, 21 Feb 2023 14:16:48 -0500 Subject: [PATCH 062/107] Increase ruby stack size limit Based on recommendation for resolving "Stack level too deep" errors, found here: https://github.com/samvera/hyrax/issues/4581#issuecomment-957872071 --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 7a48a7a741..a450f7663a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,6 +19,8 @@ COPY Gemfile.lock ./Gemfile.lock RUN gem install bundler -v "$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1)" \ && bundle config build.nokogiri --use-system-libraries +ENV RUBY_THREAD_MACHINE_STACK_SIZE 8388608 + # Build development gems FROM bundle as bundle-dev From 63908c79077d98d9970cfcbf435111bb8c1d3a25 Mon Sep 17 00:00:00 2001 From: Mason Ballengee <68433277+masaball@users.noreply.github.com> Date: Wed, 22 Feb 2023 13:58:35 -0500 Subject: [PATCH 063/107] Add ENV variable for VM stack --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index a450f7663a..2d46bfb7bf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,6 +20,7 @@ RUN gem install bundler -v "$(grep -A 1 "BUNDLED WITH" Gemfile.lock | ta && bundle config build.nokogiri --use-system-libraries ENV RUBY_THREAD_MACHINE_STACK_SIZE 8388608 +ENV RUBY_THREAD_VM_STACK_SIZE 8388608 # Build development gems From ec092507f6fdd093dd4aefd9379907ea92188c1c Mon Sep 17 00:00:00 2001 From: Mason Ballengee Date: Wed, 22 Feb 2023 16:17:44 -0500 Subject: [PATCH 064/107] Bump iiif_manifest to latest version --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index c058dda544..70667e5dc5 100644 --- a/Gemfile +++ b/Gemfile @@ -54,7 +54,7 @@ gem 'avalon-about', git: 'https://github.com/avalonmediasystem/avalon-about.git' #gem 'bootstrap-sass', '< 3.4.1' # Pin to less than 3.4.1 due to change in behavior with popovers gem 'bootstrap-toggle-rails' gem 'bootstrap_form' -gem 'iiif_manifest', '~> 0.6' +gem 'iiif_manifest', '~> 1.3' gem 'rack-cors', require: 'rack/cors' gem 'rails_same_site_cookie' gem 'recaptcha', require: 'recaptcha/rails' diff --git a/Gemfile.lock b/Gemfile.lock index 6ce7433d89..b5bb08752f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -540,7 +540,7 @@ GEM i18n (1.12.0) concurrent-ruby (~> 1.0) iconv (1.0.8) - iiif_manifest (0.6.0) + iiif_manifest (1.3.1) activesupport (>= 4) ims-lti (1.1.13) builder @@ -1082,7 +1082,7 @@ DEPENDENCIES hooks hydra-head (~> 12.0) iconv (~> 1.0.6) - iiif_manifest (~> 0.6) + iiif_manifest (~> 1.3) ims-lti (~> 1.1.13) jbuilder (~> 2.0) jquery-datatables From 2fb137185387c39869ba5f9d3b66a4f0c35c5a4d Mon Sep 17 00:00:00 2001 From: dananji Date: Thu, 23 Feb 2023 11:58:34 -0500 Subject: [PATCH 065/107] Fix missing code in SME IIIF PR (#5051) --- app/controllers/media_objects_controller.rb | 1 - .../components/ReactButtonContainer.jsx | 2 - app/models/iiif_canvas_presenter.rb | 9 ++ app/models/iiif_manifest_presenter.rb | 9 -- config/webpack/environment.js | 3 + yarn.lock | 126 ++++++++++-------- 6 files changed, 80 insertions(+), 70 deletions(-) diff --git a/app/controllers/media_objects_controller.rb b/app/controllers/media_objects_controller.rb index 229210b783..955bd59d72 100644 --- a/app/controllers/media_objects_controller.rb +++ b/app/controllers/media_objects_controller.rb @@ -475,7 +475,6 @@ def manifest manifest = IIIFManifest::V3::ManifestFactory.new(presenter).to_h # TODO: implement thumbnail in iiif_manifest manifest["thumbnail"] = [{ "id" => presenter.thumbnail, "type" => 'Image' }] if presenter.thumbnail - manifest["rendering"] = presenter.rendering respond_to do |wants| wants.json { render json: manifest.to_json } diff --git a/app/javascript/components/ReactButtonContainer.jsx b/app/javascript/components/ReactButtonContainer.jsx index 878e4e9750..2a6dff5153 100644 --- a/app/javascript/components/ReactButtonContainer.jsx +++ b/app/javascript/components/ReactButtonContainer.jsx @@ -9,7 +9,6 @@ class ReactButtonContainer extends Component { const { baseURL, - initStructure, masterFileID, mediaObjectID, canvasIndex, @@ -20,7 +19,6 @@ class ReactButtonContainer extends Component { structureURL: baseURL + '/master_files/' + masterFileID + '/structure.json', manifestURL: baseURL + '/media_objects/' + mediaObjectID + '/manifest.json', canvasIndex: canvasIndex, - initStructure: initStructure, }, structureSaved: true }; diff --git a/app/models/iiif_canvas_presenter.rb b/app/models/iiif_canvas_presenter.rb index 81f65ece78..057c3caed7 100644 --- a/app/models/iiif_canvas_presenter.rb +++ b/app/models/iiif_canvas_presenter.rb @@ -37,6 +37,15 @@ def display_content master_file.is_video? ? video_content : audio_content end + def sequence_rendering + [{ + "@id" => "#{@master_file.waveform_master_file_url(@master_file.id)}.json", + "type" => "Dataset", + "label" => { "en" => ["waveform.json"] }, + "format" => "application/json" + }] + end + private def video_content diff --git a/app/models/iiif_manifest_presenter.rb b/app/models/iiif_manifest_presenter.rb index 82af6eba10..cf5af4528c 100644 --- a/app/models/iiif_manifest_presenter.rb +++ b/app/models/iiif_manifest_presenter.rb @@ -53,15 +53,6 @@ def thumbnail @thumbnail ||= image_for(media_object.to_solr) end - def rendering - media_object.master_files.collect do |mf| - { "id" => "#{mf.waveform_master_file_url(mf.id)}.json", "type" => "SpecificResource", - "label" => { "en" => ["waveform.json"] }, - "format" => "application/json" - } - end - end - def ranges [ IiifManifestRange.new( diff --git a/config/webpack/environment.js b/config/webpack/environment.js index d16d9af743..74695855d3 100644 --- a/config/webpack/environment.js +++ b/config/webpack/environment.js @@ -1,3 +1,6 @@ const { environment } = require('@rails/webpacker') +// Preventing Babel from transpiling NodeModules packages +environment.loaders.delete('nodeModules'); + module.exports = environment diff --git a/yarn.lock b/yarn.lock index 9ab79d12d4..3715669b92 100644 --- a/yarn.lock +++ b/yarn.lock @@ -894,11 +894,11 @@ "@babel/plugin-transform-react-pure-annotations" "^7.14.5" "@babel/runtime@^7.1.2", "@babel/runtime@^7.15.4", "@babel/runtime@^7.2.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.8.3", "@babel/runtime@^7.9.2": - version "7.19.0" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.19.0.tgz#22b11c037b094d27a8a2504ea4dcff00f50e2259" - integrity sha512-eR8Lo9hnDS7tqkO7NsV+mKvCmv5boaXFSZ70DnfhcgiEne8hv9oCEd36Klw74EtizEqLsy4YnW8UWwpBVolHZA== + version "7.21.0" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.21.0.tgz#5b55c9d394e5fcf304909a8b00c07dc217b56673" + integrity sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw== dependencies: - regenerator-runtime "^0.13.4" + regenerator-runtime "^0.13.11" "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.5": version "7.16.3" @@ -1002,6 +1002,11 @@ resolved "https://registry.yarnpkg.com/@iiif/vocabulary/-/vocabulary-1.0.21.tgz#5808f62da11b64ca42a895025844be088df9f48a" integrity sha512-XUD8RYeBiEzv8rdpC9tNBaQ0FMZuGWIkPsmcFhnqXW+5WjZmRLhgqycuoGwIjxt9nPsDgW1IxuiWduNgbLl9UA== +"@iiif/vocabulary@^1.0.26": + version "1.0.26" + resolved "https://registry.yarnpkg.com/@iiif/vocabulary/-/vocabulary-1.0.26.tgz#557fab623100ca860daeddf6e4de46a8f94aaf86" + integrity sha512-yOsMDg5C90iMfD5HSydoTDzmOM/ki5zGiu4DbHpzRueM7D+12IcDHeai2A8QvEroS8HCJl5M1Edbju5rOlPIpg== + "@jridgewell/gen-mapping@^0.3.0": version "0.3.2" resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" @@ -1333,9 +1338,9 @@ integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== "@types/react-redux@^7.1.20": - version "7.1.24" - resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.1.24.tgz#6caaff1603aba17b27d20f8ad073e4c077e975c0" - integrity sha512-7FkurKcS1k0FHZEtdbbgN8Oc6b+stGSfZYjQGicofJ0j4U0qIn/jaSvnP2pLwZKiai3/17xqqxkkrxTgN8UNbQ== + version "7.1.25" + resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.1.25.tgz#de841631205b24f9dfb4967dd4a7901e048f9a88" + integrity sha512-bAGh4e+w5D8dajd6InASVIyCo4pZLJ66oLb80F9OBLO1gKESbZcRCJpTT6uLXX+HAB57zw1WTdwJdAsewuTweg== dependencies: "@types/hoist-non-react-statics" "^3.3.0" "@types/react" "*" @@ -2883,9 +2888,9 @@ csso@^4.0.2: css-tree "^1.1.2" csstype@^2.5.2: - version "2.6.20" - resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.20.tgz#9229c65ea0b260cf4d3d997cb06288e36a8d6dda" - integrity sha512-/WwNkdXfckNgw6S5R125rrW8ez139lBHWouiBvX8dfMFtcn6V81REDqnH7+CRpRipfYlyU1CmOnOxrmGcFOjeA== + version "2.6.21" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.21.tgz#2efb85b7cc55c80017c66a5ad7cbd931fda3a90e" + integrity sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w== csstype@^3.0.2: version "3.0.9" @@ -3864,9 +3869,9 @@ hex-color-regex@^1.1.0: integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ== hls.js@^1.1.2: - version "1.2.1" - resolved "https://registry.yarnpkg.com/hls.js/-/hls.js-1.2.1.tgz#09b0207c60fcb3340a88e8d3d1523799fe5fbedf" - integrity sha512-+m/5+ikSpmQQvb6FmVWZUZfzvTJMn/QVfiCGP1Oq9WW4RKrAvxlExkhhbcVGgGqLNPFk1kdFkVQur//wKu3JVw== + version "1.3.3" + resolved "https://registry.yarnpkg.com/hls.js/-/hls.js-1.3.3.tgz#834db077b5aa9d9b31d13e01c5dce4153b5e3214" + integrity sha512-4Efu6g90HfFGDuQrkquhDoRpA/4iVpSMcfK9zguJ2qXEUfo5VknZt6rziwwFPHmC2DU3crZ0NtPD0eUqOhFyqg== "hls.js@https://github.com/avalonmediasystem/hls.js#stricter_ts_probing": version "0.13.1" @@ -4554,69 +4559,69 @@ json5@^2.1.2: integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== jss-plugin-camel-case@^10.5.1: - version "10.9.2" - resolved "https://registry.yarnpkg.com/jss-plugin-camel-case/-/jss-plugin-camel-case-10.9.2.tgz#76dddfa32f9e62d17daa4e3504991fd0933b89e1" - integrity sha512-wgBPlL3WS0WDJ1lPJcgjux/SHnDuu7opmgQKSraKs4z8dCCyYMx9IDPFKBXQ8Q5dVYij1FFV0WdxyhuOOAXuTg== + version "10.10.0" + resolved "https://registry.yarnpkg.com/jss-plugin-camel-case/-/jss-plugin-camel-case-10.10.0.tgz#27ea159bab67eb4837fa0260204eb7925d4daa1c" + integrity sha512-z+HETfj5IYgFxh1wJnUAU8jByI48ED+v0fuTuhKrPR+pRBYS2EDwbusU8aFOpCdYhtRc9zhN+PJ7iNE8pAWyPw== dependencies: "@babel/runtime" "^7.3.1" hyphenate-style-name "^1.0.3" - jss "10.9.2" + jss "10.10.0" jss-plugin-default-unit@^10.5.1: - version "10.9.2" - resolved "https://registry.yarnpkg.com/jss-plugin-default-unit/-/jss-plugin-default-unit-10.9.2.tgz#3e7f4a1506b18d8fe231554fd982439feb2a9c53" - integrity sha512-pYg0QX3bBEFtTnmeSI3l7ad1vtHU42YEEpgW7pmIh+9pkWNWb5dwS/4onSfAaI0kq+dOZHzz4dWe+8vWnanoSg== + version "10.10.0" + resolved "https://registry.yarnpkg.com/jss-plugin-default-unit/-/jss-plugin-default-unit-10.10.0.tgz#db3925cf6a07f8e1dd459549d9c8aadff9804293" + integrity sha512-SvpajxIECi4JDUbGLefvNckmI+c2VWmP43qnEy/0eiwzRUsafg5DVSIWSzZe4d2vFX1u9nRDP46WCFV/PXVBGQ== dependencies: "@babel/runtime" "^7.3.1" - jss "10.9.2" + jss "10.10.0" jss-plugin-global@^10.5.1: - version "10.9.2" - resolved "https://registry.yarnpkg.com/jss-plugin-global/-/jss-plugin-global-10.9.2.tgz#e7f2ad4a5e8e674fb703b04b57a570b8c3e5c2c2" - integrity sha512-GcX0aE8Ef6AtlasVrafg1DItlL/tWHoC4cGir4r3gegbWwF5ZOBYhx04gurPvWHC8F873aEGqge7C17xpwmp2g== + version "10.10.0" + resolved "https://registry.yarnpkg.com/jss-plugin-global/-/jss-plugin-global-10.10.0.tgz#1c55d3c35821fab67a538a38918292fc9c567efd" + integrity sha512-icXEYbMufiNuWfuazLeN+BNJO16Ge88OcXU5ZDC2vLqElmMybA31Wi7lZ3lf+vgufRocvPj8443irhYRgWxP+A== dependencies: "@babel/runtime" "^7.3.1" - jss "10.9.2" + jss "10.10.0" jss-plugin-nested@^10.5.1: - version "10.9.2" - resolved "https://registry.yarnpkg.com/jss-plugin-nested/-/jss-plugin-nested-10.9.2.tgz#3aa2502816089ecf3981e1a07c49b276d67dca63" - integrity sha512-VgiOWIC6bvgDaAL97XCxGD0BxOKM0K0zeB/ECyNaVF6FqvdGB9KBBWRdy2STYAss4VVA7i5TbxFZN+WSX1kfQA== + version "10.10.0" + resolved "https://registry.yarnpkg.com/jss-plugin-nested/-/jss-plugin-nested-10.10.0.tgz#db872ed8925688806e77f1fc87f6e62264513219" + integrity sha512-9R4JHxxGgiZhurDo3q7LdIiDEgtA1bTGzAbhSPyIOWb7ZubrjQe8acwhEQ6OEKydzpl8XHMtTnEwHXCARLYqYA== dependencies: "@babel/runtime" "^7.3.1" - jss "10.9.2" + jss "10.10.0" tiny-warning "^1.0.2" jss-plugin-props-sort@^10.5.1: - version "10.9.2" - resolved "https://registry.yarnpkg.com/jss-plugin-props-sort/-/jss-plugin-props-sort-10.9.2.tgz#645f6c8f179309667b3e6212f66b59a32fb3f01f" - integrity sha512-AP1AyUTbi2szylgr+O0OB7gkIxEGzySLITZ2GpsaoX72YMCGI2jYAc+WUhPfvUnZYiauF4zTnN4V4TGuvFjJlw== + version "10.10.0" + resolved "https://registry.yarnpkg.com/jss-plugin-props-sort/-/jss-plugin-props-sort-10.10.0.tgz#67f4dd4c70830c126f4ec49b4b37ccddb680a5d7" + integrity sha512-5VNJvQJbnq/vRfje6uZLe/FyaOpzP/IH1LP+0fr88QamVrGJa0hpRRyAa0ea4U/3LcorJfBFVyC4yN2QC73lJg== dependencies: "@babel/runtime" "^7.3.1" - jss "10.9.2" + jss "10.10.0" jss-plugin-rule-value-function@^10.5.1: - version "10.9.2" - resolved "https://registry.yarnpkg.com/jss-plugin-rule-value-function/-/jss-plugin-rule-value-function-10.9.2.tgz#9afe07596e477123cbf11120776be6a64494541f" - integrity sha512-vf5ms8zvLFMub6swbNxvzsurHfUZ5Shy5aJB2gIpY6WNA3uLinEcxYyraQXItRHi5ivXGqYciFDRM2ZoVoRZ4Q== + version "10.10.0" + resolved "https://registry.yarnpkg.com/jss-plugin-rule-value-function/-/jss-plugin-rule-value-function-10.10.0.tgz#7d99e3229e78a3712f78ba50ab342e881d26a24b" + integrity sha512-uEFJFgaCtkXeIPgki8ICw3Y7VMkL9GEan6SqmT9tqpwM+/t+hxfMUdU4wQ0MtOiMNWhwnckBV0IebrKcZM9C0g== dependencies: "@babel/runtime" "^7.3.1" - jss "10.9.2" + jss "10.10.0" tiny-warning "^1.0.2" jss-plugin-vendor-prefixer@^10.5.1: - version "10.9.2" - resolved "https://registry.yarnpkg.com/jss-plugin-vendor-prefixer/-/jss-plugin-vendor-prefixer-10.9.2.tgz#410a0f3b9f8dbbfba58f4d329134df4849aa1237" - integrity sha512-SxcEoH+Rttf9fEv6KkiPzLdXRmI6waOTcMkbbEFgdZLDYNIP9UKNHFy6thhbRKqv0XMQZdrEsbDyV464zE/dUA== + version "10.10.0" + resolved "https://registry.yarnpkg.com/jss-plugin-vendor-prefixer/-/jss-plugin-vendor-prefixer-10.10.0.tgz#c01428ef5a89f2b128ec0af87a314d0c767931c7" + integrity sha512-UY/41WumgjW8r1qMCO8l1ARg7NHnfRVWRhZ2E2m0DMYsr2DD91qIXLyNhiX83hHswR7Wm4D+oDYNC1zWCJWtqg== dependencies: "@babel/runtime" "^7.3.1" css-vendor "^2.0.8" - jss "10.9.2" + jss "10.10.0" -jss@10.9.2, jss@^10.5.1: - version "10.9.2" - resolved "https://registry.yarnpkg.com/jss/-/jss-10.9.2.tgz#9379be1f195ef98011dfd31f9448251bd61b95a9" - integrity sha512-b8G6rWpYLR4teTUbGd4I4EsnWjg7MN0Q5bSsjKhVkJVjhQDy2KzkbD2AW3TuT0RYZVmZZHKIrXDn6kjU14qkUg== +jss@10.10.0, jss@^10.5.1: + version "10.10.0" + resolved "https://registry.yarnpkg.com/jss/-/jss-10.10.0.tgz#a75cc85b0108c7ac8c7b7d296c520a3e4fbc6ccc" + integrity sha512-cqsOTS7jqPsPMjtKYDUpdFC0AbhYFLTcuGRqymgmdJIeQ8cH7+AgX7YSgQy79wXloZq2VvATYxUOUQEvS1V/Zw== dependencies: "@babel/runtime" "^7.3.1" csstype "^3.0.2" @@ -4828,12 +4833,12 @@ manifesto.js@^4.1.0: lodash "^4.17.21" manifesto.js@^4.2.14: - version "4.2.14" - resolved "https://registry.yarnpkg.com/manifesto.js/-/manifesto.js-4.2.14.tgz#376fc73f9884646ff79168a67c4d3356cbd28b48" - integrity sha512-6lsgr3j/DyxlIQfqE+0VlNeKlb3MzJVv42Is9+Y8AC6pBfVIqKV4xfGrP7B1q9jX59elFR4grYGDMVWi71KwSQ== + version "4.2.17" + resolved "https://registry.yarnpkg.com/manifesto.js/-/manifesto.js-4.2.17.tgz#9d06dd50f5442a80897ccf7d88dfe861afb6a343" + integrity sha512-UjctsJ2PkgwGDUQ/ZzvyObXJO/yiFYwiz49xrzkayi9fhrwUVC3Vc0aQyGm723BZTl5nKYJQ8YdEhJRp08xOtA== dependencies: "@edsilv/http-status-codes" "^1.0.3" - "@iiif/vocabulary" "^1.0.20" + "@iiif/vocabulary" "^1.0.26" isomorphic-unfetch "^3.0.0" lodash "^4.17.21" @@ -6586,9 +6591,9 @@ react-overlays@^5.1.1: warning "^4.0.3" react-redux@^7.2.6: - version "7.2.8" - resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.8.tgz#a894068315e65de5b1b68899f9c6ee0923dd28de" - integrity sha512-6+uDjhs3PSIclqoCk0kd6iX74gzrGc3W5zcAjbrFgEdIjRSQObdIwfx80unTkVUYvbQ95Y8Av3OvFHq1w5EOUw== + version "7.2.9" + resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.9.tgz#09488fbb9416a4efe3735b7235055442b042481d" + integrity sha512-Gx4L3uM182jEEayZfRbI/G11ZpYdNAnBs70lFVMNdHJI76XYtR+7m0MN+eAs7UHBPhWXcnFPaS+9owSCJQHNpQ== dependencies: "@babel/runtime" "^7.15.4" "@types/react-redux" "^7.1.20" @@ -6715,14 +6720,14 @@ readdirp@~3.6.0: picomatch "^2.2.1" redux-thunk@^2.3.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.4.1.tgz#0dd8042cf47868f4b29699941de03c9301a75714" - integrity sha512-OOYGNY5Jy2TWvTL1KgAlVy6dcx3siPJ1wTq741EPyUKfn6W6nChdICjZwCd0p8AZBs5kWpZlbkXW2nE/zjUa+Q== + version "2.4.2" + resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.4.2.tgz#b9d05d11994b99f7a91ea223e8b04cf0afa5ef3b" + integrity sha512-+P3TjtnP0k/FEjcBL5FZpoovtvrTNT/UXd4/sluaSyrURlSlhLSzEdfsTBW7WsKB6yPvgd7q/iZPICFjW4o57Q== redux@^4.0.0, redux@^4.0.1: - version "4.2.0" - resolved "https://registry.yarnpkg.com/redux/-/redux-4.2.0.tgz#46f10d6e29b6666df758780437651eeb2b969f13" - integrity sha512-oSBmcKKIuIR4ME29/AeNUnl5L+hvBq7OaJWzaptTQJAntaPvxIJqfnjbaEiCzzaIz+XmVILfqAM3Ob0aXLPfjA== + version "4.2.1" + resolved "https://registry.yarnpkg.com/redux/-/redux-4.2.1.tgz#c08f4306826c49b5e9dc901dee0452ea8fce6197" + integrity sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w== dependencies: "@babel/runtime" "^7.9.2" @@ -6738,6 +6743,11 @@ regenerate@^1.4.2: resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== +regenerator-runtime@^0.13.11: + version "0.13.11" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" + integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== + regenerator-runtime@^0.13.4, regenerator-runtime@^0.13.9: version "0.13.9" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" From 38bf584b58e2c002c1d8e307d692324f0dc94b3f Mon Sep 17 00:00:00 2001 From: "Michael B. Klein" Date: Fri, 24 Feb 2023 19:33:12 +0000 Subject: [PATCH 066/107] Fix two bugs in JSON update API - Make `collection_id` optional in updates - Allow `:json_update, media_object` for all users who can `:edit, media_object` --- app/controllers/media_objects_controller.rb | 15 +++++++++------ app/models/ability.rb | 5 +++++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/app/controllers/media_objects_controller.rb b/app/controllers/media_objects_controller.rb index 955bd59d72..5135b09952 100644 --- a/app/controllers/media_objects_controller.rb +++ b/app/controllers/media_objects_controller.rb @@ -173,14 +173,17 @@ def json_update end def update_media_object - begin - collection = Admin::Collection.find(api_params[:collection_id]) - rescue ActiveFedora::ObjectNotFoundError - render json: { errors: ["Collection not found for #{api_params[:collection_id]}"] }, status: 422 - return + if (api_params[:collection_id].present?) + begin + collection = Admin::Collection.find(api_params[:collection_id]) + rescue ActiveFedora::ObjectNotFoundError + render json: { errors: ["Collection not found for #{api_params[:collection_id]}"] }, status: 422 + return + end + + @media_object.collection = collection end - @media_object.collection = collection @media_object.avalon_uploader = 'REST API' populate_from_catalog = (!!api_params[:import_bib_record] && media_object_parameters[:bibliographic_id].present?) diff --git a/app/models/ability.rb b/app/models/ability.rb index e07a2fb60b..8f79881023 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -165,6 +165,11 @@ def custom_permissions(user=nil, session=nil) # anyone who can edit a media_object can also push it can? :edit, media_object end + + can :json_update, MediaObject do |media_object| + # anyone who can edit a media_object can also update it via the API + is_api_request? && can?(:edit, media_object) + end end end From 07a8480f623f674d8b1633429735c4560ed2e175 Mon Sep 17 00:00:00 2001 From: Mason Ballengee Date: Mon, 27 Feb 2023 14:57:56 -0500 Subject: [PATCH 067/107] WIP HLS caption for iOS --- app/controllers/master_files_controller.rb | 5 +++++ app/views/master_files/caption_manifest.m3u8.erb | 10 ++++++++++ app/views/master_files/hls_manifest.m3u8.erb | 3 ++- config/application.rb | 2 ++ config/routes.rb | 1 + 5 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 app/views/master_files/caption_manifest.m3u8.erb diff --git a/app/controllers/master_files_controller.rb b/app/controllers/master_files_controller.rb index 98854b85c4..20bf66805c 100644 --- a/app/controllers/master_files_controller.rb +++ b/app/controllers/master_files_controller.rb @@ -325,6 +325,11 @@ def hls_manifest end end + def caption_manifest + return head :unauthorized if cannot?(:read, @master_file) + @caption = @master_file.captions + end + def structure authorize! :read, @master_file, message: "You do not have sufficient privileges" render json: @master_file.structuralMetadata.as_json diff --git a/app/views/master_files/caption_manifest.m3u8.erb b/app/views/master_files/caption_manifest.m3u8.erb new file mode 100644 index 0000000000..40fb3dfe54 --- /dev/null +++ b/app/views/master_files/caption_manifest.m3u8.erb @@ -0,0 +1,10 @@ +<% caption = captions_master_file_path %> + +#EXTM3U +#EXT-X-TARGETDURATION:<%= @master_file.duration %> +#EXT-X-VERSION:3 +#EXT-X-MEDIA-SEQUENCE:0 +#EXT-X-PLAYLIST-TYPE:VOD +#EXTINF:<%= @master_file.duration %> +<%= caption %> +#EXT-X-ENDLIST diff --git a/app/views/master_files/hls_manifest.m3u8.erb b/app/views/master_files/hls_manifest.m3u8.erb index e574584381..c2e12ea90a 100644 --- a/app/views/master_files/hls_manifest.m3u8.erb +++ b/app/views/master_files/hls_manifest.m3u8.erb @@ -14,7 +14,8 @@ Unless required by applicable law or agreed to in writing, software distributed --- END LICENSE_HEADER BLOCK --- %> #EXTM3U +#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",LANGUAGE="en",NAME="English",AUTOSELECT=YES,URI="<%= caption_manifest_master_file_path %>" <% @hls_streams.each do |hls| %> -#EXT-X-STREAM-INF:BANDWIDTH=<%= hls[:bitrate] %> +#EXT-X-STREAM-INF:BANDWIDTH=<%= hls[:bitrate] %>,SUBTITLES="subs" <%= hls[:url] %> <% end %> diff --git a/config/application.rb b/config/application.rb index 1d41ba160f..63e91c4dbc 100644 --- a/config/application.rb +++ b/config/application.rb @@ -47,6 +47,8 @@ class Application < Rails::Application resource '/master_files/*/structure.json', headers: :any, methods: [:get, :post, :delete] resource '/master_files/*/waveform.json', headers: :any, methods: [:get] resource '/master_files/*/*.m3u8', headers: :any, credentials: true, methods: [:get, :head] + resource '/master_files/*/caption_manifest', headers: :any, methods: [:get] + resource '/master_files/*/captions', headers: :any, methods: [:get] resource '/timelines/*/manifest.json', headers: :any, methods: [:get, :post] end end diff --git a/config/routes.rb b/config/routes.rb index 99a0b74db9..12e0482561 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -158,6 +158,7 @@ get :captions get :waveform match ':quality.m3u8', to: 'master_files#hls_manifest', via: [:get], as: :hls_manifest + get 'caption_manifest' get 'structure', to: 'master_files#structure', constraints: { format: 'json' } post 'structure', to: 'master_files#set_structure', constraints: { format: 'json' } delete 'structure', to: 'master_files#delete_structure', constraints: { format: 'json' } From a197872ef5f2875aaf78021d1988621a3953f951 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Tue, 28 Feb 2023 11:29:12 -0500 Subject: [PATCH 068/107] Add tests --- .../media_objects_controller_spec.rb | 47 +++++++++++++++++-- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/spec/controllers/media_objects_controller_spec.rb b/spec/controllers/media_objects_controller_spec.rb index 606612b281..c84ea86ae0 100644 --- a/spec/controllers/media_objects_controller_spec.rb +++ b/spec/controllers/media_objects_controller_spec.rb @@ -296,6 +296,13 @@ expect(JSON.parse(response.body)["errors"].class).to eq Array expect(JSON.parse(response.body)["errors"].first.class).to eq String end + it "should respond with 422 if collection param not present" do + post 'create', params: { format: 'json' } + expect(response.status).to eq(422) + expect(JSON.parse(response.body)).to include('errors') + expect(JSON.parse(response.body)["errors"].class).to eq Array + expect(JSON.parse(response.body)["errors"].first.class).to eq String + end it "should create a new media_object" do # master_file_obj = FactoryBot.create(:master_file, master_file.slice(:files)) media_object = FactoryBot.create(:media_object)#, master_files: [master_file_obj]) @@ -446,14 +453,15 @@ end describe "#update" do context 'using api' do - let(:administrator) { FactoryBot.create(:administrator) } + let(:user) { FactoryBot.create(:administrator) } + let(:media_object) { FactoryBot.create(:media_object, :with_master_file) } before(:each) do - ApiToken.create token: 'secret_token', username: administrator.username, email: administrator.email + ApiToken.create token: 'secret_token', username: user.username, email: user.email request.headers['Avalon-Api-Key'] = 'secret_token' allow_any_instance_of(MasterFile).to receive(:get_ffmpeg_frame_data).and_return('some data') end - let!(:media_object) { FactoryBot.create(:media_object, :with_master_file) } + it "should route json format to #json_update" do assert_routing({ path: 'media_objects/1.json', method: :put }, { controller: 'media_objects', action: 'json_update', id: '1', format: 'json' }) @@ -513,6 +521,39 @@ expect(JSON.parse(response.body)["errors"].class).to eq Array expect(JSON.parse(response.body)["errors"].first.class).to eq String end + + context "as an authorized non-admin user" do + let(:user) { FactoryBot.create(:manager) } + let(:collection) { FactoryBot.create(:collection, managers: [user.username]) } + let(:media_object) { FactoryBot.create(:media_object, collection: collection) } + + it "updates metadata" do + old_title = media_object.title + put 'json_update', params: { format: 'json', id: media_object.id, fields: {title: old_title+'new'}, collection_id: media_object.collection_id } + expect(JSON.parse(response.body)['id'].class).to eq String + expect(JSON.parse(response.body)).not_to include('errors') + media_object.reload + expect(media_object.title).to eq old_title+'new' + end + end + + context "collection_id parameter" do + it "updates metadata without collection_id" do + old_title = media_object.title + put 'json_update', params: { format: 'json', id: media_object.id, fields: {title: old_title+'new'} } + expect(JSON.parse(response.body)['id'].class).to eq String + expect(JSON.parse(response.body)).not_to include('errors') + media_object.reload + expect(media_object.title).to eq old_title+'new' + end + it "should respond with 422 if collection not found" do + put 'json_update', params: { format: 'json', id: media_object.id, collection_id: "doesnt_exist" } + expect(response.status).to eq(422) + expect(JSON.parse(response.body)).to include('errors') + expect(JSON.parse(response.body)["errors"].class).to eq Array + expect(JSON.parse(response.body)["errors"].first.class).to eq String + end + end end end end From da15a786d3940e52adf38fa568545779e5d88e18 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Tue, 28 Feb 2023 11:50:59 -0500 Subject: [PATCH 069/107] Use old namespace for bibframe property to align with pre-existing data --- app/models/admin/collection.rb | 2 +- app/models/avalon/rdf_vocab.rb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/admin/collection.rb b/app/models/admin/collection.rb index 9deac6daf8..4c11f69832 100644 --- a/app/models/admin/collection.rb +++ b/app/models/admin/collection.rb @@ -34,7 +34,7 @@ class Admin::Collection < ActiveFedora::Base property :name, predicate: ::RDF::Vocab::DC.title, multiple: false do |index| index.as :stored_sortable end - property :unit, predicate: ::RDF::Vocab::Bibframe.heldBy, multiple: false do |index| + property :unit, predicate: Avalon::RDFVocab::Bibframe.heldBy, multiple: false do |index| index.as :stored_sortable end property :description, predicate: ::RDF::Vocab::DC.description, multiple: false do |index| diff --git a/app/models/avalon/rdf_vocab.rb b/app/models/avalon/rdf_vocab.rb index c9782b889f..e6a0498e1b 100644 --- a/app/models/avalon/rdf_vocab.rb +++ b/app/models/avalon/rdf_vocab.rb @@ -72,5 +72,9 @@ class EBUCore < RDF::StrictVocabulary("http://www.ebu.ch/metadata/ontologies/ebu property :identifier, "rdfs:isDefinedBy" => %(avr-collection:).freeze, type: "rdfs:Class".freeze property :locator, "rdfs:isDefinedBy" => %(avr-collection:).freeze, type: "rdfs:Class".freeze end + + class Bibframe < RDF::StrictVocabulary("http://bibframe.org/vocab/") + property :heldBy, "rdfs:isDefinedBy" => %(avr-collection:).freeze, type: "rdfs:Class".freeze + end end end From 872cf73bd17f451902271446bb10dddc92bd0d60 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Wed, 1 Mar 2023 11:19:44 -0500 Subject: [PATCH 070/107] Avoid modifying frozen string --- app/helpers/upload_form_helper.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/helpers/upload_form_helper.rb b/app/helpers/upload_form_helper.rb index fc46645388..6aa989e24f 100644 --- a/app/helpers/upload_form_helper.rb +++ b/app/helpers/upload_form_helper.rb @@ -27,13 +27,14 @@ def upload_form_data if direct_upload? bucket = Aws::S3::Bucket.new(name: Settings.encoding.masterfile_bucket) direct_post = bucket.presigned_post(key: "uploads/#{SecureRandom.uuid}/${filename}", success_action_status: '201') + upload_form_url = direct_post.url if Settings.minio.present? && Settings.minio.public_host.present? - direct_post.url.sub!(Settings.minio.endpoint, Settings.minio.public_host) + upload_form_url = direct_post.url.sub(Settings.minio.endpoint, Settings.minio.public_host) end { 'form-data' => (direct_post.fields), - 'url' => direct_post.url, - 'host' => Addressable::URI.parse(direct_post.url).host + 'url' => upload_form_url, + 'host' => Addressable::URI.parse(upload_form_url).host } else {} From 37ead160ebf63a533e1f9b150adf4e1b3924f59d Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Wed, 1 Mar 2023 12:03:22 -0500 Subject: [PATCH 071/107] Ensure MODS data is indexed when media object is indexed --- app/models/media_object.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/media_object.rb b/app/models/media_object.rb index c21c0f45ae..4154f42a09 100644 --- a/app/models/media_object.rb +++ b/app/models/media_object.rb @@ -240,7 +240,7 @@ def fill_in_solr_fields_that_need_master_files(solr_doc) end def to_solr(include_child_fields: false) - super.tap do |solr_doc| + descMetadata.to_solr(super).tap do |solr_doc| solr_doc[ActiveFedora.index_field_mapper.solr_name("workflow_published", :facetable, type: :string)] = published? ? 'Published' : 'Unpublished' solr_doc[ActiveFedora.index_field_mapper.solr_name("collection", :symbol, type: :string)] = collection.name if collection.present? solr_doc[ActiveFedora.index_field_mapper.solr_name("unit", :symbol, type: :string)] = collection.unit if collection.present? From 688c735e503d7002e503e04cf635ba62843563d3 Mon Sep 17 00:00:00 2001 From: Mason Ballengee Date: Thu, 2 Mar 2023 14:22:50 -0500 Subject: [PATCH 072/107] Prevent reification when requesting manifest --- app/models/derivative.rb | 9 ++++++--- app/models/iiif_canvas_presenter.rb | 18 +++++++++++------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/app/models/derivative.rb b/app/models/derivative.rb index 1ca6086cd6..dffec3a721 100644 --- a/app/models/derivative.rb +++ b/app/models/derivative.rb @@ -1,11 +1,11 @@ # Copyright 2011-2022, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# +# # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the @@ -87,6 +87,9 @@ def absolute_location=(value) def to_solr super.tap do |solr_doc| + solr_doc['format_ss'] = self.format + solr_doc['mime_type_ss'] = self.mime_type.nil? ? "Nil" : self.mime_type + solr_doc['bitrate_is'] = self.bitrate solr_doc['stream_path_ssi'] = if location_url&.start_with?("rtmp") location_url.split(/:/).last else diff --git a/app/models/iiif_canvas_presenter.rb b/app/models/iiif_canvas_presenter.rb index 057c3caed7..1fead28830 100644 --- a/app/models/iiif_canvas_presenter.rb +++ b/app/models/iiif_canvas_presenter.rb @@ -1,11 +1,11 @@ # Copyright 2011-2022, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# +# # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the @@ -38,9 +38,9 @@ def display_content end def sequence_rendering - [{ - "@id" => "#{@master_file.waveform_master_file_url(@master_file.id)}.json", - "type" => "Dataset", + [{ + "@id" => "#{@master_file.waveform_master_file_url(@master_file.id)}.json", + "type" => "Dataset", "label" => { "en" => ["waveform.json"] }, "format" => "application/json" }] @@ -144,7 +144,11 @@ def structure_ng_xml # in which case SyntaxError shall be prompted to the user during file upload. # This can be done by defining some XML schema to require that at least one Div/Span child node exists # under root or each Div node, otherwise Nokogiri::XML parser will report error, and raise exception here. - @structure_ng_xml ||= (s = master_file.structuralMetadata.content).nil? ? Nokogiri::XML(nil) : Nokogiri::XML(s) + @structure_ng_xml ||= if master_file.has_structuralMetadata? + Nokogiri::XML(master_file.structuralMetadata.content) + else + Nokogiri::XML(nil) + end end def auth_service(quality) From 2ae231710d7b05aaf982b2e5a5bf079ae65445f2 Mon Sep 17 00:00:00 2001 From: Mason Ballengee Date: Thu, 2 Mar 2023 14:42:01 -0500 Subject: [PATCH 073/107] Fix bug for expanding filename and hover text --- app/views/media_objects/_file_upload.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/media_objects/_file_upload.html.erb b/app/views/media_objects/_file_upload.html.erb index 36005022bb..ba12f32374 100644 --- a/app/views/media_objects/_file_upload.html.erb +++ b/app/views/media_objects/_file_upload.html.erb @@ -60,10 +60,10 @@ Unless required by applicable law or agreed to in writing, software distributed <% end %> <% filename = section.title || File.basename(section.file_location.to_s) %> - title=<%= filename %>> - <%= section.title || truncate_center(File.basename(section.file_location.to_s), 30, 10) %> + title="<%= filename %>"> + <%= truncate_center(filename, 30, 10) %> - style="display: none;" title=<%= filename %>> + style="display: none;" title="<%= filename %>"> <%= filename %> <%= number_to_human_size(section.file_size) %> From b09cd3b1c6c0e1e5c28413da593b1144600d9fe2 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Tue, 7 Mar 2023 14:07:23 -0500 Subject: [PATCH 074/107] Override SearchService#count to ensure it uses the preferred http method instead of assuming GET, which doesn't work for lengthy requests --- config/initializers/policy_aware_modification.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/config/initializers/policy_aware_modification.rb b/config/initializers/policy_aware_modification.rb index f77f8a82e0..40e175ef9f 100644 --- a/config/initializers/policy_aware_modification.rb +++ b/config/initializers/policy_aware_modification.rb @@ -43,4 +43,19 @@ def self.post(query, args = {}) def self.default_http_method ActiveFedora.solr_config.fetch(:http_method, :post).to_sym end + + def self.count(query, args = {}) + args = args.merge(rows: 0) + method = args.delete(:method) || default_http_method + + result = case method + when :get + get(query, args) + when :post + post(query, args) + else + raise "Unsupported HTTP method for querying SolrService (#{method.inspect})" + end + result['response']['numFound'].to_i + end end From a39d7b22270a853c877eb1522715fec6cd001eb8 Mon Sep 17 00:00:00 2001 From: Mason Ballengee Date: Tue, 28 Feb 2023 15:26:56 -0500 Subject: [PATCH 075/107] Clean Up implementation --- app/controllers/master_files_controller.rb | 1 - app/views/master_files/caption_manifest.m3u8.erb | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/app/controllers/master_files_controller.rb b/app/controllers/master_files_controller.rb index 20bf66805c..dcb0e9f792 100644 --- a/app/controllers/master_files_controller.rb +++ b/app/controllers/master_files_controller.rb @@ -327,7 +327,6 @@ def hls_manifest def caption_manifest return head :unauthorized if cannot?(:read, @master_file) - @caption = @master_file.captions end def structure diff --git a/app/views/master_files/caption_manifest.m3u8.erb b/app/views/master_files/caption_manifest.m3u8.erb index 40fb3dfe54..a4aa72b3b3 100644 --- a/app/views/master_files/caption_manifest.m3u8.erb +++ b/app/views/master_files/caption_manifest.m3u8.erb @@ -1,10 +1,8 @@ -<% caption = captions_master_file_path %> - #EXTM3U #EXT-X-TARGETDURATION:<%= @master_file.duration %> #EXT-X-VERSION:3 #EXT-X-MEDIA-SEQUENCE:0 #EXT-X-PLAYLIST-TYPE:VOD #EXTINF:<%= @master_file.duration %> -<%= caption %> +<%= captions_master_file_path %> #EXT-X-ENDLIST From 905c5d6478ba9f2b11e0e0f6f991f2a98559604b Mon Sep 17 00:00:00 2001 From: Mason Ballengee Date: Tue, 7 Mar 2023 14:24:37 -0500 Subject: [PATCH 076/107] Add caption language default setting --- app/views/master_files/hls_manifest.m3u8.erb | 2 +- config/settings.yml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/master_files/hls_manifest.m3u8.erb b/app/views/master_files/hls_manifest.m3u8.erb index c2e12ea90a..7710cae265 100644 --- a/app/views/master_files/hls_manifest.m3u8.erb +++ b/app/views/master_files/hls_manifest.m3u8.erb @@ -14,7 +14,7 @@ Unless required by applicable law or agreed to in writing, software distributed --- END LICENSE_HEADER BLOCK --- %> #EXTM3U -#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",LANGUAGE="en",NAME="English",AUTOSELECT=YES,URI="<%= caption_manifest_master_file_path %>" +#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",LANGUAGE="<%= Settings.caption_default.language %>",NAME="<%= Settings.caption_default.name %>",AUTOSELECT=YES,URI="<%= caption_manifest_master_file_path %>" <% @hls_streams.each do |hls| %> #EXT-X-STREAM-INF:BANDWIDTH=<%= hls[:bitrate] %>,SUBTITLES="subs" <%= hls[:url] %> diff --git a/config/settings.yml b/config/settings.yml index 7ae15aaeb0..7bcda7e282 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -100,3 +100,7 @@ controlled_digital_lending: # Choose whether every collection has CDL enabled or disabled by default collections_enabled: false default_lending_period: 'P14D' # ISO8601 duration format: P14D == 14.days, PT8H == 8.hours, etc. +caption_default: + # Language should be 2 or 3 letter ISO 639 codes + language: 'en' + name: 'English' From a1f6fb9737dbbadb6e29e757890dfd996411eeac Mon Sep 17 00:00:00 2001 From: Mason Ballengee Date: Tue, 7 Mar 2023 15:42:45 -0500 Subject: [PATCH 077/107] Add tests --- .../master_files_controller_spec.rb | 31 +++++++++++++++++++ spec/routing/master_files_routing_spec.rb | 9 ++++-- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/spec/controllers/master_files_controller_spec.rb b/spec/controllers/master_files_controller_spec.rb index 4d2f284919..8806d309d0 100644 --- a/spec/controllers/master_files_controller_spec.rb +++ b/spec/controllers/master_files_controller_spec.rb @@ -632,6 +632,37 @@ class << file end end + describe '#caption_manifest' do + let(:media_object) { FactoryBot.create(:published_media_object) } + let(:master_file) { FactoryBot.create(:master_file, :with_captions, media_object: media_object) } + let(:public_media_object) { FactoryBot.create(:published_media_object, visibility: 'public') } + let(:public_master_file) { FactoryBot.create(:master_file, :with_captions, media_object: public_media_object) } + + context 'master file has been deleted' do + before do + allow(MasterFile).to receive(:find).and_raise(Ldp::Gone) + end + + it 'returns gone (403)' do + expect(get('caption_manifest', params: { id: master_file.id }, xhr: true)).to have_http_status(:gone) + end + end + + it 'returns unauthorized (401) if cannot read the master file' do + expect(get('caption_manifest', params: { id: master_file.id }, xhr: true)).to have_http_status(:unauthorized) + end + + it 'returns the caption manifest' do + login_as :administrator + expect(get('caption_manifest', params: { id: master_file.id }, xhr: true)).to have_http_status(:ok) + expect(response.content_type).to eq 'application/x-mpegURL; charset=utf-8' + end + + it 'returns a manifest if public' do + expect(get('caption_manifest', params: { id: public_master_file.id }, xhr: true)).to have_http_status(:ok) + end + end + describe '#move' do let(:master_file) { FactoryBot.create(:master_file, :with_media_object) } let(:target_media_object) { FactoryBot.create(:media_object) } diff --git a/spec/routing/master_files_routing_spec.rb b/spec/routing/master_files_routing_spec.rb index 2f7ca7446e..29ac9bb8a1 100644 --- a/spec/routing/master_files_routing_spec.rb +++ b/spec/routing/master_files_routing_spec.rb @@ -1,11 +1,11 @@ # Copyright 2011-2022, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# +# # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the @@ -19,5 +19,8 @@ it "routes to #move" do expect(:post => "/master_files/abc1234/move").to route_to("master_files#move", id: 'abc1234') end + it "routes to #caption_manifest" do + expect(:get => "/master_files/abc1234/caption_manifest").to route_to("master_files#caption_manifest", id: 'abc1234') + end end end From b16a7be2ec4dbeaaf5e8aa2c65851277c90ecef3 Mon Sep 17 00:00:00 2001 From: Mason Ballengee Date: Tue, 7 Mar 2023 15:43:16 -0500 Subject: [PATCH 078/107] Add filtering for captions to HLS manifest Not all videos have captions. Only generate caption info in HLS manifests for MasterFiles that have associated caption files. --- app/views/master_files/hls_manifest.m3u8.erb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/views/master_files/hls_manifest.m3u8.erb b/app/views/master_files/hls_manifest.m3u8.erb index 7710cae265..4e5af48837 100644 --- a/app/views/master_files/hls_manifest.m3u8.erb +++ b/app/views/master_files/hls_manifest.m3u8.erb @@ -14,8 +14,15 @@ Unless required by applicable law or agreed to in writing, software distributed --- END LICENSE_HEADER BLOCK --- %> #EXTM3U +<% if @master_file.has_captions? %> #EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",LANGUAGE="<%= Settings.caption_default.language %>",NAME="<%= Settings.caption_default.name %>",AUTOSELECT=YES,URI="<%= caption_manifest_master_file_path %>" <% @hls_streams.each do |hls| %> #EXT-X-STREAM-INF:BANDWIDTH=<%= hls[:bitrate] %>,SUBTITLES="subs" <%= hls[:url] %> <% end %> +<% else %> +<% @hls_streams.each do |hls| %> +#EXT-X-STREAM-INF:BANDWIDTH=<%= hls[:bitrate] %> +<%= hls[:url] %> +<% end %> +<% end %> From 71fc19cd6da1de430a8d7a73b2df865825e5bb0f Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Wed, 1 Mar 2023 17:41:37 -0500 Subject: [PATCH 079/107] Use active-fedora branch and update faraday to 2.x --- Gemfile | 3 +-- Gemfile.lock | 69 ++++++++++++++++------------------------------------ 2 files changed, 22 insertions(+), 50 deletions(-) diff --git a/Gemfile b/Gemfile index 70667e5dc5..5d1e5a49a7 100644 --- a/Gemfile +++ b/Gemfile @@ -29,8 +29,7 @@ gem 'uglifier', '>= 1.3.0' gem 'webpacker' # Core Samvera -#gem 'active-fedora', '~> 14.0' -gem 'active-fedora', git: "https://github.com/samvera/active_fedora.git", branch: "main" +gem 'active-fedora', '~> 14.0', '>= 14.0.1' gem 'active_fedora-datastreams', '~> 0.5' gem 'hydra-head', '~> 12.0' gem 'ldp', '~> 1.1.0' diff --git a/Gemfile.lock b/Gemfile.lock index b5bb08752f..f77e9a2af0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -85,22 +85,6 @@ GIT pretender rails (>= 5.2.4.3, < 7.1) -GIT - remote: https://github.com/samvera/active_fedora.git - revision: a75b5b5038a524bec9bf499e602e0207443ae5df - branch: main - specs: - active-fedora (14.0.0) - active-triples (>= 0.11.0, < 2.0.0) - activemodel (>= 5.1) - activesupport (>= 5.1) - deprecation - faraday (~> 1.0) - faraday-encoding (>= 0.0.5) - ldp (>= 0.7.0, < 2) - rsolr (>= 1.1.2, < 3) - ruby-progressbar (~> 1.0) - GEM remote: https://rubygems.org/ specs: @@ -149,6 +133,16 @@ GEM erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) + active-fedora (14.0.1) + active-triples (>= 0.11.0, < 2.0.0) + activemodel (>= 5.1) + activesupport (>= 5.1) + deprecation + faraday (>= 1.0) + faraday-encoding (>= 0.0.5) + ldp (>= 0.7.0, < 2) + rsolr (>= 1.1.2, < 3) + ruby-progressbar (~> 1.0) active-triples (1.2.0) activemodel (>= 3.0.0) activesupport (>= 3.0.0) @@ -210,7 +204,6 @@ GEM public_suffix (>= 2.0.2, < 6.0) airbrussh (1.4.1) sshkit (>= 1.6.1, != 1.7.0) - amazing_print (1.4.0) api-pagination (5.0.0) ast (2.4.2) audio_waveform-ruby (1.0.7) @@ -345,7 +338,7 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) - concurrent-ruby (1.2.0) + concurrent-ruby (1.2.2) config (4.1.0) deep_merge (~> 1.2, >= 1.2.1) dry-validation (~> 1.0, >= 1.0.0) @@ -418,13 +411,12 @@ GEM dry-initializer (~> 3.0) dry-schema (>= 1.12, < 2) zeitwerk (~> 2.6) - ebnf (2.3.1) - amazing_print (~> 1.4) + ebnf (2.3.2) htmlentities (~> 4.3) rdf (~> 3.2) scanf (~> 1.0) sxp (~> 1.2) - unicode-types (~> 1.7) + unicode-types (~> 1.8) edtf (3.1.1) activesupport (>= 3.0, < 8.0) email_spec (2.2.1) @@ -447,31 +439,12 @@ GEM fakefs (2.2.0) faker (3.1.1) i18n (>= 1.8.11, < 2) - 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) + faraday (2.7.4) + faraday-net_http (>= 2.0, < 3.1) ruby2_keywords (>= 0.0.4) - faraday-em_http (1.0.0) - faraday-em_synchrony (1.0.0) faraday-encoding (0.0.5) faraday - faraday-excon (1.1.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-net_http (3.0.2) fastimage (2.2.6) fcrepo_wrapper (0.9.0) ruby-progressbar @@ -625,7 +598,7 @@ GEM mini_mime (1.1.2) mini_portile2 (2.8.1) minitar (0.9) - minitest (5.17.0) + minitest (5.18.0) msgpack (1.6.0) multi_json (1.15.0) multi_xml (0.6.0) @@ -700,7 +673,7 @@ GEM nio4r (~> 2.0) raabro (1.4.0) racc (1.6.2) - rack (2.2.6.2) + rack (2.2.6.3) rack-cors (1.1.1) rack (>= 2.0.0) rack-protection (3.0.5) @@ -876,7 +849,7 @@ GEM json multipart-post oauth2 - ruby-progressbar (1.11.0) + ruby-progressbar (1.13.0) ruby-saml (1.15.0) nokogiri (>= 1.13.10) rexml @@ -917,7 +890,7 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) - slop (4.9.3) + slop (4.10.1) solr_wrapper (4.0.2) http minitar @@ -1023,7 +996,7 @@ PLATFORMS DEPENDENCIES about_page! - active-fedora! + active-fedora (~> 14.0, >= 14.0.1) active_annotations (~> 0.4) active_elastic_job active_encode (~> 1.0, >= 1.1.2) From 1e701cddb84071fe32023547c5efbe701779ee20 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Tue, 7 Mar 2023 18:21:38 -0500 Subject: [PATCH 080/107] Use released version of persona --- Gemfile | 3 +-- Gemfile.lock | 26 ++++++++++---------------- 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/Gemfile b/Gemfile index 5d1e5a49a7..011c43af1c 100644 --- a/Gemfile +++ b/Gemfile @@ -57,8 +57,7 @@ gem 'iiif_manifest', '~> 1.3' gem 'rack-cors', require: 'rack/cors' gem 'rails_same_site_cookie' gem 'recaptcha', require: 'recaptcha/rails' -#gem 'samvera-persona', '~> 0.3' -gem 'samvera-persona', git: "https://github.com/samvera-labs/samvera-persona.git", branch: "newer_rails" +gem 'samvera-persona', '~> 0.4', '>= 0.4.1' gem 'speedy-af', '~> 0.3' # Avalon Components diff --git a/Gemfile.lock b/Gemfile.lock index f77e9a2af0..ac03d2cddd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -73,18 +73,6 @@ GIT ims-lti omniauth -GIT - remote: https://github.com/samvera-labs/samvera-persona.git - revision: 044973c6f08f36c3cce5ff3014eb9d23938afdc7 - branch: newer_rails - specs: - samvera-persona (0.3.0) - devise (~> 4.6) - devise_invitable (>= 1.7, < 3.0) - paranoia (~> 2.2) - pretender - rails (>= 5.2.4.3, < 7.1) - GEM remote: https://rubygems.org/ specs: @@ -359,7 +347,7 @@ GEM deep_merge (1.2.2) deprecation (1.1.0) activesupport - devise (4.8.1) + devise (4.9.0) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) @@ -623,7 +611,7 @@ GEM noid-rails (3.1.0) actionpack (>= 5.0.0, < 7.1) noid (~> 0.9) - nokogiri (1.14.1) + nokogiri (1.14.2) mini_portile2 (~> 2.8.0) racc (~> 1.4) nom-xml (1.2.0) @@ -855,6 +843,12 @@ GEM rexml ruby2_keywords (0.0.5) rubyzip (1.3.0) + samvera-persona (0.4.1) + devise (~> 4.6) + devise_invitable (>= 1.7, < 3.0) + paranoia (~> 2.2) + pretender + rails (>= 5.2.4.3, < 7.1) sass (3.4.22) sassc (2.4.0) ffi (~> 1.9) @@ -932,7 +926,7 @@ GEM temple (0.10.0) thor (1.2.1) tilt (2.0.11) - timeout (0.3.1) + timeout (0.3.2) trailblazer-option (0.1.2) twitter-typeahead-rails (0.11.1.pre.corejavascript) actionpack (>= 3.1) @@ -1101,7 +1095,7 @@ DEPENDENCIES rspec-rails rspec-retry rspec_junit_formatter - samvera-persona! + samvera-persona (~> 0.4, >= 0.4.1) sass (= 3.4.22) selenium-webdriver shoulda-matchers From 71f32b737a909924391d66e85b2dec4405bc18ab Mon Sep 17 00:00:00 2001 From: Mason Ballengee Date: Mon, 6 Mar 2023 16:33:27 -0500 Subject: [PATCH 081/107] Add timeout to waveform ffmpeg process --- app/services/waveform_service.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/services/waveform_service.rb b/app/services/waveform_service.rb index 892dfb0bd4..d61f055567 100644 --- a/app/services/waveform_service.rb +++ b/app/services/waveform_service.rb @@ -1,11 +1,11 @@ # Copyright 2011-2022, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# +# # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the @@ -88,7 +88,8 @@ def get_normalized_peaks(uri) def get_wave_io(uri) headers = "-headers $'Referer: #{Rails.application.routes.url_helpers.root_url}\r\n'" if uri.starts_with? "http" normalized_uri = uri.starts_with?("file") ? Addressable::URI.unencode(uri) : uri - cmd = "#{Settings.ffmpeg.path} #{headers} -i '#{normalized_uri}' -f wav -ar 44100 - 2> /dev/null" + timeout = 3600000000 # Must be in microseconds. Current value = 1 hour. + cmd = "#{Settings.ffmpeg.path} #{headers} -rw_timeout #{timeout} -i '#{normalized_uri}' -f wav -ar 44100 - 2> /dev/null" IO.popen(cmd) end From 542f509cb2014ddea42e38162b8858e8b8499b01 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Fri, 10 Mar 2023 12:10:36 -0500 Subject: [PATCH 082/107] Upgrade to latest version of rails --- Gemfile | 2 +- Gemfile.lock | 108 +++++++++++++++++++++++++-------------------------- 2 files changed, 55 insertions(+), 55 deletions(-) diff --git a/Gemfile b/Gemfile index 011c43af1c..771145759e 100644 --- a/Gemfile +++ b/Gemfile @@ -5,7 +5,7 @@ gem 'bootsnap', require: false gem 'listen' gem 'net-smtp', require: false gem 'psych', '< 4' -gem 'rails', '=7.0.4.1' +gem 'rails', '=7.0.4.2' gem 'sprockets', '~>3.7.2' #gem 'sprockets-rails', require: 'sprockets/railtie' gem 'sqlite3' diff --git a/Gemfile.lock b/Gemfile.lock index ac03d2cddd..d49e7e2204 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -76,47 +76,47 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (7.0.4.1) - actionpack (= 7.0.4.1) - activesupport (= 7.0.4.1) + actioncable (7.0.4.2) + actionpack (= 7.0.4.2) + activesupport (= 7.0.4.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.4.1) - actionpack (= 7.0.4.1) - activejob (= 7.0.4.1) - activerecord (= 7.0.4.1) - activestorage (= 7.0.4.1) - activesupport (= 7.0.4.1) + actionmailbox (7.0.4.2) + actionpack (= 7.0.4.2) + activejob (= 7.0.4.2) + activerecord (= 7.0.4.2) + activestorage (= 7.0.4.2) + activesupport (= 7.0.4.2) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.4.1) - actionpack (= 7.0.4.1) - actionview (= 7.0.4.1) - activejob (= 7.0.4.1) - activesupport (= 7.0.4.1) + actionmailer (7.0.4.2) + actionpack (= 7.0.4.2) + actionview (= 7.0.4.2) + activejob (= 7.0.4.2) + activesupport (= 7.0.4.2) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.4.1) - actionview (= 7.0.4.1) - activesupport (= 7.0.4.1) + actionpack (7.0.4.2) + actionview (= 7.0.4.2) + activesupport (= 7.0.4.2) rack (~> 2.0, >= 2.2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.4.1) - actionpack (= 7.0.4.1) - activerecord (= 7.0.4.1) - activestorage (= 7.0.4.1) - activesupport (= 7.0.4.1) + actiontext (7.0.4.2) + actionpack (= 7.0.4.2) + activerecord (= 7.0.4.2) + activestorage (= 7.0.4.2) + activesupport (= 7.0.4.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.4.1) - activesupport (= 7.0.4.1) + actionview (7.0.4.2) + activesupport (= 7.0.4.2) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -153,8 +153,8 @@ GEM om (~> 3.1) rdf (~> 3.2) rdf-rdfxml (~> 3.2) - activejob (7.0.4.1) - activesupport (= 7.0.4.1) + activejob (7.0.4.2) + activesupport (= 7.0.4.2) globalid (>= 0.3.6) activejob-traffic_control (0.1.3) activejob (>= 4.2) @@ -163,25 +163,25 @@ GEM activejob-uniqueness (0.2.5) activejob (>= 4.2, < 7.1) redlock (>= 1.2, < 2) - activemodel (7.0.4.1) - activesupport (= 7.0.4.1) - activerecord (7.0.4.1) - activemodel (= 7.0.4.1) - activesupport (= 7.0.4.1) + activemodel (7.0.4.2) + activesupport (= 7.0.4.2) + activerecord (7.0.4.2) + activemodel (= 7.0.4.2) + activesupport (= 7.0.4.2) activerecord-session_store (2.0.0) actionpack (>= 5.2.4.1) activerecord (>= 5.2.4.1) multi_json (~> 1.11, >= 1.11.2) rack (>= 2.0.8, < 3) railties (>= 5.2.4.1) - activestorage (7.0.4.1) - actionpack (= 7.0.4.1) - activejob (= 7.0.4.1) - activerecord (= 7.0.4.1) - activesupport (= 7.0.4.1) + activestorage (7.0.4.2) + actionpack (= 7.0.4.2) + activejob (= 7.0.4.2) + activerecord (= 7.0.4.2) + activesupport (= 7.0.4.2) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.4.1) + activesupport (7.0.4.2) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -670,20 +670,20 @@ GEM rack rack-test (2.0.2) rack (>= 1.3) - rails (7.0.4.1) - actioncable (= 7.0.4.1) - actionmailbox (= 7.0.4.1) - actionmailer (= 7.0.4.1) - actionpack (= 7.0.4.1) - actiontext (= 7.0.4.1) - actionview (= 7.0.4.1) - activejob (= 7.0.4.1) - activemodel (= 7.0.4.1) - activerecord (= 7.0.4.1) - activestorage (= 7.0.4.1) - activesupport (= 7.0.4.1) + rails (7.0.4.2) + actioncable (= 7.0.4.2) + actionmailbox (= 7.0.4.2) + actionmailer (= 7.0.4.2) + actionpack (= 7.0.4.2) + actiontext (= 7.0.4.2) + actionview (= 7.0.4.2) + activejob (= 7.0.4.2) + activemodel (= 7.0.4.2) + activerecord (= 7.0.4.2) + activestorage (= 7.0.4.2) + activesupport (= 7.0.4.2) bundler (>= 1.15.0) - railties (= 7.0.4.1) + railties (= 7.0.4.2) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -696,9 +696,9 @@ GEM rails_same_site_cookie (0.1.9) rack (>= 1.5) user_agent_parser (~> 2.6) - railties (7.0.4.1) - actionpack (= 7.0.4.1) - activesupport (= 7.0.4.1) + railties (7.0.4.2) + actionpack (= 7.0.4.2) + activesupport (= 7.0.4.2) method_source rake (>= 12.2) thor (~> 1.0) @@ -1079,7 +1079,7 @@ DEPENDENCIES psych (< 4) puma (>= 4.3.8) rack-cors - rails (= 7.0.4.1) + rails (= 7.0.4.2) rails-controller-testing rails_same_site_cookie rb-readline From d1a7306fab5d7e5f90b4a9d2145bee242cf0054e Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Fri, 10 Mar 2023 12:16:17 -0500 Subject: [PATCH 083/107] Bump dependencies with security alerts --- yarn.lock | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/yarn.lock b/yarn.lock index 3715669b92..96d69931b4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3033,10 +3033,10 @@ dns-equal@^1.0.0: resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" integrity sha1-s55/HabrCnW6nBcySzR1PEfgZU0= -dns-packet@^5.2.2: - version "5.3.1" - resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-5.3.1.tgz#eb94413789daec0f0ebe2fcc230bdc9d7c91b43d" - integrity sha512-spBwIj0TK0Ey3666GwIdWVfUpLyubpU53BTCu8iPn4r4oXd9O14Hjg3EHw3ts2oed77/SeckunUYCyRlSngqHw== +dns-packet@^5.2.2, dns-packet@^5.4.0: + version "5.4.0" + resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-5.4.0.tgz#1f88477cf9f27e78a213fb6d118ae38e759a879b" + integrity sha512-EgqGeaBB8hLiHLZtp/IbaDQTL8pZ0+IvwzSHA6d7VyMDM+B9hgddEMa9xjK5oYnw0ci0JQ6g2XCD7/f6cafU6g== dependencies: "@leichtgewicht/ip-codec" "^2.0.1" @@ -4629,14 +4629,14 @@ jss@10.10.0, jss@^10.5.1: tiny-warning "^1.0.2" jszip@^3.7.1: - version "3.7.1" - resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.7.1.tgz#bd63401221c15625a1228c556ca8a68da6fda3d9" - integrity sha512-ghL0tz1XG9ZEmRMcEN2vt7xabrDdqHHeykgARpmZ0BiIctWxM47Vt63ZO2dnp4QYt/xJVLLy5Zv1l/xRdh2byg== + version "3.10.1" + resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.10.1.tgz#34aee70eb18ea1faec2f589208a157d1feb091c2" + integrity sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g== dependencies: lie "~3.3.0" pako "~1.0.2" readable-stream "~2.3.6" - set-immediate-shim "~1.0.1" + setimmediate "^1.0.5" keycode@^2.2.0: version "2.2.0" @@ -7141,11 +7141,6 @@ set-blocking@^2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= -set-immediate-shim@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" - integrity sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E= - set-value@^2.0.0, set-value@^2.0.1, set-value@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/set-value/-/set-value-4.1.0.tgz#aa433662d87081b75ad88a4743bd450f044e7d09" @@ -7154,10 +7149,10 @@ set-value@^2.0.0, set-value@^2.0.1, set-value@^4.1.0: is-plain-object "^2.0.4" is-primitive "^3.0.1" -setimmediate@^1.0.4: +setimmediate@^1.0.4, setimmediate@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= + integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== setprototypeof@1.1.0: version "1.1.0" From 7284e79fa6289185c45b4f70cad069ef195dd73f Mon Sep 17 00:00:00 2001 From: Mason Ballengee Date: Fri, 10 Mar 2023 12:25:58 -0500 Subject: [PATCH 084/107] Fix waveform service tests --- spec/services/waveform_service_spec.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/spec/services/waveform_service_spec.rb b/spec/services/waveform_service_spec.rb index 20e867eae1..74f9752822 100644 --- a/spec/services/waveform_service_spec.rb +++ b/spec/services/waveform_service_spec.rb @@ -1,11 +1,11 @@ # Copyright 2011-2022, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# +# # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the @@ -31,7 +31,7 @@ context "s3 file" do let(:uri) { Addressable::URI.parse("s3://path/to/video.mp4") } let(:tmpfile) { Tempfile.new } - + before do allow(Tempfile).to receive(:new).and_return tmpfile end @@ -67,7 +67,7 @@ context "http file" do let(:uri) { "http://domain/to/video.mp4" } - let(:cmd) {"#{Settings.ffmpeg.path} -headers $'Referer: http://test.host/\r\n' -i '#{uri}' -f wav -ar 44100 - 2> /dev/null"} + let(:cmd) {"#{Settings.ffmpeg.path} -headers $'Referer: http://test.host/\r\n' -rw_timeout 3600000000 -i '#{uri}' -f wav -ar 44100 - 2> /dev/null"} it "should call ffmpeg with headers" do service.send(:get_wave_io, uri) @@ -77,7 +77,7 @@ context "local file" do let(:uri) { "file:///path/to/video.mp4" } - let(:cmd) {"#{Settings.ffmpeg.path} -i '#{uri}' -f wav -ar 44100 - 2> /dev/null"} + let(:cmd) {"#{Settings.ffmpeg.path} -rw_timeout 3600000000 -i '#{uri}' -f wav -ar 44100 - 2> /dev/null"} it "should call ffmpeg without headers" do service.send(:get_wave_io, uri) @@ -87,7 +87,7 @@ context 'with spaces in filename' do let(:uri) { 'file:///path/to/special%20video%20file.mp4' } let(:unencoded_uri) { 'file:///path/to/special video file.mp4' } - let(:cmd) {"#{Settings.ffmpeg.path} -i '#{unencoded_uri}' -f wav -ar 44100 - 2> /dev/null"} + let(:cmd) {"#{Settings.ffmpeg.path} -rw_timeout 3600000000 -i '#{unencoded_uri}' -f wav -ar 44100 - 2> /dev/null"} it "should call ffmpeg without url encoding" do service.send(:get_wave_io, uri) From 149f78f3469ff3a9f18147a9ebac658e5d1b243b Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Fri, 10 Mar 2023 16:58:49 -0500 Subject: [PATCH 085/107] Use defaults and convenience methods in proxy to avoid reindexing to add new fields Co-authored-by: Mason Ballengee --- app/models/derivative.rb | 3 --- app/presenters/speedy_af/proxy/derivative.rb | 21 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 app/presenters/speedy_af/proxy/derivative.rb diff --git a/app/models/derivative.rb b/app/models/derivative.rb index dffec3a721..07aee182e1 100644 --- a/app/models/derivative.rb +++ b/app/models/derivative.rb @@ -87,9 +87,6 @@ def absolute_location=(value) def to_solr super.tap do |solr_doc| - solr_doc['format_ss'] = self.format - solr_doc['mime_type_ss'] = self.mime_type.nil? ? "Nil" : self.mime_type - solr_doc['bitrate_is'] = self.bitrate solr_doc['stream_path_ssi'] = if location_url&.start_with?("rtmp") location_url.split(/:/).last else diff --git a/app/presenters/speedy_af/proxy/derivative.rb b/app/presenters/speedy_af/proxy/derivative.rb new file mode 100644 index 0000000000..4307b48a19 --- /dev/null +++ b/app/presenters/speedy_af/proxy/derivative.rb @@ -0,0 +1,21 @@ +# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# University. Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# --- END LICENSE_HEADER BLOCK --- + +class SpeedyAF::Proxy::Derivative < SpeedyAF::Base + self.defaults = { video_bitrate: 0, video_codec: nil, mime_type: nil } + + def bitrate + audio_bitrate.to_i + video_bitrate.to_i + end +end From 35a5655894503ced05468382b1652155ecc6f7bd Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Mon, 13 Mar 2023 10:18:13 -0400 Subject: [PATCH 086/107] Set id/uri translation lambdas for ActiveFedora::File since AF doesn't do it anymore --- config/initializers/active_fedora_general.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/initializers/active_fedora_general.rb b/config/initializers/active_fedora_general.rb index dbbbf09274..933d8aed38 100644 --- a/config/initializers/active_fedora_general.rb +++ b/config/initializers/active_fedora_general.rb @@ -8,6 +8,12 @@ end ActiveFedora::Base.logger = Rails.logger +# ActiveFedora 14.x+ does not set these by default for some reason so need to set them here +# Without these set AF::File subclasses like StructuralMetadata will include the btree in their ids +# (e.g. ab/cd/ef/gh/abcdefghi/structuralMetadata) which messes up SpeedyAF (and probably other things) +ActiveFedora::File.translate_uri_to_id = ActiveFedora::Base.translate_uri_to_id +ActiveFedora::File.translate_id_to_uri = ActiveFedora::Base.translate_id_to_uri + # ActiveModel::Dirty's internals were substantially rewritten in Rails 6 making the following monkey-patch potentially unnecessary. # We will need to test this throroughly to ensure it is safe to remove. # From ca5cb72aecc001a456c5c35dbd9eefe3fabf8e9d Mon Sep 17 00:00:00 2001 From: Mason Ballengee Date: Mon, 13 Mar 2023 11:35:19 -0400 Subject: [PATCH 087/107] Add derivative presenter tests --- app/presenters/speedy_af/proxy/derivative.rb | 8 ++-- .../speedy_af/proxy/derivative_spec.rb | 43 +++++++++++++++++++ 2 files changed, 47 insertions(+), 4 deletions(-) create mode 100644 spec/presenters/speedy_af/proxy/derivative_spec.rb diff --git a/app/presenters/speedy_af/proxy/derivative.rb b/app/presenters/speedy_af/proxy/derivative.rb index 4307b48a19..cc15dc6599 100644 --- a/app/presenters/speedy_af/proxy/derivative.rb +++ b/app/presenters/speedy_af/proxy/derivative.rb @@ -1,11 +1,11 @@ # Copyright 2011-2022, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# +# # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the @@ -13,7 +13,7 @@ # --- END LICENSE_HEADER BLOCK --- class SpeedyAF::Proxy::Derivative < SpeedyAF::Base - self.defaults = { video_bitrate: 0, video_codec: nil, mime_type: nil } + self.defaults = { video_bitrate: nil, video_codec: nil, mime_type: nil } def bitrate audio_bitrate.to_i + video_bitrate.to_i diff --git a/spec/presenters/speedy_af/proxy/derivative_spec.rb b/spec/presenters/speedy_af/proxy/derivative_spec.rb new file mode 100644 index 0000000000..3c82c7d95a --- /dev/null +++ b/spec/presenters/speedy_af/proxy/derivative_spec.rb @@ -0,0 +1,43 @@ +# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# University. Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# --- END LICENSE_HEADER BLOCK --- + +require 'rails_helper' + +describe SpeedyAF::Proxy::Derivative do + let(:derivative) { FactoryBot.create(:derivative) } + before(:each) do + derivative.video_codec = nil + derivative.video_bitrate = nil + derivative.mime_type = nil + derivative.save + end + subject(:presenter) { described_class.find(derivative.id) } + + describe "#defaults" do + it "sets video_bitrate to nil" do + expect(subject.inspect).to include("video_bitrate") + expect(subject.video_bitrate).to be_nil + end + + it "sets video_codec to nil" do + expect(subject.inspect).to include("video_codec") + expect(subject.video_codec).to be_nil + end + + it "sets mime_type to nil" do + expect(subject.inspect).to include("mime_type") + expect(subject.mime_type).to be_nil + end + end +end From 04a8336716ac6a6ac8349d9c926a09263ea776f4 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Mon, 13 Mar 2023 17:08:23 -0400 Subject: [PATCH 088/107] Enqueue media object indexing job when media object and child master files are reindexed --- app/models/master_file.rb | 1 + app/models/media_object.rb | 8 ++++++-- spec/models/master_file_spec.rb | 15 +++++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/app/models/master_file.rb b/app/models/master_file.rb index 7f0f570b3e..00d5cb1bae 100644 --- a/app/models/master_file.rb +++ b/app/models/master_file.rb @@ -165,6 +165,7 @@ def error before_destroy :stop_processing! before_destroy :update_parent! define_hooks :after_transcoding, :after_processing + after_update_index { |mf| mf.media_object&.enqueue_long_indexing } # Generate the waveform after proessing is complete but before master file management after_transcoding :generate_waveform diff --git a/app/models/media_object.rb b/app/models/media_object.rb index 4154f42a09..544afd69b2 100644 --- a/app/models/media_object.rb +++ b/app/models/media_object.rb @@ -37,6 +37,7 @@ class MediaObject < ActiveFedora::Base before_save :assign_id!, prepend: true after_save :update_dependent_permalinks_job, if: Proc.new { |mo| mo.persisted? && mo.published? } after_save :remove_bookmarks + after_update_index :enqueue_long_indexing # Call custom validation methods to ensure that required fields are present and # that preferred controlled vocabulary standards are used @@ -239,6 +240,11 @@ def fill_in_solr_fields_that_need_master_files(solr_doc) solr_doc['all_comments_sim'] = all_comments end + # Enqueue background job to do a full indexing including more costly fields that read from children + def enqueue_long_indexing + MediaObjectIndexingJob.perform_later(id) + end + def to_solr(include_child_fields: false) descMetadata.to_solr(super).tap do |solr_doc| solr_doc[ActiveFedora.index_field_mapper.solr_name("workflow_published", :facetable, type: :string)] = published? ? 'Published' : 'Unpublished' @@ -259,8 +265,6 @@ def to_solr(include_child_fields: false) # Fill in other identifier so these values aren't stripped from the solr doc while waiting for the background job mf_docs = ActiveFedora::SolrService.query("isPartOf_ssim:#{id}", rows: 1_000_000) solr_doc["other_identifier_sim"] += mf_docs.collect { |h| h['identifier_ssim'] }.flatten - # Enqueue background job to do a full indexing including more costly fields that read from children - MediaObjectIndexingJob.perform_later(id) end #Add all searchable fields to the all_text_timv field diff --git a/spec/models/master_file_spec.rb b/spec/models/master_file_spec.rb index 657a2b3535..53663a4247 100644 --- a/spec/models/master_file_spec.rb +++ b/spec/models/master_file_spec.rb @@ -836,4 +836,19 @@ end end end + + describe 'indexing' do + let(:master_file) { FactoryBot.build(:master_file, :with_media_object) } + + before do + # Force creation of master_file and then clear queue of byproduct jobs + master_file + ActiveJob::Base.queue_adapter.enqueued_jobs.clear + end + + it 'enqueues indexing of parent media object' do + master_file.update_index + expect(MediaObjectIndexingJob).to have_been_enqueued.with(master_file.media_object.id) + end + end end From 4d5f5c9d73216320fddd55938119a2b3bc4986b2 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Tue, 14 Mar 2023 13:29:24 -0400 Subject: [PATCH 089/107] Strip out childless paths from structural metadata to ensure valid manifest --- app/models/iiif_canvas_presenter.rb | 12 ++++- spec/models/iiif_canvas_presenter_spec.rb | 58 +++++++++++++++++++++++ 2 files changed, 68 insertions(+), 2 deletions(-) diff --git a/app/models/iiif_canvas_presenter.rb b/app/models/iiif_canvas_presenter.rb index 1fead28830..2306ea28f6 100644 --- a/app/models/iiif_canvas_presenter.rb +++ b/app/models/iiif_canvas_presenter.rb @@ -83,10 +83,10 @@ def stream_urls end end - def simple_iiif_range + def simple_iiif_range(label = stream_info[:embed_title]) # TODO: embed_title? IiifManifestRange.new( - label: { "none" => [stream_info[:embed_title]] }, + label: { "none" => [label] }, items: [ IiifCanvasPresenter.new(master_file: master_file, stream_info: stream_info, media_fragment: 't=0,') ] @@ -94,6 +94,14 @@ def simple_iiif_range end def structure_to_iiif_range + # Remove all "Div" nodes which do not have a "Span" descendant to ensure a valid manifest. + # According the to IIIF presentation 3 spec each Range needs to have a descendant that is a Canvas. + # See https://iiif.io/api/presentation/3.0/#34-structural-properties + structure_ng_xml.root.xpath("//*[local-name() = 'Div' and not(descendant::*[local-name() = 'Span'])]").map(&:remove) + + # Return default range if nothing valid is left + return simple_iiif_range(structure_ng_xml.root.attr('label')) if structure_ng_xml.root.children.all?(&:blank?) + div_to_iiif_range(structure_ng_xml.root) end diff --git a/spec/models/iiif_canvas_presenter_spec.rb b/spec/models/iiif_canvas_presenter_spec.rb index b84452338d..164d143948 100644 --- a/spec/models/iiif_canvas_presenter_spec.rb +++ b/spec/models/iiif_canvas_presenter_spec.rb @@ -56,4 +56,62 @@ end end end + + describe '#range' do + let(:structure_xml) { '
' } + + subject { presenter.range } + + before do + master_file.structuralMetadata.content = structure_xml + end + + it 'converts stored xml into IIIF ranges' do + expect(subject.label.to_s).to eq '{"none"=>["Test"]}' + expect(subject.items.size).to eq 1 + expect(subject.items.first.label.to_s).to eq '{"none"=>["Div 1"]}' + expect(subject.items.first.items.size).to eq 1 + expect(subject.items.first.items.first.label.to_s).to eq '{"none"=>["Span 1"]}' + expect(subject.items.first.items.first.items.size).to eq 1 + expect(subject.items.first.items.first.items.first).to be_a IiifCanvasPresenter + expect(subject.items.first.items.first.items.first.media_fragment).to eq 't=0.0,1.235' + end + + context 'with no structural metadata' do + let(:structure_xml) { "" } + + it 'autogenerates a basic range' do + expect(subject.label.to_s).to eq "{\"none\"=>[\"#{master_file.embed_title}\"]}" + expect(subject.items.size).to eq 1 + expect(subject.items.first).to be_a IiifCanvasPresenter + expect(subject.items.first.media_fragment).to eq 't=0,' + end + end + + context 'with invalid structural metadata' do + let(:structure_xml) { '
' } + + it 'removes ranges without descendant canvases' do + expect(subject.label.to_s).to eq '{"none"=>["Test"]}' + expect(subject.items.size).to eq 1 + expect(subject.items.first.label.to_s).to eq '{"none"=>["Div 1"]}' + expect(subject.items.first.items.size).to eq 1 + expect(subject.items.first.items.first.label.to_s).to eq '{"none"=>["Span 1"]}' + expect(subject.items.first.items.first.items.size).to eq 1 + expect(subject.items.first.items.first.items.first).to be_a IiifCanvasPresenter + expect(subject.items.first.items.first.items.first.media_fragment).to eq 't=0.0,1.235' + end + + context 'when there are no valid ranges' do + let(:structure_xml) { '
' } + + it 'autogenerates a basic range but preserves the root level label' do + expect(subject.label.to_s).to eq '{"none"=>["Test"]}' + expect(subject.items.size).to eq 1 + expect(subject.items.first).to be_a IiifCanvasPresenter + expect(subject.items.first.media_fragment).to eq 't=0,' + end + end + end + end end From 64ba6798fce02632794b989167d3d8418389f7b1 Mon Sep 17 00:00:00 2001 From: dananji Date: Tue, 14 Mar 2023 15:05:10 -0400 Subject: [PATCH 090/107] New SME build with bug fixes --- yarn.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/yarn.lock b/yarn.lock index 96d69931b4..0e2c6a24cc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3033,7 +3033,7 @@ dns-equal@^1.0.0: resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" integrity sha1-s55/HabrCnW6nBcySzR1PEfgZU0= -dns-packet@^5.2.2, dns-packet@^5.4.0: +dns-packet@^5.2.2: version "5.4.0" resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-5.4.0.tgz#1f88477cf9f27e78a213fb6d118ae38e759a879b" integrity sha512-EgqGeaBB8hLiHLZtp/IbaDQTL8pZ0+IvwzSHA6d7VyMDM+B9hgddEMa9xjK5oYnw0ci0JQ6g2XCD7/f6cafU6g== @@ -3869,9 +3869,9 @@ hex-color-regex@^1.1.0: integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ== hls.js@^1.1.2: - version "1.3.3" - resolved "https://registry.yarnpkg.com/hls.js/-/hls.js-1.3.3.tgz#834db077b5aa9d9b31d13e01c5dce4153b5e3214" - integrity sha512-4Efu6g90HfFGDuQrkquhDoRpA/4iVpSMcfK9zguJ2qXEUfo5VknZt6rziwwFPHmC2DU3crZ0NtPD0eUqOhFyqg== + version "1.3.4" + resolved "https://registry.yarnpkg.com/hls.js/-/hls.js-1.3.4.tgz#8212a3f95c3321f64a586f20e67876f3a9d09488" + integrity sha512-iFEwVqtEDk6sKotcTwtJ5OMo/nuDTk9PrpB8FI2J2WYf8EriTVfR4FaK0aNyYtwbYeRSWCXJKlz23xeREdlNYg== "hls.js@https://github.com/avalonmediasystem/hls.js#stricter_ts_probing": version "0.13.1" @@ -6604,7 +6604,7 @@ react-redux@^7.2.6: "react-structural-metadata-editor@https://github.com/avalonmediasystem/react-structural-metadata-editor": version "1.1.0" - resolved "https://github.com/avalonmediasystem/react-structural-metadata-editor#ca1ed572f3104e6043e4b8fc60bf67f6a75259cd" + resolved "https://github.com/avalonmediasystem/react-structural-metadata-editor#c29229daf1b2efe398f55cb8dfc0c603bdd6441d" dependencies: "@babel/runtime" "^7.4.4" "@fortawesome/fontawesome-svg-core" "^1.2.4" From 2c1fab30eb367abb014761f3cc8ce16373f79a18 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Tue, 14 Mar 2023 15:17:04 -0400 Subject: [PATCH 091/107] Bump version for release --- config/application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/application.rb b/config/application.rb index 63e91c4dbc..3328dce071 100644 --- a/config/application.rb +++ b/config/application.rb @@ -8,7 +8,7 @@ Bundler.require(*Rails.groups) module Avalon - VERSION = '7.5.1' + VERSION = '7.6.0' class Application < Rails::Application require 'avalon/configuration' From c32cc5f668f1b49fa5f62f30decf61c29b3bb780 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Tue, 14 Mar 2023 15:25:19 -0400 Subject: [PATCH 092/107] Use tagged versions of forked dependencies --- Gemfile | 6 +++--- Gemfile.lock | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Gemfile b/Gemfile index 771145759e..850f7d3aa1 100644 --- a/Gemfile +++ b/Gemfile @@ -34,7 +34,7 @@ gem 'active_fedora-datastreams', '~> 0.5' gem 'hydra-head', '~> 12.0' gem 'ldp', '~> 1.1.0' gem 'noid-rails', '~> 3.1' -gem 'om', git: 'https://github.com/avalonmediasystem/om.git', branch: 'ruby3' +gem 'om', git: 'https://github.com/avalonmediasystem/om.git', tag: 'v3.2.0-ruby3' gem 'rdf-rdfxml' # Samvera version pins @@ -76,10 +76,10 @@ gem "omniauth-saml", "~> 2.0" # Media Access & Transcoding gem 'active_encode', '~> 1.0', '>= 1.1.2' gem 'audio_waveform-ruby', '~> 1.0.7', require: 'audio_waveform' -gem 'browse-everything', git: "https://github.com/avalonmediasystem/browse-everything.git", branch: 'v1.2-avalon' +gem 'browse-everything', git: "https://github.com/avalonmediasystem/browse-everything.git", tag: 'v1.2.0-avalon' gem 'fastimage' gem 'media_element_add_to_playlist', git: 'https://github.com/avalonmediasystem/media-element-add-to-playlist.git', tag: 'avalon-r6.5' -gem 'mediainfo', git: "https://github.com/avalonmediasystem/mediainfo.git", branch: 'rails6.1' +gem 'mediainfo', git: "https://github.com/avalonmediasystem/mediainfo.git", tag: 'v0.7.1-avalon' gem 'rest-client', '~> 2.0' gem 'roo' gem 'wavefile', '~> 1.0.1' diff --git a/Gemfile.lock b/Gemfile.lock index d49e7e2204..49a1818912 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -25,7 +25,7 @@ GIT GIT remote: https://github.com/avalonmediasystem/browse-everything.git revision: 38610d19d36105ca9c311e0a641fdb43697fabea - branch: v1.2-avalon + tag: v1.2.0-avalon specs: browse-everything (1.2.0) addressable (~> 2.5) @@ -49,14 +49,14 @@ GIT GIT remote: https://github.com/avalonmediasystem/mediainfo.git revision: bea9479d33328c6b483ee19c008730f939d98266 - branch: rails6.1 + tag: v0.7.1-avalon specs: mediainfo (0.7.1) GIT remote: https://github.com/avalonmediasystem/om.git revision: ffde890b4187a7d8be41ae387264cd6eb20b6ba8 - branch: ruby3 + tag: v3.2.0-ruby3 specs: om (3.2.0) activemodel (>= 5.1) @@ -457,8 +457,8 @@ GEM retriable (>= 2.0, < 4.a) rexml webrick - google-apis-drive_v3 (0.33.0) - google-apis-core (>= 0.9.1, < 2.a) + google-apis-drive_v3 (0.37.0) + google-apis-core (>= 0.11.0, < 2.a) googleauth (1.3.0) faraday (>= 0.17.3, < 3.a) jwt (>= 1.4, < 3.0) From 297545d0b0b26262190863b52ceddbcdf78bee32 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Tue, 14 Mar 2023 16:06:07 -0400 Subject: [PATCH 093/107] Update license header and add to files missing it --- LICENSE_HEADER | 12 ++++++++++++ .../javascripts/access_control_step.js.coffee | 2 +- app/assets/javascripts/android_pre_play.js | 2 +- app/assets/javascripts/application.js | 2 +- app/assets/javascripts/autocomplete.js.coffee | 2 +- app/assets/javascripts/avalon.js | 2 +- .../avalon_playlists/playlist_items.js | 2 +- .../avalon_playlists/playlists.js.coffee | 2 +- app/assets/javascripts/avalon_progress.js.coffee | 2 +- .../avalon_timelines/timelines.js.coffee | 2 +- app/assets/javascripts/blacklight/facet_load.js | 2 +- .../javascripts/button_confirmation.js.coffee | 8 ++++---- app/assets/javascripts/crop_upload.js | 2 +- app/assets/javascripts/datatables.js | 2 +- app/assets/javascripts/direct_upload.js.coffee | 2 +- app/assets/javascripts/display_returned_items.js | 10 +++++----- app/assets/javascripts/dynamic_fields.js.coffee | 2 +- app/assets/javascripts/expand_filename.js | 16 ++++++++++++++++ app/assets/javascripts/file_browse.js.coffee | 2 +- .../javascripts/file_upload_step.js.coffee | 2 +- app/assets/javascripts/fix_console.js | 2 +- app/assets/javascripts/hydra/hydra-head.js | 2 +- app/assets/javascripts/import_button.js.coffee | 2 +- .../input_form_attribute_support.js.coffee | 2 +- app/assets/javascripts/intercom_push.js | 2 +- app/assets/javascripts/localize_times.js | 16 ++++++++++++++++ app/assets/javascripts/mejs4_player.js | 2 +- app/assets/javascripts/modernizr.js | 2 +- app/assets/javascripts/move_section.js | 2 +- app/assets/javascripts/pop_help.js.coffee | 2 +- .../javascripts/popovers_and_tooltips.js.coffee | 2 +- app/assets/javascripts/refresh_token.js.coffee | 2 +- app/assets/javascripts/select_all.js.coffee | 2 +- app/assets/javascripts/sessions_new.js | 2 +- app/assets/javascripts/sort_streams.js | 2 +- app/assets/javascripts/supplemental_files.js | 2 +- app/assets/stylesheets/admin.scss | 2 +- app/assets/stylesheets/application.scss | 2 +- app/assets/stylesheets/avalon.scss | 10 +++++----- app/assets/stylesheets/avalon/_accordions.scss | 2 +- app/assets/stylesheets/avalon/_buttons.scss | 2 +- app/assets/stylesheets/avalon/_collections.scss | 2 +- app/assets/stylesheets/avalon/_facets.scss | 2 +- app/assets/stylesheets/avalon/_footer.scss | 2 +- app/assets/stylesheets/avalon/_form.scss | 2 +- app/assets/stylesheets/avalon/_header.scss | 2 +- app/assets/stylesheets/avalon/_homepage.scss | 2 +- .../stylesheets/avalon/_loading-spinner.scss | 2 +- app/assets/stylesheets/avalon/_mediaelement.scss | 2 +- app/assets/stylesheets/avalon/_mixins.scss | 2 +- app/assets/stylesheets/avalon/_modals.scss | 2 +- app/assets/stylesheets/avalon/_nav.scss | 2 +- app/assets/stylesheets/avalon/_playlists.scss | 2 +- app/assets/stylesheets/avalon/_timeliner.scss | 2 +- app/assets/stylesheets/blacklight.scss | 2 +- .../stylesheets/blacklight_themes/avalon.scss | 2 +- app/assets/stylesheets/branding.scss | 2 +- app/assets/stylesheets/datatables.scss | 2 +- app/assets/stylesheets/embed.scss | 2 +- .../mejs4/mediaelement-common-styles.scss | 2 +- .../stylesheets/mejs4/mejs4_link_back.scss | 2 +- .../mejs4_plugin_add_marker_to_playlist.scss | 2 +- .../mejs4/mejs4_plugin_add_to_playlist.scss | 2 +- .../mejs4/mejs4_plugin_create_thumbnail.scss | 2 +- .../mejs4/mejs4_plugin_track_scrubber.scss | 2 +- app/assets/stylesheets/mejs4_player.scss | 2 +- app/assets/stylesheets/nestable.scss | 2 +- app/controllers/admin/collections_controller.rb | 8 ++++---- app/controllers/admin/groups_controller.rb | 2 +- app/controllers/application_controller.rb | 8 ++++---- app/controllers/auth_forms_controller.rb | 2 +- app/controllers/avalon_marker_controller.rb | 2 +- app/controllers/bookmarks_controller.rb | 2 +- app/controllers/catalog_controller.rb | 2 +- app/controllers/checkouts_controller.rb | 14 ++++++++++++++ app/controllers/collections_controller.rb | 2 +- app/controllers/comments_controller.rb | 8 ++++---- .../concerns/blacklight_helper_reload_fix.rb | 2 +- app/controllers/concerns/conditional_partials.rb | 2 +- app/controllers/derivatives_controller.rb | 8 ++++---- app/controllers/dropbox_controller.rb | 2 +- app/controllers/encode_records_controller.rb | 2 +- app/controllers/master_files_controller.rb | 8 ++++---- app/controllers/media_objects_controller.rb | 8 ++++---- app/controllers/objects_controller.rb | 2 +- app/controllers/playlist_items_controller.rb | 2 +- app/controllers/playlists_controller.rb | 8 ++++---- .../samvera/persona/users_controller.rb | 8 ++++---- app/controllers/supplemental_files_controller.rb | 2 +- app/controllers/timelines_controller.rb | 8 ++++---- .../users/omniauth_callbacks_controller.rb | 8 ++++---- app/controllers/users/sessions_controller.rb | 2 +- app/controllers/vocabulary_controller.rb | 8 ++++---- app/helpers/application_helper.rb | 2 +- .../blacklight/local_blacklight_helper.rb | 2 +- app/helpers/catalog_helper.rb | 2 +- app/helpers/cdl_helper.rb | 8 ++++---- app/helpers/conditional_partials_helper.rb | 2 +- app/helpers/media_objects_helper.rb | 2 +- app/helpers/player_helper.rb | 2 +- app/helpers/playlists_helper.rb | 2 +- app/helpers/security_helper.rb | 8 ++++---- app/helpers/timelines_helper.rb | 2 +- app/helpers/upload_form_helper.rb | 2 +- app/javascript/components/CollectionCarousel.js | 2 +- app/javascript/components/CollectionDetails.js | 10 +++++----- app/javascript/components/CollectionList.js | 2 +- .../components/ReactButtonContainer.scss | 2 +- app/javascript/components/Search.js | 2 +- app/javascript/components/collection_index.html | 2 +- app/javascript/components/collection_index.js | 2 +- app/javascript/components/collection_view.html | 2 +- app/javascript/components/collection_view.js | 2 +- .../components/collections/Collection.scss | 10 +++++----- .../components/collections/CollectionCardBody.js | 2 +- .../collections/CollectionCardShell.js | 2 +- .../collections/CollectionCardThumbnail.js | 2 +- .../collections/CollectionsFilterNoResults.js | 2 +- .../collections/landing/FacetBadges.js | 2 +- .../components/collections/landing/FacetPanel.js | 2 +- .../components/collections/landing/Facets.js | 2 +- .../components/collections/landing/Pagination.js | 2 +- .../collections/landing/SearchResults.js | 2 +- .../collections/landing/SearchResultsCard.js | 10 +++++----- .../list/ButtonCollectionListShowAll.js | 2 +- .../collections/list/CollectionCard.js | 2 +- .../list/CollectionListStickyUtils.js | 2 +- .../collections/list/CollectionsSortedByAZ.js | 2 +- .../collections/list/CollectionsSortedByUnit.js | 2 +- .../components/collections/list/Unit.js | 2 +- app/javascript/components/ui/LoadingSpinner.js | 2 +- app/javascript/iiif-timeliner-styles.css | 2 +- app/javascript/packs/application.js | 2 +- app/javascript/packs/iiif-timeliner.js | 2 +- app/javascript/packs/server_rendering.js | 2 +- app/javascript/services.js | 2 +- app/jobs/active_encode_jobs.rb | 2 +- app/jobs/application_job.rb | 14 ++++++++++++++ app/jobs/batch_ingest_job.rb | 2 +- app/jobs/batch_scan_job.rb | 2 +- app/jobs/bulk_action_jobs.rb | 8 ++++---- app/jobs/cleanup_session_job.rb | 2 +- app/jobs/cleanup_working_file_job.rb | 2 +- app/jobs/delete_course_job.rb | 2 +- app/jobs/delete_derivative_job.rb | 2 +- app/jobs/delete_dropbox_job.rb | 2 +- app/jobs/delete_old_searches_job.rb | 2 +- app/jobs/extract_still_job.rb | 2 +- app/jobs/ingest_batch_entry_job.rb | 2 +- app/jobs/ingest_batch_status_email_jobs.rb | 2 +- app/jobs/master_file_management_jobs.rb | 2 +- app/jobs/media_object_indexing_job.rb | 9 +++++---- app/jobs/reindex_job.rb | 2 +- app/jobs/s3_split_job.rb | 2 +- app/jobs/solr_backup_job.rb | 2 +- app/jobs/update_dependent_permalinks_job.rb | 2 +- app/jobs/waveform_job.rb | 2 +- app/mailers/application_mailer.rb | 2 +- app/mailers/batch_registries_mailer.rb | 2 +- app/mailers/comments_mailer.rb | 8 ++++---- app/mailers/ingest_batch_mailer.rb | 2 +- app/mailers/notifications_mailer.rb | 2 +- app/models/ability.rb | 8 ++++---- app/models/access_control_step.rb | 8 ++++---- app/models/admin/collection.rb | 8 ++++---- app/models/admin/group.rb | 2 +- app/models/api_token.rb | 2 +- app/models/application_record.rb | 2 +- app/models/avalon/rdf_vocab.rb | 8 ++++---- app/models/avalon_annotation.rb | 2 +- app/models/avalon_clip.rb | 2 +- app/models/avalon_marker.rb | 2 +- app/models/batch_entries.rb | 2 +- app/models/batch_registries.rb | 2 +- app/models/checkout.rb | 14 ++++++++++++++ app/models/collection_search_builder.rb | 2 +- app/models/comment.rb | 8 ++++---- app/models/concerns/derivative_behavior.rb | 2 +- app/models/concerns/derivative_intercom.rb | 2 +- app/models/concerns/frame_size.rb | 2 +- app/models/concerns/hidden.rb | 2 +- app/models/concerns/identifier.rb | 2 +- app/models/concerns/master_file_behavior.rb | 2 +- app/models/concerns/master_file_intercom.rb | 2 +- app/models/concerns/media_object_intercom.rb | 2 +- app/models/concerns/media_object_mods.rb | 2 +- app/models/concerns/migration_target.rb | 2 +- app/models/concerns/permalink.rb | 2 +- .../concerns/supplemental_file_behavior.rb | 2 +- app/models/concerns/virtual_groups.rb | 2 +- app/models/course.rb | 2 +- app/models/derivative.rb | 8 ++++---- app/models/external_group.rb | 2 +- app/models/ffmpeg_encode.rb | 2 +- app/models/file_upload_step.rb | 2 +- app/models/identity.rb | 2 +- app/models/iiif_canvas_presenter.rb | 8 ++++---- app/models/iiif_manifest_presenter.rb | 2 +- app/models/iiif_manifest_range.rb | 2 +- app/models/indexed_file.rb | 2 +- app/models/ingest_batch.rb | 2 +- app/models/language_term.rb | 2 +- app/models/lease.rb | 2 +- app/models/master_file.rb | 2 +- app/models/media_object.rb | 8 ++++---- app/models/migration_status.rb | 2 +- app/models/mods_behaviors.rb | 2 +- app/models/mods_document.rb | 2 +- app/models/mods_templates.rb | 2 +- app/models/pass_through_encode.rb | 2 +- app/models/playlist.rb | 2 +- app/models/playlist_item.rb | 2 +- app/models/preview_step.rb | 2 +- app/models/resource_description_step.rb | 2 +- app/models/role_map.rb | 2 +- app/models/search_builder.rb | 8 ++++---- app/models/security_handler.rb | 2 +- app/models/solr_document.rb | 2 +- app/models/stream_token.rb | 8 ++++---- app/models/structural_metadata.rb | 2 +- app/models/structure_step.rb | 2 +- app/models/supplemental_file.rb | 2 +- app/models/timeline.rb | 2 +- app/models/user.rb | 8 ++++---- app/models/watched_encode.rb | 2 +- app/presenters/admin/collection_presenter.rb | 2 +- app/presenters/collection_presenter.rb | 2 +- app/presenters/encode_presenter.rb | 2 +- .../speedy_af/proxy/admin/collection.rb | 2 +- app/presenters/speedy_af/proxy/derivative.rb | 8 ++++---- app/presenters/speedy_af/proxy/master_file.rb | 2 +- app/presenters/speedy_af/proxy/media_object.rb | 2 +- .../speedy_af/proxy/structural_metadata.rb | 2 +- app/services/file_locator.rb | 8 ++++---- app/services/master_file_builder.rb | 8 ++++---- app/services/security_service.rb | 8 ++++---- app/services/solr_collection_admin.rb | 2 +- app/services/solr_collection_creator.rb | 2 +- app/services/waveform_service.rb | 8 ++++---- app/validators/array_inclusion_validator.rb | 2 +- app/validators/uniqueness_validator.rb | 2 +- app/views/_user_util_links.html.erb | 2 +- .../collections/_apply_access_control.html.erb | 2 +- app/views/admin/collections/_form.html.erb | 2 +- app/views/admin/collections/index.html.erb | 2 +- app/views/admin/collections/new.html.erb | 2 +- app/views/admin/collections/remove.html.erb | 2 +- app/views/admin/collections/show.html.erb | 2 +- app/views/admin/groups/_form.html.erb | 2 +- app/views/admin/groups/edit.html.erb | 2 +- app/views/admin/groups/index.html.erb | 2 +- .../_batch_encoding_entry_row.html.erb | 2 +- .../batch_encoding_finished.html.erb | 2 +- .../batch_ingest_validation_error.html.erb | 2 +- .../batch_ingest_validation_success.html.erb | 2 +- .../batch_registration_finished_mailer.html.erb | 2 +- .../batch_registration_stalled_mailer.html.erb | 2 +- app/views/bookmarks/_document_action.html.erb | 2 +- .../bookmarks/_formless_document_action.html.erb | 2 +- app/views/bookmarks/add_to_playlist.html.erb | 2 +- app/views/bookmarks/delete.html.erb | 2 +- app/views/bookmarks/index.html.erb | 2 +- app/views/bookmarks/intercom_push.html.erb | 2 +- app/views/bookmarks/merge.html.erb | 2 +- app/views/bookmarks/move.html.erb | 2 +- .../bookmarks/update_access_control.html.erb | 2 +- app/views/catalog/_document_list.html.erb | 2 +- app/views/catalog/_facet_group.html.erb | 2 +- app/views/catalog/_facet_pagination.html.erb | 2 +- app/views/catalog/_facets.html.erb | 2 +- app/views/catalog/_home_text.html.erb | 2 +- .../catalog/_index_header_media_object.html.erb | 2 +- app/views/catalog/_index_media_object.html.erb | 2 +- app/views/catalog/_select_all.html.erb | 2 +- .../catalog/_thumbnail_media_object.html.erb | 2 +- app/views/catalog/index.html.erb | 2 +- app/views/checkouts/_inactive_checkout.html.erb | 2 +- app/views/checkouts/index.html.erb | 15 +++++++++++++++ app/views/collections/index.html.erb | 2 +- app/views/collections/show.html.erb | 2 +- app/views/comments/create.html.erb | 2 +- app/views/comments/index.html.erb | 2 +- app/views/comments_mailer/contact_email.html.erb | 2 +- app/views/comments_mailer/contact_email.text.erb | 2 +- app/views/devise/passwords/edit.html.erb | 2 +- app/views/devise/passwords/new.html.erb | 2 +- app/views/devise/registrations/edit.html.erb | 2 +- app/views/devise/registrations/new.html.erb | 2 +- app/views/devise/sessions/new.html.erb | 2 +- app/views/devise/shared/_error_messages.html.erb | 15 +++++++++++++++ app/views/devise/shared/_links.html.erb | 2 +- app/views/encode_records/index.html.erb | 2 +- app/views/encode_records/show.html.erb | 2 +- app/views/errors/deleted_pid.html.erb | 2 +- app/views/errors/restricted_pid.html.erb | 2 +- app/views/errors/unknown_pid.html.erb | 2 +- .../batch_ingest_validation_error.html.erb | 2 +- .../batch_ingest_validation_success.html.erb | 2 +- .../ingest_batch_mailer/status_email.html.erb | 2 +- app/views/layouts/avalon.html.erb | 2 +- app/views/layouts/embed.html.erb | 2 +- app/views/layouts/mailer.html.erb | 2 +- app/views/master_files/_authenticate.html.erb | 2 +- app/views/master_files/_authorize.html.erb | 2 +- app/views/master_files/_cdl_embed.html.erb | 2 +- app/views/master_files/_mejs4_player_js.html.erb | 2 +- app/views/master_files/_player.html.erb | 2 +- app/views/master_files/caption_manifest.m3u8.erb | 15 +++++++++++++++ app/views/master_files/embed.html.erb | 2 +- app/views/master_files/hls_manifest.m3u8.erb | 2 +- app/views/master_files/iiif_auth_token.html.erb | 2 +- app/views/media_objects/_access_control.html.erb | 2 +- .../media_objects/_add_to_playlist_form.html.erb | 2 +- .../media_objects/_administrative_links.html.erb | 2 +- app/views/media_objects/_checkout.html.erb | 2 +- .../_checkout_authenticate.html.erb | 2 +- .../media_objects/_destroy_checkout.html.erb | 2 +- .../media_objects/_dropbox_details.html.erb | 2 +- .../_dropbox_empty_container.html.erb | 2 +- .../media_objects/_dropbox_file_entry.html.erb | 2 +- .../_dropbox_file_navigator.html.erb | 2 +- app/views/media_objects/_dropdown_field.html.erb | 2 +- app/views/media_objects/_embed_checkout.html.erb | 2 +- app/views/media_objects/_embed_resource.html.erb | 2 +- app/views/media_objects/_file_upload.html.erb | 2 +- app/views/media_objects/_ingest_step.html.erb | 2 +- app/views/media_objects/_ingest_steps.html.erb | 2 +- .../media_objects/_intercom_push_form.html.erb | 2 +- .../media_objects/_intercom_push_modal.html.erb | 2 +- app/views/media_objects/_item_view.html.erb | 2 +- app/views/media_objects/_lti_url.html.erb | 2 +- .../_mejs4_add_to_playlist.html.erb | 2 +- .../media_objects/_mejs4_player_js.html.erb | 2 +- .../media_objects/_metadata_display.html.erb | 2 +- .../_multipart_dropdown_field.html.erb | 2 +- app/views/media_objects/_remove_item.html.erb | 2 +- .../media_objects/_resource_description.html.erb | 2 +- app/views/media_objects/_sections.html.erb | 2 +- app/views/media_objects/_share.html.erb | 2 +- app/views/media_objects/_share_resource.html.erb | 2 +- app/views/media_objects/_structure.html.erb | 2 +- .../media_objects/_supplemental_files.html.erb | 2 +- .../_supplemental_files_list.html.erb | 2 +- .../_supplemental_files_upload.html.erb | 2 +- app/views/media_objects/_text_area.html.erb | 2 +- app/views/media_objects/_text_field.html.erb | 2 +- app/views/media_objects/_timeline.html.erb | 2 +- app/views/media_objects/_two_part_field.html.erb | 2 +- .../media_objects/_typeahead_field.html.erb | 2 +- .../media_objects/_workflow_buttons.html.erb | 2 +- .../media_objects/_workflow_progress.html.erb | 2 +- app/views/media_objects/confirm_remove.html.erb | 2 +- app/views/media_objects/edit.html.erb | 2 +- app/views/media_objects/show.html.erb | 2 +- app/views/media_objects/tree.html.erb | 2 +- app/views/modules/_access_control.html.erb | 2 +- app/views/modules/_access_object.html.erb | 2 +- app/views/modules/_avalon_search_form.html.erb | 2 +- app/views/modules/_become_message.html.erb | 2 +- app/views/modules/_flash_messages.html.erb | 2 +- app/views/modules/_footer.html.erb | 2 +- app/views/modules/_global_navigation.html.erb | 2 +- app/views/modules/_google_analytics.html.erb | 2 +- app/views/modules/_header.html.erb | 2 +- app/views/modules/_tooltip.html.erb | 2 +- app/views/modules/_user_management.html.erb | 2 +- app/views/modules/player/_audio_element.html.erb | 2 +- app/views/modules/player/_section.html.erb | 2 +- app/views/modules/player/_video_element.html.erb | 2 +- .../notifications_mailer/new_collection.html.erb | 2 +- .../update_collection.html.erb | 2 +- app/views/playlist_items/_current_item.html.erb | 2 +- app/views/playlist_items/_markers.html.erb | 2 +- app/views/playlist_items/_related_items.html.erb | 2 +- .../playlists/_copy_playlist_modal.html.erb | 2 +- app/views/playlists/_current_item.html.erb | 2 +- app/views/playlists/_current_masterfile.html.erb | 2 +- app/views/playlists/_edit_form.html.erb | 2 +- app/views/playlists/_form.html.erb | 2 +- app/views/playlists/_info.html.erb | 2 +- app/views/playlists/_item_list.html.erb | 2 +- app/views/playlists/_lti_url.html.erb | 2 +- app/views/playlists/_markers.html.erb | 2 +- .../_mejs4_add_marker_to_playlist.html.erb | 2 +- app/views/playlists/_mejs4_player_js.html.erb | 2 +- .../playlists/_mejs4_playlist_item.html.erb | 2 +- app/views/playlists/_player.html.erb | 2 +- app/views/playlists/_playlist_item.html.erb | 2 +- app/views/playlists/_share.html.erb | 2 +- app/views/playlists/_share_resource.html.erb | 2 +- .../playlists/_show_playlist_details.html.erb | 2 +- app/views/playlists/_tag_form.html.erb | 2 +- app/views/playlists/edit.html.erb | 2 +- .../import_variations_playlist.html.erb | 2 +- app/views/playlists/index.html.erb | 2 +- app/views/playlists/new.html.erb | 2 +- app/views/playlists/refresh_info.js.erb | 2 +- app/views/playlists/show.html.erb | 2 +- app/views/samvera/persona/users/index.html.erb | 2 +- .../timelines/_copy_timeline_modal.html.erb | 2 +- app/views/timelines/_edit_form.html.erb | 2 +- app/views/timelines/_form.html.erb | 2 +- .../timelines/_show_timeline_details.html.erb | 2 +- app/views/timelines/_tag_form.html.erb | 2 +- app/views/timelines/edit.html.erb | 2 +- app/views/timelines/index.html.erb | 2 +- app/views/timelines/new.html.erb | 2 +- app/views/timelines/show.html.erb | 4 ++-- app/views/timelines/timeliner.html.erb | 2 +- .../better_active_elastic_job_adapter.rb | 2 +- lib/avalon/authentication.rb | 2 +- lib/avalon/batch.rb | 2 +- lib/avalon/batch/entry.rb | 2 +- lib/avalon/batch/file_manifest.rb | 2 +- lib/avalon/batch/ingest.rb | 2 +- lib/avalon/batch/manifest.rb | 2 +- lib/avalon/batch/package.rb | 2 +- lib/avalon/batch/s3_manifest.rb | 2 +- lib/avalon/bib_retriever.rb | 2 +- lib/avalon/bib_retriever/sru.rb | 2 +- lib/avalon/bib_retriever/zoom.rb | 2 +- lib/avalon/build_utils.rb | 2 +- lib/avalon/configuration.rb | 8 ++++---- lib/avalon/controlled_vocabulary.rb | 2 +- lib/avalon/controller/controller_behavior.rb | 2 +- lib/avalon/dropbox.rb | 2 +- lib/avalon/elastic_transcoder.rb | 2 +- lib/avalon/elastic_transcoder_encode.rb | 2 +- lib/avalon/errors.rb | 8 ++++---- lib/avalon/file_resolver.rb | 2 +- lib/avalon/intercom.rb | 2 +- lib/avalon/m3u8_reader.rb | 2 +- lib/avalon/role_controls.rb | 2 +- lib/avalon/routing/can_constraint.rb | 2 +- lib/avalon/sanitizer.rb | 2 +- lib/avalon/solr_config_uploader.rb | 2 +- lib/avalon/stream_mapper.rb | 2 +- lib/avalon/variations_mapping_service.rb | 2 +- lib/avalon/variations_playlist_importer.rb | 2 +- lib/avalon/variations_timeline_importer.rb | 2 +- lib/capistrano/tasks/glob.rake | 2 +- lib/capistrano/tasks/hls.rake | 2 +- lib/day_hour_string.rb | 8 ++++---- lib/hydra/multiple_policy_aware_ability.rb | 2 +- ...e_policy_aware_access_controls_enforcement.rb | 2 +- lib/string_additions.rb | 2 +- lib/tasks/avalon.rake | 2 +- lib/tasks/avalon_api.rake | 2 +- lib/tasks/avalon_tools.rake | 2 +- lib/tasks/aws.rake | 2 +- lib/tasks/wipeout.rake | 2 +- lib/tasks/zookeeper.rake | 2 +- script/avalon_image_tags.rb | 2 +- script/avalon_push_images | 2 +- script/avalon_version.rb | 2 +- script/waveform_backfill.rb | 2 +- .../admin_collections_controller_spec.rb | 8 ++++---- spec/controllers/application_controller_spec.rb | 2 +- .../controllers/avalon_marker_controller_spec.rb | 2 +- spec/controllers/bookmarks_controller_spec.rb | 2 +- spec/controllers/catalog_controller_spec.rb | 2 +- spec/controllers/collections_controller_spec.rb | 2 +- spec/controllers/derivative_controller_spec.rb | 8 ++++---- spec/controllers/dropbox_controller_spec.rb | 2 +- .../encode_records_controller_spec.rb | 2 +- spec/controllers/groups_controller_spec.rb | 2 +- spec/controllers/master_files_controller_spec.rb | 8 ++++---- .../controllers/media_objects_controller_spec.rb | 8 ++++---- spec/controllers/objects_controller_spec.rb | 2 +- .../omniauth_callbacks_controller_spec.rb | 8 ++++---- .../playlist_items_controller_spec.rb | 2 +- spec/controllers/playlists_controller_spec.rb | 8 ++++---- .../samvera/persona/user_controller_spec.rb | 8 ++++---- .../supplemental_files_controller_spec.rb | 2 +- spec/controllers/timelines_controller_spec.rb | 8 ++++---- spec/controllers/vocabulary_controller_spec.rb | 8 ++++---- spec/cypress/cypress.json | 2 +- spec/cypress/fixtures/example.json | 2 +- spec/cypress/integration/auth_identity_spec.js | 2 +- spec/cypress/integration/homepage_spec.js | 2 +- spec/cypress/integration/media_object_spec.js | 2 +- spec/cypress/integration/navigation_spec.js | 2 +- spec/cypress/integration/playlist_spec.js | 2 +- spec/cypress/integration/secure_routes_spec.js | 2 +- spec/cypress/plugins/index.js | 2 +- spec/cypress/support/commands.js | 2 +- spec/cypress/support/index.js | 2 +- spec/factories/avalon_clip.rb | 2 +- spec/factories/avalon_marker.rb | 2 +- spec/factories/batch_entries.rb | 2 +- spec/factories/batch_registries.rb | 2 +- spec/factories/checkouts.rb | 9 ++++----- spec/factories/collections.rb | 2 +- spec/factories/derivatives.rb | 2 +- spec/factories/encode.rb | 2 +- spec/factories/encode_record.rb | 2 +- spec/factories/groups.rb | 2 +- spec/factories/lease.rb | 2 +- spec/factories/master_files.rb | 2 +- spec/factories/media_objects.rb | 2 +- spec/factories/playlist.rb | 2 +- spec/factories/playlist_item.rb | 2 +- spec/factories/supplemental_file.rb | 2 +- spec/factories/timeline.rb | 2 +- spec/factories/users.rb | 2 +- spec/features/auth_identity_spec.rb | 2 +- spec/features/capybara_admin_collection_spec.rb | 2 +- spec/features/capybara_checkouts_spec.rb | 8 ++++---- spec/features/capybara_homepage_spec.rb | 2 +- spec/features/capybara_navigation_spec.rb | 2 +- spec/features/capybara_playlist_spec.rb | 2 +- spec/features/login_redirect_spec.rb | 8 ++++---- spec/features/media_object_spec.rb | 8 ++++---- spec/features/secure_routes_spec.rb | 2 +- spec/fixtures/meow.json | 2 +- spec/fixtures/structure.json | 2 +- spec/fixtures/structure_with_html.json | 2 +- spec/fixtures/waveform.json | 2 +- spec/helpers/application_helper_spec.rb | 2 +- spec/helpers/media_objects_helper_spec.rb | 2 +- spec/helpers/security_helper_spec.rb | 8 ++++---- spec/helpers/timelines_helper_spec.rb | 2 +- spec/helpers/upload_form_helper_spec.rb | 2 +- spec/jobs/active_encode_job_spec.rb | 2 +- spec/jobs/batch_scan_job_spec.rb | 2 +- spec/jobs/bulk_action_job_spec.rb | 8 ++++---- spec/jobs/cleanup_working_files_spec.rb | 2 +- spec/jobs/delete_course_job_spec.rb | 2 +- spec/jobs/delete_derivative_job_spec.rb | 2 +- spec/jobs/delete_dropbox_job_spec.rb | 2 +- spec/jobs/ingest_batch_entry_job_spec.rb | 2 +- spec/jobs/ingest_batch_status_email_jobs_spec.rb | 2 +- spec/jobs/master_file_management_jobs_spec.rb | 2 +- spec/jobs/media_object_indexing_job_spec.rb | 2 +- spec/jobs/reindex_job_spec.rb | 2 +- .../jobs/update_dependent_permalinks_job_spec.rb | 2 +- spec/jobs/waveform_job_spec.rb | 2 +- spec/lib/avalon/batch/entry_spec.rb | 2 +- spec/lib/avalon/batch/package_spec.rb | 2 +- spec/lib/avalon/batch_ingest_spec.rb | 2 +- spec/lib/avalon/bib_retriever_spec.rb | 2 +- spec/lib/avalon/build_utils_spec.rb | 2 +- spec/lib/avalon/controlled_vocabulary_spec.rb | 2 +- spec/lib/avalon/dropbox_spec.rb | 2 +- .../lib/avalon/elastic_transcoder_encode_spec.rb | 2 +- spec/lib/avalon/elastic_transcoder_spec.rb | 2 +- spec/lib/avalon/file_resolver_spec.rb | 2 +- spec/lib/avalon/intercom_spec.rb | 2 +- spec/lib/avalon/m3u8_read_spec.rb | 2 +- spec/lib/avalon/sanitizer_spec.rb | 2 +- spec/lib/day_hour_string_spec.rb | 8 ++++---- spec/lib/string_additions_spec.rb | 2 +- spec/mailers/batch_registries_mailer_spec.rb | 2 +- spec/mailers/comments_mailer_spec.rb | 8 ++++---- spec/mailers/ingest_batch_mailer_spec.rb | 2 +- spec/mailers/notifications_mailer_spec.rb | 2 +- spec/mailers/previews/comments_mailer_preview.rb | 14 ++++++++++++++ spec/models/ability_spec.rb | 2 +- spec/models/avalon_annotation_spec.rb | 2 +- spec/models/avalon_clip_spec.rb | 2 +- spec/models/avalon_marker_spec.rb | 2 +- spec/models/batch_entries_spec.rb | 2 +- spec/models/batch_registries_spec.rb | 2 +- spec/models/checkout_spec.rb | 14 ++++++++++++++ spec/models/collection_spec.rb | 8 ++++---- spec/models/comments_spec.rb | 2 +- spec/models/concerns/hidden_spec.rb | 2 +- spec/models/concerns/migration_target_spec.rb | 2 +- spec/models/concerns/permalink_spec.rb | 2 +- spec/models/concerns/virtual_groups_spec.rb | 2 +- spec/models/course_spec.rb | 2 +- spec/models/derivative_spec.rb | 2 +- spec/models/external_group_spec.rb | 2 +- spec/models/ffmpeg_encode_spec.rb | 2 +- spec/models/file_upload_step_spec.rb | 2 +- spec/models/group_spec.rb | 2 +- spec/models/iiif_canvas_presenter_spec.rb | 2 +- spec/models/iiif_manifest_presenter_spec.rb | 2 +- spec/models/ingest_batch_spec.rb | 2 +- spec/models/lease_spec.rb | 2 +- spec/models/master_file_spec.rb | 2 +- spec/models/media_object_spec.rb | 2 +- spec/models/pass_through_encode_spec.rb | 2 +- spec/models/playlist_item_spec.rb | 2 +- spec/models/playlist_spec.rb | 2 +- spec/models/role_map_spec.rb | 2 +- spec/models/search_builder_spec.rb | 2 +- spec/models/security_handler_spec.rb | 2 +- spec/models/stream_token_spec.rb | 2 +- spec/models/supplemental_file_spec.rb | 2 +- spec/models/timeline_spec.rb | 2 +- spec/models/user_spec.rb | 8 ++++---- spec/models/watched_encode_spec.rb | 2 +- spec/models/working_file_path_spec.rb | 2 +- .../admin_collection_presenter_spec.rb | 2 +- spec/presenters/collection_presenter_spec.rb | 2 +- .../speedy_af/proxy/derivative_spec.rb | 8 ++++---- .../speedy_af/proxy/master_file_spec.rb | 2 +- spec/rails_helper.rb | 2 +- spec/requests/about_page_spec.rb | 2 +- spec/requests/api_authentication_spec.rb | 8 ++++---- spec/requests/atom_feed_spec.rb | 2 +- spec/requests/checkouts_spec.rb | 14 ++++++++++++++ spec/requests/comments_spec.rb | 8 ++++---- spec/requests/cors_spec.rb | 8 ++++---- spec/requests/devise_login.rb | 2 +- spec/requests/jobs_spec.rb | 2 +- spec/requests/mejs_spec.rb | 2 +- spec/requests/redirect_spec.rb | 8 ++++---- .../admin_collections_controller_routing_spec.rb | 2 +- spec/routing/checkouts_routing_spec.rb | 14 ++++++++++++++ spec/routing/collections_routing_spec.rb | 2 +- spec/routing/master_files_routing_spec.rb | 8 ++++---- spec/routing/media_objects_routing_spec.rb | 2 +- spec/routing/supplemental_files_routing_spec.rb | 2 +- spec/routing/timelines_routing_spec.rb | 2 +- spec/services/file_locator_spec.rb | 2 +- spec/services/master_file_builder_spec.rb | 2 +- spec/services/security_service_spec.rb | 8 ++++---- spec/services/solr_collection_admin_spec.rb | 2 +- spec/services/solr_collection_creator_spec.rb | 2 +- spec/services/waveform_service_spec.rb | 8 ++++---- spec/spec_helper.rb | 2 +- spec/support/controller_macros.rb | 2 +- spec/support/features.rb | 14 ++++++++++++++ spec/support/fixture_macros.rb | 2 +- spec/support/ldp_call_profile_formatter.rb | 2 +- spec/support/matchers.rb | 2 +- spec/support/optional_example.rb | 2 +- .../support/supplemental_file_shared_examples.rb | 2 +- .../supplemental_files_controller_examples.rb | 2 +- spec/validators/uniqueness_validator_spec.rb | 2 +- spec/views/checkouts/index.html.erb_spec.rb | 14 ++++++++++++++ spec/views/google_analytics_spec.rb | 2 +- 634 files changed, 1045 insertions(+), 830 deletions(-) create mode 100644 LICENSE_HEADER mode change 100755 => 100644 script/avalon_image_tags.rb mode change 100755 => 100644 script/avalon_version.rb diff --git a/LICENSE_HEADER b/LICENSE_HEADER new file mode 100644 index 0000000000..2cc4fd3914 --- /dev/null +++ b/LICENSE_HEADER @@ -0,0 +1,12 @@ +Copyright 2011-2023, The Trustees of Indiana University and Northwestern + University. Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed + under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + CONDITIONS OF ANY KIND, either express or implied. See the License for the + specific language governing permissions and limitations under the License. diff --git a/app/assets/javascripts/access_control_step.js.coffee b/app/assets/javascripts/access_control_step.js.coffee index 63b6e00850..7bfe9a1b84 100644 --- a/app/assets/javascripts/access_control_step.js.coffee +++ b/app/assets/javascripts/access_control_step.js.coffee @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/assets/javascripts/android_pre_play.js b/app/assets/javascripts/android_pre_play.js index b1f778a6ce..8184cd7a05 100644 --- a/app/assets/javascripts/android_pre_play.js +++ b/app/assets/javascripts/android_pre_play.js @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index e7c61499ea..fd14f3b7ee 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/javascripts/autocomplete.js.coffee b/app/assets/javascripts/autocomplete.js.coffee index 335f23a4f2..8156236b8b 100644 --- a/app/assets/javascripts/autocomplete.js.coffee +++ b/app/assets/javascripts/autocomplete.js.coffee @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/assets/javascripts/avalon.js b/app/assets/javascripts/avalon.js index f6e4a42b5d..0185f4bd44 100644 --- a/app/assets/javascripts/avalon.js +++ b/app/assets/javascripts/avalon.js @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/javascripts/avalon_playlists/playlist_items.js b/app/assets/javascripts/avalon_playlists/playlist_items.js index 70788703b7..7737980863 100644 --- a/app/assets/javascripts/avalon_playlists/playlist_items.js +++ b/app/assets/javascripts/avalon_playlists/playlist_items.js @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/javascripts/avalon_playlists/playlists.js.coffee b/app/assets/javascripts/avalon_playlists/playlists.js.coffee index a191c0eba4..9789d1dcc0 100644 --- a/app/assets/javascripts/avalon_playlists/playlists.js.coffee +++ b/app/assets/javascripts/avalon_playlists/playlists.js.coffee @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/assets/javascripts/avalon_progress.js.coffee b/app/assets/javascripts/avalon_progress.js.coffee index 221ab7bbfe..3e5cb9efe1 100644 --- a/app/assets/javascripts/avalon_progress.js.coffee +++ b/app/assets/javascripts/avalon_progress.js.coffee @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/assets/javascripts/avalon_timelines/timelines.js.coffee b/app/assets/javascripts/avalon_timelines/timelines.js.coffee index c9d9bf0c43..870ea53faa 100644 --- a/app/assets/javascripts/avalon_timelines/timelines.js.coffee +++ b/app/assets/javascripts/avalon_timelines/timelines.js.coffee @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/assets/javascripts/blacklight/facet_load.js b/app/assets/javascripts/blacklight/facet_load.js index 235207bde3..bc69b6ff80 100644 --- a/app/assets/javascripts/blacklight/facet_load.js +++ b/app/assets/javascripts/blacklight/facet_load.js @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/javascripts/button_confirmation.js.coffee b/app/assets/javascripts/button_confirmation.js.coffee index 000799c0f5..2d5b636bbe 100644 --- a/app/assets/javascripts/button_confirmation.js.coffee +++ b/app/assets/javascripts/button_confirmation.js.coffee @@ -1,11 +1,11 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# +# # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the diff --git a/app/assets/javascripts/crop_upload.js b/app/assets/javascripts/crop_upload.js index 0be07e7e7c..a690c2279e 100644 --- a/app/assets/javascripts/crop_upload.js +++ b/app/assets/javascripts/crop_upload.js @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/javascripts/datatables.js b/app/assets/javascripts/datatables.js index f310316b54..938410976f 100644 --- a/app/assets/javascripts/datatables.js +++ b/app/assets/javascripts/datatables.js @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/javascripts/direct_upload.js.coffee b/app/assets/javascripts/direct_upload.js.coffee index 53ff54cd0f..10ec9d9df8 100644 --- a/app/assets/javascripts/direct_upload.js.coffee +++ b/app/assets/javascripts/direct_upload.js.coffee @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/assets/javascripts/display_returned_items.js b/app/assets/javascripts/display_returned_items.js index 8429370505..c61e734670 100644 --- a/app/assets/javascripts/display_returned_items.js +++ b/app/assets/javascripts/display_returned_items.js @@ -1,12 +1,12 @@ -/* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern +/* + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. - * + * * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the diff --git a/app/assets/javascripts/dynamic_fields.js.coffee b/app/assets/javascripts/dynamic_fields.js.coffee index fb0d4c802b..0e65682b9b 100644 --- a/app/assets/javascripts/dynamic_fields.js.coffee +++ b/app/assets/javascripts/dynamic_fields.js.coffee @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/assets/javascripts/expand_filename.js b/app/assets/javascripts/expand_filename.js index 34b030da1d..bc533f37a1 100644 --- a/app/assets/javascripts/expand_filename.js +++ b/app/assets/javascripts/expand_filename.js @@ -1,3 +1,19 @@ +/* + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern + * University. Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed + * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * --- END LICENSE_HEADER BLOCK --- +*/ + function expandFilename(id) { var trunc = document.getElementById("truncated_" + id); var full = document.getElementById("full_" + id); diff --git a/app/assets/javascripts/file_browse.js.coffee b/app/assets/javascripts/file_browse.js.coffee index c1f3d41537..487a09f7bd 100644 --- a/app/assets/javascripts/file_browse.js.coffee +++ b/app/assets/javascripts/file_browse.js.coffee @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/assets/javascripts/file_upload_step.js.coffee b/app/assets/javascripts/file_upload_step.js.coffee index 563397b417..f72b32eeaa 100644 --- a/app/assets/javascripts/file_upload_step.js.coffee +++ b/app/assets/javascripts/file_upload_step.js.coffee @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/assets/javascripts/fix_console.js b/app/assets/javascripts/fix_console.js index 17774ffa30..9b1060dea5 100644 --- a/app/assets/javascripts/fix_console.js +++ b/app/assets/javascripts/fix_console.js @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/javascripts/hydra/hydra-head.js b/app/assets/javascripts/hydra/hydra-head.js index 874da114f8..994087a1fa 100644 --- a/app/assets/javascripts/hydra/hydra-head.js +++ b/app/assets/javascripts/hydra/hydra-head.js @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/javascripts/import_button.js.coffee b/app/assets/javascripts/import_button.js.coffee index cb66abe417..f77c985c5f 100644 --- a/app/assets/javascripts/import_button.js.coffee +++ b/app/assets/javascripts/import_button.js.coffee @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/assets/javascripts/input_form_attribute_support.js.coffee b/app/assets/javascripts/input_form_attribute_support.js.coffee index 02f25380d8..759a414b67 100644 --- a/app/assets/javascripts/input_form_attribute_support.js.coffee +++ b/app/assets/javascripts/input_form_attribute_support.js.coffee @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/assets/javascripts/intercom_push.js b/app/assets/javascripts/intercom_push.js index 4090d19da3..be8eb9d68a 100644 --- a/app/assets/javascripts/intercom_push.js +++ b/app/assets/javascripts/intercom_push.js @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/javascripts/localize_times.js b/app/assets/javascripts/localize_times.js index 0c29368d66..9c536ff61d 100644 --- a/app/assets/javascripts/localize_times.js +++ b/app/assets/javascripts/localize_times.js @@ -1,3 +1,19 @@ +/* + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern + * University. Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed + * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * --- END LICENSE_HEADER BLOCK --- +*/ + // Requires moment.js function localize_times() { $('*[data-utc-time]').each(function() { diff --git a/app/assets/javascripts/mejs4_player.js b/app/assets/javascripts/mejs4_player.js index 8a4e8e0c4b..1e0af929f9 100644 --- a/app/assets/javascripts/mejs4_player.js +++ b/app/assets/javascripts/mejs4_player.js @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/javascripts/modernizr.js b/app/assets/javascripts/modernizr.js index d06352eea2..9f880da1b5 100644 --- a/app/assets/javascripts/modernizr.js +++ b/app/assets/javascripts/modernizr.js @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/javascripts/move_section.js b/app/assets/javascripts/move_section.js index 3cd0f4cf4d..fd46be6ea2 100644 --- a/app/assets/javascripts/move_section.js +++ b/app/assets/javascripts/move_section.js @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/javascripts/pop_help.js.coffee b/app/assets/javascripts/pop_help.js.coffee index 61194c71e8..2ba2843712 100644 --- a/app/assets/javascripts/pop_help.js.coffee +++ b/app/assets/javascripts/pop_help.js.coffee @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/assets/javascripts/popovers_and_tooltips.js.coffee b/app/assets/javascripts/popovers_and_tooltips.js.coffee index 3f0da261d5..2b63b12576 100644 --- a/app/assets/javascripts/popovers_and_tooltips.js.coffee +++ b/app/assets/javascripts/popovers_and_tooltips.js.coffee @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/assets/javascripts/refresh_token.js.coffee b/app/assets/javascripts/refresh_token.js.coffee index a170b39bfd..55c856890c 100644 --- a/app/assets/javascripts/refresh_token.js.coffee +++ b/app/assets/javascripts/refresh_token.js.coffee @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/assets/javascripts/select_all.js.coffee b/app/assets/javascripts/select_all.js.coffee index 39adee1d60..ff51dccfc1 100644 --- a/app/assets/javascripts/select_all.js.coffee +++ b/app/assets/javascripts/select_all.js.coffee @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/assets/javascripts/sessions_new.js b/app/assets/javascripts/sessions_new.js index ed64bc99b5..96362ab846 100644 --- a/app/assets/javascripts/sessions_new.js +++ b/app/assets/javascripts/sessions_new.js @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/javascripts/sort_streams.js b/app/assets/javascripts/sort_streams.js index c127fbc030..f27ea04ed0 100644 --- a/app/assets/javascripts/sort_streams.js +++ b/app/assets/javascripts/sort_streams.js @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/javascripts/supplemental_files.js b/app/assets/javascripts/supplemental_files.js index 9c4e8649cf..15b85618c2 100644 --- a/app/assets/javascripts/supplemental_files.js +++ b/app/assets/javascripts/supplemental_files.js @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss index 16ce02f29e..bbe0d96bc3 100644 --- a/app/assets/stylesheets/admin.scss +++ b/app/assets/stylesheets/admin.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 468835f204..3cbebfb9fb 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/stylesheets/avalon.scss b/app/assets/stylesheets/avalon.scss index 866af83572..1d8065e434 100644 --- a/app/assets/stylesheets/avalon.scss +++ b/app/assets/stylesheets/avalon.scss @@ -1,12 +1,12 @@ -/* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern +/* + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. - * + * * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the diff --git a/app/assets/stylesheets/avalon/_accordions.scss b/app/assets/stylesheets/avalon/_accordions.scss index f9ed637cd0..fa051441e6 100644 --- a/app/assets/stylesheets/avalon/_accordions.scss +++ b/app/assets/stylesheets/avalon/_accordions.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/stylesheets/avalon/_buttons.scss b/app/assets/stylesheets/avalon/_buttons.scss index 9ff8d7c324..8b5f023328 100644 --- a/app/assets/stylesheets/avalon/_buttons.scss +++ b/app/assets/stylesheets/avalon/_buttons.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/stylesheets/avalon/_collections.scss b/app/assets/stylesheets/avalon/_collections.scss index e08c8b3ae5..a8cb27ff35 100644 --- a/app/assets/stylesheets/avalon/_collections.scss +++ b/app/assets/stylesheets/avalon/_collections.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/stylesheets/avalon/_facets.scss b/app/assets/stylesheets/avalon/_facets.scss index 5fa32bd2ff..3c54b2b0ca 100644 --- a/app/assets/stylesheets/avalon/_facets.scss +++ b/app/assets/stylesheets/avalon/_facets.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/stylesheets/avalon/_footer.scss b/app/assets/stylesheets/avalon/_footer.scss index bcf5223bc0..bd0ffd66ad 100644 --- a/app/assets/stylesheets/avalon/_footer.scss +++ b/app/assets/stylesheets/avalon/_footer.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/stylesheets/avalon/_form.scss b/app/assets/stylesheets/avalon/_form.scss index fc04d4ddb4..bceb1e904a 100644 --- a/app/assets/stylesheets/avalon/_form.scss +++ b/app/assets/stylesheets/avalon/_form.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/stylesheets/avalon/_header.scss b/app/assets/stylesheets/avalon/_header.scss index 9c0debc58d..cc96774e2b 100644 --- a/app/assets/stylesheets/avalon/_header.scss +++ b/app/assets/stylesheets/avalon/_header.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/stylesheets/avalon/_homepage.scss b/app/assets/stylesheets/avalon/_homepage.scss index 7a5fde7623..18c19c461b 100644 --- a/app/assets/stylesheets/avalon/_homepage.scss +++ b/app/assets/stylesheets/avalon/_homepage.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/stylesheets/avalon/_loading-spinner.scss b/app/assets/stylesheets/avalon/_loading-spinner.scss index f43f491800..e622baab40 100644 --- a/app/assets/stylesheets/avalon/_loading-spinner.scss +++ b/app/assets/stylesheets/avalon/_loading-spinner.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/stylesheets/avalon/_mediaelement.scss b/app/assets/stylesheets/avalon/_mediaelement.scss index 56142c611c..10f2746708 100644 --- a/app/assets/stylesheets/avalon/_mediaelement.scss +++ b/app/assets/stylesheets/avalon/_mediaelement.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/stylesheets/avalon/_mixins.scss b/app/assets/stylesheets/avalon/_mixins.scss index 003c715ccf..05ca330b57 100644 --- a/app/assets/stylesheets/avalon/_mixins.scss +++ b/app/assets/stylesheets/avalon/_mixins.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/stylesheets/avalon/_modals.scss b/app/assets/stylesheets/avalon/_modals.scss index 019acffa77..e3bff37b8d 100644 --- a/app/assets/stylesheets/avalon/_modals.scss +++ b/app/assets/stylesheets/avalon/_modals.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/stylesheets/avalon/_nav.scss b/app/assets/stylesheets/avalon/_nav.scss index b3aeb97bf0..a2b0781000 100644 --- a/app/assets/stylesheets/avalon/_nav.scss +++ b/app/assets/stylesheets/avalon/_nav.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/stylesheets/avalon/_playlists.scss b/app/assets/stylesheets/avalon/_playlists.scss index ad31850c6d..4af16d6c4b 100644 --- a/app/assets/stylesheets/avalon/_playlists.scss +++ b/app/assets/stylesheets/avalon/_playlists.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/stylesheets/avalon/_timeliner.scss b/app/assets/stylesheets/avalon/_timeliner.scss index e8671953e7..467783e289 100644 --- a/app/assets/stylesheets/avalon/_timeliner.scss +++ b/app/assets/stylesheets/avalon/_timeliner.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/stylesheets/blacklight.scss b/app/assets/stylesheets/blacklight.scss index 63f4664185..93df131ac0 100644 --- a/app/assets/stylesheets/blacklight.scss +++ b/app/assets/stylesheets/blacklight.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/stylesheets/blacklight_themes/avalon.scss b/app/assets/stylesheets/blacklight_themes/avalon.scss index be04b58449..16d2486475 100644 --- a/app/assets/stylesheets/blacklight_themes/avalon.scss +++ b/app/assets/stylesheets/blacklight_themes/avalon.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/stylesheets/branding.scss b/app/assets/stylesheets/branding.scss index 50615f9747..48aa39c5fb 100644 --- a/app/assets/stylesheets/branding.scss +++ b/app/assets/stylesheets/branding.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/stylesheets/datatables.scss b/app/assets/stylesheets/datatables.scss index 8748faac3b..78e70fe510 100644 --- a/app/assets/stylesheets/datatables.scss +++ b/app/assets/stylesheets/datatables.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/stylesheets/embed.scss b/app/assets/stylesheets/embed.scss index ac44f3c2eb..ee305b6052 100644 --- a/app/assets/stylesheets/embed.scss +++ b/app/assets/stylesheets/embed.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/stylesheets/mejs4/mediaelement-common-styles.scss b/app/assets/stylesheets/mejs4/mediaelement-common-styles.scss index 5b6c1978ec..6756a26013 100644 --- a/app/assets/stylesheets/mejs4/mediaelement-common-styles.scss +++ b/app/assets/stylesheets/mejs4/mediaelement-common-styles.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/stylesheets/mejs4/mejs4_link_back.scss b/app/assets/stylesheets/mejs4/mejs4_link_back.scss index 89b95b54f7..214a8fa107 100644 --- a/app/assets/stylesheets/mejs4/mejs4_link_back.scss +++ b/app/assets/stylesheets/mejs4/mejs4_link_back.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/stylesheets/mejs4/mejs4_plugin_add_marker_to_playlist.scss b/app/assets/stylesheets/mejs4/mejs4_plugin_add_marker_to_playlist.scss index 1c9628e100..33ecbc7fe7 100644 --- a/app/assets/stylesheets/mejs4/mejs4_plugin_add_marker_to_playlist.scss +++ b/app/assets/stylesheets/mejs4/mejs4_plugin_add_marker_to_playlist.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/stylesheets/mejs4/mejs4_plugin_add_to_playlist.scss b/app/assets/stylesheets/mejs4/mejs4_plugin_add_to_playlist.scss index 302b2751c5..e6e4ef297b 100644 --- a/app/assets/stylesheets/mejs4/mejs4_plugin_add_to_playlist.scss +++ b/app/assets/stylesheets/mejs4/mejs4_plugin_add_to_playlist.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/stylesheets/mejs4/mejs4_plugin_create_thumbnail.scss b/app/assets/stylesheets/mejs4/mejs4_plugin_create_thumbnail.scss index e17bb0d77d..2cbd156faa 100644 --- a/app/assets/stylesheets/mejs4/mejs4_plugin_create_thumbnail.scss +++ b/app/assets/stylesheets/mejs4/mejs4_plugin_create_thumbnail.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/stylesheets/mejs4/mejs4_plugin_track_scrubber.scss b/app/assets/stylesheets/mejs4/mejs4_plugin_track_scrubber.scss index 5251da7017..4382d00cd4 100644 --- a/app/assets/stylesheets/mejs4/mejs4_plugin_track_scrubber.scss +++ b/app/assets/stylesheets/mejs4/mejs4_plugin_track_scrubber.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/stylesheets/mejs4_player.scss b/app/assets/stylesheets/mejs4_player.scss index a9bfee44df..8553854e9e 100644 --- a/app/assets/stylesheets/mejs4_player.scss +++ b/app/assets/stylesheets/mejs4_player.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/assets/stylesheets/nestable.scss b/app/assets/stylesheets/nestable.scss index 0de8913c26..3b032b69d5 100644 --- a/app/assets/stylesheets/nestable.scss +++ b/app/assets/stylesheets/nestable.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/controllers/admin/collections_controller.rb b/app/controllers/admin/collections_controller.rb index f7ab5d33ab..d62870d2a5 100644 --- a/app/controllers/admin/collections_controller.rb +++ b/app/controllers/admin/collections_controller.rb @@ -1,11 +1,11 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# +# # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the diff --git a/app/controllers/admin/groups_controller.rb b/app/controllers/admin/groups_controller.rb index b72e6e830f..35f2064c3b 100644 --- a/app/controllers/admin/groups_controller.rb +++ b/app/controllers/admin/groups_controller.rb @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 6dc3684c10..7077cd790f 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,11 +1,11 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# +# # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the diff --git a/app/controllers/auth_forms_controller.rb b/app/controllers/auth_forms_controller.rb index 21247d65a6..267715ac2d 100644 --- a/app/controllers/auth_forms_controller.rb +++ b/app/controllers/auth_forms_controller.rb @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/controllers/avalon_marker_controller.rb b/app/controllers/avalon_marker_controller.rb index 9ea235e00c..43e4f2987e 100644 --- a/app/controllers/avalon_marker_controller.rb +++ b/app/controllers/avalon_marker_controller.rb @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/controllers/bookmarks_controller.rb b/app/controllers/bookmarks_controller.rb index 8d0416a948..c08fca68d3 100644 --- a/app/controllers/bookmarks_controller.rb +++ b/app/controllers/bookmarks_controller.rb @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/controllers/catalog_controller.rb b/app/controllers/catalog_controller.rb index 09d201ad65..5d07e6c0d0 100644 --- a/app/controllers/catalog_controller.rb +++ b/app/controllers/catalog_controller.rb @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/controllers/checkouts_controller.rb b/app/controllers/checkouts_controller.rb index 0b0863ae8a..59e0a208a8 100644 --- a/app/controllers/checkouts_controller.rb +++ b/app/controllers/checkouts_controller.rb @@ -1,3 +1,17 @@ +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern +# University. Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# --- END LICENSE_HEADER BLOCK --- + class CheckoutsController < ApplicationController before_action :set_checkout, only: %i[show update destroy] before_action :set_checkouts, only: %i[index return_all] diff --git a/app/controllers/collections_controller.rb b/app/controllers/collections_controller.rb index 863ffb3cfe..e601a8c48f 100644 --- a/app/controllers/collections_controller.rb +++ b/app/controllers/collections_controller.rb @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 7bd7b380e1..3967d7ce41 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -1,11 +1,11 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# +# # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the diff --git a/app/controllers/concerns/blacklight_helper_reload_fix.rb b/app/controllers/concerns/blacklight_helper_reload_fix.rb index e4240e33cf..88fea03b08 100644 --- a/app/controllers/concerns/blacklight_helper_reload_fix.rb +++ b/app/controllers/concerns/blacklight_helper_reload_fix.rb @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/controllers/concerns/conditional_partials.rb b/app/controllers/concerns/conditional_partials.rb index f4a585ae11..2e6e4f7e96 100644 --- a/app/controllers/concerns/conditional_partials.rb +++ b/app/controllers/concerns/conditional_partials.rb @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/controllers/derivatives_controller.rb b/app/controllers/derivatives_controller.rb index e2e8a6932d..81c77963c5 100644 --- a/app/controllers/derivatives_controller.rb +++ b/app/controllers/derivatives_controller.rb @@ -1,11 +1,11 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# +# # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the diff --git a/app/controllers/dropbox_controller.rb b/app/controllers/dropbox_controller.rb index da46417062..f28b24fa04 100644 --- a/app/controllers/dropbox_controller.rb +++ b/app/controllers/dropbox_controller.rb @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/controllers/encode_records_controller.rb b/app/controllers/encode_records_controller.rb index 4700c58041..e860175e3d 100644 --- a/app/controllers/encode_records_controller.rb +++ b/app/controllers/encode_records_controller.rb @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/controllers/master_files_controller.rb b/app/controllers/master_files_controller.rb index dcb0e9f792..d16f661c7f 100644 --- a/app/controllers/master_files_controller.rb +++ b/app/controllers/master_files_controller.rb @@ -1,11 +1,11 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# +# # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the diff --git a/app/controllers/media_objects_controller.rb b/app/controllers/media_objects_controller.rb index 5135b09952..04bfc4669f 100644 --- a/app/controllers/media_objects_controller.rb +++ b/app/controllers/media_objects_controller.rb @@ -1,11 +1,11 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# +# # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the diff --git a/app/controllers/objects_controller.rb b/app/controllers/objects_controller.rb index d418a19f09..b7184aeb8b 100644 --- a/app/controllers/objects_controller.rb +++ b/app/controllers/objects_controller.rb @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/controllers/playlist_items_controller.rb b/app/controllers/playlist_items_controller.rb index 7be5d99900..01fa2a9059 100644 --- a/app/controllers/playlist_items_controller.rb +++ b/app/controllers/playlist_items_controller.rb @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/controllers/playlists_controller.rb b/app/controllers/playlists_controller.rb index 6e1215d70f..31faa1ecc6 100644 --- a/app/controllers/playlists_controller.rb +++ b/app/controllers/playlists_controller.rb @@ -1,11 +1,11 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# +# # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the diff --git a/app/controllers/samvera/persona/users_controller.rb b/app/controllers/samvera/persona/users_controller.rb index 64fc6b2889..3c890ad90a 100644 --- a/app/controllers/samvera/persona/users_controller.rb +++ b/app/controllers/samvera/persona/users_controller.rb @@ -1,11 +1,11 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# +# # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the diff --git a/app/controllers/supplemental_files_controller.rb b/app/controllers/supplemental_files_controller.rb index 17c516f169..a8ccf15e89 100644 --- a/app/controllers/supplemental_files_controller.rb +++ b/app/controllers/supplemental_files_controller.rb @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/controllers/timelines_controller.rb b/app/controllers/timelines_controller.rb index 8b9b84be66..8dca8aa444 100644 --- a/app/controllers/timelines_controller.rb +++ b/app/controllers/timelines_controller.rb @@ -1,11 +1,11 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# +# # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the diff --git a/app/controllers/users/omniauth_callbacks_controller.rb b/app/controllers/users/omniauth_callbacks_controller.rb index af264b43ad..492bfc8707 100644 --- a/app/controllers/users/omniauth_callbacks_controller.rb +++ b/app/controllers/users/omniauth_callbacks_controller.rb @@ -1,11 +1,11 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# +# # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the diff --git a/app/controllers/users/sessions_controller.rb b/app/controllers/users/sessions_controller.rb index 121d8b1567..0b64dfb2af 100644 --- a/app/controllers/users/sessions_controller.rb +++ b/app/controllers/users/sessions_controller.rb @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/controllers/vocabulary_controller.rb b/app/controllers/vocabulary_controller.rb index e6d75a6874..cea4470ce7 100644 --- a/app/controllers/vocabulary_controller.rb +++ b/app/controllers/vocabulary_controller.rb @@ -1,11 +1,11 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# +# # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 4ee88afe9b..ec643663ce 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/helpers/blacklight/local_blacklight_helper.rb b/app/helpers/blacklight/local_blacklight_helper.rb index 50d14df05b..24d3dea4bc 100644 --- a/app/helpers/blacklight/local_blacklight_helper.rb +++ b/app/helpers/blacklight/local_blacklight_helper.rb @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/helpers/catalog_helper.rb b/app/helpers/catalog_helper.rb index 0459fadeba..32b19db134 100644 --- a/app/helpers/catalog_helper.rb +++ b/app/helpers/catalog_helper.rb @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/helpers/cdl_helper.rb b/app/helpers/cdl_helper.rb index 364b0a9cf0..b1bcc93246 100644 --- a/app/helpers/cdl_helper.rb +++ b/app/helpers/cdl_helper.rb @@ -1,11 +1,11 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# +# # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the diff --git a/app/helpers/conditional_partials_helper.rb b/app/helpers/conditional_partials_helper.rb index ad10123adf..eaf5fec4ab 100644 --- a/app/helpers/conditional_partials_helper.rb +++ b/app/helpers/conditional_partials_helper.rb @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/helpers/media_objects_helper.rb b/app/helpers/media_objects_helper.rb index c435a20b73..a6f44d32ff 100644 --- a/app/helpers/media_objects_helper.rb +++ b/app/helpers/media_objects_helper.rb @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/helpers/player_helper.rb b/app/helpers/player_helper.rb index d0939fe712..a9a75529c7 100644 --- a/app/helpers/player_helper.rb +++ b/app/helpers/player_helper.rb @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/helpers/playlists_helper.rb b/app/helpers/playlists_helper.rb index b0108ff136..f20548d913 100644 --- a/app/helpers/playlists_helper.rb +++ b/app/helpers/playlists_helper.rb @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/helpers/security_helper.rb b/app/helpers/security_helper.rb index 98bc0821cc..57e99e14ea 100644 --- a/app/helpers/security_helper.rb +++ b/app/helpers/security_helper.rb @@ -1,11 +1,11 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# +# # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the diff --git a/app/helpers/timelines_helper.rb b/app/helpers/timelines_helper.rb index 0091a0453a..99b40ad7f9 100644 --- a/app/helpers/timelines_helper.rb +++ b/app/helpers/timelines_helper.rb @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/helpers/upload_form_helper.rb b/app/helpers/upload_form_helper.rb index 6aa989e24f..7a34d4b97f 100644 --- a/app/helpers/upload_form_helper.rb +++ b/app/helpers/upload_form_helper.rb @@ -1,4 +1,4 @@ -# Copyright 2011-2022, The Trustees of Indiana University and Northwestern +# Copyright 2011-2023, The Trustees of Indiana University and Northwestern # University. Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # diff --git a/app/javascript/components/CollectionCarousel.js b/app/javascript/components/CollectionCarousel.js index 41174c7949..e343825f4d 100644 --- a/app/javascript/components/CollectionCarousel.js +++ b/app/javascript/components/CollectionCarousel.js @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/javascript/components/CollectionDetails.js b/app/javascript/components/CollectionDetails.js index b0e8690a3d..b9d59c076d 100644 --- a/app/javascript/components/CollectionDetails.js +++ b/app/javascript/components/CollectionDetails.js @@ -1,12 +1,12 @@ -/* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern +/* + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. - * + * * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the diff --git a/app/javascript/components/CollectionList.js b/app/javascript/components/CollectionList.js index 236c5d74fc..cd0d547904 100644 --- a/app/javascript/components/CollectionList.js +++ b/app/javascript/components/CollectionList.js @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/javascript/components/ReactButtonContainer.scss b/app/javascript/components/ReactButtonContainer.scss index d7633bb388..3fcb1bc956 100644 --- a/app/javascript/components/ReactButtonContainer.scss +++ b/app/javascript/components/ReactButtonContainer.scss @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/javascript/components/Search.js b/app/javascript/components/Search.js index c8a1fc6912..8e30d790b6 100644 --- a/app/javascript/components/Search.js +++ b/app/javascript/components/Search.js @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022, The Trustees of Indiana University and Northwestern + * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * diff --git a/app/javascript/components/collection_index.html b/app/javascript/components/collection_index.html index 22147cc628..925ab6f309 100644 --- a/app/javascript/components/collection_index.html +++ b/app/javascript/components/collection_index.html @@ -1,5 +1,5 @@