hyrax 4.0.0.beta2 → 4.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +126 -53
- data/.dassie/Gemfile +1 -1
- data/.dassie/app/controllers/catalog_controller.rb +1 -1
- data/.dassie/config/initializers/hyrax.rb +4 -0
- data/.github/CONTRIBUTING.md +39 -27
- data/.github/SUPPORT.md +2 -3
- data/.github/workflows/main.yml +4 -4
- data/.github/workflows/release.yml +10 -4
- data/.koppie/Gemfile +1 -2
- data/.koppie/app/controllers/catalog_controller.rb +1 -1
- data/.koppie/config/authorities/licenses.yml +7 -7
- data/.koppie/config/initializers/file_services.rb +4 -0
- data/.koppie/db/schema.rb +2 -2
- data/.koppie/yarn.lock +1 -1
- data/.regen +1 -1
- data/CONTAINERS.md +5 -5
- data/CONTRIBUTING.md +2 -2
- data/Dockerfile +21 -9
- data/README.md +24 -97
- data/app/actors/hyrax/actors/create_with_files_actor.rb +1 -1
- data/app/assets/stylesheets/hyrax/_catalog.scss +4 -0
- data/app/assets/stylesheets/hyrax/_forms.scss +4 -0
- data/app/controllers/concerns/hyrax/controller.rb +3 -24
- data/app/controllers/concerns/hyrax/works_controller_behavior.rb +1 -0
- data/app/controllers/hyrax/admin/strategies_controller.rb +2 -2
- data/app/controllers/hyrax/dashboard/collections_controller.rb +1 -1
- data/app/controllers/hyrax/downloads_controller.rb +16 -1
- data/app/controllers/hyrax/file_sets_controller.rb +9 -2
- data/app/controllers/hyrax/my/works_controller.rb +3 -1
- data/app/controllers/hyrax/transfers_controller.rb +4 -1
- data/app/controllers/hyrax/workflow_actions_controller.rb +3 -2
- data/app/forms/hyrax/forms/administrative_set_form.rb +1 -1
- data/app/forms/hyrax/forms/file_set_edit_form.rb +1 -1
- data/app/forms/hyrax/forms/file_set_form.rb +8 -35
- data/app/forms/hyrax/forms/pcdm_collection_form.rb +2 -2
- data/app/forms/hyrax/forms/pcdm_object_form.rb +46 -0
- data/app/forms/hyrax/forms/permission.rb +2 -2
- data/app/forms/hyrax/forms/resource_form.rb +19 -44
- data/app/forms/hyrax/forms/work_embargo_form.rb +3 -3
- data/app/forms/hyrax/forms/work_lease_form.rb +3 -3
- data/app/helpers/hyrax/content_block_helper_behavior.rb +1 -1
- data/app/helpers/hyrax/hyrax_helper_behavior.rb +1 -1
- data/app/helpers/hyrax/iiif_helper.rb +1 -1
- data/app/indexers/hyrax/valkyrie_file_set_indexer.rb +1 -1
- data/app/jobs/characterize_job.rb +3 -2
- data/app/jobs/valkyrie_create_derivatives_job.rb +0 -2
- data/app/models/collection_branding_info.rb +7 -13
- data/app/models/concerns/hyrax/ability.rb +1 -1
- data/app/models/concerns/hyrax/collection_behavior.rb +0 -47
- data/app/models/concerns/hyrax/solr_document/metadata.rb +1 -0
- data/app/models/concerns/hyrax/suppressible.rb +0 -8
- data/app/models/file_download_stat.rb +4 -4
- data/app/models/hyrax/collection_type.rb +0 -16
- data/app/models/hyrax/file_metadata.rb +5 -12
- data/app/models/hyrax/file_set.rb +1 -9
- data/app/models/hyrax/permission_template.rb +1 -1
- data/app/models/hyrax/statistic.rb +4 -4
- data/app/models/sipity.rb +27 -6
- data/app/presenters/hyrax/collection_presenter.rb +1 -1
- data/app/presenters/hyrax/iiif_manifest_presenter.rb +15 -5
- data/app/presenters/hyrax/presenter_factory.rb +2 -2
- data/app/presenters/hyrax/work_show_presenter.rb +1 -1
- data/app/presenters/hyrax/workflow_presenter.rb +1 -1
- data/app/search_builders/hyrax/collection_search_builder.rb +1 -0
- data/app/search_builders/hyrax/filter_suppressed_with_roles.rb +1 -1
- data/app/services/hyrax/admin_set_service.rb +1 -1
- data/app/services/hyrax/collections/nested_collection_query_service.rb +2 -2
- data/app/services/hyrax/database_migrator.rb +1 -1
- data/app/services/hyrax/edit_permissions_service.rb +21 -3
- data/app/services/hyrax/restriction_service.rb +1 -1
- data/app/services/hyrax/solr_query_service.rb +10 -2
- data/app/services/hyrax/solr_service.rb +24 -18
- data/app/services/hyrax/thumbnail_path_service.rb +10 -2
- data/app/services/hyrax/valkyrie_persist_derivatives.rb +26 -15
- data/app/services/hyrax/valkyrie_upload.rb +23 -30
- data/app/services/hyrax/visibility_propagator.rb +5 -5
- data/app/services/hyrax/visibility_reader.rb +1 -1
- data/app/services/hyrax/visibility_writer.rb +1 -1
- data/app/services/hyrax/workflow/permission_query.rb +5 -5
- data/app/services/hyrax/workflow/status_list_service.rb +1 -1
- data/app/validators/hyrax/collection_membership_validator.rb +2 -2
- data/app/views/hyrax/base/_attribute_rows.html.erb +2 -0
- data/app/views/hyrax/dashboard/collections/_form_for_select_collection.html.erb +1 -1
- data/app/views/hyrax/file_sets/_permission.html.erb +1 -1
- data/app/views/hyrax/file_sets/edit.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_audio.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_default.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_image.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_office_document.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_pdf.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_video.html.erb +1 -1
- data/app/views/hyrax/uploads/_js_templates.html.erb +8 -8
- data/app/views/hyrax/uploads/_js_templates_branding.html.erb +2 -2
- data/app/views/hyrax/users/_vitals.html.erb +4 -4
- data/chart/hyrax/Chart.yaml +7 -7
- data/chart/hyrax/README.md +5 -0
- data/chart/hyrax/templates/_helpers.tpl +14 -6
- data/chart/hyrax/templates/cron-embargo.yaml +1 -1
- data/chart/hyrax/templates/cron-lease.yaml +1 -1
- data/chart/hyrax/templates/deployment-worker.yaml +2 -2
- data/chart/hyrax/templates/extra-list.yaml +8 -0
- data/chart/hyrax/templates/secrets.yaml +3 -3
- data/chart/hyrax/values.yaml +22 -15
- data/config/initializers/kaminari_engine_patch.rb +16 -0
- data/config/locales/hyrax.de.yml +7 -7
- data/config/locales/hyrax.es.yml +7 -7
- data/config/locales/hyrax.fr.yml +8 -8
- data/config/locales/hyrax.it.yml +7 -7
- data/config/locales/hyrax.pt-BR.yml +7 -7
- data/config/locales/hyrax.zh.yml +8 -8
- data/config/metadata/file_set_metadata.yaml +130 -0
- data/documentation/MAINTENANCE.md +77 -0
- data/documentation/developing-your-hyrax-based-app.md +2 -2
- data/documentation/legacyREADME.md +3 -3
- data/hyrax.gemspec +7 -10
- data/lib/generators/hyrax/templates/catalog_controller.rb +1 -1
- data/lib/hyrax/configuration.rb +16 -0
- data/lib/hyrax/controlled_vocabularies/resource_label_caching.rb +1 -1
- data/lib/hyrax/engine.rb +2 -1
- data/lib/hyrax/transactions/container.rb +0 -2
- data/lib/hyrax/transactions/steps/save_collection_banner.rb +1 -1
- data/lib/hyrax/transactions/steps/save_collection_logo.rb +1 -1
- data/lib/hyrax/transactions/transaction.rb +3 -2
- data/lib/hyrax/version.rb +1 -1
- data/lib/hyrax.rb +0 -1
- data/lib/valkyrie/indexing/solr/indexing_adapter.rb +1 -1
- data/lib/wings/active_fedora_converter/file_metadata_node.rb +1 -1
- data/lib/wings/valkyrie/storage.rb +4 -1
- data/samvera-fall-TM3.svg +376 -0
- data/template.rb +1 -1
- metadata +43 -85
- data/app/conversions/power_converters/polymorphic_type.rb +0 -9
- data/app/conversions/power_converters/sipity_action.rb +0 -11
- data/app/conversions/power_converters/sipity_action_name.rb +0 -10
- data/app/conversions/power_converters/sipity_agent.rb +0 -9
- data/app/conversions/power_converters/sipity_entity.rb +0 -14
- data/app/conversions/power_converters/sipity_role.rb +0 -10
- data/app/conversions/power_converters/sipity_workflow_id.rb +0 -17
- data/app/conversions/power_converters/sipity_workflow_state.rb +0 -13
- data/app/conversions/power_converters.rb +0 -7
@@ -0,0 +1,77 @@
|
|
1
|
+
# Maintenance Policy for Hyrax
|
2
|
+
January 25, 2023
|
3
|
+
|
4
|
+
[Hyrax Maintenance Working Group](https://samvera.atlassian.net/wiki/spaces/samvera/pages/496632295/Hyrax+Maintenance+Working+Group)
|
5
|
+
|
6
|
+
## Why do we need a policy?
|
7
|
+
A written policy prevents word-of-mouth policies which create confusion in the community.
|
8
|
+
A written policy also provides a transparent way to communicate our values to people who may
|
9
|
+
not work on the maintenance team consistently. It gives a basis to justify spending time on
|
10
|
+
something that isn’t in the product backlog.
|
11
|
+
|
12
|
+
Updated versions of JavaScript libraries, Ruby, and Ruby gems are released all the time.
|
13
|
+
If we don’t keep our applications up-to-date with the latest released versions of their
|
14
|
+
dependencies, we may end up with applications that rely on dependencies with known
|
15
|
+
vulnerabilities, bugs, or deprecated features.
|
16
|
+
|
17
|
+
Hyrax releases are managed in two groupings:
|
18
|
+
- Breaking changes which include new features with incompatible changes such as requiring
|
19
|
+
data migration, bug fixes or security fixes with incompatible changes.
|
20
|
+
- Non-breaking changes which have new features that can be introduced with feature flipper,
|
21
|
+
backwards compatibility, or that do not require data migration, bug fixes or security fixes
|
22
|
+
that do not require data migration.
|
23
|
+
|
24
|
+
## Semantic Versioning
|
25
|
+
|
26
|
+
Hyrax follows [semver](https://semver.org/) for release versioning. All releases are handled in X.Y.Z format.
|
27
|
+
|
28
|
+
Current releases are at https://github.com/samvera/hyrax/releases
|
29
|
+
|
30
|
+
### Major X
|
31
|
+
New features with incompatible changes such as requiring data migration, bug fixes or security
|
32
|
+
fixes with incompatible changes. Breaking changes are paired with deprecation notices in the
|
33
|
+
previous minor or major release.
|
34
|
+
|
35
|
+
### Minor Y
|
36
|
+
New features that can be introduced with feature flipper, backwards compatibility, or that do not
|
37
|
+
require data migration. May also contain bug fixes or security fixes that do not require data migration.
|
38
|
+
|
39
|
+
### Patch Z
|
40
|
+
Bug fixes or security fixes that do not require data migration. No new features.
|
41
|
+
|
42
|
+
## Supported Versions
|
43
|
+
Supported versions are the highest currently released X version and then backwards to X-1. So when
|
44
|
+
Hyrax 4.0 is released, the latest Hyrax 3.y is supported but Hyrax 2.y is not. Extended support for
|
45
|
+
an otherwise unsupported version may be offered at the Product Owner or Technical Lead’s discretion.
|
46
|
+
See End-of-Life Versions below.
|
47
|
+
|
48
|
+
## New features
|
49
|
+
New features that are added to the current release may be backported to supported past versions on
|
50
|
+
a case-by-case basis. New features that are not relevant to the current release can be added to a
|
51
|
+
supported past version.
|
52
|
+
|
53
|
+
## Bug fixes
|
54
|
+
Bug fixes that are added to the current release may be backported to supported past versions on a
|
55
|
+
case-by-case basis.
|
56
|
+
|
57
|
+
## Security fixes
|
58
|
+
The current major release will receive patches and new versions in case of a security fix. The last
|
59
|
+
release in the previous major version will also receive security updates. So when Hyrax 4.y has a
|
60
|
+
security fix applied, this security fix would also be applied to the latest Hyrax 3.y, but not to
|
61
|
+
Hyrax 2.y.
|
62
|
+
|
63
|
+
## Dependency Management
|
64
|
+
Deprecated or end-of-life versions of dependencies used as part of building a Hyrax-based application
|
65
|
+
will be removed from the test suite to manage maintenance. If an outdated version of a dependency is
|
66
|
+
still supported that does not pose security issues, it may remain supported in the test suite.
|
67
|
+
|
68
|
+
## End-of-Life Versions
|
69
|
+
End-of-life versions are X-1 versions behind the highest currently released X version. So when Hyrax 4.0
|
70
|
+
is released, Hyrax 2.y is end-of-life and no longer supported, but Hyrax 3.y is still supported and is
|
71
|
+
not end-of-life. Extended support for an otherwise unsupported version may be offered at the Product
|
72
|
+
Owner or Technical Lead’s discretion (e.g. many major releases in a short period of time).
|
73
|
+
See Supported Versions above.
|
74
|
+
|
75
|
+
End-of-Life versions of Hyrax will not be supported. Applying fixes (security or otherwise) will be
|
76
|
+
up to the implementing entity. We encourage updating to supported versions of Hyrax to receive updates
|
77
|
+
and security fixes.
|
@@ -30,7 +30,7 @@ A Hyrax-based application includes lots of dependencies. We provide a [Docker im
|
|
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
|
This document contains instructions specific to setting up an app with __Hyrax
|
33
|
-
|
33
|
+
v4.0.0.rc1__. If you are looking for instructions on installing a different
|
34
34
|
version, be sure to select the appropriate branch or tag from the drop-down
|
35
35
|
menu above.
|
36
36
|
|
@@ -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
|
128
|
+
rails _6.1.7.3_ new my_app -m https://raw.githubusercontent.com/samvera/hyrax/hyrax-v4.0.0.rc1/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
|
-
v4.0.0.
|
53
|
+
v4.0.0.rc2__. 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
|
|
@@ -129,7 +129,7 @@ Note here that the following commands assume you're setting up Hyrax in a develo
|
|
129
129
|
|
130
130
|
First, you'll need a working Ruby installation. You can install this via your operating system's package manager -- you are likely to get farther with OSX, Linux, or UNIX than Windows but your mileage may vary -- but we recommend using a Ruby version manager such as [RVM](https://rvm.io/) or [rbenv](https://github.com/sstephenson/rbenv).
|
131
131
|
|
132
|
-
Hyrax supports Ruby 2.
|
132
|
+
Hyrax supports Ruby 2.7, 3.0, 3.1 and 3.2. When starting a new project, we recommend using the latest Ruby 3.2 version.
|
133
133
|
|
134
134
|
## Redis
|
135
135
|
|
@@ -159,7 +159,7 @@ NOTE: The steps need to be done in order to create a new Hyrax based app.
|
|
159
159
|
Generate a new Rails application using the template.
|
160
160
|
|
161
161
|
```
|
162
|
-
rails
|
162
|
+
rails _6.1.7.3_ new my_app -m https://raw.githubusercontent.com/samvera/hyrax/hyrax-v4.0.0.rc2/template.rb
|
163
163
|
```
|
164
164
|
|
165
165
|
Generating a new Rails application using Hyrax's template above takes cares of a number of steps for you, including:
|
data/hyrax.gemspec
CHANGED
@@ -32,7 +32,7 @@ SUMMARY
|
|
32
32
|
# http://guides.rubyonrails.org/maintenance_policy.html
|
33
33
|
spec.add_dependency 'rails', '~> 6.0'
|
34
34
|
|
35
|
-
spec.add_dependency 'active-fedora', '~>
|
35
|
+
spec.add_dependency 'active-fedora', '~> 14.0'
|
36
36
|
spec.add_dependency 'almond-rails', '~> 0.1'
|
37
37
|
spec.add_dependency 'awesome_nested_set', '~> 3.1'
|
38
38
|
spec.add_dependency 'blacklight', '~> 7.29'
|
@@ -44,8 +44,8 @@ SUMMARY
|
|
44
44
|
spec.add_dependency 'draper', '~> 4.0'
|
45
45
|
spec.add_dependency 'dry-events', '~> 0.2.0'
|
46
46
|
spec.add_dependency 'dry-equalizer', '~> 0.2'
|
47
|
+
spec.add_dependency 'dry-monads', '~> 1.5'
|
47
48
|
spec.add_dependency 'dry-struct', '~> 1.0'
|
48
|
-
spec.add_dependency 'dry-transaction', '~> 0.11'
|
49
49
|
spec.add_dependency 'dry-validation', '~> 1.3'
|
50
50
|
spec.add_dependency 'flipflop', '~> 2.3'
|
51
51
|
# Pin more tightly because 0.x gems are potentially unstable
|
@@ -53,37 +53,34 @@ SUMMARY
|
|
53
53
|
spec.add_dependency 'font-awesome-rails', '~> 4.2'
|
54
54
|
spec.add_dependency 'hydra-derivatives', '~> 3.3'
|
55
55
|
spec.add_dependency 'hydra-editor', '~> 6.0'
|
56
|
-
spec.add_dependency 'hydra-file_characterization', '~> 1.1
|
56
|
+
spec.add_dependency 'hydra-file_characterization', '~> 1.1'
|
57
57
|
spec.add_dependency 'hydra-head', '~> 12.0'
|
58
58
|
spec.add_dependency 'hydra-works', '>= 0.16'
|
59
59
|
spec.add_dependency 'iiif_manifest', '>= 0.3', '< 2.0'
|
60
60
|
spec.add_dependency 'json-schema' # for Arkivo
|
61
|
-
# Pin more tightly because 0.x gems are potentially unstable
|
62
|
-
spec.add_dependency 'kaminari_route_prefix', '~> 0.1.1'
|
63
61
|
spec.add_dependency 'legato', '~> 0.3'
|
64
62
|
spec.add_dependency 'linkeddata' # Required for getting values from geonames
|
65
63
|
spec.add_dependency 'mailboxer', '~> 0.12'
|
66
64
|
spec.add_dependency 'nest', '~> 3.1'
|
67
|
-
spec.add_dependency 'noid-rails', '~> 3.0
|
65
|
+
spec.add_dependency 'noid-rails', '~> 3.0'
|
68
66
|
spec.add_dependency 'oauth'
|
69
67
|
spec.add_dependency 'oauth2', '~> 1.2'
|
70
68
|
spec.add_dependency 'openseadragon'
|
71
69
|
spec.add_dependency 'posix-spawn'
|
72
|
-
spec.add_dependency 'power_converter', '~> 0.1', '>= 0.1.2'
|
73
70
|
spec.add_dependency 'qa', '~> 5.5', '>= 5.5.1' # questioning_authority
|
74
71
|
spec.add_dependency 'rails_autolink', '~> 1.1'
|
75
72
|
spec.add_dependency 'rdf-rdfxml' # controlled vocabulary importer
|
76
73
|
spec.add_dependency 'rdf-vocab', '~> 3.0'
|
77
74
|
spec.add_dependency 'redis', '~> 4.0'
|
78
75
|
spec.add_dependency 'redis-namespace', '~> 1.5'
|
79
|
-
spec.add_dependency 'redlock', '>= 0.1.2'
|
76
|
+
spec.add_dependency 'redlock', '>= 0.1.2', '< 2.0'
|
80
77
|
spec.add_dependency 'reform', '~> 2.3'
|
81
78
|
spec.add_dependency 'reform-rails', '~> 0.2.0'
|
82
79
|
spec.add_dependency 'retriable', '>= 2.9', '< 4.0'
|
83
|
-
spec.add_dependency 'samvera-nesting_indexer', '~> 2.0'
|
84
80
|
spec.add_dependency 'signet'
|
85
81
|
spec.add_dependency 'tinymce-rails', '~> 5.10'
|
86
|
-
spec.add_dependency 'valkyrie', '~>
|
82
|
+
spec.add_dependency 'valkyrie', '~> 3.0.1'
|
83
|
+
spec.add_dependency 'view_component', '~> 2.74.1' # Pin until blacklight is updated with workaround for https://github.com/ViewComponent/view_component/issues/1565
|
87
84
|
spec.add_dependency 'sprockets', '~> 3.7'
|
88
85
|
spec.add_dependency 'sass-rails', '~> 6.0'
|
89
86
|
spec.add_dependency 'select2-rails', '~> 3.5'
|
@@ -19,7 +19,7 @@ class CatalogController < ApplicationController
|
|
19
19
|
|
20
20
|
# Because too many times on Samvera tech people raise a problem regarding a failed query to SOLR.
|
21
21
|
# Often, it's because they inadvertently exceeded the character limit of a GET request.
|
22
|
-
config.http_method =
|
22
|
+
config.http_method = Hyrax.config.solr_default_method
|
23
23
|
|
24
24
|
## Default parameters to send to solr for all search-like requests. See also SolrHelper#solr_search_params
|
25
25
|
config.default_solr_params = {
|
data/lib/hyrax/configuration.rb
CHANGED
@@ -846,6 +846,11 @@ module Hyrax
|
|
846
846
|
@solr_select_path ||= ActiveFedora.solr_config.fetch(:select_path, 'select')
|
847
847
|
end
|
848
848
|
|
849
|
+
attr_writer :solr_default_method
|
850
|
+
def solr_default_method
|
851
|
+
@solr_default_method ||= :post
|
852
|
+
end
|
853
|
+
|
849
854
|
attr_writer :identifier_registrars
|
850
855
|
def identifier_registrars
|
851
856
|
@identifier_registrars ||= {}
|
@@ -875,6 +880,17 @@ module Hyrax
|
|
875
880
|
@derivative_services ||= [Hyrax::FileSetDerivativesService]
|
876
881
|
end
|
877
882
|
|
883
|
+
attr_writer :visibility_map
|
884
|
+
# A mapping from visibility string values to permissions; the default and
|
885
|
+
# reference implementation is provided by {Hyrax::VisibilityMap}.
|
886
|
+
#
|
887
|
+
# @return [Hyrax::VisibilityMap]
|
888
|
+
# @see Hyrax::VisibilityReader
|
889
|
+
# @see Hyrax::VisibilityWriter
|
890
|
+
def visibility_map
|
891
|
+
@visibility_map ||= Hyrax::VisibilityMap.instance
|
892
|
+
end
|
893
|
+
|
878
894
|
private
|
879
895
|
|
880
896
|
# @param [Symbol, #to_s] model_name - symbol representing the model
|
data/lib/hyrax/engine.rb
CHANGED
@@ -87,7 +87,6 @@ module Hyrax
|
|
87
87
|
end
|
88
88
|
|
89
89
|
initializer 'requires' do
|
90
|
-
require 'power_converters'
|
91
90
|
require 'wings' unless Hyrax.config.disable_wings
|
92
91
|
end
|
93
92
|
|
@@ -108,6 +107,8 @@ module Hyrax
|
|
108
107
|
|
109
108
|
ActiveFedora::Base.translate_uri_to_id = c.translate_uri_to_id
|
110
109
|
ActiveFedora::Base.translate_id_to_uri = c.translate_id_to_uri
|
110
|
+
ActiveFedora::File.translate_uri_to_id = c.translate_uri_to_id
|
111
|
+
ActiveFedora::File.translate_id_to_uri = c.translate_id_to_uri
|
111
112
|
|
112
113
|
::Noid::Rails.config.template = c.noid_template
|
113
114
|
::Noid::Rails.config.minter_class = c.noid_minter_class
|
@@ -95,7 +95,8 @@ module Hyrax
|
|
95
95
|
def call(value)
|
96
96
|
Success(
|
97
97
|
steps.inject(value) do |val, step_name|
|
98
|
-
|
98
|
+
args = step_arguments_for(step_name)
|
99
|
+
yield container[step_name].call(val, *args[0..-2], **Hash(args[-1]))
|
99
100
|
end
|
100
101
|
)
|
101
102
|
end
|
@@ -119,7 +120,7 @@ module Hyrax
|
|
119
120
|
# tx = Hyrax::Transactions::Transaction.new(steps: [:first_step, :second_step])
|
120
121
|
# result = tx.with_step_args(second_step: {named_parameter: :param_value}).call(:value)
|
121
122
|
#
|
122
|
-
def with_step_args(args)
|
123
|
+
def with_step_args(**args)
|
123
124
|
raise(ArgumentError, key_err_msg(args.keys)) if
|
124
125
|
args.keys.any? { |key| !step?(key) }
|
125
126
|
|
data/lib/hyrax/version.rb
CHANGED
data/lib/hyrax.rb
CHANGED
@@ -20,7 +20,6 @@ require 'hyrax/version'
|
|
20
20
|
require 'hyrax/inflections'
|
21
21
|
require 'hyrax/name'
|
22
22
|
require 'hyrax/valkyrie_can_can_adapter'
|
23
|
-
require 'kaminari_route_prefix'
|
24
23
|
require 'valkyrie/indexing_adapter'
|
25
24
|
require 'valkyrie/indexing/solr/indexing_adapter'
|
26
25
|
require 'valkyrie/indexing/null_indexing_adapter'
|
@@ -9,7 +9,7 @@ module Wings
|
|
9
9
|
# skip reserved attributes, we assume we don't need to translate valkyrie internals
|
10
10
|
schema = resource_class.schema.reject do |key|
|
11
11
|
resource_class.reserved_attributes.include?(key.name) ||
|
12
|
-
key.name == :size
|
12
|
+
key.name == :size || key.name == :has_model
|
13
13
|
end
|
14
14
|
|
15
15
|
Wings::ActiveFedoraConverter.apply_properties(self, schema)
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'faraday/multipart'
|
4
|
+
|
3
5
|
module Wings
|
4
6
|
module Valkyrie
|
5
7
|
##
|
@@ -67,8 +69,9 @@ module Wings
|
|
67
69
|
|
68
70
|
reader = RDF::Reader.for(content_type: response.headers['content-type'])
|
69
71
|
version_graph = RDF::Graph.new << reader.new(response.body)
|
72
|
+
query = { predicate: RDF::Vocab::Fcrepo4.hasVersion }
|
70
73
|
|
71
|
-
version_graph.query(
|
74
|
+
version_graph.query(query).objects.map do |uri|
|
72
75
|
timestamp =
|
73
76
|
version_graph.query([uri, RDF::Vocab::Fcrepo4.created, :created])
|
74
77
|
.first_object
|