Skip to content

Commit

Permalink
Merge pull request #368 from scientist-softserv/utilize-hyrax-config-…
Browse files Browse the repository at this point in the history
…simple_schema_loader_config_search_paths

⚙️ Utilize Hyrax's schema search paths config
  • Loading branch information
kirkkwang authored Sep 5, 2024
2 parents 273057f + 933a75b commit 3a14e3a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/build-lint-test-action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,16 @@ on:

jobs:
build:
uses: scientist-softserv/actions/.github/workflows/[email protected].13
uses: scientist-softserv/actions/.github/workflows/[email protected].15
secrets: inherit
with:
platforms: "linux/amd64"
target: hyku-base
worker: false
webTarget: hyku-base
test:
needs: build
uses: scientist-softserv/actions/.github/workflows/[email protected].13
uses: scientist-softserv/actions/.github/workflows/[email protected].15
with:
setup_db_cmd: bundle exec rake prepare_and_run_tests
lint:
needs: build
uses: scientist-softserv/actions/.github/workflows/[email protected].13
uses: scientist-softserv/actions/.github/workflows/[email protected].15
2 changes: 1 addition & 1 deletion app/services/iiif_print/simple_schema_loader_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ def config_search_paths
end
end
end
Hyrax::SimpleSchemaLoader.prepend(IiifPrint::SimpleSchemaLoaderDecorator)
Hyrax::SimpleSchemaLoader.prepend(IiifPrint::SimpleSchemaLoaderDecorator) unless Hyrax.config.respond_to?(:simple_schema_loader_config_search_paths)
2 changes: 2 additions & 0 deletions lib/iiif_print/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ class Engine < ::Rails::Engine
config.callback.set(:after_create_fileset) do |file_set, user|
IiifPrint.config.handle_after_create_fileset(file_set, user)
end

config.simple_schema_loader_config_search_paths += [IiifPrint::Engine.root] if config.respond_to?(:simple_schema_loader_config_search_paths)
end
end
# rubocop:enable Metrics/BlockLength
Expand Down

0 comments on commit 3a14e3a

Please sign in to comment.