hyrax 5.0.0.rc3 → 5.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/CONTAINERS.md +1 -1
  3. data/app/assets/javascripts/hyrax/autocomplete/linked_data.es6 +3 -0
  4. data/app/assets/javascripts/hyrax/editor/controlled_vocabulary.es6 +38 -5
  5. data/app/assets/stylesheets/hyrax/_file_upload.scss +6 -0
  6. data/app/assets/stylesheets/hyrax/controlled_vocabulary.scss +2 -2
  7. data/app/controllers/hyrax/dashboard/collections_controller.rb +0 -3
  8. data/app/controllers/hyrax/file_sets_controller.rb +1 -1
  9. data/app/controllers/hyrax/single_use_links_viewer_controller.rb +9 -2
  10. data/app/models/collection.rb +13 -1
  11. data/app/models/hyrax/model_registry.rb +1 -1
  12. data/app/presenters/hyrax/pcdm_member_presenter_factory.rb +2 -2
  13. data/app/presenters/hyrax/work_show_presenter.rb +2 -2
  14. data/app/search_builders/hyrax/catalog_search_builder.rb +7 -1
  15. data/app/services/hyrax/file_set_file_service.rb +10 -1
  16. data/app/services/hyrax/listeners/file_listener.rb +39 -0
  17. data/app/services/hyrax/listeners/file_metadata_listener.rb +0 -30
  18. data/app/services/hyrax/lock_manager.rb +2 -2
  19. data/app/services/hyrax/valkyrie_upload.rb +5 -2
  20. data/app/views/hyrax/uploads/_js_templates.html.erb +9 -9
  21. data/app/views/hyrax/uploads/_js_templates_branding.html.erb +3 -3
  22. data/app/views/hyrax/uploads/_js_templates_versioning.html.erb +1 -1
  23. data/chart/hyrax/Chart.yaml +1 -1
  24. data/chart/hyrax/templates/_tmplvalues.tpl +38 -0
  25. data/chart/hyrax/templates/deployment-worker.yaml +6 -2
  26. data/chart/hyrax/templates/deployment.yaml +21 -3
  27. data/chart/hyrax/values.yaml +10 -0
  28. data/documentation/developing-your-hyrax-based-app.md +14 -9
  29. data/hyrax.gemspec +2 -8
  30. data/lib/generators/hyrax/templates/config/initializers/hyrax.rb +1 -1
  31. data/lib/hyrax/publisher.rb +11 -0
  32. data/{spec → lib/hyrax/specs/shared_specs}/factories/hyrax_work.rb +11 -0
  33. data/lib/hyrax/transactions/steps/delete_all_file_metadata.rb +4 -5
  34. data/lib/hyrax/version.rb +1 -1
  35. data/template.rb +1 -1
  36. metadata +45 -78
  37. data/spec/support/book_resource.rb +0 -36
  38. data/spec/support/can_can_overrides.rb +0 -43
  39. data/spec/support/clean_solr.rb +0 -7
  40. data/spec/support/controller_level_helpers.rb +0 -27
  41. data/spec/support/factory_helpers.rb +0 -94
  42. data/spec/support/fakes/fake_actor.rb +0 -22
  43. data/spec/support/fakes/fake_authority.rb +0 -14
  44. data/spec/support/fakes/fake_search_builder_scope.rb +0 -44
  45. data/spec/support/fakes/indexing_adapter.rb +0 -17
  46. data/spec/support/fakes/test_hydra_group_service.rb +0 -55
  47. data/spec/support/features/batch_edit_actions.rb +0 -37
  48. data/spec/support/features/session_helpers.rb +0 -15
  49. data/spec/support/features/workflow.rb +0 -10
  50. data/spec/support/features.rb +0 -11
  51. data/spec/support/form_with_validations.rb +0 -15
  52. data/spec/support/input_support.rb +0 -12
  53. data/spec/support/logging_formatter.rb +0 -67
  54. data/spec/support/matchers/api_responses.rb +0 -27
  55. data/spec/support/matchers/collection_type_property_matchers.rb +0 -30
  56. data/spec/support/matchers/embargo.rb +0 -9
  57. data/spec/support/matchers/lease.rb +0 -9
  58. data/spec/support/matchers/match_valkyrie_ids_with_af_ids.rb +0 -12
  59. data/spec/support/matchers/pcdm_matchers.rb +0 -34
  60. data/spec/support/matchers/permission.rb +0 -31
  61. data/spec/support/matchers/response_matchers.rb +0 -8
  62. data/spec/support/optional_example.rb +0 -17
  63. data/spec/support/rake.rb +0 -42
  64. data/spec/support/selectors.rb +0 -112
  65. data/spec/support/shared_examples_for_collection_presenter.rb +0 -44
  66. data/spec/support/simple_work.rb +0 -28
  67. data/spec/support/spec_statistic.rb +0 -24
  68. data/spec/support/speedup.rb +0 -7
  69. data/spec/support/statistic_helper.rb +0 -10
  70. data/spec/support/valkyrie_indexing.rb +0 -2
  71. data/spec/support/wings_models.rb +0 -9
  72. /data/{spec → lib/hyrax/specs/shared_specs}/factories/access_control.rb +0 -0
  73. /data/{spec → lib/hyrax/specs/shared_specs}/factories/admin_sets.rb +0 -0
  74. /data/{spec → lib/hyrax/specs/shared_specs}/factories/admin_sets_lw.rb +0 -0
  75. /data/{spec → lib/hyrax/specs/shared_specs}/factories/administrative_sets.rb +0 -0
  76. /data/{spec → lib/hyrax/specs/shared_specs}/factories/api_items.rb +0 -0
  77. /data/{spec → lib/hyrax/specs/shared_specs}/factories/collection_branding_infos.rb +0 -0
  78. /data/{spec → lib/hyrax/specs/shared_specs}/factories/collection_type_participants.rb +0 -0
  79. /data/{spec → lib/hyrax/specs/shared_specs}/factories/collection_types.rb +0 -0
  80. /data/{spec → lib/hyrax/specs/shared_specs}/factories/collections.rb +0 -0
  81. /data/{spec → lib/hyrax/specs/shared_specs}/factories/collections_factory.rb +0 -0
  82. /data/{spec → lib/hyrax/specs/shared_specs}/factories/content_blocks.rb +0 -0
  83. /data/{spec → lib/hyrax/specs/shared_specs}/factories/counter_metrics.rb +0 -0
  84. /data/{spec → lib/hyrax/specs/shared_specs}/factories/featured_works.rb +0 -0
  85. /data/{spec → lib/hyrax/specs/shared_specs}/factories/file_sets.rb +0 -0
  86. /data/{spec → lib/hyrax/specs/shared_specs}/factories/generic_works.rb +0 -0
  87. /data/{spec → lib/hyrax/specs/shared_specs}/factories/hyrax_collection.rb +0 -0
  88. /data/{spec → lib/hyrax/specs/shared_specs}/factories/hyrax_default_admin_set.rb +0 -0
  89. /data/{spec → lib/hyrax/specs/shared_specs}/factories/hyrax_embargo.rb +0 -0
  90. /data/{spec → lib/hyrax/specs/shared_specs}/factories/hyrax_file_metadata.rb +0 -0
  91. /data/{spec → lib/hyrax/specs/shared_specs}/factories/hyrax_file_set.rb +0 -0
  92. /data/{spec → lib/hyrax/specs/shared_specs}/factories/hyrax_lease.rb +0 -0
  93. /data/{spec → lib/hyrax/specs/shared_specs}/factories/hyrax_resource.rb +0 -0
  94. /data/{spec → lib/hyrax/specs/shared_specs}/factories/object_id.rb +0 -0
  95. /data/{spec → lib/hyrax/specs/shared_specs}/factories/operations.rb +0 -0
  96. /data/{spec → lib/hyrax/specs/shared_specs}/factories/permission.rb +0 -0
  97. /data/{spec → lib/hyrax/specs/shared_specs}/factories/permission_template_accesses.rb +0 -0
  98. /data/{spec → lib/hyrax/specs/shared_specs}/factories/permission_templates.rb +0 -0
  99. /data/{spec → lib/hyrax/specs/shared_specs}/factories/proxy_deposit_requests.rb +0 -0
  100. /data/{spec → lib/hyrax/specs/shared_specs}/factories/single_use_links.rb +0 -0
  101. /data/{spec → lib/hyrax/specs/shared_specs}/factories/sipity_entities.rb +0 -0
  102. /data/{spec → lib/hyrax/specs/shared_specs}/factories/uploaded_files.rb +0 -0
  103. /data/{spec → lib/hyrax/specs/shared_specs}/factories/users.rb +0 -0
  104. /data/{spec → lib/hyrax/specs/shared_specs}/factories/workflow_actions.rb +0 -0
  105. /data/{spec → lib/hyrax/specs/shared_specs}/factories/workflow_states.rb +0 -0
  106. /data/{spec → lib/hyrax/specs/shared_specs}/factories/workflows.rb +0 -0
@@ -1,28 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Hyrax
4
- module Test
5
- ##
6
- # A generic PCDM Work, with only Hyrax "core" (required) metadata.
7
- #
8
- # @example building with FactoryBot
9
- # work = FactoryBot.build(:hyrax_work, :public, title: ['Comet in Moominland'])
10
- #
11
- # @example creating with FactoryBot
12
- # work = FactoryBot.valkyrie_create(:hyrax_work, :public, title: ['Comet in Moominland'])
13
- class SimpleWork < Hyrax::Work; end
14
-
15
- class SimpleWorkLegacy < ActiveFedora::Base
16
- include WorkBehavior
17
- include CoreMetadata
18
- end
19
-
20
- class SimpleWorkSearchBuilder < Hyrax::WorkSearchBuilder
21
- def work_types
22
- [Hyrax::Test::SimpleWorkLegacy]
23
- end
24
- end
25
- end
26
- end
27
-
28
- Wings::ModelRegistry.register(Hyrax::Test::SimpleWork, Hyrax::Test::SimpleWorkLegacy) if defined?(Wings)
@@ -1,24 +0,0 @@
1
- # frozen_string_literal: true
2
- # This is a replacement for the OpenStruct usage. The idea is to expose
3
- # an object with a common interface.
4
- class SpecStatistic
5
- def initialize(**kargs)
6
- @attributes = kargs.symbolize_keys
7
- end
8
-
9
- def [](key)
10
- @attributes[key.to_sym]
11
- end
12
-
13
- def method_missing(method_name, *arguments, &block)
14
- if @attributes.key?(method_name.to_sym)
15
- @attributes[method_name]
16
- else
17
- super
18
- end
19
- end
20
-
21
- def respond_to_missing?(method_name, include_private = false)
22
- @attributes.key?(method_name.to_sym) || super
23
- end
24
- end
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
- # Prevent recompiling assets in test.
3
- # See: https://github.com/rails/rails/pull/27271
4
- # This can be removed when we use Rails 5.1.0
5
- class << ActionView::LookupContext::DetailsKey
6
- def clear; end
7
- end
@@ -1,10 +0,0 @@
1
- # frozen_string_literal: true
2
- module StatisticHelper
3
- def statistic_date(date)
4
- date.to_datetime.to_i * 1000
5
- end
6
-
7
- RSpec.configure do |config|
8
- config.include StatisticHelper
9
- end
10
- end
@@ -1,2 +0,0 @@
1
- # frozen_string_literal: true
2
- VALKYRIE_SOLR_TEST_URL = "http://127.0.0.1:#{ENV['TEST_JETTY_PORT'] || 8984}/solr/valkyrie-test-core"
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- return if Hyrax.config.disable_wings
4
-
5
- # Clear existing Collection mapping to allow reverse lookups to resolve CollectionResource.
6
- # Then restore PcdmCollection for any code directly using that model.
7
- Wings::ModelRegistry.unregister(Hyrax::PcdmCollection)
8
- Wings::ModelRegistry.register(CollectionResource, ::Collection)
9
- Wings::ModelRegistry.register(Hyrax::PcdmCollection, ::Collection)