hyrax 4.0.0.beta2 → 4.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +66 -54
  3. data/.dassie/Gemfile +1 -1
  4. data/.dassie/app/controllers/catalog_controller.rb +1 -1
  5. data/.dassie/config/initializers/hyrax.rb +4 -0
  6. data/.github/SUPPORT.md +2 -3
  7. data/.github/workflows/main.yml +4 -4
  8. data/.github/workflows/release.yml +10 -4
  9. data/.koppie/Gemfile +1 -2
  10. data/.koppie/app/controllers/catalog_controller.rb +1 -1
  11. data/.koppie/config/authorities/licenses.yml +7 -7
  12. data/.koppie/config/initializers/file_services.rb +4 -0
  13. data/.koppie/db/schema.rb +2 -2
  14. data/.koppie/yarn.lock +1 -1
  15. data/CONTAINERS.md +2 -2
  16. data/CONTRIBUTING.md +2 -2
  17. data/Dockerfile +21 -9
  18. data/README.md +24 -97
  19. data/app/assets/stylesheets/hyrax/_catalog.scss +4 -0
  20. data/app/assets/stylesheets/hyrax/_forms.scss +4 -0
  21. data/app/controllers/concerns/hyrax/controller.rb +1 -23
  22. data/app/controllers/concerns/hyrax/works_controller_behavior.rb +1 -0
  23. data/app/controllers/hyrax/dashboard/collections_controller.rb +1 -1
  24. data/app/controllers/hyrax/downloads_controller.rb +16 -1
  25. data/app/controllers/hyrax/file_sets_controller.rb +9 -2
  26. data/app/controllers/hyrax/my/works_controller.rb +3 -1
  27. data/app/controllers/hyrax/transfers_controller.rb +4 -1
  28. data/app/controllers/hyrax/workflow_actions_controller.rb +3 -2
  29. data/app/forms/hyrax/forms/file_set_edit_form.rb +1 -1
  30. data/app/forms/hyrax/forms/file_set_form.rb +8 -35
  31. data/app/forms/hyrax/forms/pcdm_object_form.rb +46 -0
  32. data/app/forms/hyrax/forms/resource_form.rb +9 -34
  33. data/app/helpers/hyrax/hyrax_helper_behavior.rb +1 -1
  34. data/app/indexers/hyrax/valkyrie_file_set_indexer.rb +1 -1
  35. data/app/jobs/characterize_job.rb +3 -2
  36. data/app/jobs/valkyrie_create_derivatives_job.rb +0 -2
  37. data/app/models/concerns/hyrax/ability.rb +1 -1
  38. data/app/models/concerns/hyrax/collection_behavior.rb +0 -47
  39. data/app/models/concerns/hyrax/solr_document/metadata.rb +1 -0
  40. data/app/models/concerns/hyrax/suppressible.rb +0 -8
  41. data/app/models/file_download_stat.rb +4 -4
  42. data/app/models/hyrax/collection_type.rb +0 -16
  43. data/app/models/hyrax/file_metadata.rb +5 -12
  44. data/app/models/hyrax/file_set.rb +1 -9
  45. data/app/models/hyrax/statistic.rb +4 -4
  46. data/app/models/sipity.rb +27 -6
  47. data/app/presenters/hyrax/collection_presenter.rb +1 -1
  48. data/app/presenters/hyrax/iiif_manifest_presenter.rb +14 -4
  49. data/app/presenters/hyrax/work_show_presenter.rb +1 -1
  50. data/app/presenters/hyrax/workflow_presenter.rb +1 -1
  51. data/app/search_builders/hyrax/collection_search_builder.rb +1 -0
  52. data/app/search_builders/hyrax/filter_suppressed_with_roles.rb +1 -1
  53. data/app/services/hyrax/admin_set_service.rb +1 -1
  54. data/app/services/hyrax/collections/nested_collection_query_service.rb +2 -2
  55. data/app/services/hyrax/database_migrator.rb +1 -1
  56. data/app/services/hyrax/edit_permissions_service.rb +21 -3
  57. data/app/services/hyrax/restriction_service.rb +1 -1
  58. data/app/services/hyrax/solr_query_service.rb +10 -2
  59. data/app/services/hyrax/solr_service.rb +22 -16
  60. data/app/services/hyrax/thumbnail_path_service.rb +10 -2
  61. data/app/services/hyrax/valkyrie_persist_derivatives.rb +26 -15
  62. data/app/services/hyrax/valkyrie_upload.rb +23 -30
  63. data/app/services/hyrax/visibility_propagator.rb +5 -5
  64. data/app/services/hyrax/workflow/status_list_service.rb +1 -1
  65. data/app/views/hyrax/base/_attribute_rows.html.erb +2 -0
  66. data/app/views/hyrax/dashboard/collections/_form_for_select_collection.html.erb +1 -1
  67. data/app/views/hyrax/file_sets/_permission.html.erb +1 -1
  68. data/app/views/hyrax/file_sets/edit.html.erb +1 -1
  69. data/app/views/hyrax/file_sets/media_display/_audio.html.erb +1 -1
  70. data/app/views/hyrax/file_sets/media_display/_default.html.erb +1 -1
  71. data/app/views/hyrax/file_sets/media_display/_image.html.erb +1 -1
  72. data/app/views/hyrax/file_sets/media_display/_office_document.html.erb +1 -1
  73. data/app/views/hyrax/file_sets/media_display/_pdf.html.erb +1 -1
  74. data/app/views/hyrax/file_sets/media_display/_video.html.erb +1 -1
  75. data/app/views/hyrax/uploads/_js_templates.html.erb +8 -8
  76. data/app/views/hyrax/uploads/_js_templates_branding.html.erb +2 -2
  77. data/app/views/hyrax/users/_vitals.html.erb +4 -4
  78. data/chart/hyrax/Chart.yaml +7 -7
  79. data/chart/hyrax/README.md +5 -0
  80. data/chart/hyrax/templates/_helpers.tpl +14 -6
  81. data/chart/hyrax/templates/cron-embargo.yaml +1 -1
  82. data/chart/hyrax/templates/cron-lease.yaml +1 -1
  83. data/chart/hyrax/templates/deployment-worker.yaml +2 -2
  84. data/chart/hyrax/templates/extra-list.yaml +8 -0
  85. data/chart/hyrax/templates/secrets.yaml +3 -3
  86. data/chart/hyrax/values.yaml +22 -15
  87. data/config/locales/hyrax.de.yml +7 -7
  88. data/config/locales/hyrax.es.yml +7 -7
  89. data/config/locales/hyrax.fr.yml +8 -8
  90. data/config/locales/hyrax.it.yml +7 -7
  91. data/config/locales/hyrax.pt-BR.yml +7 -7
  92. data/config/locales/hyrax.zh.yml +8 -8
  93. data/config/metadata/file_set_metadata.yaml +130 -0
  94. data/documentation/MAINTENANCE.md +77 -0
  95. data/documentation/developing-your-hyrax-based-app.md +2 -2
  96. data/documentation/legacyREADME.md +2 -2
  97. data/hyrax.gemspec +4 -4
  98. data/lib/generators/hyrax/templates/catalog_controller.rb +1 -1
  99. data/lib/hyrax/configuration.rb +5 -0
  100. data/lib/hyrax/engine.rb +0 -1
  101. data/lib/hyrax/transactions/container.rb +0 -2
  102. data/lib/hyrax/transactions/steps/save_collection_banner.rb +1 -1
  103. data/lib/hyrax/transactions/steps/save_collection_logo.rb +1 -1
  104. data/lib/hyrax/version.rb +1 -1
  105. data/lib/valkyrie/indexing/solr/indexing_adapter.rb +1 -1
  106. data/lib/wings/active_fedora_converter/file_metadata_node.rb +1 -1
  107. data/samvera-fall-TM3.svg +376 -0
  108. data/template.rb +1 -1
  109. metadata +36 -45
  110. data/app/conversions/power_converters/polymorphic_type.rb +0 -9
  111. data/app/conversions/power_converters/sipity_action.rb +0 -11
  112. data/app/conversions/power_converters/sipity_action_name.rb +0 -10
  113. data/app/conversions/power_converters/sipity_agent.rb +0 -9
  114. data/app/conversions/power_converters/sipity_entity.rb +0 -14
  115. data/app/conversions/power_converters/sipity_role.rb +0 -10
  116. data/app/conversions/power_converters/sipity_workflow_id.rb +0 -17
  117. data/app/conversions/power_converters/sipity_workflow_state.rb +0 -13
  118. data/app/conversions/power_converters.rb +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f39a5cb135f87ff31b87b65f105d488572df699258a55c12bcc17f7f9e34b9a1
4
- data.tar.gz: c1aa78455834f0440debab01d811044787b1749a6825b937d6f23a114c96027e
3
+ metadata.gz: a40b509766f1add062da64ebfa925e2f005b37f3b8ba98cf47869b126e5c5edb
4
+ data.tar.gz: f8d8d154e6c12ba940ea317042ded3bddbbc8c5b3b4ba70df2edcb35715c3aca
5
5
  SHA512:
6
- metadata.gz: e42131c51271b260719032394cdeed9d5c0464b5aeaf97206a276b79ae68a2bb714a6e255ffb3053275ea3c964014648acbfedbf5dbc098ec63089fd3eb25d2e
7
- data.tar.gz: c9c2645320f0ddf32e0d190057ee0fe58ac93886c9c104f0293e47ef44add50c8d3b569dedad6bdc02285b95c9993e3c2dc1a438f74a00cdfa8db65875a179d6
6
+ metadata.gz: b07a5c4beb95e72e33ebcdb6cd7c68837077760de21f73ff8a216c9a51eef7b32ca8c2331a3cfc54e17aae8964fa2c5cbd5981de052c822502141bc7ad3ee513
7
+ data.tar.gz: cae0fc1b05c720927879e2c076e3ce9eac3fa623e44012f227ef43814028b95cfd7605c14f87e459d26259f9d3996c15848c25130ad128ca82c3a13a9298f237
data/.circleci/config.yml CHANGED
@@ -2,22 +2,25 @@ version: 2.1
2
2
  orbs:
3
3
  samvera: samvera/circleci-orb@1
4
4
  browser-tools: circleci/browser-tools@1.3
5
+ ruby: circleci/ruby@2
6
+ node: circleci/node@5
7
+
5
8
  jobs:
6
9
  bundle:
7
10
  parameters:
8
11
  ruby_version:
9
12
  type: string
10
- default: 2.7.6
13
+ default: 2.7.7
11
14
  bundler_version:
12
15
  type: string
13
- default: 2.3.13
16
+ default: 2.4.8
14
17
  rails_version:
15
18
  type: string
16
- default: 6.1.6.1
19
+ default: 6.1.7.2
17
20
  executor:
18
21
  name: 'samvera/ruby'
19
22
  ruby_version: << parameters.ruby_version >>
20
- resource_class: medium+
23
+ resource_class: medium
21
24
  environment:
22
25
  RAILS_VERSION: << parameters.rails_version >>
23
26
  NOKOGIRI_USE_SYSTEM_LIBRARIES: true
@@ -44,8 +47,8 @@ jobs:
44
47
  - restore_cache:
45
48
  name: Restore rubocop cache
46
49
  keys:
47
- - v1-ruby<< parameters.ruby_version >>-bundle{{ checksum "Gemfile.lock" }}
48
- - v1-ruby<< parameters.ruby_version >>
50
+ - v1-rubocop-ruby<< parameters.ruby_version >>-bundle{{ checksum "Gemfile.lock" }}
51
+ - v1-rubocop-ruby<< parameters.ruby_version >>
49
52
  - v1
50
53
 
51
54
  - run:
@@ -54,9 +57,9 @@ jobs:
54
57
 
55
58
  - save_cache:
56
59
  name: Save rubocop cache
57
- key: v1-ruby<< parameters.ruby_version >>-bundle{{ checksum "Gemfile.lock" }}
60
+ key: v1-rubocop-ruby<< parameters.ruby_version >>-bundle{{ checksum "Gemfile.lock" }}
58
61
  paths:
59
- - ~/.cache
62
+ - ~/.cache/rubocop_cache
60
63
 
61
64
  - persist_to_workspace:
62
65
  root: ~/
@@ -68,17 +71,17 @@ jobs:
68
71
  parameters:
69
72
  ruby_version:
70
73
  type: string
71
- default: 2.7.6
74
+ default: 2.7.7
72
75
  bundler_version:
73
76
  type: string
74
- default: 2.3.13
77
+ default: 2.4.8
75
78
  rails_version:
76
79
  type: string
77
- default: 6.1.6.1
80
+ default: 6.1.7.2
78
81
  executor:
79
82
  name: 'samvera/ruby_fcrepo_solr_redis_postgres'
80
83
  ruby_version: << parameters.ruby_version >>
81
- resource_class: medium+
84
+ resource_class: medium
82
85
  environment:
83
86
  RAILS_VERSION: << parameters.rails_version >>
84
87
  NOKOGIRI_USE_SYSTEM_LIBRARIES: true
@@ -92,6 +95,15 @@ jobs:
92
95
  - samvera/bundle:
93
96
  ruby_version: << parameters.ruby_version >>
94
97
  bundler_version: << parameters.bundler_version >>
98
+ - 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
95
107
  - persist_to_workspace:
96
108
  root: ~/
97
109
  paths:
@@ -102,10 +114,10 @@ jobs:
102
114
  parameters:
103
115
  ruby_version:
104
116
  type: string
105
- default: 2.7.6
117
+ default: 2.7.7
106
118
  bundler_version:
107
119
  type: string
108
- default: 2.3.13
120
+ default: 2.4.8
109
121
  hyrax_valkyrie:
110
122
  type: string
111
123
  default: "false"
@@ -120,6 +132,7 @@ jobs:
120
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
121
133
  KARMA_BROWSER: ChromeHeadlessCustom
122
134
  RAILS_ROOT: .internal_test_app
135
+ SPEC_OPTS: "" # Clear output conflicts between samvera orb executor and ruby orb rspec command
123
136
  steps:
124
137
  - attach_workspace:
125
138
  at: ~/
@@ -127,17 +140,25 @@ jobs:
127
140
  name: Install system dependencies
128
141
  command: |
129
142
  sudo apt-get update
130
- sudo apt-get install imagemagick librsvg2-bin
143
+ sudo apt-get install imagemagick librsvg2-bin lsof
131
144
  - browser-tools/install-chrome
132
145
  - browser-tools/install-chromedriver
133
146
  - run:
147
+ name: Check Chrome install
134
148
  command: |
135
149
  google-chrome --version
136
150
  chromedriver --version
137
- name: Check Chrome install
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
138
155
  - run:
139
- name: Yarn install
156
+ name: Yarn Install (engine)
140
157
  command: yarn install
158
+ - save_cache:
159
+ key: engine-node-v1-{{ checksum "package.json" }}
160
+ paths:
161
+ - node_modules
141
162
  - samvera/install_solr_core:
142
163
  solr_config_path: .internal_test_app/solr/conf
143
164
  - samvera/install_solr_core:
@@ -147,56 +168,47 @@ jobs:
147
168
  - samvera/bundle:
148
169
  ruby_version: << parameters.ruby_version >>
149
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
150
177
  - run:
151
- command: bundle exec rake app:db:migrate
152
- - samvera/parallel_rspec
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
153
187
 
154
- # Trigger a workflow on the nurax repository that will deploy the most recent hyrax gem code to https://nurax-dev.curationexperts.com/
155
- deploy:
156
- docker:
157
- - image: ubuntu
158
- steps:
159
- - run:
160
- name: Install curl
161
- command: apt-get update && apt-get install -y curl
162
- - run:
163
- name: "Trigger Nurax deploy"
164
- command: |
165
- curl -X POST https://circleci.com/api/v2/project/gh/curationexperts/nurax/pipeline \
166
- --header "Circle-Token: $NURAX_CIRCLECI_TOKEN" \
167
- --header 'Accept: text/plain' \
168
- --header 'Content-Type: application/json'
169
188
  workflows:
170
189
  version: 2
171
- ruby2-7-6:
190
+ ruby2-7:
172
191
  jobs:
173
192
  - bundle:
174
- ruby_version: "2.7.6"
175
- rails_version: "6.1.6.1"
176
- bundler_version: "2.3.13"
193
+ ruby_version: "2.7.7"
194
+ rails_version: "6.1.7.2"
195
+ bundler_version: "2.4.8"
177
196
  - build:
178
- ruby_version: "2.7.6"
179
- rails_version: "6.1.6.1"
180
- bundler_version: "2.3.13"
197
+ ruby_version: "2.7.7"
198
+ rails_version: "6.1.7.2"
199
+ bundler_version: "2.4.8"
181
200
  requires:
182
201
  - bundle
183
202
  - test:
184
- name: "ruby2-7-6"
185
- ruby_version: "2.7.6"
186
- bundler_version: "2.3.13"
203
+ name: "ruby2-7"
204
+ ruby_version: "2.7.7"
205
+ bundler_version: "2.4.8"
187
206
  requires:
188
207
  - build
189
208
  - test:
190
- name: "ruby2-7-6-valkyrie"
191
- ruby_version: "2.7.6"
192
- bundler_version: "2.3.13"
209
+ name: "ruby2-7-valkyrie"
210
+ ruby_version: "2.7.7"
211
+ bundler_version: "2.4.8"
193
212
  hyrax_valkyrie: "true"
194
213
  requires:
195
214
  - build
196
- nurax-dev_deploy:
197
- jobs:
198
- - deploy:
199
- filters:
200
- branches:
201
- only:
202
- - main
data/.dassie/Gemfile CHANGED
@@ -8,7 +8,7 @@ else
8
8
  end
9
9
  git_source(:github) { |repo| "https://github.com/#{repo}.git" }
10
10
 
11
- ruby '2.7.6'
11
+ ruby '2.7.7'
12
12
 
13
13
  # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
14
14
  gem 'rails', '~> 6.0'
@@ -25,7 +25,7 @@ class CatalogController < ApplicationController
25
25
 
26
26
  # Because too many times on Samvera tech people raise a problem regarding a failed query to SOLR.
27
27
  # Often, it's because they inadvertently exceeded the character limit of a GET request.
28
- config.http_method = :post
28
+ config.http_method = Hyrax.config.solr_default_method
29
29
 
30
30
  ## Default parameters to send to solr for all search-like requests. See also SolrHelper#solr_search_params
31
31
  config.default_solr_params = {
@@ -46,6 +46,10 @@ Hyrax.config do |config|
46
46
  # Set the system-wide virus scanner
47
47
  config.virus_scanner = Hyrax::VirusScanner
48
48
 
49
+ # The default method used for Solr queries. Values are :get or :post.
50
+ # Post is suggested to prevent issues with URL length.
51
+ config.solr_default_method = :post
52
+
49
53
  ##
50
54
  # To index to the Valkyrie core, uncomment the following lines.
51
55
  # config.query_index_from_valkyrie = true
data/.github/SUPPORT.md CHANGED
@@ -1,10 +1,9 @@
1
1
  # Getting Help
2
2
 
3
- If you have questions or need help, please email [the Samvera community tech list](mailto:samvera-tech@googlegroups.com) or stop by the #dev channel in [the Samvera community Slack team](https://wiki.lyrasis.org/pages/viewpage.action?pageId=87460391#Getintouch!-Slack).
3
+ If you have questions or need help, please email [the Samvera community tech list](mailto:samvera-tech@googlegroups.com) or stop by the #dev channel in [the Samvera Community Slack Workspace](https://samvera.atlassian.net/wiki/spaces/samvera/pages/405211682/Getting+Started+in+the+Samvera+Community#Join-the-Samvera-Slack-workspace).
4
4
 
5
5
  The [Hyrax wiki](https://github.com/samvera/hyrax/wiki) gathers documentation as the community tries things and learns what works. There is useful knowledge and history there but please keep in mind that this information can age quickly. Refer to the [README.md](./README.md) for the best updated guidance we have to offer.
6
6
 
7
- You can also look in the [Samvera Community Knowledge Base](https://samvera.github.io) for help with Hyrax or other Samvera Community questions.
8
7
 
9
8
  ## Reporting Issues
10
9
 
@@ -12,4 +11,4 @@ If you would like to report an issue with Hyrax, first do search [the list of is
12
11
 
13
12
  ## Reporting Security Issues
14
13
 
15
- To report a security vulnerability, email [samvera-steering@googlegroups.com](mailto:samvera-steering@googlegroups.com) and the Steering Group will coordinate the community response. In your message, please document to the best of your ability cases (relevant software versions, conditions, etc.) where the vulnerability is applicable, the potential negative effects, and any known workarounds or fixes to mitigate the risk. Steering will communicate this to the Partners and the rest of the community in a timely fashion.
14
+ To report a security vulnerability, email [the Samvera Board](mailto:board@samvera.org) and the they will coordinate the community response. In your message, please document to the best of your ability cases (relevant software versions, conditions, etc.) where the vulnerability is applicable, the potential negative effects, and any known workarounds or fixes to mitigate the risk. The Board will communicate this to the Partners and the rest of the community in a timely fashion.
@@ -2,16 +2,16 @@ name: Trigger Nurax build
2
2
  on:
3
3
  workflow_dispatch:
4
4
  push:
5
+ branches:
6
+ - 'main'
5
7
 
6
8
  jobs:
7
9
  trigger:
8
10
  runs-on: ubuntu-latest
9
11
  steps:
10
- - uses: peter-evans/repository-dispatch@v1
12
+ - uses: peter-evans/repository-dispatch@v2.1.1
11
13
  with:
12
14
  token: ${{ secrets.NURAX_ACCESS_TOKEN }}
13
15
  event-type: push
14
- repository: curationexperts/nurax
16
+ repository: samvera-labs/nurax
15
17
  client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
16
-
17
-
@@ -2,16 +2,22 @@ name: Trigger Nurax build
2
2
  on:
3
3
  workflow_dispatch:
4
4
  release:
5
+ types: [released]
5
6
 
6
7
  jobs:
7
8
  trigger:
8
9
  runs-on: ubuntu-latest
9
10
  steps:
10
- - uses: peter-evans/repository-dispatch@v1
11
+ - id: latest-release
12
+ uses: pozetroninc/github-action-get-latest-release@v0.7.0
13
+ with:
14
+ repository: ${{ github.repository }}
15
+ token: ${{ github.token }}
16
+ excludes: prerelease, draft
17
+ - uses: peter-evans/repository-dispatch@v2.1.1
18
+ if: ${{ steps.latest-release.outputs.release == github.ref_name }}
11
19
  with:
12
20
  token: ${{ secrets.NURAX_ACCESS_TOKEN }}
13
21
  event-type: release
14
- repository: curationexperts/nurax
22
+ repository: samvera-labs/nurax
15
23
  client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
16
-
17
-
data/.koppie/Gemfile CHANGED
@@ -6,7 +6,7 @@ else
6
6
  end
7
7
  git_source(:github) { |repo| "https://github.com/#{repo}.git" }
8
8
 
9
- ruby '2.7.6'
9
+ ruby '2.7.7'
10
10
 
11
11
  gem 'bootsnap', '>= 1.1.0', require: false
12
12
  gem 'bootstrap', '~> 4.0'
@@ -29,7 +29,6 @@ gem 'turbolinks', '~> 5'
29
29
  gem 'twitter-typeahead-rails', '0.11.1.pre.corejavascript'
30
30
  gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
31
31
  gem 'uglifier', '>= 1.3.0'
32
- gem 'valkyrie', '~> 2', '>= 2.1.1'
33
32
 
34
33
  group :development do
35
34
  gem 'better_errors' # add command line in browser when errors
@@ -29,7 +29,7 @@ class CatalogController < ApplicationController
29
29
 
30
30
  # Because too many times on Samvera tech people raise a problem regarding a failed query to SOLR.
31
31
  # Often, it's because they inadvertently exceeded the character limit of a GET request.
32
- config.http_method = :post
32
+ config.http_method = Hyrax.config.solr_default_method
33
33
 
34
34
  ## Default parameters to send to solr for all search-like requests. See also SolrHelper#solr_search_params
35
35
  config.default_solr_params = {
@@ -1,25 +1,25 @@
1
1
  terms:
2
2
  - id: http://creativecommons.org/licenses/by/3.0/us/
3
3
  term: Attribution 3.0 United States
4
- active: true
4
+ active: false
5
5
  - id: http://creativecommons.org/licenses/by-sa/3.0/us/
6
6
  term: Attribution-ShareAlike 3.0 United States
7
- active: true
7
+ active: false
8
8
  - id: http://creativecommons.org/licenses/by-nc/3.0/us/
9
9
  term: Attribution-NonCommercial 3.0 United States
10
- active: true
10
+ active: false
11
11
  - id: http://creativecommons.org/licenses/by-nd/3.0/us/
12
12
  term: Attribution-NoDerivs 3.0 United States
13
- active: true
13
+ active: false
14
14
  - id: http://creativecommons.org/licenses/by-nc-nd/3.0/us/
15
15
  term: Attribution-NonCommercial-NoDerivs 3.0 United States
16
- active: true
16
+ active: false
17
17
  - id: http://creativecommons.org/licenses/by-nc-sa/3.0/us/
18
18
  term: Attribution-NonCommercial-ShareAlike 3.0 United States
19
- active: true
19
+ active: false
20
20
  - id: http://www.europeana.eu/portal/rights/rr-r.html
21
21
  term: All rights reserved
22
- active: true
22
+ active: false
23
23
  - id: https://creativecommons.org/licenses/by/4.0/
24
24
  term: Creative Commons BY Attribution 4.0 International
25
25
  active: true
@@ -0,0 +1,4 @@
1
+ ActiveSupport::Reloader.to_prepare do
2
+ Hydra::Derivatives.config.output_file_service = Hyrax::ValkyriePersistDerivatives
3
+ Hydra::Derivatives.config.source_file_service = Hyrax::LocalFileService
4
+ end
data/.koppie/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/.koppie/yarn.lock CHANGED
@@ -1355,7 +1355,7 @@ unfetch@^4.2.0:
1355
1355
  resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-4.2.0.tgz#7e21b0ef7d363d8d9af0fb929a5555f6ef97a3be"
1356
1356
  integrity sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA==
1357
1357
 
1358
- universalviewer@^3.1.1:
1358
+ universalviewer@^3.1.4:
1359
1359
  version "3.1.4"
1360
1360
  resolved "https://registry.yarnpkg.com/universalviewer/-/universalviewer-3.1.4.tgz#5355aa77e06a05d1252f473e7b437caa24ecd9ff"
1361
1361
  integrity sha512-1z/0iN0JcGlN3lNX3/hMts2WAaLdmvG+j50lgqdzKsGex6033XmE30otl0U2UvF21S5U7bVlW+KYlMeIQyTRww==
data/CONTAINERS.md CHANGED
@@ -191,8 +191,8 @@ We publish several Hyrax images to the [GitHub container registry][ghcr] under
191
191
  the [Samvera organization][samvera-packages]. To build them:
192
192
 
193
193
  ```sh
194
- export HYRAX_VERSION=v3.4.1 # or desired version
195
- git checkout $HYRAX_VERSION
194
+ export HYRAX_VERSION=v4.0.0.rc1 # or desired version
195
+ git checkout hyrax-$HYRAX_VERSION
196
196
 
197
197
  docker build --target hyrax-base --tag ghcr.io/samvera/hyrax/hyrax-base:$(git rev-parse HEAD) .
198
198
 
data/CONTRIBUTING.md CHANGED
@@ -45,7 +45,7 @@ further details.
45
45
  ### Reporting Issues
46
46
 
47
47
  * Make sure you have a [GitHub account](https://github.com/signup/free)
48
- * Submit a [Github issue](https://github.com/samvera/{{library}}/issues/) by:
48
+ * Submit a [Github issue](https://github.com/samvera/hyrax/issues/) by:
49
49
  * Clearly describing the issue
50
50
  * Provide a descriptive summary
51
51
  * Explain the expected behavior
@@ -178,4 +178,4 @@ If you are uncertain, bring other contributors into the conversation by assignin
178
178
  * [General GitHub documentation](http://help.github.com/)
179
179
  * [GitHub pull request documentation](https://help.github.com/articles/about-pull-requests/)
180
180
  * [Pro Git](http://git-scm.com/book) is both a free and excellent book about Git.
181
- * [A Git Config for Contributing](http://ndlib.github.io/practices/my-typical-per-project-git-config/)
181
+ * [A Git Config for Contributing](http://ndlib.github.io/practices/my-typical-per-project-git-config/)
data/Dockerfile CHANGED
@@ -1,9 +1,19 @@
1
- ARG RUBY_VERSION=2.7.6
2
- FROM ruby:$RUBY_VERSION-alpine3.15 as hyrax-base
1
+ ARG RUBY_VERSION=2.7.7
2
+
3
+ # Replace with official jemalloc package in alpine 3.17
4
+ FROM ruby:$RUBY_VERSION-alpine3.16 as builder
5
+ RUN apk add build-base curl
6
+ RUN curl -sL https://github.com/jemalloc/jemalloc/releases/download/5.3.0/jemalloc-5.3.0.tar.bz2 | tar -xj && \
7
+ cd jemalloc-5.3.0 && \
8
+ ./configure && \
9
+ make && \
10
+ make install
11
+
12
+ FROM ruby:$RUBY_VERSION-alpine3.16 as hyrax-base
3
13
 
4
14
  ARG DATABASE_APK_PACKAGE="postgresql-dev"
5
15
  ARG EXTRA_APK_PACKAGES="git"
6
- ARG RUBYGEMS_VERSION=3.3.20
16
+ ARG RUBYGEMS_VERSION=""
7
17
 
8
18
  RUN apk --no-cache upgrade && \
9
19
  apk --no-cache add acl \
@@ -33,6 +43,9 @@ ENV PATH="/app/samvera:$PATH"
33
43
  ENV RAILS_ROOT="/app/samvera/hyrax-webapp"
34
44
  ENV RAILS_SERVE_STATIC_FILES="1"
35
45
 
46
+ COPY --from=builder /usr/local/lib/libjemalloc.so.2 /usr/local/lib/
47
+ ENV LD_PRELOAD="/usr/local/lib/libjemalloc.so.2"
48
+
36
49
  ENTRYPOINT ["hyrax-entrypoint.sh"]
37
50
  CMD ["bundle", "exec", "puma", "-v", "-b", "tcp://0.0.0.0:3000"]
38
51
 
@@ -49,22 +62,21 @@ ONBUILD RUN RAILS_ENV=production SECRET_KEY_BASE=`bin/rake secret` DB_ADAPTER=nu
49
62
 
50
63
  FROM hyrax-base as hyrax-worker-base
51
64
 
52
- ENV MALLOC_ARENA_MAX=2
53
-
54
65
  USER root
55
66
  RUN apk --no-cache add bash \
56
67
  ffmpeg \
57
68
  mediainfo \
58
- openjdk11-jre \
69
+ openjdk17-jre \
59
70
  perl
60
71
  USER app
61
72
 
62
73
  RUN mkdir -p /app/fits && \
63
74
  cd /app/fits && \
64
- wget https://github.com/harvard-lts/fits/releases/download/1.5.1/fits-1.5.1.zip -O fits.zip && \
75
+ wget https://github.com/harvard-lts/fits/releases/download/1.6.0/fits-1.6.0.zip -O fits.zip && \
65
76
  unzip fits.zip && \
66
- rm fits.zip && \
67
- chmod a+x /app/fits/fits.sh
77
+ rm fits.zip tools/mediainfo/linux/libmediainfo.so.0 tools/mediainfo/linux/libzen.so.0 && \
78
+ chmod a+x /app/fits/fits.sh && \
79
+ sed -i 's/\(<tool.*TikaTool.*>\)/<!--\1-->/' /app/fits/xml/fits.xml
68
80
  ENV PATH="${PATH}:/app/fits"
69
81
 
70
82
  CMD bundle exec sidekiq