From 4bc4af3ebbc47b68a313108c72c319945c673c1b Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Tue, 17 Oct 2023 22:14:23 -0700 Subject: [PATCH 1/3] Rails / Hyrax Upgrade --- hyrax-iiif_av.gemspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hyrax-iiif_av.gemspec b/hyrax-iiif_av.gemspec index 2626b3c..6f97950 100644 --- a/hyrax-iiif_av.gemspec +++ b/hyrax-iiif_av.gemspec @@ -19,9 +19,9 @@ Gem::Specification.new do |s| f.match(%r{^(test|spec|features)/}) end - s.add_dependency "rails", "~>5.1" + s.add_dependency "rails", ">= 5.1", "< 8.0" s.add_dependency "blacklight" - s.add_dependency "hyrax", ">= 2.9", "< 4.0" + s.add_dependency "hyrax", ">= 3.5", "< 6.0" s.add_dependency "iiif_manifest", "> 0.5" s.add_development_dependency 'bixby' From 66a94059f192a295bfb4503d247986f16b183330 Mon Sep 17 00:00:00 2001 From: Jeremy Friesen Date: Tue, 19 Dec 2023 16:57:38 -0500 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=A7=B9=20Exclude=20specs=20and=20bin/?= =?UTF-8?q?rails=20from=20gem=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There's no need to include the spec files in the gemfile list. And including `bin/rails` can wreck havoc on the downstream application. Related to: - https://github.com/samvera/hyrax/pull/6146 --- hyrax-iiif_av.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hyrax-iiif_av.gemspec b/hyrax-iiif_av.gemspec index 6f97950..0a7eafc 100644 --- a/hyrax-iiif_av.gemspec +++ b/hyrax-iiif_av.gemspec @@ -16,7 +16,7 @@ Gem::Specification.new do |s| s.license = 'Apache-2.0' s.files = `git ls-files -z`.split("\x0").reject do |f| - f.match(%r{^(test|spec|features)/}) + f.match(%r{^(test|spec|features)/}) || f == 'bin/rails' end s.add_dependency "rails", ">= 5.1", "< 8.0" From 4723b8fd0961fa179caf787532bd7922a44957ec Mon Sep 17 00:00:00 2001 From: Kirk Wang Date: Tue, 2 Jan 2024 10:53:55 -0800 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=90=9B=20Only=20render=20json=20for?= =?UTF-8?q?=20manifest=20requests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We were getting the error: `ActionController::RespondToMismatchError in Hyrax::ImagesController#manifest` `respond_to was called multiple times and matched with conflicting formats in this action. Please note that you may only call respond_to and match on a single format per action.` This commit fixes that by only rendering json for manifest requests. --- .../concerns/hyrax/iiif_av/controller_behavior.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/controllers/concerns/hyrax/iiif_av/controller_behavior.rb b/app/controllers/concerns/hyrax/iiif_av/controller_behavior.rb index cb5eb37..eb72ff5 100644 --- a/app/controllers/concerns/hyrax/iiif_av/controller_behavior.rb +++ b/app/controllers/concerns/hyrax/iiif_av/controller_behavior.rb @@ -36,10 +36,7 @@ def manifest json = iiif_manifest_builder.manifest_for(presenter: iiif_manifest_presenter, iiif_manifest_factory: manifest_factory) - respond_to do |wants| - wants.json { render json: json } - wants.html { render json: json } - end + render json: json end private