hyrax 4.0.0.rc3 → 5.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (168) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +116 -231
  3. data/.dassie/.env +3 -1
  4. data/.dassie/Gemfile +0 -2
  5. data/.dassie/config/analytics.yml +2 -2
  6. data/.dassie/config/environments/test.rb +1 -0
  7. data/.dassie/config/initializers/hyrax.rb +3 -1
  8. data/.dassie/config/initializers/redis_config.rb +0 -1
  9. data/.dassie/config/initializers/riiif.rb +13 -3
  10. data/.dassie/db/schema.rb +2 -2
  11. data/.dockerignore +6 -0
  12. data/.github/ISSUE_TEMPLATE.md +14 -9
  13. data/.github/PULL_REQUEST_TEMPLATE.md +25 -6
  14. data/.github/release.yml +5 -2
  15. data/.koppie/.env +3 -0
  16. data/.koppie/Gemfile +0 -2
  17. data/.koppie/README.md +11 -11
  18. data/.koppie/app/forms/collection_resource_form.rb +1 -0
  19. data/.koppie/app/indexers/collection_resource_indexer.rb +1 -0
  20. data/.koppie/app/models/collection_resource.rb +1 -0
  21. data/.koppie/config/analytics.yml +1 -0
  22. data/.koppie/config/environments/test.rb +1 -0
  23. data/.koppie/config/initializers/hyrax.rb +8 -2
  24. data/.koppie/config/initializers/redis_config.rb +0 -1
  25. data/.koppie/config/initializers/riiif.rb +13 -4
  26. data/.koppie/config/metadata/collection_resource.yaml +1 -128
  27. data/.koppie/yarn.lock +23 -23
  28. data/.regen +1 -1
  29. data/CONTAINERS.md +15 -15
  30. data/Dockerfile +6 -11
  31. data/app/actors/hyrax/actors/base_actor.rb +4 -3
  32. data/app/actors/hyrax/actors/embargo_actor.rb +5 -2
  33. data/app/actors/hyrax/actors/lease_actor.rb +5 -2
  34. data/app/assets/javascripts/hyrax/file_manager/sorting.es6 +3 -2
  35. data/app/controllers/concerns/hyrax/embargoes_controller_behavior.rb +1 -1
  36. data/app/controllers/concerns/hyrax/valkyrie_downloads_controller_behavior.rb +74 -0
  37. data/app/controllers/concerns/hyrax/works_controller_behavior.rb +14 -5
  38. data/app/controllers/hyrax/admin/workflows_controller.rb +48 -3
  39. data/app/controllers/hyrax/batch_edits_controller.rb +33 -4
  40. data/app/controllers/hyrax/downloads_controller.rb +8 -1
  41. data/app/controllers/hyrax/file_sets_controller.rb +1 -0
  42. data/app/forms/hyrax/forms/file_set_edit_form.rb +1 -1
  43. data/app/forms/hyrax/forms/permission_template_form.rb +2 -0
  44. data/app/forms/hyrax/forms/resource_batch_edit_form.rb +90 -0
  45. data/app/forms/hyrax/forms/work_embargo_form.rb +1 -0
  46. data/app/forms/hyrax/forms/work_form.rb +1 -1
  47. data/app/forms/hyrax/forms/work_lease_form.rb +1 -0
  48. data/app/helpers/hyrax/dashboard_helper_behavior.rb +17 -9
  49. data/app/helpers/hyrax/membership_helper.rb +13 -1
  50. data/app/helpers/hyrax/work_form_helper.rb +0 -107
  51. data/app/indexers/hyrax/file_set_indexer.rb +6 -0
  52. data/app/indexers/hyrax/pcdm_collection_indexer.rb +8 -0
  53. data/app/indexers/hyrax/valkyrie_file_set_indexer.rb +41 -5
  54. data/app/indexers/hyrax/valkyrie_work_indexer.rb +8 -2
  55. data/app/jobs/valkyrie_create_derivatives_job.rb +8 -7
  56. data/app/jobs/valkyrie_ingest_job.rb +0 -1
  57. data/app/models/admin_set.rb +1 -31
  58. data/app/models/concerns/hyrax/file_set/derivatives.rb +3 -2
  59. data/app/models/concerns/hyrax/solr_document_behavior.rb +1 -1
  60. data/app/models/hyrax/collection_type.rb +5 -14
  61. data/app/models/hyrax/file_metadata.rb +6 -7
  62. data/app/models/hyrax/file_set.rb +8 -0
  63. data/app/models/hyrax/resource.rb +30 -2
  64. data/app/presenters/hyrax/file_set_presenter.rb +6 -0
  65. data/app/presenters/hyrax/iiif_manifest_presenter.rb +3 -7
  66. data/app/presenters/hyrax/presenter_renderer.rb +0 -7
  67. data/app/presenters/hyrax/work_show_presenter.rb +6 -11
  68. data/app/search_builders/hyrax/file_set_search_builder.rb +1 -1
  69. data/app/search_builders/hyrax/valkyrie_abstract_type_relation.rb +37 -0
  70. data/app/search_builders/hyrax/valkyrie_work_relation.rb +9 -0
  71. data/app/services/hyrax/analytics/google.rb +23 -15
  72. data/app/services/hyrax/analytics/matomo.rb +4 -3
  73. data/app/services/hyrax/characterization/valkyrie_characterization_service.rb +11 -9
  74. data/app/services/hyrax/custom_queries/find_by_date_range.rb +55 -0
  75. data/app/services/hyrax/custom_queries/find_count_by.rb +62 -0
  76. data/app/services/hyrax/custom_queries/find_file_metadata.rb +1 -1
  77. data/app/services/hyrax/custom_queries/find_models_by_access.rb +59 -0
  78. data/app/services/hyrax/derivative_bucketed_storage.rb +25 -0
  79. data/app/services/hyrax/derivative_path.rb +14 -4
  80. data/app/services/hyrax/embargo_manager.rb +76 -10
  81. data/app/services/hyrax/file_set_derivatives_service.rb +3 -2
  82. data/app/services/hyrax/lease_manager.rb +88 -8
  83. data/app/services/hyrax/listeners/file_metadata_listener.rb +2 -2
  84. data/app/services/hyrax/listeners/workflow_listener.rb +8 -11
  85. data/app/services/hyrax/persist_directly_contained_output_file_service.rb +24 -2
  86. data/app/services/hyrax/solr_query_service.rb +7 -6
  87. data/app/services/hyrax/statistics/depositors/summary.rb +1 -1
  88. data/app/services/hyrax/statistics/over_time.rb +1 -1
  89. data/app/services/hyrax/statistics/users/over_time.rb +3 -1
  90. data/app/services/hyrax/statistics/valkyrie_query_service.rb +49 -0
  91. data/app/services/hyrax/statistics/works/count.rb +1 -1
  92. data/app/services/hyrax/thumbnail_path_service.rb +5 -0
  93. data/app/services/hyrax/valkyrie_persist_derivatives.rb +16 -11
  94. data/app/services/hyrax/valkyrie_upload.rb +5 -3
  95. data/app/services/hyrax/versioning_service.rb +1 -0
  96. data/app/services/hyrax/visibility_intention.rb +1 -4
  97. data/app/services/hyrax/visibility_propagator.rb +1 -1
  98. data/app/services/hyrax/workflow/actionable_objects.rb +28 -3
  99. data/app/services/hyrax/workflow/grant_edit_to_depositor.rb +1 -1
  100. data/app/services/hyrax/workflow/grant_read_to_depositor.rb +1 -1
  101. data/app/services/hyrax/workflow/permission_query.rb +23 -2
  102. data/app/views/hyrax/admin/workflows/_tabs.html.erb +9 -0
  103. data/app/views/hyrax/admin/workflows/index.html.erb +53 -76
  104. data/app/views/hyrax/base/_file_manager_members.html.erb +2 -2
  105. data/app/views/hyrax/base/_form.html.erb +0 -10
  106. data/app/views/hyrax/base/_form_files.html.erb +7 -2
  107. data/app/views/hyrax/base/_form_permission_embargo.html.erb +1 -1
  108. data/app/views/hyrax/base/_form_permission_lease.html.erb +1 -1
  109. data/app/views/hyrax/base/_form_visibility_component.html.erb +2 -2
  110. data/app/views/hyrax/base/_items.html.erb +1 -1
  111. data/app/views/hyrax/base/file_manager.html.erb +1 -1
  112. data/app/views/hyrax/base/show.json.jbuilder +2 -2
  113. data/app/views/hyrax/file_sets/_versioning.html.erb +1 -1
  114. data/app/views/hyrax/file_sets/show.html.erb +5 -3
  115. data/app/views/hyrax/homepage/_explore_collections.html.erb +1 -1
  116. data/chart/hyrax/Chart.yaml +18 -14
  117. data/chart/hyrax/README.md +34 -21
  118. data/chart/hyrax/templates/_helpers.tpl +26 -1
  119. data/chart/hyrax/templates/configmap-env.yaml +12 -2
  120. data/chart/hyrax/templates/secrets.yaml +1 -1
  121. data/chart/hyrax/values.yaml +36 -14
  122. data/config/initializers/listeners.rb +4 -10
  123. data/config/initializers/storage_adapter_initializer.rb +1 -1
  124. data/config/locales/hyrax.de.yml +11 -3
  125. data/config/locales/hyrax.en.yml +13 -2
  126. data/config/locales/hyrax.es.yml +4 -1
  127. data/config/locales/hyrax.fr.yml +4 -1
  128. data/config/locales/hyrax.it.yml +5 -2
  129. data/config/locales/hyrax.pt-BR.yml +9 -2
  130. data/config/locales/hyrax.zh.yml +4 -1
  131. data/config/metadata/file_set_metadata.yaml +1 -1
  132. data/docker-compose-koppie.yml +17 -4
  133. data/docker-compose.yml +19 -6
  134. data/documentation/developing-your-hyrax-based-app.md +6 -14
  135. data/documentation/legacyREADME.md +7 -5
  136. data/hyrax.gemspec +2 -2
  137. data/karma.conf.js +8 -9
  138. data/lib/generators/hyrax/templates/config/analytics.yml +1 -0
  139. data/lib/generators/hyrax/templates/config/initializers/hyrax.rb +1 -1
  140. data/lib/generators/hyrax/templates/config/initializers/redis_config.rb +0 -1
  141. data/lib/generators/hyrax/templates/config/initializers/riiif.rb +15 -5
  142. data/lib/hyrax/active_fedora_dummy_model.rb +6 -1
  143. data/lib/hyrax/configuration.rb +6 -0
  144. data/lib/hyrax/engine.rb +2 -0
  145. data/lib/hyrax/publisher.rb +19 -3
  146. data/lib/hyrax/specs/capybara.rb +9 -4
  147. data/lib/hyrax/transactions/container.rb +5 -0
  148. data/lib/hyrax/transactions/steps/add_file_sets.rb +6 -0
  149. data/lib/hyrax/transactions/steps/apply_permission_template.rb +40 -0
  150. data/lib/hyrax/transactions/steps/save.rb +21 -0
  151. data/lib/hyrax/transactions/work_create.rb +1 -0
  152. data/lib/hyrax/version.rb +1 -1
  153. data/lib/hyrax.rb +1 -0
  154. data/lib/wings/active_fedora_converter/default_work.rb +7 -2
  155. data/lib/wings/active_fedora_converter/file_metadata_node.rb +1 -1
  156. data/lib/wings/active_fedora_converter.rb +47 -11
  157. data/lib/wings/model_transformer.rb +23 -4
  158. data/lib/wings/setup.rb +21 -1
  159. data/lib/wings/valkyrie/persister.rb +4 -2
  160. data/package.json +3 -1
  161. data/template.rb +1 -1
  162. metadata +15 -10
  163. data/app/forms/hyrax/forms/file_manager_form.rb +0 -35
  164. data/app/services/hyrax/collections/migration_service.rb +0 -113
  165. data/app/views/hyrax/base/_form_collections_error.html.erb +0 -1
  166. data/app/views/hyrax/base/_form_in_works_error.html.erb +0 -3
  167. data/app/views/hyrax/base/_form_ordered_members_error.html.erb +0 -3
  168. 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: f7d9595ce45877e35b01b14d36cdefb89a1bb8978ab424bbe9907edcfebb693e
4
- data.tar.gz: 516c7de64fc06ede1b8bd0843ad4ad98b01d39f7440c4723e72235880d52d34a
3
+ metadata.gz: 136cdda4fa63bf4027c7df373f2bf769221e5d0f9a16811ff75e3a2e7e791f9c
4
+ data.tar.gz: dc26381d252dc0d89c3ffce60341c906249b57107a812a219b4c6b81801a2035
5
5
  SHA512:
6
- metadata.gz: 7a4173fac3ac9ee096966e8019d7bbb00e80715b1a7672fd830920229b6236cd31b63c3099992137d107f47ef4a863db2137607c8f86f094bcd981e90443ac38
7
- data.tar.gz: 8fe124964ed3356cbb93bf5db4d1d491d8927020dce6226c0046a8068504ea21b427b99a25fd48b81b7b36ebc1702a23479ce4fe89189d4851551d5e703aa8c2
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
data/.dassie/Gemfile CHANGED
@@ -8,8 +8,6 @@ else
8
8
  end
9
9
  git_source(:github) { |repo| "https://github.com/#{repo}.git" }
10
10
 
11
- ruby '3.2.1'
12
-
13
11
  # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
14
12
  gem 'rails', '~> 6.0'
15
13
  # Use postgresql as the database for Active Record
@@ -3,11 +3,11 @@ analytics:
3
3
  analytics_id: <%= ENV['GOOGLE_ANALYTICS_ID'] %>
4
4
  app_name: <%= ENV['GOOGLE_OAUTH_APP_NAME'] %>
5
5
  app_version: <%= ENV['GOOGLE_OAUTH_APP_VERSION'] %>
6
+ privkey_value: <%= ENV['GOOGLE_OAUTH_PRIVATE_KEY_VALUE'] %>
6
7
  privkey_path: <%= ENV['GOOGLE_OAUTH_PRIVATE_KEY_PATH'] %>
7
8
  privkey_secret: <%= ENV['GOOGLE_OAUTH_PRIVATE_KEY_SECRET'] %>
8
9
  client_email: <%= ENV['GOOGLE_OAUTH_CLIENT_EMAIL'] %>
9
- matomo:
10
+ matomo:
10
11
  base_url: <%= ENV['MATOMO_BASE_URL'] %>
11
12
  site_id: <%= ENV['MATOMO_SITE_ID'] %>
12
13
  auth_token: <%= ENV['MATOMO_AUTH_TOKEN'] %>
13
-
@@ -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
@@ -2,7 +2,6 @@
2
2
  require 'redis'
3
3
  require 'connection_pool'
4
4
  config = YAML.safe_load(ERB.new(IO.read(Rails.root.join('config', 'redis.yml'))).result)[Rails.env].with_indifferent_access
5
- config[:thread_safe] = true
6
5
 
7
6
  size = ENV.fetch("HYRAX_REDIS_POOL_SIZE", 5)
8
7
  timeout = ENV.fetch("HYRAX_REDIS_TIMEOUT", 5)
@@ -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
@@ -1,20 +1,25 @@
1
1
  ### Descriptive summary
2
2
 
3
- Include what version of Hyrax relates to this issue (7.x, 6.x, HEAD, etc.) if appropriate, and any relevant tracebacks if you're reporting a bug.
3
+ Present tense short summary (30 words or less)
4
4
 
5
- ### Rationale
5
+ ### Steps to reproduce the behavior in User Interface (UI)
6
6
 
7
- Provide the rationale or user story that describes "why" this issue should be addressed. Especially if this is a new feature or significant change to the existing implementation.
7
+ 1. Do this
8
+ 2. Then do this...
9
+ 3. Include note here if not testable in UI
8
10
 
9
- ### Expected behavior
11
+ ### Actual behavior (include screenshots if available)
10
12
 
11
- ### Actual behavior
13
+ Include what version of Hyrax relates to this issue (3.x, 4.x, main branch, etc.) if appropriate, and any relevant error messages/tracebacks if you're reporting a bug.
12
14
 
13
- ### Steps to reproduce the behavior
15
+ ### Acceptance Criteria/Expected Behavior
14
16
 
15
- 1. Do this
16
- 2. Then do this...
17
+ - [ ] Create checkbox list of what done looks like...
18
+
19
+ ### Rationale (for feature request only)
20
+
21
+ Provide the rationale or user story that describes "why" this issue should be addressed. Especially if this is a new feature or significant change to the existing implementation.
17
22
 
18
23
  ### Related work
19
24
 
20
- Link to related tickets or prior related work here.
25
+ Link to related issues or prior related work here.
@@ -1,7 +1,31 @@
1
+ ### Fixes
2
+
1
3
  Fixes #issuenumber ; refs #issuenumber
2
4
 
5
+ ### Summary
6
+
3
7
  Present tense short summary (50 characters or less)
4
8
 
9
+ ### Guidance for testing, such as acceptance criteria or new user interface behaviors:
10
+ *
11
+ *
12
+ *
13
+
14
+ ### Type of change (for release notes)
15
+
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)
26
+
27
+ ### Detailed Description
28
+
5
29
  More detailed description, if necessary. Try to be as descriptive as you can: even if you think that the PR content is obvious, it may not be obvious to others. Include tracebacks if helpful, and be sure to call out any bits of the PR that may be work-in-progress.
6
30
 
7
31
  Description can have multiple paragraphs and you can use code examples inside:
@@ -14,12 +38,7 @@ class PostsController
14
38
  end
15
39
  ```
16
40
 
17
- Changes proposed in this pull request:
18
- *
19
- *
20
- *
21
-
22
- Guidance for testing, such as acceptance criteria or new user interface behaviors:
41
+ ### Changes proposed in this pull request:
23
42
  *
24
43
  *
25
44
  *
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
data/.koppie/Gemfile CHANGED
@@ -6,8 +6,6 @@ else
6
6
  end
7
7
  git_source(:github) { |repo| "https://github.com/#{repo}.git" }
8
8
 
9
- ruby '2.7.7'
10
-
11
9
  gem 'bootsnap', '>= 1.1.0', require: false
12
10
  gem 'bootstrap', '~> 4.0'
13
11
  gem 'coffee-rails', '~> 4.2'