hyrax 3.0.0.pre.rc4 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.circleci/config.yml +41 -8
- data/.dassie/Gemfile +10 -5
- data/.dassie/config/cable.yml +1 -1
- data/.dassie/config/environments/development.rb +2 -0
- data/.dassie/config/environments/production.rb +1 -1
- data/.dassie/config/initializers/hyrax.rb +5 -0
- data/.dassie/config/initializers/riiif.rb +22 -20
- data/.dassie/config/redis.yml +1 -0
- data/.dassie/config/role_map.yml +2 -0
- data/.dassie/db/seeds.rb +9 -1
- data/.dassie/package.json +3 -5
- data/.dockerignore +4 -0
- data/.env +1 -2
- data/.rubocop.yml +4 -0
- data/CONTAINERS.md +21 -1
- data/Dockerfile +46 -17
- data/Gemfile +21 -27
- data/app/actors/hyrax/actors/base_actor.rb +1 -1
- data/app/actors/hyrax/actors/create_with_remote_files_actor.rb +89 -41
- data/app/actors/hyrax/actors/create_with_remote_files_ordered_members_actor.rb +7 -42
- data/app/actors/hyrax/actors/file_actor.rb +4 -2
- data/app/actors/hyrax/actors/file_set_actor.rb +18 -11
- data/app/controllers/concerns/hyrax/collections_controller_behavior.rb +20 -8
- data/app/controllers/concerns/hyrax/embargoes_controller_behavior.rb +21 -9
- data/app/controllers/concerns/hyrax/leases_controller_behavior.rb +14 -5
- data/app/controllers/concerns/hyrax/works_controller_behavior.rb +38 -8
- data/app/controllers/hyrax/admin/permission_template_accesses_controller.rb +0 -4
- data/app/controllers/hyrax/admin/workflows_controller.rb +8 -2
- data/app/controllers/hyrax/dashboard/collection_members_controller.rb +13 -9
- data/app/controllers/hyrax/dashboard/collections_controller.rb +14 -14
- data/app/controllers/hyrax/file_sets_controller.rb +49 -13
- data/app/controllers/hyrax/permissions_controller.rb +3 -4
- data/app/controllers/hyrax/workflow_actions_controller.rb +3 -1
- data/app/forms/hyrax/forms/collection_form.rb +12 -6
- data/app/forms/hyrax/forms/dashboard/nest_collection_form.rb +24 -2
- data/app/forms/hyrax/forms/file_set_form.rb +46 -0
- data/app/forms/hyrax/forms/permission.rb +23 -0
- data/app/forms/hyrax/forms/permission_template_form.rb +8 -2
- data/app/forms/hyrax/forms/resource_form.rb +31 -13
- data/app/forms/hyrax/forms/work_form.rb +5 -2
- data/app/helpers/hyrax/batch_edits_helper.rb +3 -1
- data/app/helpers/hyrax/collections_helper.rb +88 -2
- data/app/helpers/hyrax/dashboard_helper_behavior.rb +16 -5
- data/app/helpers/hyrax/embargo_helper.rb +4 -0
- data/app/helpers/hyrax/file_set_helper.rb +25 -6
- data/app/helpers/hyrax/hyrax_helper_behavior.rb +8 -0
- data/app/helpers/hyrax/lease_helper.rb +4 -0
- data/app/helpers/hyrax/url_helper.rb +4 -1
- data/app/helpers/hyrax/work_form_helper.rb +53 -0
- data/app/indexers/hyrax/administrative_set_indexer.rb +18 -0
- data/app/indexers/hyrax/valkyrie_file_set_indexer.rb +118 -0
- data/app/indexers/hyrax/valkyrie_indexer.rb +10 -4
- data/app/indexers/hyrax/valkyrie_work_indexer.rb +3 -1
- data/app/inputs/controlled_vocabulary_input.rb +2 -5
- data/app/jobs/attach_files_to_work_job.rb +19 -10
- data/app/jobs/attach_files_to_work_with_ordered_members_job.rb +6 -5
- data/app/jobs/embargo_expiry_job.rb +7 -5
- data/app/jobs/file_set_attached_event_job.rb +6 -1
- data/app/jobs/ingest_local_file_job.rb +18 -2
- data/app/jobs/inherit_permissions_job.rb +9 -5
- data/app/jobs/lease_expiry_job.rb +6 -4
- data/app/models/admin_set.rb +6 -25
- data/app/models/collection_branding_info.rb +25 -9
- data/app/models/concerns/hyrax/ability.rb +14 -1
- data/app/models/concerns/hyrax/collection_behavior.rb +17 -44
- data/app/models/concerns/hyrax/embargoable.rb +24 -0
- data/app/models/concerns/hyrax/file_set/characterization.rb +18 -12
- data/app/models/concerns/hyrax/solr_document_behavior.rb +9 -46
- data/app/models/concerns/hyrax/suppressible.rb +5 -0
- data/app/models/concerns/hyrax/user.rb +9 -3
- data/app/models/concerns/hyrax/work_behavior.rb +1 -1
- data/app/models/hyrax/file_set.rb +7 -0
- data/app/models/hyrax/pcdm_collection.rb +1 -0
- data/app/models/hyrax/permission_template.rb +98 -12
- data/app/models/hyrax/virus_scanner.rb +27 -18
- data/app/models/hyrax/work.rb +2 -0
- data/app/models/job_io_wrapper.rb +1 -1
- data/app/models/sipity/agent.rb +1 -0
- data/app/models/sipity/entity.rb +30 -8
- data/app/models/sipity/workflow.rb +1 -0
- data/app/models/sipity.rb +42 -0
- data/app/presenters/hyrax/admin_set_options_presenter.rb +12 -8
- data/app/presenters/hyrax/admin_set_presenter.rb +5 -1
- data/app/presenters/hyrax/admin_set_selection_presenter.rb +116 -0
- data/app/presenters/hyrax/collection_presenter.rb +41 -20
- data/app/presenters/hyrax/file_set_presenter.rb +6 -1
- data/app/presenters/hyrax/file_usage.rb +3 -2
- data/app/presenters/hyrax/pcdm_member_presenter_factory.rb +119 -0
- data/app/presenters/hyrax/stats_usage_presenter.rb +2 -1
- data/app/presenters/hyrax/trophy_presenter.rb +33 -4
- data/app/presenters/hyrax/user_profile_presenter.rb +11 -1
- data/app/presenters/hyrax/version_list_presenter.rb +19 -0
- data/app/presenters/hyrax/version_presenter.rb +3 -2
- data/app/presenters/hyrax/work_show_presenter.rb +30 -5
- data/app/presenters/hyrax/work_usage.rb +5 -3
- data/app/renderers/hyrax/renderers/attribute_renderer.rb +10 -2
- data/app/search_builders/hyrax/admin_set_search_builder.rb +1 -1
- data/app/search_builders/hyrax/collection_member_search_builder.rb +6 -1
- data/app/search_builders/hyrax/my/collections_search_builder.rb +2 -2
- data/app/search_builders/hyrax/nested_collections_parent_search_builder.rb +1 -1
- data/app/search_builders/hyrax/single_collection_search_builder.rb +1 -1
- data/app/services/hyrax/access_control_list.rb +1 -1
- data/app/services/hyrax/adapters/nesting_index_adapter.rb +1 -1
- data/app/services/hyrax/admin_set_create_service.rb +3 -1
- data/app/services/hyrax/collections/collection_member_search_service.rb +72 -0
- data/app/services/hyrax/collections/collection_member_service.rb +112 -27
- data/app/services/hyrax/collections/migration_service.rb +4 -2
- data/app/services/hyrax/collections/nested_collection_persistence_service.rb +12 -13
- data/app/services/hyrax/collections/nested_collection_query_service.rb +2 -0
- data/app/services/hyrax/collections/permissions_create_service.rb +6 -4
- data/app/services/hyrax/contextual_path.rb +24 -1
- data/app/services/hyrax/custom_queries/find_file_metadata.rb +7 -5
- data/app/services/hyrax/custom_queries/navigators/parent_collections_navigator.rb +46 -0
- data/app/services/hyrax/edit_permissions_service.rb +74 -41
- data/app/services/hyrax/embargo_manager.rb +1 -1
- data/app/services/hyrax/find_objects_via_solr_service.rb +31 -0
- data/app/services/hyrax/graph_exporter.rb +1 -1
- data/app/services/hyrax/listeners/member_cleanup_listener.rb +26 -0
- data/app/services/hyrax/listeners/metadata_index_listener.rb +18 -1
- data/app/services/hyrax/listeners/object_lifecycle_listener.rb +1 -1
- data/app/services/hyrax/listeners/trophy_cleanup_listener.rb +17 -0
- data/app/services/hyrax/listeners.rb +2 -0
- data/app/services/hyrax/multiple_membership_checker.rb +53 -29
- data/app/services/hyrax/persist_derivatives.rb +3 -1
- data/app/services/hyrax/resource_status.rb +7 -0
- data/app/services/hyrax/search_service.rb +4 -2
- data/app/services/hyrax/solr_query_builder_service.rb +45 -8
- data/app/services/hyrax/solr_query_service.rb +224 -0
- data/app/services/hyrax/solr_service.rb +8 -1
- data/app/services/hyrax/statistics/depositors/summary.rb +2 -1
- data/app/services/hyrax/thumbnail_path_service.rb +1 -1
- data/app/services/hyrax/versioning_service.rb +1 -1
- data/app/services/hyrax/visibility_intention.rb +20 -2
- data/app/services/hyrax/visibility_propagator.rb +30 -1
- data/app/services/hyrax/work_uploads_handler.rb +22 -4
- data/app/services/hyrax/workflow/actionable_objects.rb +70 -0
- data/app/services/hyrax/workflow/object_in_workflow_decorator.rb +31 -0
- data/app/services/hyrax/workflow/status_list_service.rb +43 -13
- data/app/views/hyrax/admin/admin_sets/_show_document_list_row.html.erb +1 -1
- data/app/views/hyrax/base/_form_child_work_relationships.html.erb +1 -1
- data/app/views/hyrax/base/_form_relationships.html.erb +1 -2
- data/app/views/hyrax/base/_form_rendering.html.erb +1 -1
- data/app/views/hyrax/base/_form_representative.html.erb +1 -1
- data/app/views/hyrax/base/_form_share.html.erb +1 -5
- data/app/views/hyrax/base/_form_thumbnail.html.erb +1 -1
- data/app/views/hyrax/base/_form_visibility_error.html.erb +2 -0
- data/app/views/hyrax/base/_guts4form.html.erb +3 -3
- data/app/views/hyrax/base/_representative_media.html.erb +1 -1
- data/app/views/hyrax/base/_show_actions.html.erb +2 -2
- data/app/views/hyrax/base/_work_button_row.html.erb +1 -1
- data/app/views/hyrax/base/_workflow_actions.html.erb +1 -1
- data/app/views/hyrax/batch_edits/edit.html.erb +2 -2
- data/app/views/hyrax/batch_uploads/_form.html.erb +1 -1
- data/app/views/hyrax/collections/_list_collections.html.erb +1 -1
- data/app/views/hyrax/collections/_search_form.html.erb +1 -1
- data/app/views/hyrax/collections/show.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_form.html.erb +3 -3
- data/app/views/hyrax/dashboard/collections/_form_branding.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_list_collections.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/edit.html.erb +4 -2
- data/app/views/hyrax/dashboard/collections/new.html.erb +4 -2
- data/app/views/hyrax/dashboard/collections/show.html.erb +1 -1
- data/app/views/hyrax/file_sets/_actions.html.erb +10 -0
- data/app/views/hyrax/file_sets/edit.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_audio.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_default.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_image.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_office_document.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_pdf.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_video.html.erb +1 -1
- data/app/views/hyrax/file_sets/show.html.erb +1 -1
- data/app/views/hyrax/my/_admin_set_action_menu.html.erb +0 -11
- data/app/views/hyrax/my/_collection_action_menu.html.erb +1 -2
- data/app/views/hyrax/my/collections/_list_collections.html.erb +1 -1
- data/app/views/hyrax/my/collections/_modal_add_subcollection.html.erb +3 -5
- data/app/views/hyrax/stats/file.html.erb +1 -1
- data/app/views/hyrax/stats/work.html.erb +1 -1
- data/app/views/hyrax/uploads/_js_templates.html.erb +4 -4
- data/app/views/hyrax/uploads/_js_templates_versioning.html.erb +4 -4
- data/app/views/hyrax/users/_contributions.html.erb +1 -1
- data/app/views/hyrax/users/_profile_tabs.html.erb +2 -2
- data/app/views/hyrax/users/_search_form.html.erb +1 -1
- data/app/views/hyrax/users/_user.html.erb +1 -1
- data/app/views/hyrax/users/_user_info.html.erb +9 -9
- data/bin/db-migrate-seed.sh +6 -2
- data/bin/hyrax-entrypoint.sh +0 -14
- data/bin/solrcloud-assign-configset.sh +35 -0
- data/bin/solrcloud-upload-configset.sh +42 -0
- data/chart/hyrax/Chart.yaml +12 -8
- data/chart/hyrax/README.md +94 -11
- data/chart/hyrax/templates/NOTES.txt +1 -1
- data/chart/hyrax/templates/_helpers.tpl +98 -0
- data/chart/hyrax/templates/branding-pvc.yaml +14 -0
- data/chart/hyrax/templates/configmap-env.yaml +21 -11
- data/chart/hyrax/templates/cron-embargo.yaml +24 -0
- data/chart/hyrax/templates/cron-lease.yaml +24 -0
- data/chart/hyrax/templates/deployment-worker.yaml +129 -0
- data/chart/hyrax/templates/deployment.yaml +125 -4
- data/chart/hyrax/templates/derivatives-pvc.yaml +14 -0
- data/chart/hyrax/templates/ingress.yaml +13 -4
- data/chart/hyrax/templates/secrets.yaml +12 -2
- data/chart/hyrax/templates/uploads-pvc.yaml +14 -0
- data/chart/hyrax/values.yaml +186 -2
- data/config/brakeman.ignore +2 -2
- data/config/features.rb +47 -43
- data/config/initializers/listeners.rb +4 -0
- data/config/initializers/valkryrie_storage.rb +7 -0
- data/config/locales/hyrax.de.yml +1 -1
- data/config/locales/hyrax.en.yml +1 -1
- data/config/locales/hyrax.es.yml +1 -1
- data/config/locales/hyrax.fr.yml +1 -1
- data/config/locales/hyrax.it.yml +1 -1
- data/config/locales/hyrax.pt-BR.yml +1 -1
- data/config/locales/hyrax.zh.yml +1 -1
- data/docker-compose.yml +39 -8
- data/documentation/developing-your-hyrax-based-app.md +4 -4
- data/documentation/legacyREADME.md +3 -3
- data/lib/generators/hyrax/templates/config/initializers/hyrax.rb +5 -0
- data/lib/generators/hyrax/templates/config/initializers/riiif.rb +22 -20
- data/lib/hyrax/active_fedora_dummy_model.rb +62 -0
- data/lib/hyrax/configuration.rb +28 -0
- data/lib/hyrax/engine.rb +3 -1
- data/lib/hyrax/errors.rb +2 -0
- data/lib/hyrax/resource_name.rb +1 -0
- data/lib/hyrax/specs/capybara.rb +5 -3
- data/lib/hyrax/specs/shared_specs/valkyrie_storage_versions.rb +9 -0
- data/lib/hyrax/transactions/container.rb +32 -1
- data/lib/hyrax/transactions/file_set_destroy.rb +21 -0
- data/lib/hyrax/transactions/steps/add_file_sets.rb +3 -2
- data/lib/hyrax/transactions/steps/add_to_parent.rb +36 -0
- data/lib/hyrax/transactions/steps/delete_resource.rb +38 -0
- data/lib/hyrax/transactions/steps/destroy_work.rb +1 -0
- data/lib/hyrax/transactions/steps/remove_file_set_from_work.rb +47 -0
- data/lib/hyrax/transactions/work_create.rb +2 -1
- data/lib/hyrax/transactions/work_destroy.rb +20 -0
- data/lib/hyrax/valkyrie_can_can_adapter.rb +3 -0
- data/lib/hyrax/valkyrie_simple_path_generator.rb +20 -0
- data/lib/hyrax/version.rb +1 -1
- data/lib/hyrax.rb +9 -0
- data/lib/tasks/collection_type_global_id.rake +1 -1
- data/lib/tasks/embargo_lease.rake +27 -0
- data/lib/tasks/regenerate_derivatives.rake +12 -0
- data/lib/wings/active_fedora_converter/default_work.rb +19 -0
- data/lib/wings/attribute_transformer.rb +29 -19
- data/lib/wings/converter_value_mapper.rb +2 -2
- data/lib/wings/model_transformer.rb +21 -20
- data/lib/wings/orm_converter.rb +42 -23
- data/lib/wings/setup.rb +2 -0
- data/lib/wings/valkyrie/persister.rb +8 -5
- data/lib/wings/valkyrie/query_service.rb +96 -41
- data/lib/wings/valkyrie/storage.rb +56 -1
- data/lib/wings.rb +0 -21
- data/template.rb +1 -1
- metadata +41 -21
- data/chart/fcrepo/.gitignore +0 -2
- data/chart/fcrepo/.helmignore +0 -23
- data/chart/fcrepo/Chart.yaml +0 -11
- data/chart/fcrepo/README.md +0 -50
- data/chart/fcrepo/templates/NOTES.txt +0 -21
- data/chart/fcrepo/templates/_helpers.tpl +0 -68
- data/chart/fcrepo/templates/configmap-env.yaml +0 -19
- data/chart/fcrepo/templates/deployment.yaml +0 -109
- data/chart/fcrepo/templates/ingress.yaml +0 -41
- data/chart/fcrepo/templates/pvc.yaml +0 -20
- data/chart/fcrepo/templates/secret.yaml +0 -12
- data/chart/fcrepo/templates/service.yaml +0 -15
- data/chart/fcrepo/templates/serviceaccount.yaml +0 -12
- data/chart/fcrepo/templates/tests/test-connection.yaml +0 -15
- data/chart/fcrepo/values.yaml +0 -79
- data/chart/hyrax/templates/fcrepo-secret.yaml +0 -13
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ea0970bcb0ea485337ce206cd398d9ca95ce9f5dbd22bda820b6112e089ed624
|
|
4
|
+
data.tar.gz: c58183be603ec7ac6af52523412034f3b28332b2b8d5aa788239e7dabbf4c521
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: af2b27f2c10d54ede9007a17f4a126bf408d92c163a924081658625212ff52edccb06bbc7edcf49fce1faa56c715bdf0454f687fbc284f93cfd8d30dbb26d46a
|
|
7
|
+
data.tar.gz: 85b38c0dc2628abbbb56dc8aed70461bb5fe6e9ce4444a2d61d6f972968efd1f9157881fc2a5f4443cb1bba85f0495b78e3bc2e7d0d7fe5ea9a8d4cb69d6946b
|
data/.circleci/config.yml
CHANGED
|
@@ -12,7 +12,7 @@ jobs:
|
|
|
12
12
|
default: 1.17.3
|
|
13
13
|
rails_version:
|
|
14
14
|
type: string
|
|
15
|
-
default: '5.2.
|
|
15
|
+
default: '5.2.6'
|
|
16
16
|
executor:
|
|
17
17
|
name: 'samvera/ruby'
|
|
18
18
|
ruby_version: << parameters.ruby_version >>
|
|
@@ -22,6 +22,17 @@ jobs:
|
|
|
22
22
|
NOKOGIRI_USE_SYSTEM_LIBRARIES: true
|
|
23
23
|
steps:
|
|
24
24
|
- samvera/cached_checkout
|
|
25
|
+
|
|
26
|
+
- run:
|
|
27
|
+
name: Check for a branch named 'master'
|
|
28
|
+
command: |
|
|
29
|
+
git fetch --all --quiet --prune --prune-tags
|
|
30
|
+
if [[ -n "$(git branch --all --list master */master)" ]]; then
|
|
31
|
+
echo "A branch named 'master' was found. Please remove it."
|
|
32
|
+
echo "$(git branch --all --list master */master)"
|
|
33
|
+
fi
|
|
34
|
+
[[ -z "$(git branch --all --list master */master)" ]]
|
|
35
|
+
|
|
25
36
|
- samvera/bundle_for_gem:
|
|
26
37
|
ruby_version: << parameters.ruby_version >>
|
|
27
38
|
bundler_version: << parameters.bundler_version >>
|
|
@@ -63,7 +74,7 @@ jobs:
|
|
|
63
74
|
default: 1.17.3
|
|
64
75
|
rails_version:
|
|
65
76
|
type: string
|
|
66
|
-
default: '5.2.
|
|
77
|
+
default: '5.2.6'
|
|
67
78
|
executor:
|
|
68
79
|
name: 'samvera/ruby_fcrepo_solr_redis_postgres'
|
|
69
80
|
ruby_version: << parameters.ruby_version >>
|
|
@@ -125,16 +136,31 @@ jobs:
|
|
|
125
136
|
command: bundle exec rake app:db:migrate
|
|
126
137
|
- samvera/parallel_rspec
|
|
127
138
|
|
|
139
|
+
# Trigger a workflow on the nurax repository that will deploy the most recent hyrax gem code to https://nurax-dev.curationexperts.com/
|
|
140
|
+
deploy:
|
|
141
|
+
docker:
|
|
142
|
+
- image: ubuntu
|
|
143
|
+
steps:
|
|
144
|
+
- run:
|
|
145
|
+
name: Install curl
|
|
146
|
+
command: apt-get update && apt-get install -y curl
|
|
147
|
+
- run:
|
|
148
|
+
name: "Trigger Nurax deploy"
|
|
149
|
+
command: |
|
|
150
|
+
curl -X POST https://circleci.com/api/v2/project/gh/curationexperts/nurax/pipeline \
|
|
151
|
+
--header "Circle-Token: $NURAX_CIRCLECI_TOKEN" \
|
|
152
|
+
--header 'Accept: text/plain' \
|
|
153
|
+
--header 'Content-Type: application/json'
|
|
128
154
|
workflows:
|
|
129
155
|
version: 2
|
|
130
156
|
ruby2-5-8:
|
|
131
157
|
jobs:
|
|
132
158
|
- bundle:
|
|
133
159
|
ruby_version: "2.5.8"
|
|
134
|
-
rails_version: "5.2.
|
|
160
|
+
rails_version: "5.2.6"
|
|
135
161
|
- build:
|
|
136
162
|
ruby_version: "2.5.8"
|
|
137
|
-
rails_version: "5.2.
|
|
163
|
+
rails_version: "5.2.6"
|
|
138
164
|
requires:
|
|
139
165
|
- bundle
|
|
140
166
|
- test:
|
|
@@ -146,10 +172,10 @@ workflows:
|
|
|
146
172
|
jobs:
|
|
147
173
|
- bundle:
|
|
148
174
|
ruby_version: "2.6.6"
|
|
149
|
-
rails_version: "5.2.
|
|
175
|
+
rails_version: "5.2.6"
|
|
150
176
|
- build:
|
|
151
177
|
ruby_version: "2.6.6"
|
|
152
|
-
rails_version: "5.2.
|
|
178
|
+
rails_version: "5.2.6"
|
|
153
179
|
requires:
|
|
154
180
|
- bundle
|
|
155
181
|
- test:
|
|
@@ -167,11 +193,11 @@ workflows:
|
|
|
167
193
|
jobs:
|
|
168
194
|
- bundle:
|
|
169
195
|
ruby_version: "2.7.2"
|
|
170
|
-
rails_version: "5.2.
|
|
196
|
+
rails_version: "5.2.6"
|
|
171
197
|
bundler_version: "2.1.4"
|
|
172
198
|
- build:
|
|
173
199
|
ruby_version: "2.7.2"
|
|
174
|
-
rails_version: "5.2.
|
|
200
|
+
rails_version: "5.2.6"
|
|
175
201
|
bundler_version: "2.1.4"
|
|
176
202
|
requires:
|
|
177
203
|
- bundle
|
|
@@ -181,3 +207,10 @@ workflows:
|
|
|
181
207
|
bundler_version: "2.1.4"
|
|
182
208
|
requires:
|
|
183
209
|
- build
|
|
210
|
+
nurax-dev_deploy:
|
|
211
|
+
jobs:
|
|
212
|
+
- deploy:
|
|
213
|
+
filters:
|
|
214
|
+
branches:
|
|
215
|
+
only:
|
|
216
|
+
- main
|
data/.dassie/Gemfile
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Attempts to determine if a global gem source has ready been added by another Gemfile
|
|
3
|
+
if @sources.global_rubygems_source == Bundler::SourceList.new.global_rubygems_source
|
|
4
|
+
Bundler.ui.info '[Dassie] Adding global rubygems source.'
|
|
5
|
+
source 'https://rubygems.org'
|
|
6
|
+
else
|
|
7
|
+
Bundler.ui.info "[Dassie] Global rubygems source already set: #{@sources.global_rubygems_source.inspect}"
|
|
8
|
+
end
|
|
2
9
|
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
|
3
10
|
|
|
4
11
|
ruby '2.7.2'
|
|
@@ -8,7 +15,7 @@ gem 'rails', '~> 5.2.4', '>= 5.2.4.4'
|
|
|
8
15
|
# Use postgresql as the database for Active Record
|
|
9
16
|
gem 'pg', '>= 0.18', '< 2.0'
|
|
10
17
|
# Use Puma as the app server
|
|
11
|
-
gem 'puma', '~> 3.
|
|
18
|
+
gem 'puma', '~> 4.3.8'
|
|
12
19
|
# Use SCSS for stylesheets
|
|
13
20
|
gem 'sass-rails', '~> 5.0'
|
|
14
21
|
# Use Uglifier as compressor for JavaScript assets
|
|
@@ -43,9 +50,7 @@ end
|
|
|
43
50
|
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
|
44
51
|
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
|
45
52
|
|
|
46
|
-
|
|
47
|
-
gem 'hyrax', path: ENV.fetch('HYRAX_ENGINE_PATH', '..')
|
|
48
|
-
rescue; end
|
|
53
|
+
gemspec name: 'hyrax', path: ENV.fetch('HYRAX_ENGINE_PATH', '..')
|
|
49
54
|
|
|
50
55
|
gem 'rsolr', '>= 1.0', '< 3'
|
|
51
56
|
gem 'bootstrap-sass', '~> 3.0'
|
data/.dassie/config/cable.yml
CHANGED
|
@@ -6,5 +6,5 @@ test:
|
|
|
6
6
|
|
|
7
7
|
production:
|
|
8
8
|
adapter: redis
|
|
9
|
-
url: <%= ENV.fetch("REDIS_URL") { "redis
|
|
9
|
+
url: <%= ENV.fetch("REDIS_URL") { sprintf "redis://%s%s:%s/1", (ENV['REDIS_PASSWORD'].present? ? ":#{ENV['REDIS_PASSWORD']}@" : ''), ENV.fetch('REDIS_HOST', 'localhost'), ENV.fetch('REDIS_PORT', '6379') } %>
|
|
10
10
|
channel_prefix: _dassie_production
|
|
@@ -23,7 +23,7 @@ Rails.application.configure do
|
|
|
23
23
|
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
|
24
24
|
|
|
25
25
|
# Compress JavaScripts and CSS.
|
|
26
|
-
config.assets.js_compressor = :
|
|
26
|
+
config.assets.js_compressor = Uglifier.new(harmony: true)
|
|
27
27
|
# config.assets.css_compressor = :sass
|
|
28
28
|
|
|
29
29
|
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
|
@@ -39,6 +39,11 @@ Hyrax.config do |config|
|
|
|
39
39
|
##
|
|
40
40
|
# Set the system-wide virus scanner
|
|
41
41
|
config.virus_scanner = Hyrax::VirusScanner
|
|
42
|
+
|
|
43
|
+
##
|
|
44
|
+
# To index to the Valkyrie core, uncomment the following two lines.
|
|
45
|
+
# config.query_index_from_valkyrie = true
|
|
46
|
+
# config.index_adapter = :solr_index
|
|
42
47
|
end
|
|
43
48
|
|
|
44
49
|
Date::DATE_FORMATS[:standard] = "%m/%d/%Y"
|
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
Riiif::Image.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
ActiveSupport::Reloader.to_prepare do
|
|
3
|
+
Riiif::Image.file_resolver = Riiif::HttpFileResolver.new
|
|
4
|
+
Riiif::Image.info_service = lambda do |id, _file|
|
|
5
|
+
# id will look like a path to a pcdm:file
|
|
6
|
+
# (e.g. rv042t299%2Ffiles%2F6d71677a-4f80-42f1-ae58-ed1063fd79c7)
|
|
7
|
+
# but we just want the id for the FileSet it's attached to.
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
end
|
|
9
|
+
# Capture everything before the first slash
|
|
10
|
+
fs_id = id.sub(/\A([^\/]*)\/.*/, '\1')
|
|
11
|
+
resp = Hyrax::SolrService.get("id:#{fs_id}")
|
|
12
|
+
doc = resp['response']['docs'].first
|
|
13
|
+
raise "Unable to find solr document with id:#{fs_id}" unless doc
|
|
14
|
+
{ height: doc['height_is'], width: doc['width_is'], format: doc['mime_type_ssi'], channels: doc['alpha_channels_ssi'] }
|
|
15
|
+
end
|
|
15
16
|
|
|
16
|
-
Riiif::Image.file_resolver.id_to_uri = lambda do |id|
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
Riiif::Image.file_resolver.id_to_uri = lambda do |id|
|
|
18
|
+
Hyrax::Base.id_to_uri(CGI.unescape(id)).tap do |url|
|
|
19
|
+
Rails.logger.info "Riiif resolved #{id} to #{url}"
|
|
20
|
+
end
|
|
19
21
|
end
|
|
20
|
-
end
|
|
21
22
|
|
|
22
|
-
Riiif::Image.authorization_service = Hyrax::IIIFAuthorizationService
|
|
23
|
+
Riiif::Image.authorization_service = Hyrax::IIIFAuthorizationService
|
|
23
24
|
|
|
24
|
-
Riiif.not_found_image = Rails.root.join('app', 'assets', 'images', 'us_404.svg')
|
|
25
|
-
Riiif.unauthorized_image = Rails.root.join('app', 'assets', 'images', 'us_404.svg')
|
|
25
|
+
Riiif.not_found_image = Rails.root.join('app', 'assets', 'images', 'us_404.svg')
|
|
26
|
+
Riiif.unauthorized_image = Rails.root.join('app', 'assets', 'images', 'us_404.svg')
|
|
26
27
|
|
|
27
|
-
Riiif::Engine.config.cache_duration = 365.days
|
|
28
|
+
Riiif::Engine.config.cache_duration = 365.days
|
|
29
|
+
end
|
data/.dassie/config/redis.yml
CHANGED
data/.dassie/config/role_map.yml
CHANGED
data/.dassie/db/seeds.rb
CHANGED
|
@@ -6,9 +6,17 @@
|
|
|
6
6
|
# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
|
|
7
7
|
# Character.create(name: 'Luke', movie: movies.first)
|
|
8
8
|
|
|
9
|
-
Hyrax::Engine.load_seed
|
|
9
|
+
Hyrax::Engine.load_seed unless ActiveModel::Type::Boolean.new.cast(ENV["SKIP_HYRAX_ENGINE_SEED"])
|
|
10
10
|
|
|
11
11
|
puts "\n== Loading users"
|
|
12
12
|
User.where(email: 'admin@example.com').first_or_create do |f|
|
|
13
13
|
f.password = 'admin_password'
|
|
14
14
|
end
|
|
15
|
+
|
|
16
|
+
User.where(email: 'basic_user@example.com').first_or_create do |f|
|
|
17
|
+
f.password = 'password'
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
User.where(email: 'another_user@example.com').first_or_create do |f|
|
|
21
|
+
f.password = 'password'
|
|
22
|
+
end
|
data/.dassie/package.json
CHANGED
|
@@ -8,10 +8,8 @@
|
|
|
8
8
|
"scripts": {
|
|
9
9
|
"preinstall": "rm -rf ./public/uv",
|
|
10
10
|
"postinstall": "yarn run uv-install && yarn run uv-config",
|
|
11
|
-
"uv-install": "
|
|
12
|
-
"uv-config": "
|
|
11
|
+
"uv-install": "cp -r ./node_modules/universalviewer/dist ./public/uv",
|
|
12
|
+
"uv-config": "cp ./config/uv/uv.html ./public/uv/uv.html & cp ./config/uv/uv-config.json ./public/uv/"
|
|
13
13
|
},
|
|
14
|
-
"devDependencies": {
|
|
15
|
-
"shx": "^0.3.2"
|
|
16
|
-
}
|
|
14
|
+
"devDependencies": {}
|
|
17
15
|
}
|
data/.dockerignore
CHANGED
data/.env
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
CAPYBARA_SERVER=http://app:3010
|
|
2
1
|
CHROME_HEADLESS_MODE=false
|
|
3
2
|
DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL=true
|
|
4
3
|
DATABASE_TEST_URL=postgresql://hyrax_user:hyrax_password@postgres/hyrax_test?pool=5
|
|
@@ -7,7 +6,7 @@ DB_PORT=5432
|
|
|
7
6
|
DB_HOST=postgres
|
|
8
7
|
FCREPO_PORT=8080
|
|
9
8
|
FCREPO_HOST=fcrepo
|
|
10
|
-
FCREPO_REST_PATH=
|
|
9
|
+
FCREPO_REST_PATH=rest
|
|
11
10
|
FCREPO_TEST_BASE_PATH=/test
|
|
12
11
|
HUB_URL=http://chrome:4444/wd/hub
|
|
13
12
|
HYRAX_DERIVATIVES_PATH=/app/samvera/hyrax-webapp/derivatives/
|
data/.rubocop.yml
CHANGED
data/CONTAINERS.md
CHANGED
|
@@ -8,7 +8,7 @@ providing better guidance around deployment.
|
|
|
8
8
|
Where are we at? It's complicated. What we have below is experimental support, but one that we want to push
|
|
9
9
|
towards. We need your help to keep pushing in this direction. So dig in and prepare to get your hands dirty.
|
|
10
10
|
|
|
11
|
-
The [Hyrax Engine Development](#hyrax-engine-development) is further along than the [Docker Image for Hyrax-based Applications](docker-image-for-hyrax-based-applications) which is further along than [Deploying to Production](#deploying-to-production).
|
|
11
|
+
The [Hyrax Engine Development](#hyrax-engine-development) is further along than the [Docker Image for Hyrax-based Applications](#docker-image-for-hyrax-based-applications) which is further along than [Deploying to Production](#deploying-to-production).
|
|
12
12
|
|
|
13
13
|
<!-- NOTE: This title is referenced in the top-level README.md. Keep that in mind if you change it. -->
|
|
14
14
|
## Hyrax Engine Development
|
|
@@ -107,6 +107,26 @@ I (Jeremy) find myself wanting to debug the application. This requires a somewh
|
|
|
107
107
|
|
|
108
108
|
This advice comes from [Debugging Rails App With Docker Compose: How to use Byebug in a dockerized rails app](https://medium.com/gogox-technology/debugging-rails-app-with-docker-compose-39a3767962f4).
|
|
109
109
|
|
|
110
|
+
### Troubleshooting
|
|
111
|
+
|
|
112
|
+
#### Bad Address SOLR
|
|
113
|
+
|
|
114
|
+
With `docker-compose up` running, if you see the following, then there may be issues with file permissions:
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
db_migrate_1 | waiting for solr:8983
|
|
118
|
+
db_migrate_1 | nc: bad address 'solr'
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Check the Docker application logs and look for permission errors:
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
Executing /opt/docker-solr/scripts/precreate-core hyrax_test /opt/solr/server/configsets/hyraxconf
|
|
125
|
+
cp: cannot create directory '/var/solr/data/hyrax_test': Permission denied
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
The solution that appears to work is to `docker-compose down --volumes`; This will tear down the docker instance, and remove the volumes. You can then run `docker-compose up` to get back to work. _**Note:** the `--volumes` switch will remove all custom data._
|
|
129
|
+
|
|
110
130
|
<!-- NOTE: This title is referenced in the top-level documentation/developing-your-hyrax-based-app.md. Keep that in mind if you change it. -->
|
|
111
131
|
## Docker Image for Hyrax-based Applications
|
|
112
132
|
|
data/Dockerfile
CHANGED
|
@@ -7,10 +7,12 @@ ARG EXTRA_APK_PACKAGES="git"
|
|
|
7
7
|
|
|
8
8
|
RUN apk --no-cache upgrade && \
|
|
9
9
|
apk --no-cache add build-base \
|
|
10
|
+
curl \
|
|
10
11
|
imagemagick \
|
|
11
12
|
tzdata \
|
|
12
13
|
nodejs \
|
|
13
14
|
yarn \
|
|
15
|
+
zip \
|
|
14
16
|
$DATABASE_APK_PACKAGE \
|
|
15
17
|
$EXTRA_APK_PACKAGES
|
|
16
18
|
|
|
@@ -39,31 +41,19 @@ ARG BUNDLE_WITHOUT="development test"
|
|
|
39
41
|
|
|
40
42
|
ONBUILD COPY --chown=1001:101 $APP_PATH /app/samvera/hyrax-webapp
|
|
41
43
|
ONBUILD RUN bundle install --jobs "$(nproc)"
|
|
42
|
-
ONBUILD RUN DB_ADAPTER=nulldb DATABASE_URL='postgresql://fake' bundle exec rake assets:precompile
|
|
43
|
-
|
|
44
|
-
FROM hyrax-base as hyrax-engine-dev
|
|
45
|
-
|
|
46
|
-
ARG APP_PATH=.dassie
|
|
47
|
-
ARG BUNDLE_WITHOUT=
|
|
48
|
-
|
|
49
|
-
ENV HYRAX_ENGINE_PATH /app/samvera/hyrax-engine
|
|
50
|
-
|
|
51
|
-
COPY --chown=1001:101 $APP_PATH /app/samvera/hyrax-webapp
|
|
52
|
-
COPY --chown=1001:101 . /app/samvera/hyrax-engine
|
|
53
|
-
|
|
54
|
-
RUN cd /app/samvera/hyrax-engine && bundle install --jobs "$(nproc)"
|
|
55
|
-
RUN DB_ADAPTER=nulldb DATABASE_URL='postgresql://fake' bundle exec rake yarn:install
|
|
44
|
+
ONBUILD RUN RAILS_ENV=production SECRET_KEY_BASE=`bin/rake secret` DB_ADAPTER=nulldb DATABASE_URL='postgresql://fake' bundle exec rake assets:precompile
|
|
56
45
|
|
|
57
46
|
|
|
58
|
-
FROM hyrax-
|
|
47
|
+
FROM hyrax-base as hyrax-worker-base
|
|
59
48
|
|
|
60
49
|
ENV MALLOC_ARENA_MAX=2
|
|
61
50
|
|
|
62
51
|
USER root
|
|
63
52
|
RUN apk --no-cache add bash \
|
|
53
|
+
ffmpeg \
|
|
54
|
+
mediainfo \
|
|
64
55
|
openjdk11-jre \
|
|
65
|
-
perl
|
|
66
|
-
mediainfo
|
|
56
|
+
perl
|
|
67
57
|
USER app
|
|
68
58
|
|
|
69
59
|
RUN mkdir -p /app/fits && \
|
|
@@ -75,3 +65,42 @@ RUN mkdir -p /app/fits && \
|
|
|
75
65
|
ENV PATH="${PATH}:/app/fits"
|
|
76
66
|
|
|
77
67
|
CMD bundle exec sidekiq
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
FROM hyrax-worker-base as hyrax-worker
|
|
71
|
+
|
|
72
|
+
ARG APP_PATH=.
|
|
73
|
+
ARG BUNDLE_WITHOUT="development test"
|
|
74
|
+
|
|
75
|
+
ONBUILD COPY --chown=1001:101 $APP_PATH /app/samvera/hyrax-webapp
|
|
76
|
+
ONBUILD RUN bundle install --jobs "$(nproc)"
|
|
77
|
+
ONBUILD RUN RAILS_ENV=production SECRET_KEY_BASE=`bin/rake secret` DB_ADAPTER=nulldb DATABASE_URL='postgresql://fake' bundle exec rake assets:precompile
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
FROM hyrax-base as hyrax-engine-dev
|
|
81
|
+
|
|
82
|
+
ARG APP_PATH=.dassie
|
|
83
|
+
ARG BUNDLE_WITHOUT=
|
|
84
|
+
|
|
85
|
+
ENV HYRAX_ENGINE_PATH /app/samvera/hyrax-engine
|
|
86
|
+
|
|
87
|
+
COPY --chown=1001:101 $APP_PATH /app/samvera/hyrax-webapp
|
|
88
|
+
COPY --chown=1001:101 . /app/samvera/hyrax-engine
|
|
89
|
+
|
|
90
|
+
RUN gem update bundler && gem cleanup bundler && bundle -v && \
|
|
91
|
+
bundle install --jobs "$(nproc)" && \
|
|
92
|
+
cd $HYRAX_ENGINE_PATH && bundle install --jobs "$(nproc)"
|
|
93
|
+
RUN RAILS_ENV=production SECRET_KEY_BASE='fakesecret1234' DB_ADAPTER=nulldb DATABASE_URL='postgresql://fake' bundle exec rake assets:precompile
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
FROM hyrax-worker-base as hyrax-engine-dev-worker
|
|
97
|
+
|
|
98
|
+
ARG APP_PATH=.dassie
|
|
99
|
+
ARG BUNDLE_WITHOUT=
|
|
100
|
+
|
|
101
|
+
ENV HYRAX_ENGINE_PATH /app/samvera/hyrax-engine
|
|
102
|
+
|
|
103
|
+
COPY --chown=1001:101 $APP_PATH /app/samvera/hyrax-webapp
|
|
104
|
+
COPY --chown=1001:101 . /app/samvera/hyrax-engine
|
|
105
|
+
|
|
106
|
+
RUN bundle install --jobs "$(nproc)"
|