hyrax 3.4.1 → 3.4.2
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 +26 -17
- data/.dassie/.env +1 -1
- data/.dassie/Gemfile +1 -1
- data/.dassie/app/forms/collection_resource_form.rb +8 -0
- data/.dassie/app/indexers/collection_resource_indexer.rb +8 -0
- data/.dassie/app/models/collection_resource.rb +35 -0
- data/.dassie/config/initializers/file_services.rb +4 -0
- data/.dassie/config/initializers/hyrax.rb +2 -1
- data/.dassie/config/metadata/collection_resource.yaml +23 -0
- data/.dassie/db/seeds.rb +2 -0
- data/.dassie/spec/forms/collection_resource_form_spec.rb +13 -0
- data/.dassie/spec/indexers/collection_resource_indexer_spec.rb +14 -0
- data/.dassie/spec/models/collection_resource_spec.rb +13 -0
- data/.regen +1 -1
- data/.rubocop.yml +1 -1
- data/.rubocop_fixme.yml +19 -2
- data/CONTAINERS.md +18 -13
- data/Dockerfile +2 -2
- data/app/assets/javascripts/hyrax/collections_v2.es6 +13 -0
- data/app/controllers/concerns/hyrax/collections_controller_behavior.rb +1 -3
- data/app/controllers/hyrax/dashboard/collections_controller.rb +159 -75
- data/app/controllers/hyrax/single_use_links_viewer_controller.rb +1 -1
- data/app/forms/hyrax/forms/collection_form.rb +1 -1
- data/app/forms/hyrax/forms/pcdm_collection_form.rb +29 -2
- data/app/forms/hyrax/forms/resource_form.rb +15 -1
- data/app/forms/hyrax/forms/widgets/admin_set_visibility.rb +1 -1
- data/app/indexers/hyrax/pcdm_collection_indexer.rb +0 -1
- data/app/jobs/characterize_job.rb +5 -1
- data/app/jobs/import_url_job.rb +4 -6
- data/app/jobs/valkyrie_ingest_job.rb +15 -77
- data/app/models/admin_set.rb +8 -0
- data/app/models/concerns/hyrax/collection_behavior.rb +1 -1
- data/app/models/concerns/hyrax/user.rb +11 -0
- data/app/models/concerns/hyrax/work_behavior.rb +1 -1
- data/app/models/featured_work_list.rb +0 -1
- data/app/models/hyrax/file_metadata.rb +32 -2
- data/app/models/hyrax/file_set.rb +1 -3
- data/app/models/hyrax/group.rb +19 -0
- data/app/models/hyrax/pcdm_collection.rb +0 -1
- data/app/models/job_io_wrapper.rb +1 -1
- data/app/presenters/hyrax/member_presenter_factory.rb +2 -4
- data/app/presenters/hyrax/work_show_presenter.rb +3 -3
- data/app/services/hyrax/access_control_list.rb +7 -6
- data/app/services/hyrax/adapters/nesting_index_adapter.rb +3 -3
- data/app/services/hyrax/characterization/valkyrie_characterization_service.rb +3 -5
- data/app/services/hyrax/collections/collection_member_service.rb +3 -5
- data/app/services/hyrax/listeners/file_metadata_listener.rb +11 -0
- data/app/services/hyrax/listeners/member_cleanup_listener.rb +14 -18
- data/app/services/hyrax/multiple_membership_checker.rb +2 -0
- data/app/services/hyrax/valkyrie_persist_derivatives.rb +50 -0
- data/app/services/hyrax/valkyrie_upload.rb +94 -0
- data/app/services/hyrax/workflow/workflow_importer.rb +7 -9
- data/app/services/hyrax/workflow/workflow_schema.rb +3 -5
- data/app/strategies/hyrax/strategies/yaml_strategy.rb +4 -6
- data/app/uploaders/hyrax/uploaded_file_uploader.rb +4 -4
- data/app/validators/hyrax/collection_membership_validator.rb +16 -15
- data/app/views/catalog/_index_header_list_default.html.erb +8 -1
- data/app/views/catalog/_thumbnail_list_default.html.erb +8 -3
- data/app/views/collections/edit_fields/_based_near.html.erb +7 -7
- data/app/views/hyrax/dashboard/collections/_form.html.erb +3 -2
- data/app/views/hyrax/dashboard/collections/_form_branding.html.erb +1 -0
- data/app/views/hyrax/dashboard/sidebar/_activity.html.erb +1 -1
- data/app/views/hyrax/my/works/_tabs.html.erb +6 -1
- data/chart/hyrax/Chart.yaml +10 -6
- data/chart/hyrax/templates/_helpers.tpl +4 -0
- data/chart/hyrax/templates/cron-embargo.yaml +5 -0
- data/chart/hyrax/templates/cron-lease.yaml +5 -0
- data/chart/hyrax/templates/deployment-worker.yaml +11 -0
- data/chart/hyrax/templates/ingress.yaml +7 -6
- data/chart/hyrax/values.yaml +152 -0
- data/config/features.rb +48 -50
- data/config/initializers/{valkryrie_storage.rb → storage_adapter_initializer.rb} +5 -0
- data/config/locales/hyrax.de.yml +12 -12
- data/docker-compose.yml +1 -0
- data/documentation/developing-your-hyrax-based-app.md +1 -1
- data/documentation/legacyREADME.md +1 -1
- data/hyrax.gemspec +5 -3
- data/lib/generators/hyrax/collection_resource/USAGE +20 -0
- data/lib/generators/hyrax/collection_resource/collection_resource_generator.rb +133 -0
- data/lib/generators/hyrax/collection_resource/templates/collection.rb.erb +34 -0
- data/lib/generators/hyrax/collection_resource/templates/collection_form.rb.erb +7 -0
- data/lib/generators/hyrax/collection_resource/templates/collection_form_spec.rb.erb +13 -0
- data/lib/generators/hyrax/collection_resource/templates/collection_indexer.rb.erb +7 -0
- data/lib/generators/hyrax/collection_resource/templates/collection_indexer_spec.rb.erb +13 -0
- data/lib/generators/hyrax/collection_resource/templates/collection_metadata.yaml +22 -0
- data/lib/generators/hyrax/collection_resource/templates/collection_spec.rb.erb +12 -0
- data/lib/generators/hyrax/install_generator.rb +9 -0
- data/lib/hyrax/configuration.rb +12 -0
- data/lib/hyrax/publisher.rb +4 -0
- data/lib/hyrax/specs/shared_specs/hydra_works.rb +0 -1
- data/lib/hyrax/transactions/collection_update.rb +2 -0
- data/lib/hyrax/transactions/container.rb +10 -0
- data/lib/hyrax/transactions/steps/save_collection_banner.rb +59 -0
- data/lib/hyrax/transactions/steps/save_collection_logo.rb +109 -0
- data/lib/hyrax/version.rb +1 -1
- data/lib/wings/active_fedora_converter/file_metadata_node.rb +48 -0
- data/lib/wings/active_fedora_converter/instance_builder.rb +68 -0
- data/lib/wings/active_fedora_converter.rb +3 -3
- data/lib/wings/services/custom_queries/find_file_metadata.rb +19 -8
- data/lib/wings/valkyrie/query_service.rb +4 -6
- data/template.rb +1 -1
- metadata +63 -13
- data/app/views/catalog/_index_header_list_hyrax_pcdm_collection.html.erb +0 -4
@@ -33,7 +33,20 @@ module Wings
|
|
33
33
|
#
|
34
34
|
# @raise [Hyrax::ObjectNotFoundError]
|
35
35
|
def find_file_metadata_by(id:, use_valkyrie: true)
|
36
|
-
|
36
|
+
fcrepo_flag =
|
37
|
+
begin
|
38
|
+
::Valkyrie::StorageAdapter.adapter_for(id: id).is_a?(::Valkyrie::Storage::Fedora)
|
39
|
+
rescue ::Valkyrie::StorageAdapter::AdapterNotFoundError
|
40
|
+
true # assume fcrepo if we can't find an adapter
|
41
|
+
end
|
42
|
+
|
43
|
+
if fcrepo_flag
|
44
|
+
find_file_metadata_by_alternate_identifier(alternate_identifier: id, use_valkyrie: use_valkyrie)
|
45
|
+
else
|
46
|
+
result = ActiveFedora::Base.where(file_identifier_ssim: id.to_s).first ||
|
47
|
+
raise(Hyrax::ObjectNotFoundError)
|
48
|
+
result.valkyrie_resource
|
49
|
+
end
|
37
50
|
end
|
38
51
|
|
39
52
|
# Find a Hyrax::FileMetadata using an alternate ID, and map it to a
|
@@ -48,8 +61,8 @@ module Wings
|
|
48
61
|
#
|
49
62
|
# @raise [Hyrax::ObjectNotFoundError]
|
50
63
|
def find_file_metadata_by_alternate_identifier(alternate_identifier:, use_valkyrie: true)
|
51
|
-
alternate_identifier = ::Valkyrie::ID.new(alternate_identifier)
|
52
|
-
object = Hydra::PCDM::File.find(alternate_identifier
|
64
|
+
alternate_identifier = ::Valkyrie::ID.new(alternate_identifier).to_s
|
65
|
+
object = Hydra::PCDM::File.find(alternate_identifier)
|
53
66
|
raise Hyrax::ObjectNotFoundError if object.new_record?
|
54
67
|
|
55
68
|
if use_valkyrie == false
|
@@ -73,11 +86,9 @@ module Wings
|
|
73
86
|
# if there are no ids or none of the ids map to Hyrax::FileMetadata
|
74
87
|
def find_many_file_metadata_by_ids(ids:, use_valkyrie: true)
|
75
88
|
ids.each_with_object([]) do |alt_id, results|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
next
|
80
|
-
end
|
89
|
+
results << find_file_metadata_by_alternate_identifier(alternate_identifier: alt_id, use_valkyrie: use_valkyrie)
|
90
|
+
rescue Hyrax::ObjectNotFoundError
|
91
|
+
next
|
81
92
|
end
|
82
93
|
end
|
83
94
|
|
@@ -86,12 +86,10 @@ module Wings
|
|
86
86
|
return enum_for(:find_many_by_ids, ids: ids) unless block_given?
|
87
87
|
|
88
88
|
ids.map(&:to_s).uniq.each do |id|
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
next
|
94
|
-
end
|
89
|
+
af_object = ActiveFedora::Base.find(id)
|
90
|
+
yield resource_factory.to_resource(object: af_object)
|
91
|
+
rescue ::ActiveFedora::ObjectNotFoundError, Ldp::Gone
|
92
|
+
next
|
95
93
|
end
|
96
94
|
end
|
97
95
|
|
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: 3.4.
|
4
|
+
version: 3.4.2
|
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: 2022-
|
17
|
+
date: 2022-08-24 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: rails
|
@@ -424,6 +424,20 @@ dependencies:
|
|
424
424
|
- - "~>"
|
425
425
|
- !ruby/object:Gem::Version
|
426
426
|
version: '6.0'
|
427
|
+
- !ruby/object:Gem::Dependency
|
428
|
+
name: json-ld
|
429
|
+
requirement: !ruby/object:Gem::Requirement
|
430
|
+
requirements:
|
431
|
+
- - "<"
|
432
|
+
- !ruby/object:Gem::Version
|
433
|
+
version: '3.2'
|
434
|
+
type: :runtime
|
435
|
+
prerelease: false
|
436
|
+
version_requirements: !ruby/object:Gem::Requirement
|
437
|
+
requirements:
|
438
|
+
- - "<"
|
439
|
+
- !ruby/object:Gem::Version
|
440
|
+
version: '3.2'
|
427
441
|
- !ruby/object:Gem::Dependency
|
428
442
|
name: json-schema
|
429
443
|
requirement: !ruby/object:Gem::Requirement
|
@@ -584,6 +598,20 @@ dependencies:
|
|
584
598
|
- - ">="
|
585
599
|
- !ruby/object:Gem::Version
|
586
600
|
version: 0.1.2
|
601
|
+
- !ruby/object:Gem::Dependency
|
602
|
+
name: psych
|
603
|
+
requirement: !ruby/object:Gem::Requirement
|
604
|
+
requirements:
|
605
|
+
- - "~>"
|
606
|
+
- !ruby/object:Gem::Version
|
607
|
+
version: '3.3'
|
608
|
+
type: :runtime
|
609
|
+
prerelease: false
|
610
|
+
version_requirements: !ruby/object:Gem::Requirement
|
611
|
+
requirements:
|
612
|
+
- - "~>"
|
613
|
+
- !ruby/object:Gem::Version
|
614
|
+
version: '3.3'
|
587
615
|
- !ruby/object:Gem::Dependency
|
588
616
|
name: qa
|
589
617
|
requirement: !ruby/object:Gem::Requirement
|
@@ -768,16 +796,16 @@ dependencies:
|
|
768
796
|
name: tinymce-rails
|
769
797
|
requirement: !ruby/object:Gem::Requirement
|
770
798
|
requirements:
|
771
|
-
- - "
|
799
|
+
- - "~>"
|
772
800
|
- !ruby/object:Gem::Version
|
773
|
-
version: '
|
801
|
+
version: '5.10'
|
774
802
|
type: :runtime
|
775
803
|
prerelease: false
|
776
804
|
version_requirements: !ruby/object:Gem::Requirement
|
777
805
|
requirements:
|
778
|
-
- - "
|
806
|
+
- - "~>"
|
779
807
|
- !ruby/object:Gem::Version
|
780
|
-
version: '
|
808
|
+
version: '5.10'
|
781
809
|
- !ruby/object:Gem::Dependency
|
782
810
|
name: valkyrie
|
783
811
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1102,20 +1130,20 @@ dependencies:
|
|
1102
1130
|
requirements:
|
1103
1131
|
- - "~>"
|
1104
1132
|
- !ruby/object:Gem::Version
|
1105
|
-
version: '
|
1133
|
+
version: '5.0'
|
1106
1134
|
- - ">="
|
1107
1135
|
- !ruby/object:Gem::Version
|
1108
|
-
version:
|
1136
|
+
version: 5.0.2
|
1109
1137
|
type: :development
|
1110
1138
|
prerelease: false
|
1111
1139
|
version_requirements: !ruby/object:Gem::Requirement
|
1112
1140
|
requirements:
|
1113
1141
|
- - "~>"
|
1114
1142
|
- !ruby/object:Gem::Version
|
1115
|
-
version: '
|
1143
|
+
version: '5.0'
|
1116
1144
|
- - ">="
|
1117
1145
|
- !ruby/object:Gem::Version
|
1118
|
-
version:
|
1146
|
+
version: 5.0.2
|
1119
1147
|
- !ruby/object:Gem::Dependency
|
1120
1148
|
name: shoulda-callback-matchers
|
1121
1149
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1234,11 +1262,13 @@ files:
|
|
1234
1262
|
- ".dassie/app/controllers/hyrax/generic_works_controller.rb"
|
1235
1263
|
- ".dassie/app/controllers/hyrax/monographs_controller.rb"
|
1236
1264
|
- ".dassie/app/controllers/hyrax/namespaced_works/nested_works_controller.rb"
|
1265
|
+
- ".dassie/app/forms/collection_resource_form.rb"
|
1237
1266
|
- ".dassie/app/forms/hyrax/generic_work_form.rb"
|
1238
1267
|
- ".dassie/app/forms/hyrax/namespaced_works/nested_work_form.rb"
|
1239
1268
|
- ".dassie/app/forms/monograph_form.rb"
|
1240
1269
|
- ".dassie/app/helpers/application_helper.rb"
|
1241
1270
|
- ".dassie/app/helpers/hyrax_helper.rb"
|
1271
|
+
- ".dassie/app/indexers/collection_resource_indexer.rb"
|
1242
1272
|
- ".dassie/app/indexers/generic_work_indexer.rb"
|
1243
1273
|
- ".dassie/app/indexers/monograph_indexer.rb"
|
1244
1274
|
- ".dassie/app/indexers/namespaced_works/nested_work_indexer.rb"
|
@@ -1247,6 +1277,7 @@ files:
|
|
1247
1277
|
- ".dassie/app/models/ability.rb"
|
1248
1278
|
- ".dassie/app/models/application_record.rb"
|
1249
1279
|
- ".dassie/app/models/collection.rb"
|
1280
|
+
- ".dassie/app/models/collection_resource.rb"
|
1250
1281
|
- ".dassie/app/models/concerns/.keep"
|
1251
1282
|
- ".dassie/app/models/file_set.rb"
|
1252
1283
|
- ".dassie/app/models/generic_work.rb"
|
@@ -1296,6 +1327,7 @@ files:
|
|
1296
1327
|
- ".dassie/config/initializers/clamav.rb"
|
1297
1328
|
- ".dassie/config/initializers/cookies_serializer.rb"
|
1298
1329
|
- ".dassie/config/initializers/devise.rb"
|
1330
|
+
- ".dassie/config/initializers/file_services.rb"
|
1299
1331
|
- ".dassie/config/initializers/filter_parameter_logging.rb"
|
1300
1332
|
- ".dassie/config/initializers/hydra_config.rb"
|
1301
1333
|
- ".dassie/config/initializers/hyrax.rb"
|
@@ -1330,6 +1362,7 @@ files:
|
|
1330
1362
|
- ".dassie/config/locales/namespaced_works/nested_work.it.yml"
|
1331
1363
|
- ".dassie/config/locales/namespaced_works/nested_work.pt-BR.yml"
|
1332
1364
|
- ".dassie/config/locales/namespaced_works/nested_work.zh.yml"
|
1365
|
+
- ".dassie/config/metadata/collection_resource.yaml"
|
1333
1366
|
- ".dassie/config/metadata/monograph.yaml"
|
1334
1367
|
- ".dassie/config/metadata/sample_metadata.yaml"
|
1335
1368
|
- ".dassie/config/puma.rb"
|
@@ -1445,6 +1478,9 @@ files:
|
|
1445
1478
|
- ".dassie/solr/conf/xslt/example_rss.xsl"
|
1446
1479
|
- ".dassie/solr/conf/xslt/luke.xsl"
|
1447
1480
|
- ".dassie/solr/sample_solr_documents.yml"
|
1481
|
+
- ".dassie/spec/forms/collection_resource_form_spec.rb"
|
1482
|
+
- ".dassie/spec/indexers/collection_resource_indexer_spec.rb"
|
1483
|
+
- ".dassie/spec/models/collection_resource_spec.rb"
|
1448
1484
|
- ".dassie/storage/.keep"
|
1449
1485
|
- ".dassie/tmp/pids/.keep"
|
1450
1486
|
- ".dassie/values.stage.yaml"
|
@@ -2227,6 +2263,8 @@ files:
|
|
2227
2263
|
- app/services/hyrax/time_service.rb
|
2228
2264
|
- app/services/hyrax/tolerant_select_service.rb
|
2229
2265
|
- app/services/hyrax/user_stat_importer.rb
|
2266
|
+
- app/services/hyrax/valkyrie_persist_derivatives.rb
|
2267
|
+
- app/services/hyrax/valkyrie_upload.rb
|
2230
2268
|
- app/services/hyrax/versioning_service.rb
|
2231
2269
|
- app/services/hyrax/virus_checker_service.rb
|
2232
2270
|
- app/services/hyrax/visibility_intention.rb
|
@@ -2303,7 +2341,6 @@ files:
|
|
2303
2341
|
- app/views/catalog/_index_gallery_collection_wrapper.html.erb
|
2304
2342
|
- app/views/catalog/_index_header_list_collection.html.erb
|
2305
2343
|
- app/views/catalog/_index_header_list_default.html.erb
|
2306
|
-
- app/views/catalog/_index_header_list_hyrax_pcdm_collection.html.erb
|
2307
2344
|
- app/views/catalog/_index_list_default.html.erb
|
2308
2345
|
- app/views/catalog/_search_form.html.erb
|
2309
2346
|
- app/views/catalog/_thumbnail_list_collection.html.erb
|
@@ -2748,7 +2785,7 @@ files:
|
|
2748
2785
|
- config/initializers/listeners.rb
|
2749
2786
|
- config/initializers/nesting_indexer_initializer.rb
|
2750
2787
|
- config/initializers/simple_form.rb
|
2751
|
-
- config/initializers/
|
2788
|
+
- config/initializers/storage_adapter_initializer.rb
|
2752
2789
|
- config/initializers/valkyrie_id_equality.rb
|
2753
2790
|
- config/locales/hyrax.de.yml
|
2754
2791
|
- config/locales/hyrax.en.yml
|
@@ -2778,6 +2815,15 @@ files:
|
|
2778
2815
|
- lib/generators/hyrax/assets_generator.rb
|
2779
2816
|
- lib/generators/hyrax/clamav_generator.rb
|
2780
2817
|
- lib/generators/hyrax/collection_generator.rb
|
2818
|
+
- lib/generators/hyrax/collection_resource/USAGE
|
2819
|
+
- lib/generators/hyrax/collection_resource/collection_resource_generator.rb
|
2820
|
+
- lib/generators/hyrax/collection_resource/templates/collection.rb.erb
|
2821
|
+
- lib/generators/hyrax/collection_resource/templates/collection_form.rb.erb
|
2822
|
+
- lib/generators/hyrax/collection_resource/templates/collection_form_spec.rb.erb
|
2823
|
+
- lib/generators/hyrax/collection_resource/templates/collection_indexer.rb.erb
|
2824
|
+
- lib/generators/hyrax/collection_resource/templates/collection_indexer_spec.rb.erb
|
2825
|
+
- lib/generators/hyrax/collection_resource/templates/collection_metadata.yaml
|
2826
|
+
- lib/generators/hyrax/collection_resource/templates/collection_spec.rb.erb
|
2781
2827
|
- lib/generators/hyrax/config_generator.rb
|
2782
2828
|
- lib/generators/hyrax/health_check_generator.rb
|
2783
2829
|
- lib/generators/hyrax/install_generator.rb
|
@@ -2996,6 +3042,8 @@ files:
|
|
2996
3042
|
- lib/hyrax/transactions/steps/remove_file_set_from_work.rb
|
2997
3043
|
- lib/hyrax/transactions/steps/save.rb
|
2998
3044
|
- lib/hyrax/transactions/steps/save_access_control.rb
|
3045
|
+
- lib/hyrax/transactions/steps/save_collection_banner.rb
|
3046
|
+
- lib/hyrax/transactions/steps/save_collection_logo.rb
|
2999
3047
|
- lib/hyrax/transactions/steps/save_work.rb
|
3000
3048
|
- lib/hyrax/transactions/steps/set_collection_type_gid.rb
|
3001
3049
|
- lib/hyrax/transactions/steps/set_default_admin_set.rb
|
@@ -3036,6 +3084,8 @@ files:
|
|
3036
3084
|
- lib/wings/active_fedora_classifier.rb
|
3037
3085
|
- lib/wings/active_fedora_converter.rb
|
3038
3086
|
- lib/wings/active_fedora_converter/default_work.rb
|
3087
|
+
- lib/wings/active_fedora_converter/file_metadata_node.rb
|
3088
|
+
- lib/wings/active_fedora_converter/instance_builder.rb
|
3039
3089
|
- lib/wings/active_fedora_converter/nested_resource.rb
|
3040
3090
|
- lib/wings/attribute_transformer.rb
|
3041
3091
|
- lib/wings/converter_value_mapper.rb
|
@@ -3098,7 +3148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
3098
3148
|
- !ruby/object:Gem::Version
|
3099
3149
|
version: '0'
|
3100
3150
|
requirements: []
|
3101
|
-
rubygems_version: 3.3.
|
3151
|
+
rubygems_version: 3.3.17
|
3102
3152
|
signing_key:
|
3103
3153
|
specification_version: 4
|
3104
3154
|
summary: Hyrax is a front-end based on the robust Samvera framework, providing a user
|