hyrax 3.4.1 → 3.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +26 -17
  3. data/.dassie/.env +1 -1
  4. data/.dassie/Gemfile +1 -1
  5. data/.dassie/app/forms/collection_resource_form.rb +8 -0
  6. data/.dassie/app/indexers/collection_resource_indexer.rb +8 -0
  7. data/.dassie/app/models/collection_resource.rb +35 -0
  8. data/.dassie/config/initializers/file_services.rb +4 -0
  9. data/.dassie/config/initializers/hyrax.rb +2 -1
  10. data/.dassie/config/metadata/collection_resource.yaml +23 -0
  11. data/.dassie/db/seeds.rb +2 -0
  12. data/.dassie/spec/forms/collection_resource_form_spec.rb +13 -0
  13. data/.dassie/spec/indexers/collection_resource_indexer_spec.rb +14 -0
  14. data/.dassie/spec/models/collection_resource_spec.rb +13 -0
  15. data/.regen +1 -1
  16. data/.rubocop.yml +1 -1
  17. data/.rubocop_fixme.yml +19 -2
  18. data/CONTAINERS.md +18 -13
  19. data/Dockerfile +2 -2
  20. data/app/assets/javascripts/hyrax/collections_v2.es6 +13 -0
  21. data/app/controllers/concerns/hyrax/collections_controller_behavior.rb +1 -3
  22. data/app/controllers/hyrax/dashboard/collections_controller.rb +159 -75
  23. data/app/controllers/hyrax/single_use_links_viewer_controller.rb +1 -1
  24. data/app/forms/hyrax/forms/collection_form.rb +1 -1
  25. data/app/forms/hyrax/forms/pcdm_collection_form.rb +29 -2
  26. data/app/forms/hyrax/forms/resource_form.rb +15 -1
  27. data/app/forms/hyrax/forms/widgets/admin_set_visibility.rb +1 -1
  28. data/app/indexers/hyrax/pcdm_collection_indexer.rb +0 -1
  29. data/app/jobs/characterize_job.rb +5 -1
  30. data/app/jobs/import_url_job.rb +4 -6
  31. data/app/jobs/valkyrie_ingest_job.rb +15 -77
  32. data/app/models/admin_set.rb +8 -0
  33. data/app/models/concerns/hyrax/collection_behavior.rb +1 -1
  34. data/app/models/concerns/hyrax/user.rb +11 -0
  35. data/app/models/concerns/hyrax/work_behavior.rb +1 -1
  36. data/app/models/featured_work_list.rb +0 -1
  37. data/app/models/hyrax/file_metadata.rb +32 -2
  38. data/app/models/hyrax/file_set.rb +1 -3
  39. data/app/models/hyrax/group.rb +19 -0
  40. data/app/models/hyrax/pcdm_collection.rb +0 -1
  41. data/app/models/job_io_wrapper.rb +1 -1
  42. data/app/presenters/hyrax/member_presenter_factory.rb +2 -4
  43. data/app/presenters/hyrax/work_show_presenter.rb +3 -3
  44. data/app/services/hyrax/access_control_list.rb +7 -6
  45. data/app/services/hyrax/adapters/nesting_index_adapter.rb +3 -3
  46. data/app/services/hyrax/characterization/valkyrie_characterization_service.rb +3 -5
  47. data/app/services/hyrax/collections/collection_member_service.rb +3 -5
  48. data/app/services/hyrax/listeners/file_metadata_listener.rb +11 -0
  49. data/app/services/hyrax/listeners/member_cleanup_listener.rb +14 -18
  50. data/app/services/hyrax/multiple_membership_checker.rb +2 -0
  51. data/app/services/hyrax/valkyrie_persist_derivatives.rb +50 -0
  52. data/app/services/hyrax/valkyrie_upload.rb +94 -0
  53. data/app/services/hyrax/workflow/workflow_importer.rb +7 -9
  54. data/app/services/hyrax/workflow/workflow_schema.rb +3 -5
  55. data/app/strategies/hyrax/strategies/yaml_strategy.rb +4 -6
  56. data/app/uploaders/hyrax/uploaded_file_uploader.rb +4 -4
  57. data/app/validators/hyrax/collection_membership_validator.rb +16 -15
  58. data/app/views/catalog/_index_header_list_default.html.erb +8 -1
  59. data/app/views/catalog/_thumbnail_list_default.html.erb +8 -3
  60. data/app/views/collections/edit_fields/_based_near.html.erb +7 -7
  61. data/app/views/hyrax/dashboard/collections/_form.html.erb +3 -2
  62. data/app/views/hyrax/dashboard/collections/_form_branding.html.erb +1 -0
  63. data/app/views/hyrax/dashboard/sidebar/_activity.html.erb +1 -1
  64. data/app/views/hyrax/my/works/_tabs.html.erb +6 -1
  65. data/chart/hyrax/Chart.yaml +10 -6
  66. data/chart/hyrax/templates/_helpers.tpl +4 -0
  67. data/chart/hyrax/templates/cron-embargo.yaml +5 -0
  68. data/chart/hyrax/templates/cron-lease.yaml +5 -0
  69. data/chart/hyrax/templates/deployment-worker.yaml +11 -0
  70. data/chart/hyrax/templates/ingress.yaml +7 -6
  71. data/chart/hyrax/values.yaml +152 -0
  72. data/config/features.rb +48 -50
  73. data/config/initializers/{valkryrie_storage.rb → storage_adapter_initializer.rb} +5 -0
  74. data/config/locales/hyrax.de.yml +12 -12
  75. data/docker-compose.yml +1 -0
  76. data/documentation/developing-your-hyrax-based-app.md +1 -1
  77. data/documentation/legacyREADME.md +1 -1
  78. data/hyrax.gemspec +5 -3
  79. data/lib/generators/hyrax/collection_resource/USAGE +20 -0
  80. data/lib/generators/hyrax/collection_resource/collection_resource_generator.rb +133 -0
  81. data/lib/generators/hyrax/collection_resource/templates/collection.rb.erb +34 -0
  82. data/lib/generators/hyrax/collection_resource/templates/collection_form.rb.erb +7 -0
  83. data/lib/generators/hyrax/collection_resource/templates/collection_form_spec.rb.erb +13 -0
  84. data/lib/generators/hyrax/collection_resource/templates/collection_indexer.rb.erb +7 -0
  85. data/lib/generators/hyrax/collection_resource/templates/collection_indexer_spec.rb.erb +13 -0
  86. data/lib/generators/hyrax/collection_resource/templates/collection_metadata.yaml +22 -0
  87. data/lib/generators/hyrax/collection_resource/templates/collection_spec.rb.erb +12 -0
  88. data/lib/generators/hyrax/install_generator.rb +9 -0
  89. data/lib/hyrax/configuration.rb +12 -0
  90. data/lib/hyrax/publisher.rb +4 -0
  91. data/lib/hyrax/specs/shared_specs/hydra_works.rb +0 -1
  92. data/lib/hyrax/transactions/collection_update.rb +2 -0
  93. data/lib/hyrax/transactions/container.rb +10 -0
  94. data/lib/hyrax/transactions/steps/save_collection_banner.rb +59 -0
  95. data/lib/hyrax/transactions/steps/save_collection_logo.rb +109 -0
  96. data/lib/hyrax/version.rb +1 -1
  97. data/lib/wings/active_fedora_converter/file_metadata_node.rb +48 -0
  98. data/lib/wings/active_fedora_converter/instance_builder.rb +68 -0
  99. data/lib/wings/active_fedora_converter.rb +3 -3
  100. data/lib/wings/services/custom_queries/find_file_metadata.rb +19 -8
  101. data/lib/wings/valkyrie/query_service.rb +4 -6
  102. data/template.rb +1 -1
  103. metadata +63 -13
  104. data/app/views/catalog/_index_header_list_hyrax_pcdm_collection.html.erb +0 -4
@@ -23,7 +23,7 @@
23
23
  <% end %>
24
24
  </ul>
25
25
 
26
- <%= simple_form_for @form, url: [hyrax, :dashboard, @form], html: { class: 'editor nav-safety' } do |f| %>
26
+ <%= simple_form_for @form, url: [hyrax, :dashboard, @form], html: { class: 'editor nav-safety', data: { behavior: 'collection-form', 'param-key' => @form.model_name.param_key } } do |f| %>
27
27
  <div class="tab-content">
28
28
  <div id="description" class="tab-pane active">
29
29
  <div class="panel panel-default labels">
@@ -35,7 +35,7 @@
35
35
  <% end %>
36
36
 
37
37
  <% # TODO: Remove check for PcdmCollection when Issue #5286 is resolved. %>
38
- <% if f.object.persisted? && Hyrax.config.collection_class != Hyrax::PcdmCollection %>
38
+ <% if f.object.persisted? && !(Hyrax.config.collection_class < Valkyrie::Resource) %>
39
39
  <%# we're loading these values dynamically to speed page load %>
40
40
  <%= f.input :thumbnail_id,
41
41
  input_html: { data: { text: thumbnail_label_for(object: f.object) } } %>
@@ -116,3 +116,4 @@
116
116
  <% end # simple_form_for %>
117
117
 
118
118
  </div> <!-- end collection-controls -->
119
+
@@ -34,6 +34,7 @@
34
34
  <div class="row branding-banner-list">
35
35
  <div class="col-xs-12">
36
36
  <div class="container">
37
+ <%# Where the request to display the branding comes from. %>
37
38
  <% if f.object.banner_info[:file] %>
38
39
  <div id="banner">
39
40
  <div class="row branding-banner-row">
@@ -32,7 +32,7 @@
32
32
  <% end %>
33
33
  <% end %>
34
34
 
35
- <% if current_ability.can_create_any_work? %>
35
+ <% if current_ability.can_create_any_work? && Hyrax.config.analytics? %>
36
36
  <li>
37
37
  <%= menu.collapsable_section t('hyrax.admin.sidebar.analytics'),
38
38
  icon_class: "fa fa-pie-chart",
@@ -1,6 +1,11 @@
1
1
  <ul class="nav nav-tabs" id="my_nav" role="list">
2
2
  <li<%= ' class="active"'.html_safe if current_page?(hyrax.dashboard_works_path(locale: nil)) %>>
3
- <%= link_to t("hyrax.dashboard.#{current_ability.admin? ? 'all' : 'managed'}.works"), hyrax.dashboard_works_path %>
3
+ <% if params[:add_works_to_collection].present? && params[:add_works_to_collection_label].present? %>
4
+ <%= link_to t("hyrax.dashboard.#{current_ability.admin? ? 'all' : 'managed'}.works"), hyrax.dashboard_works_path(add_works_to_collection: params[:add_works_to_collection], add_works_to_collection_label: params[:add_works_to_collection_label]) %>
5
+ <% else %>
6
+ <%= link_to t("hyrax.dashboard.#{current_ability.admin? ? 'all' : 'managed'}.works"), hyrax.dashboard_works_path %>
7
+ <% end %>
8
+
4
9
  </li>
5
10
  <li<%= ' class="active"'.html_safe if current_page?(hyrax.my_works_path(locale: nil)) %>>
6
11
  <%= link_to t('hyrax.dashboard.my.your_works'), hyrax.my_works_path %>
@@ -2,7 +2,7 @@ apiVersion: v2
2
2
  name: hyrax
3
3
  description: An open-source, Samvera-powered digital repository system
4
4
  type: application
5
- version: 1.1.0
5
+ version: 1.5.1
6
6
  appVersion: 3.3.0
7
7
  dependencies:
8
8
  - name: fcrepo
@@ -11,21 +11,25 @@ dependencies:
11
11
  condition: fcrepo.enabled
12
12
  - name: memcached
13
13
  version: 4.2.21
14
- repository: https://charts.bitnami.com/bitnami
14
+ repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
15
15
  condition: memcached.enabled
16
16
  - name: minio
17
17
  version: 6.7.2
18
- repository: https://charts.bitnami.com/bitnami
18
+ repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
19
19
  condition: minio.enabled
20
20
  - name: postgresql
21
21
  version: 10.3.13
22
- repository: https://charts.bitnami.com/bitnami
22
+ repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
23
23
  condition: postgresql.enabled
24
24
  - name: redis
25
25
  version: 10.7.16
26
- repository: https://charts.bitnami.com/bitnami
26
+ repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
27
27
  condition: redis.enabled
28
28
  - name: solr
29
29
  version: 1.0.1
30
- repository: https://charts.bitnami.com/bitnami
30
+ repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
31
31
  condition: solr.enabled
32
+ - name: nginx
33
+ version: 9.8.0
34
+ repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
35
+ condition: nginx.enabled
@@ -179,6 +179,10 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
179
179
  {{- printf "redis://:%s@%s:%s" .Values.redis.password (include "hyrax.redis.host" .) "6379/0" -}}
180
180
  {{- end -}}
181
181
 
182
+ {{- define "hyrax.nginx.host" -}}
183
+ {{- printf "%s-%s" .Release.Name "nginx" | trunc 63 | trimSuffix "-" -}}
184
+ {{- end -}}
185
+
182
186
  {{- define "hyrax.sharedPvcAccessModes" -}}
183
187
  {{- if .Values.worker.enabled }}
184
188
  accessModes:
@@ -11,6 +11,11 @@ spec:
11
11
  jobTemplate:
12
12
  spec:
13
13
  template:
14
+ metadata:
15
+ {{- with .Values.podAnnotations }}
16
+ annotations:
17
+ {{- toYaml . | nindent 12 }}
18
+ {{- end }}
14
19
  spec:
15
20
  containers:
16
21
  - name: embargo-release
@@ -11,6 +11,11 @@ spec:
11
11
  jobTemplate:
12
12
  spec:
13
13
  template:
14
+ metadata:
15
+ {{- with .Values.podAnnotations }}
16
+ annotations:
17
+ {{- toYaml . | nindent 12 }}
18
+ {{- end }}
14
19
  spec:
15
20
  containers:
16
21
  - name: lease-release
@@ -64,6 +64,17 @@ spec:
64
64
  {{- end }}
65
65
  env:
66
66
  {{- toYaml .Values.worker.extraEnvVars | nindent 12 }}
67
+ {{- if .Values.worker.readinessProbe.enabled }}
68
+ readinessProbe:
69
+ exec:
70
+ command:
71
+ {{- toYaml .Values.worker.readinessProbe.command | nindent 16 }}
72
+ failureThreshold: {{ .Values.worker.readinessProbe.failureThreshold }}
73
+ initialDelaySeconds: {{ .Values.worker.readinessProbe.initialDelaySeconds }}
74
+ periodSeconds: {{ .Values.worker.readinessProbe.periodSeconds }}
75
+ successThreshold: {{ .Values.worker.readinessProbe.successThreshold }}
76
+ timeoutSeconds: {{ .Values.worker.readinessProbe.timeoutSeconds }}
77
+ {{- end }}
67
78
  volumeMounts:
68
79
  - name: derivatives
69
80
  mountPath: /app/samvera/derivatives
@@ -1,6 +1,7 @@
1
1
  {{- if .Values.ingress.enabled -}}
2
- {{- $fullName := include "hyrax.fullname" . -}}
3
- {{- $svcPort := .Values.service.port -}}
2
+ {{- $svcFullName := ternary (include "hyrax.nginx.host" .) (include "hyrax.fullname" .) .Values.nginx.enabled -}}
3
+ {{- $svcPort := ternary .Values.nginx.service.port .Values.service.port .Values.nginx.enabled -}}
4
+
4
5
  {{- $beta := semverCompare "<1.19-0" (default .Capabilities.KubeVersion.Version .Values.kubeVersion) -}}
5
6
  {{- if $beta }}
6
7
  apiVersion: networking.k8s.io/v1beta1
@@ -9,7 +10,7 @@ apiVersion: networking.k8s.io/v1
9
10
  {{- end }}
10
11
  kind: Ingress
11
12
  metadata:
12
- name: {{ $fullName }}
13
+ name: {{ include "hyrax.fullname" . }}
13
14
  labels:
14
15
  {{- include "hyrax.labels" . | nindent 4 }}
15
16
  {{- with .Values.ingress.annotations }}
@@ -37,14 +38,14 @@ spec:
37
38
  pathType: {{ .pathType | default "ImplementationSpecific" }}
38
39
  backend:
39
40
  {{- if $beta }}
40
- serviceName: {{ $fullName }}
41
+ serviceName: {{ $svcFullName }}
41
42
  servicePort: {{ $svcPort }}
42
43
  {{- else }}
43
44
  service:
44
- name: {{ $fullName }}
45
+ name: {{ $svcFullName }}
45
46
  port:
46
47
  number: {{ $svcPort }}
47
48
  {{- end }}
48
49
  {{- end }}
49
50
  {{- end }}
50
- {{- end }}
51
+ {{- end }}
@@ -201,6 +201,18 @@ worker:
201
201
  affinity: {}
202
202
  resources: {}
203
203
 
204
+ # see: https://github.com/mperham/sidekiq/wiki/Kubernetes#health-checks
205
+ readinessProbe:
206
+ enabled: false
207
+ # command:
208
+ # - cat
209
+ # - /app/samvera/hyrax-webapp/tmp/sidekiq_process_has_started_and_will_begin_processing_jobs
210
+ # initialDelaySeconds: 10
211
+ # periodSeconds: 2
212
+ # timeoutSeconds: 1
213
+ # failureThreshold: 10
214
+ # successThreshold: 2
215
+
204
216
  fcrepo:
205
217
  enabled: true
206
218
  externalDatabaseUsername: "hyrax"
@@ -238,6 +250,144 @@ postgresql:
238
250
  # persistence:
239
251
  # size: 10Gi
240
252
 
253
+
254
+ ## Nginx proxy is used to keep puma from having to serve static assets
255
+ ## and to act as an auth proxy for Cantelope
256
+ nginx:
257
+ enabled: false
258
+ # The set up below does malicious bot / ip blocking and mounts
259
+ # vaolumes to allow nginx to server assets and other public directory items
260
+ # image:
261
+ # registry: registry.gitlab.com
262
+ # repository: notch8/scripts/bitnami-nginx
263
+ # tag: 1.21.5-debian-10-r4
264
+ # extraVolumes:
265
+ # - name: "uploads"
266
+ # persistentVolumeClaim:
267
+ # claimName: {{ .Values.global.hyraxHostName }}-uploads
268
+ # extraVolumeMounts:
269
+ # - name: uploads
270
+ # mountPath: /app/samvera/hyrax-webapp/public/system
271
+ # subPath: public-system
272
+ # - name: uploads
273
+ # mountPath: /app/samvera/hyrax-webapp/public/uploads
274
+ # subPath: public-uploads
275
+ # - name: uploads
276
+ # mountPath: /app/samvera/hyrax-webapp/public/uv
277
+ # subPath: public-uv
278
+ # - name: uploads
279
+ # mountPath: /app/samvera/hyrax-webapp/public/assets
280
+ # subPath: public-assets
281
+ # serverBlock: |-
282
+ # upstream rails_app {
283
+ # server {{ .Values.global.hyraxHostName }};
284
+ # }
285
+
286
+ # map $status $loggable {
287
+ # ~^444 0;
288
+ # default 1;
289
+ # }
290
+
291
+ # log_format loki 'host=$host ip=$http_x_forwarded_for remote_user=$remote_user [$time_local] '
292
+ # 'request="$request" status=$status bytes=$body_bytes_sent '
293
+ # 'referer="$http_referer" agent="$http_user_agent" request_time=$request_time upstream_response_time=$upstream_response_time upstream_response_length=$upstream_response_length';
294
+
295
+ # error_log /opt/bitnami/nginx/logs/error.log warn;
296
+ # #tcp_nopush on;
297
+
298
+ # # Cloudflare ips see for refresh
299
+ # # https://support.cloudflare.com/hc/en-us/articles/200170786-Restoring-original-visitor-IPs-logging-visitor-IP-addresses
300
+ # # update list https://www.cloudflare.com/ips/
301
+ # set_real_ip_from 103.21.244.0/22;
302
+ # set_real_ip_from 103.22.200.0/22;
303
+ # set_real_ip_from 103.31.4.0/22;
304
+ # set_real_ip_from 104.16.0.0/13;
305
+ # set_real_ip_from 104.24.0.0/14;
306
+ # set_real_ip_from 108.162.192.0/18;
307
+ # set_real_ip_from 131.0.72.0/22;
308
+ # set_real_ip_from 141.101.64.0/18;
309
+ # set_real_ip_from 162.158.0.0/15;
310
+ # set_real_ip_from 172.64.0.0/13;
311
+ # set_real_ip_from 173.245.48.0/20;
312
+ # set_real_ip_from 188.114.96.0/20;
313
+ # set_real_ip_from 190.93.240.0/20;
314
+ # set_real_ip_from 197.234.240.0/22;
315
+ # set_real_ip_from 198.41.128.0/17;
316
+ # set_real_ip_from 2400:cb00::/32;
317
+ # set_real_ip_from 2606:4700::/32;
318
+ # set_real_ip_from 2803:f800::/32;
319
+ # set_real_ip_from 2405:b500::/32;
320
+ # set_real_ip_from 2405:8100::/32;
321
+ # set_real_ip_from 2a06:98c0::/29;
322
+ # set_real_ip_from 2c0f:f248::/32;
323
+
324
+ # real_ip_header X-Forwarded-For;
325
+ # real_ip_recursive on;
326
+ # include /opt/bitnami/nginx/conf/conf.d/*.conf;
327
+ # server {
328
+ # listen 8080;
329
+ # server_name _;
330
+ # root /app/samvera/hyrax-webapp/public;
331
+ # index index.html;
332
+
333
+ # client_body_in_file_only clean;
334
+ # client_body_buffer_size 32K;
335
+ # client_max_body_size 0;
336
+ # access_log /opt/bitnami/nginx/logs/access.log loki;
337
+ # # if=$loggable;
338
+
339
+ # sendfile on;
340
+ # send_timeout 300s;
341
+
342
+ # include /opt/bitnami/nginx/conf/bots.d/ddos.conf;
343
+ # include /opt/bitnami/nginx/conf/bots.d/blockbots.conf;
344
+
345
+ # location ~ (\.php|\.aspx|\.asp) {
346
+ # return 404;
347
+ # }
348
+
349
+ # # deny requests for files that should never be accessed
350
+ # location ~ /\. {
351
+ # deny all;
352
+ # }
353
+
354
+ # location ~* ^.+\.(rb|log)$ {
355
+ # deny all;
356
+ # }
357
+
358
+ # # serve static (compiled) assets directly if they exist (for rails production)
359
+ # location ~ ^/(assets|packs|fonts|images|javascripts|stylesheets|swfs|system)/ {
360
+ # try_files $uri @rails;
361
+
362
+ # # access_log off;
363
+ # gzip_static on; # to serve pre-gzipped version
364
+
365
+ # expires max;
366
+ # add_header Cache-Control public;
367
+
368
+ # # Some browsers still send conditional-GET requests if there's a
369
+ # # Last-Modified header or an ETag header even if they haven't
370
+ # # reached the expiry date sent in the Expires header.
371
+ # add_header Last-Modified "";
372
+ # add_header ETag "";
373
+ # break;
374
+ # }
375
+
376
+ # # send non-static file requests to the app server
377
+ # location / {
378
+ # try_files $uri @rails;
379
+ # }
380
+
381
+ # location @rails {
382
+ # proxy_set_header X-Real-IP $remote_addr;
383
+ # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
384
+ # proxy_set_header Host $http_host;
385
+ # proxy_redirect off;
386
+ # proxy_pass http://rails_app;
387
+ # }
388
+ # }
389
+
390
+
241
391
  redis:
242
392
  enabled: true
243
393
  password: mysecret
@@ -273,6 +423,8 @@ global:
273
423
  postgresql:
274
424
  postgresqlUsername: hyrax
275
425
  postgresqlPassword: hyrax_pass
426
+ # This is th name of the running rails server pod
427
+ hyraxHostName: hyrax
276
428
 
277
429
  nodeSelector: {}
278
430
 
data/config/features.rb CHANGED
@@ -1,53 +1,51 @@
1
1
  # frozen_string_literal: true
2
2
  Flipflop.configure do
3
- begin
4
- # Strategies will be used in the order listed here.
5
- strategy :cookie
6
- strategy :active_record, class: Hyrax::Feature
7
- strategy Hyrax::Strategies::YamlStrategy, config: Hyrax.config.feature_config_path
8
- strategy :default
9
-
10
- feature :proxy_deposit,
11
- default: true,
12
- description: "Depositors may designate proxies to deposit works on their behalf"
13
-
14
- feature :transfer_works,
15
- default: true,
16
- description: "Depositors may transfer their works to another user"
17
-
18
- # Note, if this is deactivated, a default admin set will be created and all
19
- # works will be assigned to it when they are created.
20
- feature :assign_admin_set,
21
- default: true,
22
- description: "Ability to assign uploaded items to an admin set"
23
-
24
- feature :show_deposit_agreement,
25
- default: true,
26
- description: "Show a deposit agreement to users creating works"
27
-
28
- feature :active_deposit_agreement_acceptance,
29
- default: Hyrax.config.active_deposit_agreement_acceptance?,
30
- description: "Require an active acceptance of the deposit agreement by checking a checkbox"
31
-
32
- feature :batch_upload,
33
- default: false,
34
- description: "Enable uploading batches of works"
35
-
36
- feature :hide_private_items,
37
- default: false,
38
- description: "Do not show the private items."
39
-
40
- feature :hide_users_list,
41
- default: true,
42
- description: "Do not show users list unless user has authenticated."
43
-
44
- feature :cache_work_iiif_manifest,
45
- default: false,
46
- description: "Use Rails.cache to cache the JSON document for IIIF manifests"
47
- feature :read_only,
48
- default: false,
49
- description: "Put the system into read-only mode. Deposits, edits, approvals and anything that makes a change to the data will be disabled."
50
- rescue Flipflop::StrategyError, Flipflop::FeatureError => err
51
- Rails.logger.warn "Ignoring #{err}: #{err.message}"
52
- end
3
+ # Strategies will be used in the order listed here.
4
+ strategy :cookie
5
+ strategy :active_record, class: Hyrax::Feature
6
+ strategy Hyrax::Strategies::YamlStrategy, config: Hyrax.config.feature_config_path
7
+ strategy :default
8
+
9
+ feature :proxy_deposit,
10
+ default: true,
11
+ description: "Depositors may designate proxies to deposit works on their behalf"
12
+
13
+ feature :transfer_works,
14
+ default: true,
15
+ description: "Depositors may transfer their works to another user"
16
+
17
+ # Note, if this is deactivated, a default admin set will be created and all
18
+ # works will be assigned to it when they are created.
19
+ feature :assign_admin_set,
20
+ default: true,
21
+ description: "Ability to assign uploaded items to an admin set"
22
+
23
+ feature :show_deposit_agreement,
24
+ default: true,
25
+ description: "Show a deposit agreement to users creating works"
26
+
27
+ feature :active_deposit_agreement_acceptance,
28
+ default: Hyrax.config.active_deposit_agreement_acceptance?,
29
+ description: "Require an active acceptance of the deposit agreement by checking a checkbox"
30
+
31
+ feature :batch_upload,
32
+ default: false,
33
+ description: "Enable uploading batches of works"
34
+
35
+ feature :hide_private_items,
36
+ default: false,
37
+ description: "Do not show the private items."
38
+
39
+ feature :hide_users_list,
40
+ default: true,
41
+ description: "Do not show users list unless user has authenticated."
42
+
43
+ feature :cache_work_iiif_manifest,
44
+ default: false,
45
+ description: "Use Rails.cache to cache the JSON document for IIIF manifests"
46
+ feature :read_only,
47
+ default: false,
48
+ description: "Put the system into read-only mode. Deposits, edits, approvals and anything that makes a change to the data will be disabled."
49
+ rescue Flipflop::StrategyError, Flipflop::FeatureError => err
50
+ Rails.logger.warn "Ignoring #{err}: #{err.message}"
53
51
  end
@@ -5,3 +5,8 @@ Valkyrie::StorageAdapter.register(
5
5
  path_generator: Hyrax::ValkyrieSimplePathGenerator),
6
6
  :branding_disk
7
7
  )
8
+
9
+ Valkyrie::StorageAdapter.register(
10
+ Valkyrie::Storage::Disk.new(base_path: Hyrax.config.derivatives_path),
11
+ :derivatives_disk
12
+ )
@@ -220,7 +220,7 @@ de:
220
220
  summary: Zusammenfassung
221
221
  title: Sammlungsbericht
222
222
  view_collection_btn: Kollektion ansehen
223
- visibility: Sichtweite
223
+ visibility: Sichtbarkeit
224
224
  summary:
225
225
  all_time: Alle Zeit
226
226
  collection_home_page_views: Aufrufe der Sammlungs-Startseite
@@ -239,7 +239,7 @@ de:
239
239
  export: Export
240
240
  file_downloads_in_collection: Dateiset-Downloads in dieser Sammlung
241
241
  top_collections: Top-Kollektionen
242
- works_in_collection_views: Funktioniert in dieser Sammlungsansichten
242
+ works_in_collection_views: Arbeiten in dieser Sammlungsansichten
243
243
  date_range_form:
244
244
  date_range_heading: Datumsbereich anpassen
245
245
  end_date: Endtermin
@@ -270,7 +270,7 @@ de:
270
270
  summary: Zusammenfassung
271
271
  title: Werksbericht
272
272
  views: Ansichten
273
- works: funktioniert
273
+ works: Arbeiten
274
274
  monthly_summary:
275
275
  file_downloads: Datei-Downloads
276
276
  monthly_subtitle: Monat für Monat Status für die letzten 12 Monate bis
@@ -285,7 +285,7 @@ de:
285
285
  summary: Zusammenfassung
286
286
  title: Arbeitsbericht
287
287
  view_work_btn: Arbeit ansehen
288
- visibility: Sichtweite
288
+ visibility: Sichtbarkeit
289
289
  work_type: Arbeitstyp
290
290
  summary:
291
291
  all_time: Alle Zeit
@@ -310,7 +310,7 @@ de:
310
310
  work_title: Arbeitstitel
311
311
  work_views: Arbeitsseitenaufrufe
312
312
  work_counts:
313
- child_works: Kind arbeitet
313
+ child_works: untergeordnete Arbeiten
314
314
  files: Dateien
315
315
  total_size: Gesamtgröße
316
316
  work_files:
@@ -408,7 +408,7 @@ de:
408
408
  collections_report: Sammlungsbericht
409
409
  configuration: Konfiguration
410
410
  content_blocks: Inhaltsblöcke
411
- dashboard: Armaturenbrett
411
+ dashboard: Dashboard
412
412
  delete_all: Alles löschen
413
413
  notifications: Benachrichtigungen
414
414
  pages: Seiten
@@ -976,7 +976,7 @@ de:
976
976
  remove_from_collection: Aus der Sammlung entfernen
977
977
  select_an_action: Wählen Sie eine Aktion aus
978
978
  transfer_ownership_of_work: Übertragen Sie das Eigentum an der Arbeit
979
- works: Funktioniert
979
+ works: Arbeiten
980
980
  create_work: Arbeiten erstellen
981
981
  current_proxies: Aktuelle Vertreter
982
982
  delete_notification: Benachrichtigung löschen
@@ -1106,7 +1106,7 @@ de:
1106
1106
  objects: Objekte
1107
1107
  subtitle: Die letzten 90 Tage
1108
1108
  title: Repository-Wachstum
1109
- works: Funktioniert
1109
+ works: Arbeiten
1110
1110
  repository_objects:
1111
1111
  status: Aktueller Status
1112
1112
  subtitle: Aktueller Status
@@ -1157,7 +1157,7 @@ de:
1157
1157
  user_notifications: Benutzerbenachrichtigungen
1158
1158
  view_files: Dateien ansehen
1159
1159
  visibility_graph:
1160
- visibility: Sichtweite
1160
+ visibility: Sichtbarkeit
1161
1161
  work_type_graph:
1162
1162
  count: Zählen
1163
1163
  title: Arbeitstypen
@@ -1408,10 +1408,10 @@ de:
1408
1408
  you_manage: "<strong> %{total_count} Sammlungen </ strong>, die Sie im Repository verwalten können"
1409
1409
  you_own: "<strong> %{total_count} Sammlungen </ strong>, die Sie im Repository besitzen"
1410
1410
  works:
1411
- in_repo: "<strong> %{total_count} funktioniert </ strong> im Repository"
1411
+ in_repo: "<strong> %{total_count} Arbeiten </ strong> im Repository"
1412
1412
  works_listing: Auflistung der Arbeiten
1413
- you_manage: "<strong> %{total_count} funktioniert </ strong>, das Sie im Repository verwalten können"
1414
- you_own: "<strong> %{total_count} funktioniert </ strong>, das Sie im Repository besitzen"
1413
+ you_manage: "<strong> %{total_count} Arbeiten </ strong>, das Sie im Repository verwalten können"
1414
+ you_own: "<strong> %{total_count} Arbeiten </ strong>, das Sie im Repository besitzen"
1415
1415
  sort_and_per_page:
1416
1416
  number_of_results_to_display_per_page: Anzahl der anzuzeigenden Ergebnisse pro Seite
1417
1417
  nav_safety:
data/docker-compose.yml CHANGED
@@ -74,6 +74,7 @@ services:
74
74
  user: root
75
75
  env_file:
76
76
  - .env
77
+ - .dassie/.env
77
78
  command: sh -l -c 'bundle && db-migrate-seed.sh'
78
79
  depends_on:
79
80
  - postgres
@@ -125,7 +125,7 @@ NOTE: The steps need to be done in order to create a new Hyrax based app.
125
125
  Generate a new Rails application using the template.
126
126
 
127
127
  ```
128
- rails _5.2.6_ new my_app -m https://raw.githubusercontent.com/samvera/hyrax/v3.4.1/template.rb
128
+ rails _5.2.6_ new my_app -m https://raw.githubusercontent.com/samvera/hyrax/v3.4.2/template.rb
129
129
  ```
130
130
 
131
131
  Generating a new Rails application using Hyrax's template above takes cares of a number of steps for you, including:
@@ -50,7 +50,7 @@ The Samvera community is here to help. Please see our [support guide](./.github/
50
50
  # Getting started
51
51
 
52
52
  This document contains instructions specific to setting up an app with __Hyrax
53
- v3.4.1__. If you are looking for instructions on installing a different
53
+ v3.4.2__. If you are looking for instructions on installing a different
54
54
  version, be sure to select the appropriate branch or tag from the drop-down
55
55
  menu above.
56
56
 
data/hyrax.gemspec CHANGED
@@ -26,7 +26,7 @@ SUMMARY
26
26
 
27
27
  spec.required_ruby_version = '>= 2.5'
28
28
 
29
- # Note: rails does not follow sem-ver conventions, it's
29
+ # NOTE: rails does not follow sem-ver conventions, it's
30
30
  # minor version releases can include breaking changes; see
31
31
  # http://guides.rubyonrails.org/maintenance_policy.html
32
32
  spec.add_dependency 'rails', '~> 5.0'
@@ -58,6 +58,7 @@ SUMMARY
58
58
  spec.add_dependency 'iiif_manifest', '>= 0.3', '< 2.0'
59
59
  spec.add_dependency 'jquery-datatables-rails', '~> 3.4'
60
60
  spec.add_dependency 'jquery-ui-rails', '~> 6.0'
61
+ spec.add_dependency 'json-ld', '< 3.2'
61
62
  spec.add_dependency 'json-schema' # for Arkivo
62
63
  # Pin more tightly because 0.x gems are potentially unstable
63
64
  spec.add_dependency 'kaminari_route_prefix', '~> 0.1.1'
@@ -70,6 +71,7 @@ SUMMARY
70
71
  spec.add_dependency 'oauth2', '~> 1.2'
71
72
  spec.add_dependency 'posix-spawn'
72
73
  spec.add_dependency 'power_converter', '~> 0.1', '>= 0.1.2'
74
+ spec.add_dependency 'psych', '~> 3.3'
73
75
  spec.add_dependency 'qa', '~> 5.5', '>= 5.5.1' # questioning_authority
74
76
  spec.add_dependency 'rails_autolink', '~> 1.1'
75
77
  spec.add_dependency 'rdf-rdfxml' # controlled vocabulary importer
@@ -82,7 +84,7 @@ SUMMARY
82
84
  spec.add_dependency 'samvera-nesting_indexer', '~> 2.0'
83
85
  spec.add_dependency 'select2-rails', '~> 3.5'
84
86
  spec.add_dependency 'signet'
85
- spec.add_dependency 'tinymce-rails'
87
+ spec.add_dependency 'tinymce-rails', '~> 5.10'
86
88
  spec.add_dependency 'valkyrie', '~> 2', '>= 2.1.1'
87
89
 
88
90
  spec.add_development_dependency "capybara", '~> 3.29'
@@ -106,7 +108,7 @@ SUMMARY
106
108
  spec.add_development_dependency 'i18n_yaml_sorter'
107
109
  spec.add_development_dependency 'rails-controller-testing', '~> 1'
108
110
  # the hyrax style guide is based on `bixby`. see `.rubocop.yml`
109
- spec.add_development_dependency 'bixby', '~> 3.0', ">= 3.0.2"
111
+ spec.add_development_dependency 'bixby', '~> 5.0', '>= 5.0.2' # bixby 5 briefly dropped Ruby 2.5
110
112
  spec.add_development_dependency 'shoulda-callback-matchers', '~> 1.1.1'
111
113
  spec.add_development_dependency 'shoulda-matchers', '~> 3.1'
112
114
  spec.add_development_dependency 'webdrivers', '~> 4.4'
@@ -0,0 +1,20 @@
1
+ Description:
2
+ This generator creates the necessary files for a Hyrax::PcdmCollection.
3
+
4
+ Example:
5
+ Usage: rails generate hyrax:collection_resource MyCollection [with_basic_metadata]
6
+
7
+ Argument:
8
+ with_basic_metadata (optional) - if present, the collection resource will include basic metadata
9
+
10
+ This will create:
11
+ app/models/my_collection.rb
12
+ app/forms/my_collection_form.rb
13
+ app/indexers/my_collection_indexer.rb
14
+ config/metadata/my_collection.yaml
15
+ spec/models/my_collection_spec.rb
16
+ spec/forms/my_collection_form_spec.rb
17
+ spec/indexers/my_collection_indexer_spec.rb
18
+
19
+ This will also:
20
+ set Hyrax.config.collection_model = "MyCollection"