From c02938382f47eb62b7defcc30c72c86746514abd Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Wed, 22 May 2024 16:24:54 -0700 Subject: [PATCH 01/10] move everything to the established decorator pattern --- .../cleanup_file_sets_actor_decorator.rb | 1 + .../actors/file_set_actor_decorator.rb | 1 + .../iiif_print/iiif_helper_decorator.rb | 1 + .../concerns/iiif_print/child_work_indexer.rb | 27 --------- .../child_work_indexer_decorator.rb | 45 +++++++++++++++ ...dexer.rb => file_set_indexer_decorator.rb} | 16 +++++- .../iiif_print/iiif_search_decorator.rb | 1 + .../iiif_search_response_decorator.rb | 1 + .../file_set_presenter_decorator.rb | 1 + ...b => iiif_manifest_presenter_decorator.rb} | 3 +- ...f_manifest_presenter_factory_decorator.rb} | 3 +- .../faceted_attribute_renderer_decorator.rb | 1 + ... => manifest_builder_service_decorator.rb} | 3 +- .../simple_schema_loader_decorator.rb | 1 + .../steps/delete_all_file_sets_decorator.rb | 2 + config/initializers/simple_schema_loader.rb | 1 - .../annotation_decorator.rb | 1 + lib/iiif_print/engine.rb | 55 +++---------------- lib/iiif_print/works_controller_behavior.rb | 9 --- .../works_controller_behavior_decorator.rb | 13 +++++ ...iiif_manifest_presenter_decorator_spec.rb} | 2 +- ...ifest_presenter_factory_decorator_spec.rb} | 4 +- ...anifest_builder_service_decorator_spec.rb} | 2 +- 23 files changed, 101 insertions(+), 93 deletions(-) delete mode 100644 app/indexers/concerns/iiif_print/child_work_indexer.rb create mode 100644 app/indexers/concerns/iiif_print/child_work_indexer_decorator.rb rename app/indexers/concerns/iiif_print/{file_set_indexer.rb => file_set_indexer_decorator.rb} (63%) rename app/presenters/iiif_print/{iiif_manifest_presenter_behavior.rb => iiif_manifest_presenter_decorator.rb} (97%) rename app/presenters/iiif_print/{iiif_manifest_presenter_factory_behavior.rb => iiif_manifest_presenter_factory_decorator.rb} (89%) rename app/services/iiif_print/{manifest_builder_service_behavior.rb => manifest_builder_service_decorator.rb} (97%) delete mode 100644 config/initializers/simple_schema_loader.rb delete mode 100644 lib/iiif_print/works_controller_behavior.rb create mode 100644 lib/iiif_print/works_controller_behavior_decorator.rb rename spec/presenters/iiif_print/{iiif_manifest_presenter_behavior_spec.rb => iiif_manifest_presenter_decorator_spec.rb} (97%) rename spec/presenters/iiif_print/{iiif_manifest_presenter_factory_behavior_spec.rb => iiif_manifest_presenter_factory_decorator_spec.rb} (96%) rename spec/services/iiif_print/{manifest_builder_service_behavior_spec.rb => manifest_builder_service_decorator_spec.rb} (92%) diff --git a/app/actors/iiif_print/actors/cleanup_file_sets_actor_decorator.rb b/app/actors/iiif_print/actors/cleanup_file_sets_actor_decorator.rb index 329ed680..a35a2eb0 100644 --- a/app/actors/iiif_print/actors/cleanup_file_sets_actor_decorator.rb +++ b/app/actors/iiif_print/actors/cleanup_file_sets_actor_decorator.rb @@ -22,3 +22,4 @@ def destroy(env) end end end +Hyrax::Actors::CleanupFileSetsActor.prepend(IiifPrint::Actors::CleanupFileSetsActorDecorator) diff --git a/app/actors/iiif_print/actors/file_set_actor_decorator.rb b/app/actors/iiif_print/actors/file_set_actor_decorator.rb index 1b7b3122..144ad076 100644 --- a/app/actors/iiif_print/actors/file_set_actor_decorator.rb +++ b/app/actors/iiif_print/actors/file_set_actor_decorator.rb @@ -56,3 +56,4 @@ def destroy end end end +Hyrax::Actors::FileSetActor.prepend(IiifPrint::Actors::FileSetActorDecorator) diff --git a/app/helpers/iiif_print/iiif_helper_decorator.rb b/app/helpers/iiif_print/iiif_helper_decorator.rb index 819bd5c5..74100ae5 100644 --- a/app/helpers/iiif_print/iiif_helper_decorator.rb +++ b/app/helpers/iiif_print/iiif_helper_decorator.rb @@ -30,3 +30,4 @@ def uv_search_param end end end +Hyrax::IiifHelper.prepend(IiifPrint::IiifHelperDecorator) diff --git a/app/indexers/concerns/iiif_print/child_work_indexer.rb b/app/indexers/concerns/iiif_print/child_work_indexer.rb deleted file mode 100644 index abdd3017..00000000 --- a/app/indexers/concerns/iiif_print/child_work_indexer.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -module IiifPrint - module ChildWorkIndexer - def to_solr - super.tap do |index_document| - index_solr_doc(index_document) - end - end - - def generate_solr_document - super.tap do |solr_doc| - index_solr_doc(solr_doc) - end - end - - private - - def index_solr_doc(solr_doc) - object ||= @object || resource - solr_doc['is_child_bsi'] ||= object.try(:is_child) - solr_doc['split_from_pdf_id_ssi'] ||= object.try(:split_from_pdf_id) - solr_doc['is_page_of_ssim'] = iiif_print_lineage_service.ancestor_ids_for(object) - solr_doc['member_ids_ssim'] = iiif_print_lineage_service.descendent_member_ids_for(object) - end - end -end diff --git a/app/indexers/concerns/iiif_print/child_work_indexer_decorator.rb b/app/indexers/concerns/iiif_print/child_work_indexer_decorator.rb new file mode 100644 index 00000000..bb9404b8 --- /dev/null +++ b/app/indexers/concerns/iiif_print/child_work_indexer_decorator.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +module IiifPrint + module ChildWorkIndexerDecorator + def to_solr + super.tap do |index_document| + index_solr_doc(index_document) + end + end + + def generate_solr_document + super.tap do |solr_doc| + index_solr_doc(solr_doc) + end + end + + private + + def index_solr_doc(solr_doc) + object ||= @object || resource + solr_doc['is_child_bsi'] ||= object.try(:is_child) + solr_doc['split_from_pdf_id_ssi'] ||= object.try(:split_from_pdf_id) + solr_doc['is_page_of_ssim'] = iiif_print_lineage_service.ancestor_ids_for(object) + solr_doc['member_ids_ssim'] = iiif_print_lineage_service.descendent_member_ids_for(object) + end + end +end + +if ActiveModel::Type::Boolean.new.cast(ENV.fetch('HYRAX_VALKYRIE', false)) + # Newer versions of Hyrax favor `Hyrax::Indexers::PcdmObjectIndexer` and deprecate + # `Hyrax::ValkyrieWorkIndexer` + indexers = Hyrax.config.curation_concerns.map do |concern| + "#{concern}ResourceIndexer".safe_constantize + end + indexers.each { |indexer| indexer.prepend(IiifPrint::ChildWorkIndexerDecorator) } + + # Versions 3.0+ of Hyrax have `Hyrax::ValkyrieWorkIndexer` so we want to decorate that as + # well. We want to use the elsif construct because later on Hyrax::ValkyrieWorkIndexer + # inherits from Hyrax::Indexers::PcdmObjectIndexer and only implements: + # `def initialize(*args); super; end` + 'Hyrax::ValkyrieWorkIndexer'.safe_constantize&.prepend(IiifPrint::ChildWorkIndexerDecorator) +else + # The ActiveFedora::Base indexer for Works + Hyrax::WorkIndexer.prepend(IiifPrint::ChildWorkIndexerDecorator) +end diff --git a/app/indexers/concerns/iiif_print/file_set_indexer.rb b/app/indexers/concerns/iiif_print/file_set_indexer_decorator.rb similarity index 63% rename from app/indexers/concerns/iiif_print/file_set_indexer.rb rename to app/indexers/concerns/iiif_print/file_set_indexer_decorator.rb index b42e8900..e815f4a9 100644 --- a/app/indexers/concerns/iiif_print/file_set_indexer.rb +++ b/app/indexers/concerns/iiif_print/file_set_indexer_decorator.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module IiifPrint - module FileSetIndexer + module FileSetIndexerDecorator def to_solr super.tap do |index_document| index_solr_doc(index_document) @@ -55,3 +55,17 @@ def all_text(object) end end end +if ActiveModel::Type::Boolean.new.cast(ENV.fetch('HYRAX_VALKYRIE', false)) + # Newer versions of Hyrax favor `Hyrax::Indexers::FileSetIndexer` and deprecate + # `Hyrax::ValkyrieFileSetIndexer`. + 'Hyrax::Indexers::FileSetIndexer'.safe_constantize&.prepend(IiifPrint::FileSetIndexerDecorator) + + # Versions 3.0+ of Hyrax have `Hyrax::ValkyrieFileSetIndexer` so we want to decorate that as + # well. We want to use the elsif construct because later on Hyrax::ValkyrieFileSetIndexer + # inherits from Hyrax::Indexers::FileSetIndexer and only implements: + # `def initialize(*args); super; end` + 'Hyrax::ValkyrieFileSetIndexer'.safe_constantize&.prepend(IiifPrint::FileSetIndexerDecorator) +else + # The ActiveFedora::Base indexer for FileSets + Hyrax::FileSetIndexer.prepend(IiifPrint::FileSetIndexerDecorator) +end diff --git a/app/models/iiif_print/iiif_search_decorator.rb b/app/models/iiif_print/iiif_search_decorator.rb index 4c007eb0..3e2370fc 100644 --- a/app/models/iiif_print/iiif_search_decorator.rb +++ b/app/models/iiif_print/iiif_search_decorator.rb @@ -33,3 +33,4 @@ def solr_params end end end +::BlacklightIiifSearch::IiifSearch.prepend(IiifPrint::IiifSearchDecorator) diff --git a/app/models/iiif_print/iiif_search_response_decorator.rb b/app/models/iiif_print/iiif_search_response_decorator.rb index e8b399aa..e852b37f 100644 --- a/app/models/iiif_print/iiif_search_response_decorator.rb +++ b/app/models/iiif_print/iiif_search_response_decorator.rb @@ -38,3 +38,4 @@ def add_metadata_match(json_results) end end end +::BlacklightIiifSearch::IiifSearchResponse.prepend(IiifPrint::IiifSearchResponseDecorator) diff --git a/app/presenters/iiif_print/file_set_presenter_decorator.rb b/app/presenters/iiif_print/file_set_presenter_decorator.rb index b7b40dbd..55ca6435 100644 --- a/app/presenters/iiif_print/file_set_presenter_decorator.rb +++ b/app/presenters/iiif_print/file_set_presenter_decorator.rb @@ -9,3 +9,4 @@ def show_split_button? end end end +Hyrax::FileSetPresenter.prepend(IiifPrint::FileSetPresenterDecorator) diff --git a/app/presenters/iiif_print/iiif_manifest_presenter_behavior.rb b/app/presenters/iiif_print/iiif_manifest_presenter_decorator.rb similarity index 97% rename from app/presenters/iiif_print/iiif_manifest_presenter_behavior.rb rename to app/presenters/iiif_print/iiif_manifest_presenter_decorator.rb index cec1477c..d8eb73ee 100644 --- a/app/presenters/iiif_print/iiif_manifest_presenter_behavior.rb +++ b/app/presenters/iiif_print/iiif_manifest_presenter_decorator.rb @@ -1,6 +1,6 @@ # mixin to provide URL for IIIF Content Search service module IiifPrint - module IiifManifestPresenterBehavior + module IiifManifestPresenterDecorator extend ActiveSupport::Concern # Extending the presenter to the base url which includes the protocol. @@ -128,3 +128,4 @@ def iiif_image_url_builder(url_builder:) end end end +Hyrax::IiifManifestPresenter.prepend(IiifPrint::IiifManifestPresenterDecorator) diff --git a/app/presenters/iiif_print/iiif_manifest_presenter_factory_behavior.rb b/app/presenters/iiif_print/iiif_manifest_presenter_factory_decorator.rb similarity index 89% rename from app/presenters/iiif_print/iiif_manifest_presenter_factory_behavior.rb rename to app/presenters/iiif_print/iiif_manifest_presenter_factory_decorator.rb index f1ee5385..1dcbee48 100644 --- a/app/presenters/iiif_print/iiif_manifest_presenter_factory_behavior.rb +++ b/app/presenters/iiif_print/iiif_manifest_presenter_factory_decorator.rb @@ -1,5 +1,5 @@ module IiifPrint - module IiifManifestPresenterFactoryBehavior + module IiifManifestPresenterFactoryDecorator # This will override Hyrax::IiifManifestPresenter::Factory#build and introducing # the expected behavior: # - child work images show as canvases in the parent work manifest @@ -31,3 +31,4 @@ def load_file_set_docs(file_set_ids) end end end +Hyrax::IiifManifestPresenter::Factory.prepend(IiifPrint::IiifManifestPresenterFactoryDecorator) diff --git a/app/renderers/hyrax/renderers/faceted_attribute_renderer_decorator.rb b/app/renderers/hyrax/renderers/faceted_attribute_renderer_decorator.rb index 29da4229..2b5d7688 100644 --- a/app/renderers/hyrax/renderers/faceted_attribute_renderer_decorator.rb +++ b/app/renderers/hyrax/renderers/faceted_attribute_renderer_decorator.rb @@ -16,3 +16,4 @@ def search_path(value) end end end +Hyrax::Renderers::FacetedAttributeRenderer.prepend(Hyrax::Renderers::FacetedAttributeRendererDecorator) diff --git a/app/services/iiif_print/manifest_builder_service_behavior.rb b/app/services/iiif_print/manifest_builder_service_decorator.rb similarity index 97% rename from app/services/iiif_print/manifest_builder_service_behavior.rb rename to app/services/iiif_print/manifest_builder_service_decorator.rb index f8ba9edb..4a01a915 100644 --- a/app/services/iiif_print/manifest_builder_service_behavior.rb +++ b/app/services/iiif_print/manifest_builder_service_decorator.rb @@ -1,6 +1,6 @@ module IiifPrint # rubocop:disable Metrics/ModuleLength - module ManifestBuilderServiceBehavior + module ManifestBuilderServiceDecorator def initialize(*args, version: IiifPrint.config.default_iiif_manifest_version, iiif_manifest_factory: iiif_manifest_factory_for(version), @@ -154,3 +154,4 @@ def get_solr_hits(ids) end # rubocop:enable Metrics/ClassLength end +Hyrax::ManifestBuilderService.prepend(IiifPrint::ManifestBuilderServiceDecorator) diff --git a/app/services/iiif_print/simple_schema_loader_decorator.rb b/app/services/iiif_print/simple_schema_loader_decorator.rb index 13f14b11..4cd255de 100644 --- a/app/services/iiif_print/simple_schema_loader_decorator.rb +++ b/app/services/iiif_print/simple_schema_loader_decorator.rb @@ -9,3 +9,4 @@ def config_search_paths end end end +Hyrax::SimpleSchemaLoader.prepend(IiifPrint::SimpleSchemaLoaderDecorator) diff --git a/app/transactions/hyrax/transactions/steps/delete_all_file_sets_decorator.rb b/app/transactions/hyrax/transactions/steps/delete_all_file_sets_decorator.rb index 148d77d7..d4edcbca 100644 --- a/app/transactions/hyrax/transactions/steps/delete_all_file_sets_decorator.rb +++ b/app/transactions/hyrax/transactions/steps/delete_all_file_sets_decorator.rb @@ -33,3 +33,5 @@ def call(resource, user: nil) end end end + +"Hyrax::Transactions::Steps::DeleteAllFileSets".safe_constantize&.prepend(Hyrax::Transactions::Steps::DeleteAllFileSetsDecorator) diff --git a/config/initializers/simple_schema_loader.rb b/config/initializers/simple_schema_loader.rb deleted file mode 100644 index a5c9fc56..00000000 --- a/config/initializers/simple_schema_loader.rb +++ /dev/null @@ -1 +0,0 @@ -"Hyrax::SimpleSchemaLoader".safe_constantize&.prepend(IiifPrint::SimpleSchemaLoaderDecorator) diff --git a/lib/iiif_print/blacklight_iiif_search/annotation_decorator.rb b/lib/iiif_print/blacklight_iiif_search/annotation_decorator.rb index 1801786b..7ba382ca 100644 --- a/lib/iiif_print/blacklight_iiif_search/annotation_decorator.rb +++ b/lib/iiif_print/blacklight_iiif_search/annotation_decorator.rb @@ -134,3 +134,4 @@ def text_resource_for_annotation end end end +::BlacklightIiifSearch::IiifSearchAnnotation.prepend(IiifPrint::BlacklightIiifSearch::AnnotationDecorator) diff --git a/lib/iiif_print/engine.rb b/lib/iiif_print/engine.rb index 40b108a8..0cb7e679 100644 --- a/lib/iiif_print/engine.rb +++ b/lib/iiif_print/engine.rb @@ -48,55 +48,14 @@ class Engine < ::Rails::Engine Hyrax.publisher.subscribe(IiifPrint::Listener.new) if Hyrax.respond_to?(:publisher) - Hyrax::IiifManifestPresenter.prepend(IiifPrint::IiifManifestPresenterBehavior) - Hyrax::IiifManifestPresenter::Factory.prepend(IiifPrint::IiifManifestPresenterFactoryBehavior) - Hyrax::ManifestBuilderService.prepend(IiifPrint::ManifestBuilderServiceBehavior) - Hyrax::Renderers::FacetedAttributeRenderer.prepend(Hyrax::Renderers::FacetedAttributeRendererDecorator) - Hyrax::WorksControllerBehavior.prepend(IiifPrint::WorksControllerBehaviorDecorator) - "Hyrax::Transactions::Steps::DeleteAllFileSets".safe_constantize&.prepend(Hyrax::Transactions::Steps::DeleteAllFileSetsDecorator) - # Hyku::WorksControllerBehavior was introduced in Hyku v6.0.0+. Yes we don't depend on Hyku, - # but this allows us to do minimal Hyku antics with IiifPrint. - 'Hyku::WorksControllerBehavior'.safe_constantize&.prepend(IiifPrint::WorksControllerBehaviorDecorator) - - Hyrax::FileSetPresenter.prepend(IiifPrint::FileSetPresenterDecorator) - Hyrax::WorkShowPresenter.prepend(IiifPrint::WorkShowPresenterDecorator) - Hyrax::IiifHelper.prepend(IiifPrint::IiifHelperDecorator) - - if ActiveModel::Type::Boolean.new.cast(ENV.fetch('HYRAX_VALKYRIE', false)) - # Newer versions of Hyrax favor `Hyrax::Indexers::FileSetIndexer` and deprecate - # `Hyrax::ValkyrieFileSetIndexer`. - 'Hyrax::Indexers::FileSetIndexer'.safe_constantize&.prepend(IiifPrint::FileSetIndexer) - - # Versions 3.0+ of Hyrax have `Hyrax::ValkyrieFileSetIndexer` so we want to decorate that as - # well. We want to use the elsif construct because later on Hyrax::ValkyrieFileSetIndexer - # inherits from Hyrax::Indexers::FileSetIndexer and only implements: - # `def initialize(*args); super; end` - 'Hyrax::ValkyrieFileSetIndexer'.safe_constantize&.prepend(IiifPrint::FileSetIndexer) - - # Newer versions of Hyrax favor `Hyrax::Indexers::PcdmObjectIndexer` and deprecate - # `Hyrax::ValkyrieWorkIndexer` - indexers = Hyrax.config.curation_concerns.map do |concern| - "#{concern}ResourceIndexer".safe_constantize - end - indexers.each { |indexer| indexer.prepend(IiifPrint::ChildWorkIndexer) } - - # Versions 3.0+ of Hyrax have `Hyrax::ValkyrieWorkIndexer` so we want to decorate that as - # well. We want to use the elsif construct because later on Hyrax::ValkyrieWorkIndexer - # inherits from Hyrax::Indexers::PcdmObjectIndexer and only implements: - # `def initialize(*args); super; end` - 'Hyrax::ValkyrieWorkIndexer'.safe_constantize&.prepend(IiifPrint::ChildWorkIndexer) - else - # The ActiveFedora::Base indexer for FileSets - Hyrax::FileSetIndexer.prepend(IiifPrint::FileSetIndexer) - # The ActiveFedora::Base indexer for Works - Hyrax::WorkIndexer.prepend(IiifPrint::ChildWorkIndexer) + # Allows us to use decorator files + Dir.glob(File.join(File.dirname(__FILE__), "../../app/**/*_decorator*.rb")).sort.each do |c| + Rails.configuration.cache_classes ? require(c) : load(c) end - ::BlacklightIiifSearch::IiifSearchResponse.prepend(IiifPrint::IiifSearchResponseDecorator) - ::BlacklightIiifSearch::IiifSearchAnnotation.prepend(IiifPrint::BlacklightIiifSearch::AnnotationDecorator) - ::BlacklightIiifSearch::IiifSearch.prepend(IiifPrint::IiifSearchDecorator) - Hyrax::Actors::FileSetActor.prepend(IiifPrint::Actors::FileSetActorDecorator) - Hyrax::Actors::CleanupFileSetsActor.prepend(IiifPrint::Actors::CleanupFileSetsActorDecorator) + Dir.glob(File.join(File.dirname(__FILE__), "../../lib/**/*_decorator*.rb")).sort.each do |c| + Rails.configuration.cache_classes ? require(c) : load(c) + end Hyrax.config do |config| config.callback.set(:after_create_fileset) do |file_set, user| @@ -108,7 +67,7 @@ class Engine < ::Rails::Engine config.after_initialize do IiifPrint::Solr::Document.decorate(SolrDocument) Hyrax::IiifManifestPresenter::DisplayImagePresenter - .prepend(IiifPrint::IiifManifestPresenterBehavior::DisplayImagePresenterBehavior) + .prepend(IiifPrint::IiifManifestPresenterDecorator::DisplayImagePresenterDecorator) end # rubocop:enable Metrics/BlockLength end diff --git a/lib/iiif_print/works_controller_behavior.rb b/lib/iiif_print/works_controller_behavior.rb deleted file mode 100644 index ec43b6ee..00000000 --- a/lib/iiif_print/works_controller_behavior.rb +++ /dev/null @@ -1,9 +0,0 @@ -module IiifPrint - module WorksControllerBehaviorDecorator - # Extending the presenter to the base url which includes the protocol. - # We need the base url to render the facet links. - def iiif_manifest_presenter - super.tap { |i| i.base_url = request.base_url } - end - end -end diff --git a/lib/iiif_print/works_controller_behavior_decorator.rb b/lib/iiif_print/works_controller_behavior_decorator.rb new file mode 100644 index 00000000..96a8ea2d --- /dev/null +++ b/lib/iiif_print/works_controller_behavior_decorator.rb @@ -0,0 +1,13 @@ +module IiifPrint + module WorksControllerBehaviorDecorator + # Extending the presenter to the base url which includes the protocol. + # We need the base url to render the facet links. + def iiif_manifest_presenter + super.tap { |i| i.base_url = request.base_url } + end + end +end +Hyrax::WorksControllerBehavior.prepend(IiifPrint::WorksControllerBehaviorDecorator) +# Hyku::WorksControllerBehavior was introduced in Hyku v6.0.0+. Yes we don't depend on Hyku, +# but this allows us to do minimal Hyku antics with IiifPrint. +'Hyku::WorksControllerBehavior'.safe_constantize&.prepend(IiifPrint::WorksControllerBehaviorDecorator) diff --git a/spec/presenters/iiif_print/iiif_manifest_presenter_behavior_spec.rb b/spec/presenters/iiif_print/iiif_manifest_presenter_decorator_spec.rb similarity index 97% rename from spec/presenters/iiif_print/iiif_manifest_presenter_behavior_spec.rb rename to spec/presenters/iiif_print/iiif_manifest_presenter_decorator_spec.rb index 641968c0..2541d582 100644 --- a/spec/presenters/iiif_print/iiif_manifest_presenter_behavior_spec.rb +++ b/spec/presenters/iiif_print/iiif_manifest_presenter_decorator_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -RSpec.describe IiifPrint::IiifManifestPresenterBehavior do +RSpec.describe IiifPrint::IiifManifestPresenterDecorator do let(:attributes) do { "id" => "abc123", "title_tesim" => ['Page the first'], diff --git a/spec/presenters/iiif_print/iiif_manifest_presenter_factory_behavior_spec.rb b/spec/presenters/iiif_print/iiif_manifest_presenter_factory_decorator_spec.rb similarity index 96% rename from spec/presenters/iiif_print/iiif_manifest_presenter_factory_behavior_spec.rb rename to spec/presenters/iiif_print/iiif_manifest_presenter_factory_decorator_spec.rb index 2c6788b6..1f78c23d 100644 --- a/spec/presenters/iiif_print/iiif_manifest_presenter_factory_behavior_spec.rb +++ b/spec/presenters/iiif_print/iiif_manifest_presenter_factory_decorator_spec.rb @@ -1,6 +1,6 @@ require "spec_helper" -RSpec.describe IiifPrint::IiifManifestPresenterBehavior do +RSpec.describe IiifPrint::IiifManifestPresenterDecorator do let(:parent_fs_attributes) do { "id" => "parent_fs123", "title_tesim" => ["My Parent FileSet"], @@ -35,7 +35,7 @@ it "returns an Array of DisplayImagePresenters" do allow_any_instance_of(Hyrax::IiifManifestPresenter::Factory) .to receive(:load_docs).and_return([parent_fs_solr_doc, child_work_solr_doc]) - allow_any_instance_of(IiifPrint::IiifManifestPresenterFactoryBehavior) + allow_any_instance_of(IiifPrint::IiifManifestPresenterFactoryDecorator) .to receive(:load_file_set_docs).and_return([child_fs_solr_doc]) allow(child_work_solr_doc).to receive(:hydra_model).and_return(MyWork) allow(Hyrax.config).to receive(:curation_concerns).and_return([MyWork]) diff --git a/spec/services/iiif_print/manifest_builder_service_behavior_spec.rb b/spec/services/iiif_print/manifest_builder_service_decorator_spec.rb similarity index 92% rename from spec/services/iiif_print/manifest_builder_service_behavior_spec.rb rename to spec/services/iiif_print/manifest_builder_service_decorator_spec.rb index d358dffc..8046c406 100644 --- a/spec/services/iiif_print/manifest_builder_service_behavior_spec.rb +++ b/spec/services/iiif_print/manifest_builder_service_decorator_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -RSpec.describe IiifPrint::ManifestBuilderServiceBehavior do +RSpec.describe IiifPrint::ManifestBuilderServiceDecorator do context '#initialize' do it 'uses defaults to set the version' do builder_service = Hyrax::ManifestBuilderService.new From 404f794590c85a2e4672bbe36172fd8a514ce06b Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Wed, 22 May 2024 22:07:13 -0700 Subject: [PATCH 02/10] skip double require --- lib/iiif_print.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/iiif_print.rb b/lib/iiif_print.rb index 2d3f2f0f..b7a5e464 100644 --- a/lib/iiif_print.rb +++ b/lib/iiif_print.rb @@ -13,8 +13,6 @@ require "iiif_print/tiff_derivative_service" require "iiif_print/lineage_service" require "iiif_print/metadata" -require "iiif_print/works_controller_behavior" -require "iiif_print/blacklight_iiif_search/annotation_decorator" require "iiif_print/split_pdfs/base_splitter" require "iiif_print/split_pdfs/child_work_creation_from_pdf_service" require "iiif_print/split_pdfs/derivative_rodeo_splitter" From 03f456e46e7394bce94e2d8a89087eb7762ff9cc Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Thu, 23 May 2024 21:52:42 -0700 Subject: [PATCH 03/10] do not nest modules like this please --- .../display_image_presenter_decorator.rb | 102 ++++++++++++++++++ .../iiif_manifest_presenter_decorator.rb | 95 ---------------- lib/iiif_print/engine.rb | 2 - 3 files changed, 102 insertions(+), 97 deletions(-) create mode 100644 app/presenters/iiif_print/iiif_manifest_presenter/display_image_presenter_decorator.rb diff --git a/app/presenters/iiif_print/iiif_manifest_presenter/display_image_presenter_decorator.rb b/app/presenters/iiif_print/iiif_manifest_presenter/display_image_presenter_decorator.rb new file mode 100644 index 00000000..a88db0fe --- /dev/null +++ b/app/presenters/iiif_print/iiif_manifest_presenter/display_image_presenter_decorator.rb @@ -0,0 +1,102 @@ +# mixin to provide URL for IIIF Content Search service +module IiifPrint + module IiifManifestPresenter + # OVERRIDE: Hyrax v3.x + module DisplayImagePresenterBehavior + extend ActiveSupport::Concern + # Extending the presenter to the base url which includes the protocol. + # We need the base url to render the facet links and normalize the interface. + attr_accessor :base_url + + # Extending this class because there is an #ability= but not #ability and this definition + # mirrors the Hyrax::IiifManifestPresenter#ability. + def ability + @ability ||= NullAbility.new + end + + def display_image + return nil unless latest_file_id + return nil unless model.image? + return nil unless IiifPrint.config.default_iiif_manifest_version == 2 + + IIIFManifest::DisplayImage + .new(display_image_url(hostname), + format: image_format(alpha_channels), + width: width, + height: height, + iiif_endpoint: iiif_endpoint(latest_file_id, base_url: hostname)) + end + + # OVERRIDE: IIIF Hyrax AV v0.2 #display_content for prez 3 manifests + def display_content + return nil unless latest_file_id + return super unless model.image? + + IIIFManifest::V3::DisplayContent + .new(display_image_url(hostname), + format: image_format(alpha_channels), + width: width, + height: height, + type: 'Image', + iiif_endpoint: iiif_endpoint(latest_file_id, base_url: hostname)) + end + + def display_image_url(base_url) + if ENV['EXTERNAL_IIIF_URL'].present? + # At the moment we are only concerned about Hyrax's default image url builder + iiif_image_url_builder(url_builder: Hyrax.config.iiif_image_url_builder) + else + super + end + end + + def iiif_endpoint(file_id, base_url: request.base_url) + if ENV['EXTERNAL_IIIF_URL'].present? + IIIFManifest::IIIFEndpoint.new( + File.join(ENV['EXTERNAL_IIIF_URL'], file_id), + profile: Hyrax.config.iiif_image_compliance_level_uri + ) + else + super + end + end + + def hostname + @hostname || 'localhost' + end + + ## + # @return [Boolean] false + def work? + false + end + + private + + def latest_file_id + if ENV['EXTERNAL_IIIF_URL'].present? + external_latest_file_id + else + super + end + end + + def external_latest_file_id + @latest_file_id ||= digest_sha1 + end + + def iiif_image_url_builder(url_builder:) + args = [ + latest_file_id, + ENV['EXTERNAL_IIIF_URL'], + Hyrax.config.iiif_image_size_default + ] + # In Hyrax 3, Hyrax.config.iiif_image_url_builder takes an additional argument + args << image_format(alpha_channels) if url_builder.arity == 4 + + url_builder.call(*args).gsub(%r{images/}, '') + end + end + end +end +Hyrax::IiifManifestPresenter::DisplayImagePresenter.prepend(IiifPrint::IiifManifestPresenter::DisplayImagePresenterDecorator) diff --git a/app/presenters/iiif_print/iiif_manifest_presenter_decorator.rb b/app/presenters/iiif_print/iiif_manifest_presenter_decorator.rb index d8eb73ee..000c472b 100644 --- a/app/presenters/iiif_print/iiif_manifest_presenter_decorator.rb +++ b/app/presenters/iiif_print/iiif_manifest_presenter_decorator.rb @@ -31,101 +31,6 @@ def sequence_rendering end.flatten end - # OVERRIDE: Hyrax v3.x - module DisplayImagePresenterBehavior - # Extending the presenter to the base url which includes the protocol. - # We need the base url to render the facet links and normalize the interface. - attr_accessor :base_url - - # Extending this class because there is an #ability= but not #ability and this definition - # mirrors the Hyrax::IiifManifestPresenter#ability. - def ability - @ability ||= NullAbility.new - end - - def display_image - return nil unless latest_file_id - return nil unless model.image? - return nil unless IiifPrint.config.default_iiif_manifest_version == 2 - - IIIFManifest::DisplayImage - .new(display_image_url(hostname), - format: image_format(alpha_channels), - width: width, - height: height, - iiif_endpoint: iiif_endpoint(latest_file_id, base_url: hostname)) - end - - # OVERRIDE: IIIF Hyrax AV v0.2 #display_content for prez 3 manifests - def display_content - return nil unless latest_file_id - return super unless model.image? - - IIIFManifest::V3::DisplayContent - .new(display_image_url(hostname), - format: image_format(alpha_channels), - width: width, - height: height, - type: 'Image', - iiif_endpoint: iiif_endpoint(latest_file_id, base_url: hostname)) - end - - def display_image_url(base_url) - if ENV['EXTERNAL_IIIF_URL'].present? - # At the moment we are only concerned about Hyrax's default image url builder - iiif_image_url_builder(url_builder: Hyrax.config.iiif_image_url_builder) - else - super - end - end - - def iiif_endpoint(file_id, base_url: request.base_url) - if ENV['EXTERNAL_IIIF_URL'].present? - IIIFManifest::IIIFEndpoint.new( - File.join(ENV['EXTERNAL_IIIF_URL'], file_id), - profile: Hyrax.config.iiif_image_compliance_level_uri - ) - else - super - end - end - - def hostname - @hostname || 'localhost' - end - - ## - # @return [Boolean] false - def work? - false - end - - private - - def latest_file_id - if ENV['EXTERNAL_IIIF_URL'].present? - external_latest_file_id - else - super - end - end - - def external_latest_file_id - @latest_file_id ||= digest_sha1 - end - - def iiif_image_url_builder(url_builder:) - args = [ - latest_file_id, - ENV['EXTERNAL_IIIF_URL'], - Hyrax.config.iiif_image_size_default - ] - # In Hyrax 3, Hyrax.config.iiif_image_url_builder takes an additional argument - args << image_format(alpha_channels) if url_builder.arity == 4 - - url_builder.call(*args).gsub(%r{images/}, '') - end - end end end Hyrax::IiifManifestPresenter.prepend(IiifPrint::IiifManifestPresenterDecorator) diff --git a/lib/iiif_print/engine.rb b/lib/iiif_print/engine.rb index 0cb7e679..be6631b1 100644 --- a/lib/iiif_print/engine.rb +++ b/lib/iiif_print/engine.rb @@ -66,8 +66,6 @@ class Engine < ::Rails::Engine config.after_initialize do IiifPrint::Solr::Document.decorate(SolrDocument) - Hyrax::IiifManifestPresenter::DisplayImagePresenter - .prepend(IiifPrint::IiifManifestPresenterDecorator::DisplayImagePresenterDecorator) end # rubocop:enable Metrics/BlockLength end From 4540c8543928a1e1f7cc59dd41193cd9830a0c59 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Fri, 14 Jun 2024 11:31:21 -0700 Subject: [PATCH 04/10] name fix --- .../display_image_presenter_decorator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/presenters/iiif_print/iiif_manifest_presenter/display_image_presenter_decorator.rb b/app/presenters/iiif_print/iiif_manifest_presenter/display_image_presenter_decorator.rb index a88db0fe..2ca4fdd3 100644 --- a/app/presenters/iiif_print/iiif_manifest_presenter/display_image_presenter_decorator.rb +++ b/app/presenters/iiif_print/iiif_manifest_presenter/display_image_presenter_decorator.rb @@ -2,7 +2,7 @@ module IiifPrint module IiifManifestPresenter # OVERRIDE: Hyrax v3.x - module DisplayImagePresenterBehavior + module DisplayImagePresenterDecorator extend ActiveSupport::Concern # Extending the presenter to the base url which includes the protocol. # We need the base url to render the facet links and normalize the interface. From 6d1700a7615c25160b205aee4a928d8ff427f865 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Fri, 14 Jun 2024 15:58:46 -0700 Subject: [PATCH 05/10] call the cops --- .../display_image_presenter_decorator.rb | 2 +- app/presenters/iiif_print/iiif_manifest_presenter_decorator.rb | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/presenters/iiif_print/iiif_manifest_presenter/display_image_presenter_decorator.rb b/app/presenters/iiif_print/iiif_manifest_presenter/display_image_presenter_decorator.rb index 2ca4fdd3..02f6212f 100644 --- a/app/presenters/iiif_print/iiif_manifest_presenter/display_image_presenter_decorator.rb +++ b/app/presenters/iiif_print/iiif_manifest_presenter/display_image_presenter_decorator.rb @@ -4,7 +4,7 @@ module IiifManifestPresenter # OVERRIDE: Hyrax v3.x module DisplayImagePresenterDecorator extend ActiveSupport::Concern - # Extending the presenter to the base url which includes the protocol. + # Extending the presenter to the base url which includes the protocol. # We need the base url to render the facet links and normalize the interface. attr_accessor :base_url diff --git a/app/presenters/iiif_print/iiif_manifest_presenter_decorator.rb b/app/presenters/iiif_print/iiif_manifest_presenter_decorator.rb index 000c472b..45aac11e 100644 --- a/app/presenters/iiif_print/iiif_manifest_presenter_decorator.rb +++ b/app/presenters/iiif_print/iiif_manifest_presenter_decorator.rb @@ -30,7 +30,6 @@ def sequence_rendering 'label' => I18n.t("hyrax.manifest.download_text") + (rendering.label || '') } end.flatten end - end end Hyrax::IiifManifestPresenter.prepend(IiifPrint::IiifManifestPresenterDecorator) From e130bba3177913f8c0f25d26ea78fc88e4e19e7e Mon Sep 17 00:00:00 2001 From: Kirk Wang Date: Wed, 3 Jul 2024 08:54:01 -0700 Subject: [PATCH 06/10] Move SolrDocument to decorator pattern --- .../concerns/iiif_print/solr/document.rb | 63 ------------------- .../iiif_print/solr_document_decorator.rb | 47 ++++++++++++++ lib/iiif_print/engine.rb | 4 -- spec/models/solr_document_spec.rb | 22 +++++++ 4 files changed, 69 insertions(+), 67 deletions(-) delete mode 100644 app/models/concerns/iiif_print/solr/document.rb create mode 100644 app/models/concerns/iiif_print/solr_document_decorator.rb diff --git a/app/models/concerns/iiif_print/solr/document.rb b/app/models/concerns/iiif_print/solr/document.rb deleted file mode 100644 index 37d4cbd7..00000000 --- a/app/models/concerns/iiif_print/solr/document.rb +++ /dev/null @@ -1,63 +0,0 @@ -module IiifPrint::Solr::Document - # @note Why decorate? We want to avoid including this module via generator. And the generator - # previously did two things: 1) include `IiifPrint::Solr::Document` in `SolrDocument`; 2) - # add the `attribute :is_child` field to the SolrDocument. We can't rely on `included do` - # block to handle that. - # - # This method is responsible for configuring the SolrDocument for a Hyrax/Hyku application. It - # does three things: - # - # 1. Adds instance methods to the SolrDocument (see implementation below) - # 2. Adds the `is_child` attribute to the SolrDocument - # 3. Adds a class attribute (e.g. `iiif_print_solr_field_names`) to allow further customization. - # - # @note These `iiif_print_solr_field_names` came from the newspaper_works implementation and are - # carried forward without much consideration, except to say "Make it configurable!" - # - # @param base [Class] - # @return [Class] - def self.decorate(base) - base.prepend(self) - base.send(:attribute, :is_child, Hyrax::SolrDocument::Metadata::Solr::String, 'is_child_bsi') - base.send(:attribute, :split_from_pdf_id, Hyrax::SolrDocument::Metadata::Solr::String, 'split_from_pdf_id_ssi') - base.send(:attribute, :digest, Hyrax::SolrDocument::Metadata::Solr::String, 'digest_ssim') - - # @note These properties came from the newspaper_works gem. They are configurable. - base.class_attribute :iiif_print_solr_field_names, default: %w[alternative_title genre - issn lccn oclcnum held_by text_direction - page_number section author photographer - volume issue_number geographic_coverage - extent publication_date height width - edition_number edition_name frequency preceded_by - succeeded_by] - base - end - - def digest_sha1 - digest[/urn:sha1:([\w]+)/, 1] - end - - def method_missing(method_name, *args, &block) - super unless iiif_print_solr_field_names.include? method_name.to_s - self[IiifPrint.solr_name(method_name.to_s)] - end - - def respond_to_missing?(method_name, include_private = false) - iiif_print_solr_field_names.include?(method_name.to_s) || super - end - - # @see https://github.com/samvera/hyrax/commit/7108409c619cd2ba4ae8c836b9f3b429a7e9837b - def file_set_ids - # Yes, this looks a little odd. But the truth is the prior key (e.g. `file_set_ids_ssim`) was - # an alias of `member_ids_ssim`. - self['member_ids_ssim'] - end - - def any_highlighting? - response&.[]('highlighting')&.[](id)&.present? - end - - def solr_document - self - end -end diff --git a/app/models/concerns/iiif_print/solr_document_decorator.rb b/app/models/concerns/iiif_print/solr_document_decorator.rb new file mode 100644 index 00000000..a3110c97 --- /dev/null +++ b/app/models/concerns/iiif_print/solr_document_decorator.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +module IiifPrint + module SolrDocumentDecorator + def digest_sha1 + digest[/urn:sha1:([\w]+)/, 1] + end + + def method_missing(method_name, *args, &block) + super unless iiif_print_solr_field_names.include? method_name.to_s + self[IiifPrint.solr_name(method_name.to_s)] + end + + def respond_to_missing?(method_name, include_private = false) + iiif_print_solr_field_names.include?(method_name.to_s) || super + end + + # @see https://github.com/samvera/hyrax/commit/7108409c619cd2ba4ae8c836b9f3b429a7e9837b + def file_set_ids + # Yes, this looks a little odd. But the truth is the prior key (e.g. `file_set_ids_ssim`) was + # an alias of `member_ids_ssim`. + self['member_ids_ssim'] + end + + def any_highlighting? + response&.[]('highlighting')&.[](id)&.present? + end + + def solr_document + self + end + end +end + +SolrDocument.prepend(IiifPrint::SolrDocumentDecorator) +SolrDocument.attribute :is_child, Hyrax::SolrDocument::Metadata::Solr::String, 'is_child_bsi' +SolrDocument.attribute :split_from_pdf_id, Hyrax::SolrDocument::Metadata::Solr::String, 'split_from_pdf_id_ssi' +SolrDocument.attribute :digest, Hyrax::SolrDocument::Metadata::Solr::String, 'digest_ssim' + +# @note These properties came from the newspaper_works gem. They are configurable. +SolrDocument.class_attribute :iiif_print_solr_field_names, default: %w[alternative_title genre + issn lccn oclcnum held_by text_direction + page_number section author photographer + volume issue_number geographic_coverage + extent publication_date height width + edition_number edition_name frequency preceded_by + succeeded_by] diff --git a/lib/iiif_print/engine.rb b/lib/iiif_print/engine.rb index be6631b1..b9368e90 100644 --- a/lib/iiif_print/engine.rb +++ b/lib/iiif_print/engine.rb @@ -63,10 +63,6 @@ class Engine < ::Rails::Engine end end end - - config.after_initialize do - IiifPrint::Solr::Document.decorate(SolrDocument) - end # rubocop:enable Metrics/BlockLength end end diff --git a/spec/models/solr_document_spec.rb b/spec/models/solr_document_spec.rb index 76a45a06..5bf45d6f 100644 --- a/spec/models/solr_document_spec.rb +++ b/spec/models/solr_document_spec.rb @@ -11,4 +11,26 @@ expect(solr_doc.file_set_ids).to eq(['bar']) end end + + describe 'iiif_print decorator' do + it 'has extra attributes' do + expect(solr_doc).to respond_to(:is_child) + expect(solr_doc).to respond_to(:split_from_pdf_id) + expect(solr_doc).to respond_to(:digest) + end + + it 'has extra class attributes' do + expect(described_class.iiif_print_solr_field_names).to eq %w[alternative_title genre + issn lccn oclcnum held_by text_direction + page_number section author photographer + volume issue_number geographic_coverage + extent publication_date height width + edition_number edition_name frequency preceded_by + succeeded_by] + end + + it 'has a method that returns itself' do + expect(solr_doc.solr_document).to be solr_doc + end + end end From 11d223bbb040881b3801c531f5f566fed5ce331e Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Wed, 3 Jul 2024 13:46:54 -0700 Subject: [PATCH 07/10] Replace active fedora find with valkyrie methods We no longer support Active Fedora in v2.0+ so this method call needs to be replaced. --- lib/iiif_print/data/fileset_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/iiif_print/data/fileset_helper.rb b/lib/iiif_print/data/fileset_helper.rb index 9c3289d8..50dbb4b0 100644 --- a/lib/iiif_print/data/fileset_helper.rb +++ b/lib/iiif_print/data/fileset_helper.rb @@ -13,7 +13,7 @@ def fileset_id def first_fileset # if context is fileset id (e.g. caller is view partial) string, # get the fileset from that id - return FileSet.find(@work) if @work.is_a?(String) + return Hyrax.query_service.find_by(id: @work) if @work.is_a?(String) # if "work" context is a FileSet, not actual work, return it return @work if @work.is_a?(Hyrax::FileSet) || @work.is_a?(FileSet) # in most cases, get from work's members: From ab0bf3ca22599eac7fbd8160a472c21f04dffd46 Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Wed, 3 Jul 2024 14:06:37 -0700 Subject: [PATCH 08/10] =?UTF-8?q?=F0=9F=A7=B9=20Add=20guard=20to=20return?= =?UTF-8?q?=20when=20no=20content=20is=20present?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This manifested as a failed derivatives job that ultimately did not display thumbnails. We need to return early whenever content isn't present to prevent this. --- lib/iiif_print/text_extraction_derivative_service.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/iiif_print/text_extraction_derivative_service.rb b/lib/iiif_print/text_extraction_derivative_service.rb index 6849dbc4..b029dcf4 100644 --- a/lib/iiif_print/text_extraction_derivative_service.rb +++ b/lib/iiif_print/text_extraction_derivative_service.rb @@ -28,7 +28,10 @@ def create_derivatives_from_ocr(filename) ocr_derivatives.each do |extension, method_name| path = prepare_path(extension.to_s) - write(content: ocr.public_send(method_name), path: path, extension: extension) + content = ocr.public_send(method_name) + return unless content.present? + + write(content: content, path: path, extension: extension) end end From c0f920fb9775241722ee10108bf241b8d507c0a5 Mon Sep 17 00:00:00 2001 From: Kirk Wang Date: Wed, 3 Jul 2024 14:36:25 -0700 Subject: [PATCH 09/10] Rubocop fix --- lib/iiif_print/text_extraction_derivative_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/iiif_print/text_extraction_derivative_service.rb b/lib/iiif_print/text_extraction_derivative_service.rb index b029dcf4..d92b93e9 100644 --- a/lib/iiif_print/text_extraction_derivative_service.rb +++ b/lib/iiif_print/text_extraction_derivative_service.rb @@ -29,7 +29,7 @@ def create_derivatives_from_ocr(filename) ocr_derivatives.each do |extension, method_name| path = prepare_path(extension.to_s) content = ocr.public_send(method_name) - return unless content.present? + next if content.blank? write(content: content, path: path, extension: extension) end From 20e5dae633921f6408c65ddcf4be4edb88df1b6c Mon Sep 17 00:00:00 2001 From: Kirk Wang Date: Wed, 3 Jul 2024 15:44:27 -0700 Subject: [PATCH 10/10] Bump version to 3.0.0 --- lib/iiif_print/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/iiif_print/version.rb b/lib/iiif_print/version.rb index 7f26c630..7dd09da9 100644 --- a/lib/iiif_print/version.rb +++ b/lib/iiif_print/version.rb @@ -1,3 +1,3 @@ module IiifPrint - VERSION = '2.0.1'.freeze + VERSION = '3.0.0'.freeze end