hyrax 5.0.3 → 5.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/jobs/batch_create_job.rb +4 -3
- data/app/jobs/create_work_job.rb +4 -3
- data/documentation/developing-your-hyrax-based-app.md +2 -2
- data/lib/hyrax/version.rb +1 -1
- data/template.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc6adf0f9c62325c3f4131eb7264f543818e25f38b2d85ea1d96c0f877ffe934
|
4
|
+
data.tar.gz: 2d8aebcc3a2064ab0af8d45121df00e20197862ecd3b9d166ca9fcfcdcf7b02b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c006cdfa3fe00dbcfafb470bdd115c2a5131bef1a2209588d3f42fd71b9b0598435c85a47b4e2405f1fa22314fa0552819d9560c10d73d9ce8055701c4e8c21b
|
7
|
+
data.tar.gz: 689bb72271db54acf6564a7107fc298f41106d1c2c512429717ba3ff7a398f9d1071a7f8b230086676d9b228717948a5226c098486559c7eb84c733334939a11
|
@@ -25,18 +25,19 @@ class BatchCreateJob < Hyrax::ApplicationJob
|
|
25
25
|
private
|
26
26
|
|
27
27
|
def create(user, titles, resource_types, uploaded_files, attributes, operation)
|
28
|
-
|
28
|
+
job_attributes = attributes
|
29
|
+
model = job_attributes.delete(:model) || job_attributes.delete('model')
|
29
30
|
raise ArgumentError, 'attributes must include "model" => ClassName.to_s' unless model
|
30
31
|
uploaded_files.each do |upload_id|
|
31
32
|
title = [titles[upload_id]] if titles[upload_id]
|
32
33
|
resource_type = Array.wrap(resource_types[upload_id]) if resource_types[upload_id]
|
33
|
-
|
34
|
+
job_attributes = job_attributes.merge(uploaded_files: [upload_id],
|
34
35
|
title: title,
|
35
36
|
resource_type: resource_type)
|
36
37
|
child_operation = Hyrax::Operation.create!(user: user,
|
37
38
|
operation_type: "Create Work",
|
38
39
|
parent: operation)
|
39
|
-
CreateWorkJob.perform_later(user, model,
|
40
|
+
CreateWorkJob.perform_later(user, model, job_attributes, child_operation)
|
40
41
|
end
|
41
42
|
end
|
42
43
|
end
|
data/app/jobs/create_work_job.rb
CHANGED
@@ -39,11 +39,12 @@ class CreateWorkJob < Hyrax::ApplicationJob
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def batch_create_valkyrie_work(work, attributes, user)
|
42
|
-
|
42
|
+
form_attributes = attributes
|
43
|
+
uploaded_file_ids = form_attributes.delete(:uploaded_files)
|
43
44
|
files = Hyrax::UploadedFile.find(uploaded_file_ids)
|
44
|
-
permissions_params =
|
45
|
+
permissions_params = form_attributes.delete(:permissions_attributes)
|
45
46
|
form = Hyrax::FormFactory.new.build(work, nil, nil)
|
46
|
-
form.validate(
|
47
|
+
form.validate(form_attributes)
|
47
48
|
|
48
49
|
transactions['change_set.create_work']
|
49
50
|
.with_step_args(
|
@@ -32,7 +32,7 @@ You can also try [Running Hyrax-based application in local VM](https://github.co
|
|
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.4__. 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
|
|
@@ -148,7 +148,7 @@ Generate a new Rails application using the template.
|
|
148
148
|
**NOTE:** `HYRAX_SKIP_WINGS` is needed here to avoid loading the Wings compatibility layer during the application generation process.
|
149
149
|
|
150
150
|
```shell
|
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.
|
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.4/template.rb
|
152
152
|
```
|
153
153
|
|
154
154
|
Generating a new Rails application using Hyrax's template above takes cares of a number of steps for you, including:
|
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.
|
4
|
+
version: 5.0.4
|
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: 2025-02-
|
17
|
+
date: 2025-02-10 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: rails
|