hyrax 4.0.0 → 5.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (148) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +116 -231
  3. data/.dassie/.env +3 -1
  4. data/.dassie/config/environments/test.rb +1 -0
  5. data/.dassie/config/initializers/hyrax.rb +3 -1
  6. data/.dassie/config/initializers/riiif.rb +13 -3
  7. data/.dassie/db/schema.rb +2 -2
  8. data/.dockerignore +6 -0
  9. data/.github/PULL_REQUEST_TEMPLATE.md +10 -7
  10. data/.github/release.yml +5 -2
  11. data/.koppie/.env +3 -0
  12. data/.koppie/app/forms/collection_resource_form.rb +1 -0
  13. data/.koppie/app/indexers/collection_resource_indexer.rb +1 -0
  14. data/.koppie/app/models/collection_resource.rb +1 -0
  15. data/.koppie/config/environments/test.rb +1 -0
  16. data/.koppie/config/initializers/hyrax.rb +8 -2
  17. data/.koppie/config/initializers/riiif.rb +13 -4
  18. data/.koppie/config/metadata/collection_resource.yaml +1 -128
  19. data/.koppie/yarn.lock +23 -23
  20. data/.regen +1 -1
  21. data/CONTAINERS.md +1 -1
  22. data/Dockerfile +6 -11
  23. data/app/actors/hyrax/actors/base_actor.rb +4 -3
  24. data/app/actors/hyrax/actors/embargo_actor.rb +5 -2
  25. data/app/actors/hyrax/actors/lease_actor.rb +5 -2
  26. data/app/assets/javascripts/hyrax/file_manager/sorting.es6 +3 -2
  27. data/app/controllers/concerns/hyrax/embargoes_controller_behavior.rb +1 -1
  28. data/app/controllers/concerns/hyrax/valkyrie_downloads_controller_behavior.rb +74 -0
  29. data/app/controllers/concerns/hyrax/works_controller_behavior.rb +14 -5
  30. data/app/controllers/hyrax/admin/workflows_controller.rb +48 -3
  31. data/app/controllers/hyrax/batch_edits_controller.rb +33 -4
  32. data/app/controllers/hyrax/downloads_controller.rb +8 -1
  33. data/app/controllers/hyrax/file_sets_controller.rb +1 -0
  34. data/app/forms/hyrax/forms/file_set_edit_form.rb +1 -1
  35. data/app/forms/hyrax/forms/permission_template_form.rb +2 -0
  36. data/app/forms/hyrax/forms/resource_batch_edit_form.rb +90 -0
  37. data/app/forms/hyrax/forms/work_embargo_form.rb +1 -0
  38. data/app/forms/hyrax/forms/work_form.rb +1 -1
  39. data/app/forms/hyrax/forms/work_lease_form.rb +1 -0
  40. data/app/helpers/hyrax/dashboard_helper_behavior.rb +17 -9
  41. data/app/helpers/hyrax/membership_helper.rb +13 -1
  42. data/app/helpers/hyrax/work_form_helper.rb +0 -107
  43. data/app/indexers/hyrax/file_set_indexer.rb +6 -0
  44. data/app/indexers/hyrax/pcdm_collection_indexer.rb +8 -0
  45. data/app/indexers/hyrax/valkyrie_file_set_indexer.rb +41 -5
  46. data/app/indexers/hyrax/valkyrie_work_indexer.rb +8 -2
  47. data/app/jobs/valkyrie_create_derivatives_job.rb +8 -7
  48. data/app/jobs/valkyrie_ingest_job.rb +0 -1
  49. data/app/models/admin_set.rb +1 -31
  50. data/app/models/concerns/hyrax/file_set/derivatives.rb +3 -2
  51. data/app/models/concerns/hyrax/solr_document_behavior.rb +1 -1
  52. data/app/models/hyrax/collection_type.rb +5 -14
  53. data/app/models/hyrax/file_metadata.rb +6 -7
  54. data/app/models/hyrax/file_set.rb +8 -0
  55. data/app/models/hyrax/resource.rb +30 -2
  56. data/app/presenters/hyrax/file_set_presenter.rb +6 -0
  57. data/app/presenters/hyrax/iiif_manifest_presenter.rb +3 -7
  58. data/app/presenters/hyrax/presenter_renderer.rb +0 -7
  59. data/app/presenters/hyrax/work_show_presenter.rb +6 -11
  60. data/app/search_builders/hyrax/file_set_search_builder.rb +1 -1
  61. data/app/search_builders/hyrax/valkyrie_abstract_type_relation.rb +37 -0
  62. data/app/search_builders/hyrax/valkyrie_work_relation.rb +9 -0
  63. data/app/services/hyrax/characterization/valkyrie_characterization_service.rb +11 -9
  64. data/app/services/hyrax/custom_queries/find_by_date_range.rb +55 -0
  65. data/app/services/hyrax/custom_queries/find_count_by.rb +62 -0
  66. data/app/services/hyrax/custom_queries/find_file_metadata.rb +1 -1
  67. data/app/services/hyrax/custom_queries/find_models_by_access.rb +59 -0
  68. data/app/services/hyrax/derivative_bucketed_storage.rb +25 -0
  69. data/app/services/hyrax/derivative_path.rb +14 -4
  70. data/app/services/hyrax/embargo_manager.rb +76 -10
  71. data/app/services/hyrax/file_set_derivatives_service.rb +3 -2
  72. data/app/services/hyrax/lease_manager.rb +88 -8
  73. data/app/services/hyrax/listeners/file_metadata_listener.rb +2 -2
  74. data/app/services/hyrax/listeners/workflow_listener.rb +8 -11
  75. data/app/services/hyrax/persist_directly_contained_output_file_service.rb +24 -2
  76. data/app/services/hyrax/solr_query_service.rb +7 -6
  77. data/app/services/hyrax/statistics/depositors/summary.rb +1 -1
  78. data/app/services/hyrax/statistics/over_time.rb +1 -1
  79. data/app/services/hyrax/statistics/users/over_time.rb +3 -1
  80. data/app/services/hyrax/statistics/valkyrie_query_service.rb +49 -0
  81. data/app/services/hyrax/statistics/works/count.rb +1 -1
  82. data/app/services/hyrax/thumbnail_path_service.rb +5 -0
  83. data/app/services/hyrax/valkyrie_persist_derivatives.rb +16 -11
  84. data/app/services/hyrax/valkyrie_upload.rb +5 -3
  85. data/app/services/hyrax/versioning_service.rb +1 -0
  86. data/app/services/hyrax/visibility_intention.rb +1 -4
  87. data/app/services/hyrax/visibility_propagator.rb +1 -1
  88. data/app/services/hyrax/workflow/actionable_objects.rb +28 -3
  89. data/app/services/hyrax/workflow/grant_edit_to_depositor.rb +1 -1
  90. data/app/services/hyrax/workflow/grant_read_to_depositor.rb +1 -1
  91. data/app/services/hyrax/workflow/permission_query.rb +23 -2
  92. data/app/views/hyrax/admin/workflows/_tabs.html.erb +9 -0
  93. data/app/views/hyrax/admin/workflows/index.html.erb +53 -76
  94. data/app/views/hyrax/base/_file_manager_members.html.erb +2 -2
  95. data/app/views/hyrax/base/_form.html.erb +0 -10
  96. data/app/views/hyrax/base/_form_permission_embargo.html.erb +1 -1
  97. data/app/views/hyrax/base/_form_permission_lease.html.erb +1 -1
  98. data/app/views/hyrax/base/_form_visibility_component.html.erb +2 -2
  99. data/app/views/hyrax/base/_items.html.erb +1 -1
  100. data/app/views/hyrax/base/file_manager.html.erb +1 -1
  101. data/app/views/hyrax/base/show.json.jbuilder +2 -2
  102. data/app/views/hyrax/file_sets/show.html.erb +5 -3
  103. data/app/views/hyrax/homepage/_explore_collections.html.erb +1 -1
  104. data/chart/hyrax/Chart.yaml +18 -14
  105. data/chart/hyrax/README.md +34 -21
  106. data/chart/hyrax/templates/_helpers.tpl +26 -1
  107. data/chart/hyrax/templates/configmap-env.yaml +12 -2
  108. data/chart/hyrax/templates/secrets.yaml +1 -1
  109. data/chart/hyrax/values.yaml +36 -14
  110. data/config/initializers/listeners.rb +4 -10
  111. data/config/initializers/storage_adapter_initializer.rb +1 -1
  112. data/config/locales/hyrax.en.yml +8 -0
  113. data/config/metadata/file_set_metadata.yaml +1 -1
  114. data/docker-compose-koppie.yml +17 -4
  115. data/docker-compose.yml +19 -6
  116. data/documentation/developing-your-hyrax-based-app.md +6 -14
  117. data/documentation/legacyREADME.md +3 -1
  118. data/hyrax.gemspec +2 -2
  119. data/karma.conf.js +8 -9
  120. data/lib/generators/hyrax/templates/config/initializers/hyrax.rb +1 -1
  121. data/lib/generators/hyrax/templates/config/initializers/riiif.rb +15 -5
  122. data/lib/hyrax/active_fedora_dummy_model.rb +6 -1
  123. data/lib/hyrax/configuration.rb +6 -0
  124. data/lib/hyrax/engine.rb +2 -0
  125. data/lib/hyrax/publisher.rb +19 -3
  126. data/lib/hyrax/specs/capybara.rb +9 -4
  127. data/lib/hyrax/transactions/container.rb +5 -0
  128. data/lib/hyrax/transactions/steps/add_file_sets.rb +6 -0
  129. data/lib/hyrax/transactions/steps/apply_permission_template.rb +40 -0
  130. data/lib/hyrax/transactions/steps/save.rb +21 -0
  131. data/lib/hyrax/transactions/work_create.rb +1 -0
  132. data/lib/hyrax/version.rb +1 -1
  133. data/lib/hyrax.rb +1 -0
  134. data/lib/wings/active_fedora_converter/default_work.rb +7 -2
  135. data/lib/wings/active_fedora_converter/file_metadata_node.rb +1 -1
  136. data/lib/wings/active_fedora_converter.rb +47 -11
  137. data/lib/wings/model_transformer.rb +23 -4
  138. data/lib/wings/setup.rb +21 -1
  139. data/lib/wings/valkyrie/persister.rb +4 -2
  140. data/package.json +3 -1
  141. data/template.rb +1 -1
  142. metadata +17 -12
  143. data/app/forms/hyrax/forms/file_manager_form.rb +0 -35
  144. data/app/services/hyrax/collections/migration_service.rb +0 -113
  145. data/app/views/hyrax/base/_form_collections_error.html.erb +0 -1
  146. data/app/views/hyrax/base/_form_in_works_error.html.erb +0 -3
  147. data/app/views/hyrax/base/_form_ordered_members_error.html.erb +0 -3
  148. data/app/views/hyrax/base/_form_visibility_error.html.erb +0 -19
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c53f04239ef92492dd8a98a52c8f13cb446c18ba4ad04d22e5b78673e688aa8c
4
- data.tar.gz: a804bc525628fbe33352617f8f8c0074d454def18a5e90c4d82e6c6a46aa25c2
3
+ metadata.gz: 136cdda4fa63bf4027c7df373f2bf769221e5d0f9a16811ff75e3a2e7e791f9c
4
+ data.tar.gz: dc26381d252dc0d89c3ffce60341c906249b57107a812a219b4c6b81801a2035
5
5
  SHA512:
6
- metadata.gz: 968a88b13e65cc3f88d30c142d4a69d39e5e21930c04a03f86af4ec2625443741da5e73662db261dc5758e770e669b521b866a1274d5d0bdfba8fcd2ef1b05c0
7
- data.tar.gz: aa1568f4a0b53f442682f87721dc4c7d458716af085df77ef3523eedae5e0e663bf708f04ef6a02f06ddf3aa143d4fd73fe513f6bbe23b1e43402438abc10ff1
6
+ metadata.gz: 64629a2c0467415e4d8a5339f15932bcec06bc191cf269733be1f223a2a62129f3e997813cc7ed1572cb7824d31254a538e76510230554dc55d07c3fd701b0f0
7
+ data.tar.gz: 50df342a224686ca14a60886b14b3154bc0de8e78c73d99099377c81d63be0a33ee4a00f635a65917e462df2a5192e516740231b446671f3b72bdb379975d8e8
data/.circleci/config.yml CHANGED
@@ -5,271 +5,156 @@ orbs:
5
5
  ruby: circleci/ruby@2
6
6
  node: circleci/node@5
7
7
 
8
- jobs:
9
- bundle:
8
+ executors:
9
+ hyrax:
10
10
  parameters:
11
+ fcrepo_version:
12
+ type: string
13
+ default: '4.7.5'
14
+ hyrax_app:
15
+ type: string
16
+ default: 'dassie'
17
+ postgres_version:
18
+ type: string
19
+ default: '14.9'
20
+ redis_version:
21
+ type: string
22
+ default: '6.2'
23
+ ruby_type:
24
+ type: string
25
+ default: 'ruby'
11
26
  ruby_version:
12
27
  type: string
13
- default: 2.7.7
14
- bundler_version:
28
+ default: '2.5.5'
29
+ solr_port:
15
30
  type: string
16
- default: 2.4.8
17
- rails_version:
31
+ default: '8985'
32
+ solr_version:
18
33
  type: string
19
- default: 6.1.7.2
20
- executor:
21
- name: 'samvera/ruby'
22
- ruby_version: << parameters.ruby_version >>
23
- resource_class: medium
34
+ default: '8.11-slim'
24
35
  environment:
25
- RAILS_VERSION: << parameters.rails_version >>
26
- NOKOGIRI_USE_SYSTEM_LIBRARIES: true
27
- steps:
28
- - samvera/cached_checkout
29
-
30
- - run:
31
- name: Check for a branch named 'master'
32
- command: |
33
- git fetch --all --quiet --prune --prune-tags
34
- if [[ -n "$(git branch --all --list master */master)" ]]; then
35
- echo "A branch named 'master' was found. Please remove it."
36
- echo "$(git branch --all --list master */master)"
37
- fi
38
- [[ -z "$(git branch --all --list master */master)" ]]
36
+ RAILS_ENV: test
37
+ RACK_ENV: test
38
+ FCREPO_PORT: 8080
39
+ POSTGRES_DB: circle_test
40
+ POSTGRES_HOST: 127.0.0.1
41
+ POSTGRES_USER: postgres
42
+ docker:
43
+ - image: "ghcr.io/samvera/hyrax/<< parameters.hyrax_app >>-dev:<< pipeline.git.revision >>"
44
+ - image: seleniarm/standalone-chromium:114.0
45
+ environment:
46
+ SE_NODE_SESSION_TIMEOUT: 1200
47
+ START_XVFB: "false"
39
48
 
40
- - samvera/bundle:
41
- ruby_version: << parameters.ruby_version >>
42
- bundler_version: << parameters.bundler_version >>
49
+ - image: samvera/fcrepo4:<< parameters.fcrepo_version >>
50
+ environment:
51
+ CATALINA_OPTS: "-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms512m -Xmx1024m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC"
52
+ - image: zookeeper:3.4
53
+ - image: solr:<< parameters.solr_version >>
54
+ environment:
55
+ VERBOSE: yes
56
+ SECURITY_JSON: '{"authentication":{"blockUnknown": false, "class":"solr.BasicAuthPlugin", "credentials":{"solr":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0= Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}, "realm":"My Solr users", "forwardCredentials": false}, "authorization":{ "class":"solr.RuleBasedAuthorizationPlugin", "permissions":[{"name":"security-edit", "role":"admin"}], "user-role":{"solr":"admin"}}}'
57
+ command: sh -c "server/scripts/cloud-scripts/zkcli.sh -zkhost localhost:2181 -cmd put /security.json \"${SECURITY_JSON}\" && solr-fg -cloud -noprompt -p << parameters.solr_port >> -z localhost:2181"
58
+ - image: redis:<< parameters.redis_version >>
59
+ - image: cimg/postgres:<< parameters.postgres_version >>
43
60
 
44
- # Run rubocop in parallel with caching
45
- # This should get added to the orb once proven here
46
-
47
- - restore_cache:
48
- name: Restore rubocop cache
49
- keys:
50
- - v1-rubocop-ruby<< parameters.ruby_version >>-bundle{{ checksum "Gemfile.lock" }}
51
- - v1-rubocop-ruby<< parameters.ruby_version >>
52
- - v1
53
-
54
- - run:
55
- name: Run rubocop in parallel
56
- command: bundle exec rubocop --parallel
57
-
58
- - save_cache:
59
- name: Save rubocop cache
60
- key: v1-rubocop-ruby<< parameters.ruby_version >>-bundle{{ checksum "Gemfile.lock" }}
61
- paths:
62
- - ~/.cache/rubocop_cache
63
-
64
- - persist_to_workspace:
65
- root: ~/
66
- paths:
67
- - project/*
68
- - project/**/*
69
-
70
- build:
61
+ jobs:
62
+ kaniko-build:
71
63
  parameters:
72
- ruby_version:
73
- type: string
74
- default: 2.7.7
75
- bundler_version:
64
+ hyrax_app:
76
65
  type: string
77
- default: 2.4.8
78
- rails_version:
66
+ default: dassie
67
+ ruby_version:
79
68
  type: string
80
- default: 6.1.7.2
81
- executor:
82
- name: 'samvera/ruby_fcrepo_solr_redis_postgres'
83
- ruby_version: << parameters.ruby_version >>
84
- resource_class: medium
85
- environment:
86
- RAILS_VERSION: << parameters.rails_version >>
87
- NOKOGIRI_USE_SYSTEM_LIBRARIES: true
88
- ENGINE_CART_RAILS_OPTIONS: --database=postgresql --skip-git --skip-bundle --skip-listen --skip-spring --skip-keeps --skip-test --skip-bootsnap --skip-javascript
89
- DATABASE_URL: postgresql://postgres@127.0.0.1/circle_test # Hard-coded with data from CircleCI orb, related to https://github.com/samvera-labs/samvera-circleci-orb/issues/42
69
+ default: 3.2.2
70
+ docker:
71
+ - image: gcr.io/kaniko-project/executor:v1.14.0-debug
72
+ entrypoint: ""
90
73
  steps:
91
- - attach_workspace:
92
- at: ~/
93
- - samvera/engine_cart_generate:
94
- cache_key: v1-internal-test-app-{{ checksum "hyrax.gemspec" }}-{{ checksum ".regen" }}-{{ checksum ".circleci/config.yml" }}-<< parameters.rails_version >>-<< parameters.ruby_version >>
95
- - samvera/bundle:
96
- ruby_version: << parameters.ruby_version >>
97
- bundler_version: << parameters.bundler_version >>
98
74
  - run:
99
- name: Generate .internal_test_app/Gemfile.lock
100
- command: bundle lock
101
- working_directory: .internal_test_app
102
- - ruby/install-deps:
103
- app-dir: .internal_test_app
104
- - node/install-packages:
105
- pkg-manager: yarn
106
- app-dir: .internal_test_app
107
- - persist_to_workspace:
108
- root: ~/
109
- paths:
110
- - project/*
111
- - project/**/*
75
+ name: Configure GHCR credentials
76
+ command: |
77
+ cat > /kaniko/.docker/config.json \<<- JSON
78
+ {
79
+ "auths": {
80
+ "ghcr.io": {
81
+ "auth": "$(echo -n $GHCR_USER:$GHCR_TOKEN | base64)"
82
+ }
83
+ }
84
+ }
85
+ JSON
86
+ - run:
87
+ name: Build and Push image
88
+ command: |
89
+ /kaniko/executor \
90
+ --cache=true \
91
+ --build-arg "EXTRA_APK_PACKAGES=git bash" \
92
+ --build-arg "APP_PATH=.<< parameters.hyrax_app >>" \
93
+ --build-arg "RUBY_VERSION=<< parameters.ruby_version >>" \
94
+ --context "git://github.com/samvera/hyrax#refs/heads/${CIRCLE_BRANCH}#${CIRCLE_SHA1}" \
95
+ --target "hyrax-engine-dev" \
96
+ --destination "ghcr.io/samvera/hyrax/<< parameters.hyrax_app >>-dev:${CIRCLE_SHA1}"
112
97
 
113
- test:
98
+ hyrax-test:
114
99
  parameters:
115
- ruby_version:
116
- type: string
117
- default: 2.7.7
118
- bundler_version:
100
+ hyrax_app:
119
101
  type: string
120
- default: 2.4.8
102
+ default: dassie
121
103
  hyrax_valkyrie:
122
104
  type: string
123
105
  default: "false"
106
+ ruby_version:
107
+ type: string
108
+ default: 3.2.2
124
109
  executor:
125
- name: 'samvera/ruby_fcrepo_solr_redis_postgres'
110
+ name: hyrax
111
+ hyrax_app: << parameters.hyrax_app >>
126
112
  ruby_version: << parameters.ruby_version >>
127
- resource_class: medium+
128
- parallelism: 10
113
+ resource_class: large
114
+ parallelism: 12
129
115
  environment:
116
+ CHROME_HEADLESS_MODE: true
117
+ DATABASE_URL: postgresql://postgres@127.0.0.1/circle_test
118
+ HUB_URL: http://localhost:4444/wd/hub
130
119
  HYRAX_VALKYRIE: << parameters.hyrax_valkyrie >>
120
+ IN_DOCKER: true
121
+ KARMA_BROWSER: remote-chromium
122
+ VALKYRIE_SOLR_CORE: valkyrie-test
131
123
  VALKYRIE_SOLR_PORT: 8985
132
- DATABASE_URL: postgresql://postgres@127.0.0.1/circle_test # Hard-coded with data from CircleCI orb, related to https://github.com/samvera-labs/samvera-circleci-orb/issues/42
133
- KARMA_BROWSER: ChromeHeadlessCustom
134
- RAILS_ROOT: .internal_test_app
135
- SPEC_OPTS: "" # Clear output conflicts between samvera orb executor and ruby orb rspec command
136
124
  steps:
137
- - attach_workspace:
138
- at: ~/
139
125
  - run:
140
- name: Install system dependencies
141
- command: |
142
- sudo apt-get update
143
- sudo apt-get install imagemagick librsvg2-bin lsof
144
- - browser-tools/install-chrome
145
- - browser-tools/install-chromedriver
126
+ name: yarn
127
+ command: cd /app/samvera/hyrax-engine && yarn
146
128
  - run:
147
- name: Check Chrome install
129
+ name: Create solr core
148
130
  command: |
149
- google-chrome --version
150
- chromedriver --version
151
- - restore_cache:
152
- keys:
153
- - engine-node-v1-{{ checksum "package.json" }}
154
- # Call yarn directly for hyrax engine; node orb demands a lockfile to use caching
155
- - run:
156
- name: Yarn Install (engine)
157
- command: yarn install
158
- - save_cache:
159
- key: engine-node-v1-{{ checksum "package.json" }}
160
- paths:
161
- - node_modules
162
- - samvera/install_solr_core:
163
- solr_config_path: .internal_test_app/solr/conf
164
- - samvera/install_solr_core:
165
- solr_config_path: .internal_test_app/solr/conf
166
- core_name: hyrax-valkyrie-test
167
- # Rerun bundler in case this is a different ruby version than bundle and build steps
168
- - samvera/bundle:
169
- ruby_version: << parameters.ruby_version >>
170
- bundler_version: << parameters.bundler_version >>
171
- # Ensure gems needed by the test app are installed
172
- - ruby/install-deps:
173
- app-dir: .internal_test_app
174
- - node/install-packages:
175
- pkg-manager: yarn
176
- app-dir: .internal_test_app
177
- - run:
178
- command: bundle exec rake db:migrate
179
- working_directory: .internal_test_app
180
- - ruby/rspec-test
181
- - store_artifacts:
182
- path: Gemfile.lock
183
- destination: engine-gemfile-lock
184
- - store_artifacts:
185
- path: .internal_test_app/Gemfile.lock
186
- destination: webapp-gemfile-lock
131
+ cd /app/samvera/hyrax-webapp/solr/conf
132
+ zip -1 -r solr_conf.zip ./*
133
+ db-wait.sh localhost:8985 # wait for solr to be available before hitting the API
134
+ curl -H "Content-type:application/octet-stream" --data-binary @solr_conf.zip "http://solr:SolrRocks@127.0.0.1:8985/solr/admin/configs?action=UPLOAD&name=solrconfig"
135
+ curl -H 'Content-type: application/json' http://solr:SolrRocks@127.0.0.1:8985/api/collections/ -d '{create: {name: hydra-test, config: solrconfig, numShards: 1}}'
136
+ curl -H 'Content-type: application/json' http://solr:SolrRocks@127.0.0.1:8985/api/collections/ -d '{create: {name: valkyrie-test, config: solrconfig, numShards: 1}}'
137
+ - ruby/rspec-test:
138
+ app-dir: /app/samvera/hyrax-engine
187
139
 
188
140
  workflows:
189
141
  version: 2
190
- ruby3-2:
142
+ dassie:
191
143
  jobs:
192
- - bundle:
144
+ - kaniko-build:
145
+ name: "dassie-build"
193
146
  ruby_version: "3.2.2"
194
- rails_version: "6.1.7.2"
195
- bundler_version: "2.4.8"
196
- - build:
147
+ hyrax_app: "dassie"
148
+ - hyrax-test:
149
+ name: "dassie-test"
197
150
  ruby_version: "3.2.2"
198
- rails_version: "6.1.7.2"
199
- bundler_version: "2.4.8"
151
+ hyrax_app: "dassie"
200
152
  requires:
201
- - bundle
202
- - test:
203
- name: "ruby3-2"
153
+ - dassie-build
154
+ - hyrax-test:
155
+ name: "dassie-valkyrie-test"
204
156
  ruby_version: "3.2.2"
205
- bundler_version: "2.4.8"
206
- requires:
207
- - build
208
- - test:
209
- name: "ruby3-2-valkyrie"
210
- ruby_version: "3.2.2"
211
- bundler_version: "2.4.8"
212
- hyrax_valkyrie: "true"
213
- requires:
214
- - build
215
- ruby3-1:
216
- jobs:
217
- - bundle:
218
- ruby_version: "3.1.4"
219
- rails_version: "6.1.7.2"
220
- bundler_version: "2.4.8"
221
- - build:
222
- ruby_version: "3.1.4"
223
- rails_version: "6.1.7.2"
224
- bundler_version: "2.4.8"
225
- requires:
226
- - bundle
227
- - test:
228
- name: "ruby3-1"
229
- ruby_version: "3.1.4"
230
- bundler_version: "2.4.8"
231
- requires:
232
- - build
233
- ruby3-0:
234
- jobs:
235
- - bundle:
236
- ruby_version: "3.0.6"
237
- rails_version: "6.1.7.2"
238
- bundler_version: "2.4.8"
239
- - build:
240
- ruby_version: "3.0.6"
241
- rails_version: "6.1.7.2"
242
- bundler_version: "2.4.8"
243
- requires:
244
- - bundle
245
- - test:
246
- name: "ruby3-0"
247
- ruby_version: "3.0.6"
248
- bundler_version: "2.4.8"
249
- requires:
250
- - build
251
- ruby2-7:
252
- jobs:
253
- - bundle:
254
- ruby_version: "2.7.7"
255
- rails_version: "6.1.7.2"
256
- bundler_version: "2.4.8"
257
- - build:
258
- ruby_version: "2.7.7"
259
- rails_version: "6.1.7.2"
260
- bundler_version: "2.4.8"
261
- requires:
262
- - bundle
263
- - test:
264
- name: "ruby2-7"
265
- ruby_version: "2.7.7"
266
- bundler_version: "2.4.8"
267
- requires:
268
- - build
269
- - test:
270
- name: "ruby2-7-valkyrie"
271
- ruby_version: "2.7.7"
272
- bundler_version: "2.4.8"
273
- hyrax_valkyrie: "true"
157
+ hyrax_app: "dassie"
158
+ hyrax_valkyrie: "1"
274
159
  requires:
275
- - build
160
+ - dassie-build
data/.dassie/.env CHANGED
@@ -9,6 +9,7 @@ FCREPO_HOST=fcrepo
9
9
  FCREPO_PORT=8080
10
10
  FCREPO_REST_PATH=rest
11
11
  FCREPO_TEST_BASE_PATH=/test
12
+ FITS_SERVLET_URL=http://fits:8080/fits
12
13
  HUB_URL=http://chrome:4444/wd/hub
13
14
  HYRAX_ANALYTICS=false
14
15
  HYRAX_ANALYTICS_PROVIDER=google
@@ -16,7 +17,8 @@ HYRAX_DERIVATIVES_PATH=/app/samvera/hyrax-webapp/derivatives/
16
17
  HYRAX_ENGINE_PATH=/app/samvera/hyrax-engine
17
18
  HYRAX_UPLOAD_PATH=/app/samvera/hyrax-webapp/uploads/
18
19
  IN_DOCKER=true
19
- KARMA_BROWSER=ChromiumHeadlessCustom
20
+ KARMA_BROWSER=remote-chromium
21
+ KARMA_HOSTNAME=app
20
22
  MEMCACHED_HOST=memcached
21
23
  RACK_ENV=development
22
24
  RAILS_ENV=development
@@ -2,6 +2,7 @@ require 'hyrax/specs/disable_animations_in_test_environment'
2
2
 
3
3
  Rails.application.configure do
4
4
  # Settings specified here will take precedence over those in config/application.rb.
5
+ config.assets.debug = true
5
6
 
6
7
  # The test environment is used exclusively to run your application's
7
8
  # test suite. You never need to work with it otherwise. Remember that
@@ -18,6 +18,8 @@ Hyrax.config do |config|
18
18
  config.work_requires_files = false
19
19
  config.citations = true
20
20
 
21
+ config.characterization_options = { ch12n_tool: ENV.fetch('CH12N_TOOL', 'fits').to_sym }
22
+
21
23
  # Returns a URL that resolves to an image provided by a IIIF image server
22
24
  config.iiif_image_url_builder = lambda do |file_id, base_url, size, format|
23
25
  Riiif::Engine.routes.url_helpers.image_url(file_id, host: base_url, size: size)
@@ -40,7 +42,7 @@ Hyrax.config do |config|
40
42
  config.browse_everything = nil
41
43
  end
42
44
 
43
- # config.geonames_username = ''
45
+ config.geonames_username = ENV['GEONAMES_USERNAME'] || ''
44
46
 
45
47
  ##
46
48
  # Set the system-wide virus scanner
@@ -14,9 +14,19 @@ ActiveSupport::Reloader.to_prepare do
14
14
  { height: doc['height_is'], width: doc['width_is'], format: doc['mime_type_ssi'], channels: doc['alpha_channels_ssi'] }
15
15
  end
16
16
 
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}"
17
+ if Hyrax.config.use_valkyrie?
18
+ # Use Valkyrie adapter to make sure file is available locally. Riiif will just open it then
19
+ # id comes in with the format "FILE_SET_ID/files/FILE_ID"
20
+ Riiif::Image.file_resolver.id_to_uri = lambda do |id|
21
+ file_metadata = Hyrax.query_service.find_by(id: id.split('/').last)
22
+ file = Hyrax.storage_adapter.find_by(id: file_metadata.file_identifier)
23
+ file.disk_path.to_s
24
+ end
25
+ else
26
+ Riiif::Image.file_resolver.id_to_uri = lambda do |id|
27
+ Hyrax::Base.id_to_uri(CGI.unescape(id)).tap do |url|
28
+ Rails.logger.info "Riiif resolved #{id} to #{url}"
29
+ end
20
30
  end
21
31
  end
22
32
 
data/.dassie/db/schema.rb CHANGED
@@ -2,8 +2,8 @@
2
2
  # of editing this file, please use the migrations feature of Active Record to
3
3
  # incrementally modify your database, and then regenerate this schema definition.
4
4
  #
5
- # This file is the source Rails uses to define your schema when running `rails
6
- # db:schema:load`. When creating a new database, `rails db:schema:load` tends to
5
+ # This file is the source Rails uses to define your schema when running `bin/rails
6
+ # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
7
  # be faster and is potentially less error prone than running all of your
8
8
  # migrations from scratch. Old migrations may fail to apply correctly if those
9
9
  # migrations use external dependencies or application code.
data/.dockerignore CHANGED
@@ -7,9 +7,15 @@ Dockerfile
7
7
 
8
8
  *.rdb
9
9
 
10
+ .circleci/*
11
+ .github/*
12
+
10
13
  artifacts/*
11
14
  coverage/*
12
15
  chart/*
13
16
 
14
17
  Gemfile.lock
15
18
  .dassie/Gemfile.lock
19
+
20
+ node_modules/*
21
+ yarn.lock
@@ -13,13 +13,16 @@ Present tense short summary (50 characters or less)
13
13
 
14
14
  ### Type of change (for release notes)
15
15
 
16
- - [ ] Major Changes (Potentially breaking changes)
17
- - [ ] New Features
18
- - [ ] Deprecations
19
- - [ ] Bug Fixes
20
- - [ ] Valkyrie Progress
21
- - [ ] Documentation
22
- - [ ] Containerization
16
+ Add an appropriate `notes-*` label to the PR (or indicate here) that classifies this change.
17
+
18
+ Choose from:
19
+ - `notes-major` Major Changes (Potentially breaking changes)
20
+ - `notes-minor` New Features that are backward compatible
21
+ - `notes-deprecation` Deprecations
22
+ - `notes-bugfix` Bug Fixes
23
+ - `notes-valkyrie` Valkyrie Progress
24
+ - `notes-docs` Documentation
25
+ - `notes-container` Containerization related (Docker, Helm, etc)
23
26
 
24
27
  ### Detailed Description
25
28
 
data/.github/release.yml CHANGED
@@ -3,10 +3,10 @@ changelog:
3
3
  - title: Major Changes (Potentially breaking changes)
4
4
  labels:
5
5
  - notes-major
6
- - title: New Features
6
+ - title: New Features and Non-breaking Changes
7
7
  labels:
8
8
  - notes-minor
9
- - title: Deprecations
9
+ - title: Deprecation Notices
10
10
  labels:
11
11
  - notes-deprecation
12
12
  - title: Bug Fixes
@@ -21,6 +21,9 @@ changelog:
21
21
  - title: Containerization
22
22
  labels:
23
23
  - notes-container
24
+ - title: Tests and CI Process
25
+ labels:
26
+ - notes-tests
24
27
  - title: Other
25
28
  labels:
26
29
  - "*"
data/.koppie/.env CHANGED
@@ -7,12 +7,15 @@ DB_NAME=koppie
7
7
  DB_PASSWORD=hyrax_password
8
8
  DB_PORT=5432
9
9
  DB_USERNAME=hyrax_user
10
+ FITS_SERVLET_URL=http://fits:8080/fits
10
11
  HUB_URL=http://chrome:4444/wd/hub
11
12
  HYRAX_DERIVATIVES_PATH=/app/samvera/hyrax-webapp/derivatives/
12
13
  HYRAX_ENGINE_PATH=/app/samvera/hyrax-engine
13
14
  HYRAX_UPLOAD_PATH=/app/samvera/hyrax-webapp/uploads/
14
15
  HYRAX_VALKYRIE=true
15
16
  IN_DOCKER=true
17
+ KARMA_BROWSER=remote-chromium
18
+ KARMA_HOSTNAME=app
16
19
  METADATA_DATABASE_NAME=koppie_metadata_development
17
20
  POSTGRES_DB=koppie
18
21
  POSTGRES_HOST_AUTH_METHOD=trust
@@ -3,5 +3,6 @@
3
3
  # Generated via
4
4
  # `rails generate hyrax:collection_resource CollectionResource`
5
5
  class CollectionResourceForm < Hyrax::Forms::PcdmCollectionForm
6
+ include Hyrax::FormFields(:basic_metadata)
6
7
  include Hyrax::FormFields(:collection_resource)
7
8
  end
@@ -3,5 +3,6 @@
3
3
  # Generated via
4
4
  # `rails generate hyrax:collection_resource CollectionResource`
5
5
  class CollectionResourceIndexer < Hyrax::PcdmCollectionIndexer
6
+ include Hyrax::Indexer(:basic_metadata)
6
7
  include Hyrax::Indexer(:collection_resource)
7
8
  end
@@ -27,5 +27,6 @@ class CollectionResource < Hyrax::PcdmCollection
27
27
  # * add Valkyrie attributes to this class
28
28
  # * update form and indexer to process the attributes
29
29
  #
30
+ include Hyrax::Schema(:basic_metadata)
30
31
  include Hyrax::Schema(:collection_resource)
31
32
  end
@@ -1,5 +1,6 @@
1
1
  Rails.application.configure do
2
2
  # Settings specified here will take precedence over those in config/application.rb.
3
+ config.assets.debug = true
3
4
 
4
5
  # The test environment is used exclusively to run your application's
5
6
  # test suite. You never need to work with it otherwise. Remember that
@@ -7,6 +7,8 @@ Hyrax.config do |config|
7
7
 
8
8
  config.disable_wings = true # not needed if ENV includes HYRAX_SKIP_WINGS=true
9
9
 
10
+ config.characterization_options = { ch12n_tool: ENV.fetch('CH12N_TOOL', 'fits').to_sym }
11
+
10
12
  # Register roles that are expected by your implementation.
11
13
  # @see Hyrax::RoleRegistry for additional details.
12
14
  # @note there are magical roles as defined in Hyrax::RoleRegistry::MAGIC_ROLES
@@ -104,7 +106,7 @@ Hyrax.config do |config|
104
106
 
105
107
  # Location autocomplete uses geonames to search for named regions
106
108
  # Username for connecting to geonames
107
- # config.geonames_username = ''
109
+ config.geonames_username = ENV['GEONAMES_USERNAME'] || ''
108
110
 
109
111
  # Should the acceptance of the licence agreement be active (checkbox), or
110
112
  # implied when the save button is pressed? Set to true for active
@@ -320,12 +322,16 @@ custom_queries = [Hyrax::CustomQueries::Navigators::CollectionMembers,
320
322
  Hyrax::CustomQueries::Navigators::ParentCollectionsNavigator,
321
323
  Hyrax::CustomQueries::Navigators::ChildFileSetsNavigator,
322
324
  Hyrax::CustomQueries::Navigators::ChildWorksNavigator,
325
+ Hyrax::CustomQueries::Navigators::ParentWorkNavigator,
323
326
  Hyrax::CustomQueries::Navigators::FindFiles,
324
327
  Hyrax::CustomQueries::FindAccessControl,
325
328
  Hyrax::CustomQueries::FindCollectionsByType,
326
329
  Hyrax::CustomQueries::FindFileMetadata,
327
330
  Hyrax::CustomQueries::FindIdsByModel,
328
- Hyrax::CustomQueries::FindManyByAlternateIds]
331
+ Hyrax::CustomQueries::FindManyByAlternateIds,
332
+ Hyrax::CustomQueries::FindModelsByAccess,
333
+ Hyrax::CustomQueries::FindCountBy,
334
+ Hyrax::CustomQueries::FindByDateRange]
329
335
  custom_queries.each do |handler|
330
336
  Hyrax.query_service.custom_queries.register_query_handler(handler)
331
337
  end
@@ -14,12 +14,21 @@ ActiveSupport::Reloader.to_prepare do
14
14
  { height: doc['height_is'], width: doc['width_is'], format: doc['mime_type_ssi'], channels: doc['alpha_channels_ssi'] }
15
15
  end
16
16
 
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}"
17
+ if Hyrax.config.use_valkyrie?
18
+ # Use Valkyrie adapter to make sure file is available locally. Riiif will just open it then
19
+ # id comes in with the format "FILE_SET_ID/files/FILE_ID"
20
+ Riiif::Image.file_resolver.id_to_uri = lambda do |id|
21
+ file_metadata = Hyrax.query_service.find_by(id: id.split('/').last)
22
+ file = Hyrax.storage_adapter.find_by(id: file_metadata.file_identifier)
23
+ file.disk_path.to_s
24
+ end
25
+ else
26
+ Riiif::Image.file_resolver.id_to_uri = lambda do |id|
27
+ Hyrax::Base.id_to_uri(CGI.unescape(id)).tap do |url|
28
+ Rails.logger.info "Riiif resolved #{id} to #{url}"
29
+ end
20
30
  end
21
31
  end
22
-
23
32
  Riiif::Image.authorization_service = Hyrax::IiifAuthorizationService
24
33
 
25
34
  Riiif.not_found_image = Rails.root.join('app', 'assets', 'images', 'us_404.svg')