hyrax 5.0.0.rc3 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CONTAINERS.md +1 -1
- data/app/controllers/hyrax/dashboard/collections_controller.rb +0 -3
- data/app/search_builders/hyrax/catalog_search_builder.rb +7 -1
- data/chart/hyrax/templates/_tmplvalues.tpl +38 -0
- data/chart/hyrax/templates/deployment-worker.yaml +6 -2
- data/chart/hyrax/templates/deployment.yaml +9 -3
- data/documentation/developing-your-hyrax-based-app.md +14 -9
- data/lib/generators/hyrax/templates/config/initializers/hyrax.rb +1 -1
- data/lib/hyrax/version.rb +1 -1
- data/template.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 238652072010e0112f31139f4a0fd08b8cfffa834d059fe6f1a09a785dbbb95b
|
4
|
+
data.tar.gz: a5a9237eb4c0444181113ae4666131b592d29f210550ed967854995cea3b5ca0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 112a9cfd288216b3ac82b7393190a2a3d5d77fe174497854d19d91a3503391fc179d1b28c00d94e91dabd3aa86c6a2d62b8e12f91f7b852e0e36edcb629ec9de
|
7
|
+
data.tar.gz: 67fabd5262783627bf3aaf6587240922db90aeede162e2c2bcc20b8312bbee4f1e84113b09fecb9636d411b7c2e09ee48bafe000d3fc73af7eb9eeec8e7e6623
|
data/CONTAINERS.md
CHANGED
@@ -226,7 +226,7 @@ We publish several Hyrax images to the [GitHub container registry][ghcr] under
|
|
226
226
|
the [Samvera organization][samvera-packages]. To build them:
|
227
227
|
|
228
228
|
```sh
|
229
|
-
export HYRAX_VERSION=v5.0.0
|
229
|
+
export HYRAX_VERSION=v5.0.0 # or desired version
|
230
230
|
git checkout hyrax-$HYRAX_VERSION
|
231
231
|
|
232
232
|
docker build --target hyrax-base --tag ghcr.io/samvera/hyrax/hyrax-base:$(git rev-parse HEAD) .
|
@@ -26,9 +26,6 @@ module Hyrax
|
|
26
26
|
# Catch permission errors
|
27
27
|
rescue_from Hydra::AccessDenied, CanCan::AccessDenied, with: :deny_collection_access
|
28
28
|
|
29
|
-
# actions: index, create, new, edit, show, update, destroy, permissions, citation
|
30
|
-
before_action :authenticate_user!, except: [:index]
|
31
|
-
|
32
29
|
class_attribute :presenter_class,
|
33
30
|
:form_class,
|
34
31
|
:single_item_search_builder_class,
|
@@ -80,6 +80,12 @@ class Hyrax::CatalogSearchBuilder < Hyrax::SearchBuilder
|
|
80
80
|
|
81
81
|
# join from file id to work relationship solrized member_ids_ssim
|
82
82
|
def join_for_works_from_files
|
83
|
-
"{!join from=#{Hyrax.config.id_field} to=member_ids_ssim
|
83
|
+
"{!join from=#{Hyrax.config.id_field} to=member_ids_ssim}#{file_set_filter}#{dismax_query}"
|
84
|
+
end
|
85
|
+
|
86
|
+
# Query segment to filter out non-FileSet documents
|
87
|
+
# A wildcard * is used to avoid attempting to escape the :: in Hyrax::FileSet
|
88
|
+
def file_set_filter
|
89
|
+
"{!lucene q.op=AND}has_model_ssim:*FileSet"
|
84
90
|
end
|
85
91
|
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
{{/*
|
2
|
+
Copyright VMware, Inc.
|
3
|
+
SPDX-License-Identifier: APACHE-2.0
|
4
|
+
*/}}
|
5
|
+
|
6
|
+
{{/* vim: set filetype=mustache: */}}
|
7
|
+
{{/*
|
8
|
+
Renders a value that contains template perhaps with scope if the scope is present.
|
9
|
+
Usage:
|
10
|
+
{{ include "hyrax.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $ ) }}
|
11
|
+
{{ include "hyrax.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $ "scope" $app ) }}
|
12
|
+
*/}}
|
13
|
+
{{- define "hyrax.tplvalues.render" -}}
|
14
|
+
{{- $value := typeIs "string" .value | ternary .value (.value | toYaml) }}
|
15
|
+
{{- if contains "{{" (toJson .value) }}
|
16
|
+
{{- if .scope }}
|
17
|
+
{{- tpl (cat "{{- with $.RelativeScope -}}" $value "{{- end }}") (merge (dict "RelativeScope" .scope) .context) }}
|
18
|
+
{{- else }}
|
19
|
+
{{- tpl $value .context }}
|
20
|
+
{{- end }}
|
21
|
+
{{- else }}
|
22
|
+
{{- $value }}
|
23
|
+
{{- end }}
|
24
|
+
{{- end -}}
|
25
|
+
|
26
|
+
{{/*
|
27
|
+
Merge a list of values that contains template after rendering them.
|
28
|
+
Merge precedence is consistent with http://masterminds.github.io/sprig/dicts.html#merge-mustmerge
|
29
|
+
Usage:
|
30
|
+
{{ include "hyrax.tplvalues.merge" ( dict "values" (list .Values.path.to.the.Value1 .Values.path.to.the.Value2) "context" $ ) }}
|
31
|
+
*/}}
|
32
|
+
{{- define "hyrax.tplvalues.merge" -}}
|
33
|
+
{{- $dst := dict -}}
|
34
|
+
{{- range .values -}}
|
35
|
+
{{- $dst = include "hyrax.tplvalues.render" (dict "value" . "context" $.context "scope" $.scope) | fromYaml | merge $dst -}}
|
36
|
+
{{- end -}}
|
37
|
+
{{ $dst | toYaml }}
|
38
|
+
{{- end -}}
|
@@ -29,7 +29,9 @@ spec:
|
|
29
29
|
- secretRef:
|
30
30
|
name: {{ template "hyrax.fullname" . }}
|
31
31
|
env:
|
32
|
-
{{-
|
32
|
+
{{- if .Values.extraEnvVars }}
|
33
|
+
{{- include "hyrax.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }}
|
34
|
+
{{- end }}
|
33
35
|
command:
|
34
36
|
- sh
|
35
37
|
- -c
|
@@ -63,7 +65,9 @@ spec:
|
|
63
65
|
{{- toYaml . | nindent 12 }}
|
64
66
|
{{- end }}
|
65
67
|
env:
|
66
|
-
{{-
|
68
|
+
{{- if .Values.extraEnvVars }}
|
69
|
+
{{- include "hyrax.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }}
|
70
|
+
{{- end }}
|
67
71
|
{{- if .Values.worker.readinessProbe.enabled }}
|
68
72
|
readinessProbe:
|
69
73
|
exec:
|
@@ -38,7 +38,9 @@ spec:
|
|
38
38
|
name: {{ .Values.solrExistingSecret }}
|
39
39
|
{{- end }}
|
40
40
|
env:
|
41
|
-
{{-
|
41
|
+
{{- if .Values.extraEnvVars }}
|
42
|
+
{{- include "hyrax.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }}
|
43
|
+
{{- end }}
|
42
44
|
command:
|
43
45
|
- sh
|
44
46
|
- -c
|
@@ -66,7 +68,9 @@ spec:
|
|
66
68
|
{{- toYaml . | nindent 12 }}
|
67
69
|
{{- end }}
|
68
70
|
env:
|
69
|
-
{{-
|
71
|
+
{{- if .Values.extraEnvVars }}
|
72
|
+
{{- include "hyrax.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }}
|
73
|
+
{{- end }}
|
70
74
|
command:
|
71
75
|
- sh
|
72
76
|
- -c
|
@@ -101,7 +105,9 @@ spec:
|
|
101
105
|
{{- toYaml . | nindent 12 }}
|
102
106
|
{{- end }}
|
103
107
|
env:
|
104
|
-
{{-
|
108
|
+
{{- if .Values.extraEnvVars }}
|
109
|
+
{{- include "hyrax.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }}
|
110
|
+
{{- end }}
|
105
111
|
ports:
|
106
112
|
- name: http
|
107
113
|
containerPort: 3000
|
@@ -25,14 +25,14 @@
|
|
25
25
|
|
26
26
|
A Hyrax-based application includes lots of dependencies. We provide a [Docker image for getting started with your Hyrax-based application](/CONTAINERS.md#docker-image-for-hyrax-based-applications).
|
27
27
|
|
28
|
-
|
28
|
+
**NOTE:** The Docker image describes the canonical dependencies. In a way, it is executable documentation. The following documentation is our best effort to transcribe that executable documentation into a narrative. In other words, this documentation may drift away from the Docker details.
|
29
29
|
|
30
30
|
You can also try [Running Hyrax-based application in local VM](https://github.com/samvera/hyrax/wiki/Hyrax-Development-Guide#running-hyrax-based-application-in-local-vm) which uses Ubuntu.
|
31
31
|
|
32
32
|
During development, running only the dependent services in a container environment may be beneficial. This avoids potential headaches concerning file permissions and eases the use of debugging tools. The application generation instructions below use [Lando](https://lando.dev) to achieve this setup.
|
33
33
|
|
34
34
|
This document contains instructions specific to setting up an app with __Hyrax
|
35
|
-
v5.0.
|
35
|
+
v5.0.0__. If you are looking for instructions on installing a different
|
36
36
|
version, be sure to select the appropriate branch or tag from the drop-down
|
37
37
|
menu above.
|
38
38
|
|
@@ -54,7 +54,7 @@ Hyrax requires the following software to work:
|
|
54
54
|
1. [LibreOffice](#derivatives)
|
55
55
|
1. [ffmpeg](#transcoding)
|
56
56
|
|
57
|
-
**NOTE
|
57
|
+
**NOTE:** The [Hyrax Development Guide](https://github.com/samvera/hyrax/wiki/Hyrax-Development-Guide) has instructions for installing Solr and Fedora in a development environment.
|
58
58
|
|
59
59
|
### Characterization
|
60
60
|
#### Servlet FITS
|
@@ -96,7 +96,7 @@ Once ffmpeg has been installed, enable transcoding by setting `config.enable_ffm
|
|
96
96
|
|
97
97
|
## Environments
|
98
98
|
|
99
|
-
|
99
|
+
**NOTE:** The following commands assume you're setting up Hyrax in a development environment (using the Rails built-in development environment). If you're setting up a production or production-like environment, you may wish to tell Rails that by prepending `RAILS_ENV=production` to the commands that follow, e.g., `rails`, `rake`, `bundle`, and so on.
|
100
100
|
|
101
101
|
## Ruby
|
102
102
|
|
@@ -116,18 +116,21 @@ Hyrax requires Rails 6. We recommend the latest Rails 6.1 release.
|
|
116
116
|
|
117
117
|
```
|
118
118
|
# If you don't already have Rails at your disposal...
|
119
|
-
gem install rails -v 6.1.7.
|
119
|
+
gem install rails -v 6.1.7.7
|
120
120
|
```
|
121
121
|
|
122
122
|
### JavaScript runtime
|
123
123
|
|
124
124
|
Rails requires that you have a JavaScript runtime installed (e.g. nodejs or rubyracer). Either install nodejs or uncomment the `rubyracer` line in your Gemfile and run `bundle install` before running Hyrax's install generator.
|
125
125
|
|
126
|
-
NOTE
|
126
|
+
**NOTE:** [nodejs](https://nodejs.org/en/) is preinstalled on most Mac computers and doesn't require a gem. To test if nodejs is already installed, execute `node -v` in the terminal and the version of nodejs will be displayed if it is installed.
|
127
127
|
|
128
128
|
## Creating a Hyrax-based app
|
129
129
|
|
130
|
-
|
130
|
+
Create a new Hyrax-based application by following these steps in order.
|
131
|
+
|
132
|
+
**NOTE:** Starting with Hyrax v5, the generated application will use [Valkyrie](https://github.com/samvera/valkyrie) for repository persistence.
|
133
|
+
Use of [ActiveFedora](https://github.com/samvera/active_fedora) (instead of Valkyrie) is deprecated, but it should still be possible to reconfigure the generated application to use it.
|
131
134
|
|
132
135
|
### Development Prerequisites
|
133
136
|
|
@@ -142,8 +145,10 @@ These instructions assume the use of [Lando](https://lando.dev) and [Docker](htt
|
|
142
145
|
|
143
146
|
Generate a new Rails application using the template.
|
144
147
|
|
148
|
+
**NOTE:** `HYRAX_SKIP_WINGS` is needed here to avoid loading the Wings compatibility layer during the application generation process.
|
149
|
+
|
145
150
|
```shell
|
146
|
-
rails _6.1.7.
|
151
|
+
HYRAX_SKIP_WINGS=true rails _6.1.7.7_ new my_app --database=postgresql -m https://raw.githubusercontent.com/samvera/hyrax/hyrax-v5.0.0/template.rb
|
147
152
|
```
|
148
153
|
|
149
154
|
Generating a new Rails application using Hyrax's template above takes cares of a number of steps for you, including:
|
@@ -207,7 +212,7 @@ rails s
|
|
207
212
|
|
208
213
|
And now you should be able to browse to [localhost:3000](http://localhost:3000/) and see the application.
|
209
214
|
|
210
|
-
|
215
|
+
**NOTE:**
|
211
216
|
* This web server is purely for development purposes. You will want to use a more fully featured [web server](https://github.com/samvera/hyrax/wiki/Hyrax-Management-Guide#web-server) for production-like environments.
|
212
217
|
* For a fresh start, the data persisted in Lando can be wiped using `lando destroy`.
|
213
218
|
|
@@ -276,7 +276,7 @@ Hyrax.config do |config|
|
|
276
276
|
|
277
277
|
## Enable Valkyrie only mode
|
278
278
|
config.use_valkyrie = true
|
279
|
-
config.disable_wings true
|
279
|
+
config.disable_wings = true
|
280
280
|
|
281
281
|
# When your application is ready to use the valkyrie index instead of the one
|
282
282
|
# maintained by active fedora, you will need to set this to true. You will
|
data/lib/hyrax/version.rb
CHANGED
data/template.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hyrax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.0
|
4
|
+
version: 5.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date: 2024-
|
17
|
+
date: 2024-03-01 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: rails
|
@@ -2935,6 +2935,7 @@ files:
|
|
2935
2935
|
- chart/hyrax/README.md
|
2936
2936
|
- chart/hyrax/templates/NOTES.txt
|
2937
2937
|
- chart/hyrax/templates/_helpers.tpl
|
2938
|
+
- chart/hyrax/templates/_tmplvalues.tpl
|
2938
2939
|
- chart/hyrax/templates/branding-pvc.yaml
|
2939
2940
|
- chart/hyrax/templates/configmap-env.yaml
|
2940
2941
|
- chart/hyrax/templates/cron-embargo.yaml
|