hyrax 2.1.0.rc1 → 2.1.0.rc2

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.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/.github/CONTRIBUTING.md +6 -6
  3. data/README.md +18 -8
  4. data/app/assets/javascripts/hyrax/app.js.erb +1 -1
  5. data/app/assets/javascripts/hyrax/collections.js +16 -13
  6. data/app/assets/javascripts/hyrax/monkey_patch_turbolinks.js.coffee +12 -0
  7. data/app/assets/stylesheets/hyrax/dashboard.scss +4 -0
  8. data/app/controllers/hyrax/dashboard/collections_controller.rb +4 -7
  9. data/app/controllers/hyrax/my_controller.rb +1 -0
  10. data/app/helpers/hyrax/collections_helper.rb +9 -0
  11. data/app/models/sipity/workflow.rb +6 -7
  12. data/app/presenters/hyrax/work_show_presenter.rb +4 -1
  13. data/app/services/hyrax/adapters/nesting_index_adapter.rb +1 -0
  14. data/app/services/hyrax/collection_types/create_service.rb +2 -2
  15. data/app/services/hyrax/file_set_fixity_check_service.rb +1 -1
  16. data/app/views/hyrax/dashboard/collections/_form.html.erb +1 -1
  17. data/app/views/hyrax/dashboard/collections/_form_for_select_collection.html.erb +11 -6
  18. data/app/views/hyrax/dashboard/collections/_modal_parent_collection_remove_deny.html.erb +14 -0
  19. data/app/views/hyrax/dashboard/collections/_show_add_items_actions.html.erb +1 -1
  20. data/app/views/hyrax/dashboard/collections/_show_parent_collection_row.html.erb +11 -1
  21. data/app/views/hyrax/dashboard/collections/show.html.erb +1 -0
  22. data/app/views/hyrax/my/collections/_modal_collection_types_to_create.html.erb +1 -1
  23. data/app/views/hyrax/my/collections/index.html.erb +8 -2
  24. data/app/views/hyrax/my/works/_tabs.html.erb +1 -2
  25. data/app/views/hyrax/my/works/index.html.erb +11 -0
  26. data/config/locales/hyrax.de.yml +19 -8
  27. data/config/locales/hyrax.en.yml +14 -3
  28. data/config/locales/hyrax.es.yml +13 -2
  29. data/config/locales/hyrax.fr.yml +13 -2
  30. data/config/locales/hyrax.it.yml +13 -2
  31. data/config/locales/hyrax.pt-BR.yml +13 -2
  32. data/config/locales/hyrax.zh.yml +13 -2
  33. data/hyrax.gemspec +1 -1
  34. data/lib/generators/hyrax/templates/db/migrate/20170810190549_update_collection_type_column_options.rb.erb +9 -1
  35. data/lib/hyrax/version.rb +1 -1
  36. data/spec/controllers/hyrax/dashboard/collections_controller_spec.rb +2 -3
  37. data/spec/features/collection_multi_membership_spec.rb +32 -33
  38. data/spec/features/dashboard/all_works.rb +2 -1
  39. data/spec/features/dashboard/collection_spec.rb +35 -13
  40. data/spec/features/work_show_spec.rb +6 -6
  41. data/spec/helpers/hyrax/collections_helper_spec.rb +16 -0
  42. data/spec/models/sipity/workflow_spec.rb +9 -0
  43. data/spec/presenters/hyrax/work_show_presenter_spec.rb +2 -2
  44. data/spec/services/hyrax/adapters/nesting_index_adapter_spec.rb +7 -3
  45. data/spec/services/hyrax/collection_types/create_service_spec.rb +2 -2
  46. data/spec/services/hyrax/collections_service_spec.rb +1 -1
  47. data/spec/services/hyrax/file_set_fixity_check_service_spec.rb +13 -0
  48. data/spec/spec_helper.rb +1 -0
  49. data/spec/support/optional_example.rb +16 -0
  50. data/spec/support/selectors.rb +15 -1
  51. data/spec/views/hyrax/dashboard/collections/_form_for_select_collection.html.erb_spec.rb +13 -21
  52. data/spec/views/hyrax/dashboard/collections/_show_add_items_actions.html.erb_spec.rb +5 -3
  53. data/spec/views/hyrax/dashboard/collections/_show_parent_collection_row.html.erb_spec.rb +35 -15
  54. data/spec/views/hyrax/my/collections/index.html.erb_spec.rb +34 -0
  55. data/spec/views/hyrax/my/works/index.html.erb_spec.rb +3 -0
  56. data/template.rb +1 -1
  57. metadata +15 -4
@@ -0,0 +1,34 @@
1
+ RSpec.describe "hyrax/my/collections/index.html.erb", type: :view do
2
+ let(:resp) { double(docs: "", total_count: 11) }
3
+
4
+ before do
5
+ assign(:managed_collection_count, 0)
6
+ assign(:response, resp)
7
+
8
+ allow(view).to receive(:can?).with(any_args).and_return(false)
9
+
10
+ stub_template "hyrax/my/collections/_scripts" => " "
11
+ stub_template "hyrax/my/collections/_tabs" => " "
12
+ stub_template "hyrax/my/collections/_default_group" => " "
13
+ stub_template "hyrax/my/collections/_search_header" => " "
14
+ stub_template "hyrax/my/collections/_results_pagination" => " "
15
+
16
+ stub_template "hyrax/my/collections/_modal_add_to_collection" => " "
17
+ stub_template "hyrax/my/collections/_modal_add_to_collection_deny" => " "
18
+ stub_template "hyrax/my/collections/_modal_add_to_collection_permission_deny" => " "
19
+ stub_template "hyrax/my/collections/_modal_collection_types_to_create" => " "
20
+ stub_template "hyrax/my/collections/_modal_delete_admin_set_deny" => " "
21
+ stub_template "hyrax/my/collections/_modal_delete_collection" => " "
22
+ stub_template "hyrax/my/collections/_modal_delete_collection_deny" => " "
23
+ stub_template "hyrax/my/collections/_modal_delete_collections_deny" => " "
24
+ stub_template "hyrax/my/collections/_modal_delete_deny" => " "
25
+ stub_template "hyrax/my/collections/_modal_delete_empty_collection" => " "
26
+ stub_template "hyrax/my/collections/_modal_delete_selected_collections" => " "
27
+ stub_template "hyrax/my/collections/_modal_edit_deny" => " "
28
+ end
29
+
30
+ it 'indicate the number of collections to be 11' do
31
+ render
32
+ expect(rendered).to have_content("11 collections in the repository")
33
+ end
34
+ end
@@ -1,9 +1,12 @@
1
1
  RSpec.describe 'hyrax/my/works/index.html.erb', type: :view do
2
+ let(:resp) { double(docs: "", total_count: 11) }
3
+
2
4
  before do
3
5
  allow(view).to receive(:current_ability).and_return(ability)
4
6
  allow(view).to receive(:provide).and_yield
5
7
  allow(view).to receive(:provide).with(:page_title, String)
6
8
  assign(:create_work_presenter, presenter)
9
+ assign(:response, resp)
7
10
  allow(view).to receive(:can?).and_return(true)
8
11
  allow(Flipflop).to receive(:batch_upload?).and_return(batch_enabled)
9
12
  stub_template 'shared/_select_work_type_modal.html.erb' => 'modal'
data/template.rb CHANGED
@@ -1,4 +1,4 @@
1
- gem 'hyrax', '2.1.0.rc1'
1
+ gem 'hyrax', '2.1.0.rc2'
2
2
  run 'bundle install'
3
3
  generate 'hyrax:install', '-f'
4
4
  rails_command 'db:migrate'
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: 2.1.0.rc1
4
+ version: 2.1.0.rc2
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: 2018-04-26 00:00:00.000000000 Z
17
+ date: 2018-05-08 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: rails
@@ -264,16 +264,22 @@ dependencies:
264
264
  name: hydra-editor
265
265
  requirement: !ruby/object:Gem::Requirement
266
266
  requirements:
267
- - - "~>"
267
+ - - ">="
268
268
  - !ruby/object:Gem::Version
269
269
  version: '3.3'
270
+ - - "<"
271
+ - !ruby/object:Gem::Version
272
+ version: '5.0'
270
273
  type: :runtime
271
274
  prerelease: false
272
275
  version_requirements: !ruby/object:Gem::Requirement
273
276
  requirements:
274
- - - "~>"
277
+ - - ">="
275
278
  - !ruby/object:Gem::Version
276
279
  version: '3.3'
280
+ - - "<"
281
+ - !ruby/object:Gem::Version
282
+ version: '5.0'
277
283
  - !ruby/object:Gem::Dependency
278
284
  name: hydra-head
279
285
  requirement: !ruby/object:Gem::Requirement
@@ -1875,6 +1881,7 @@ files:
1875
1881
  - app/views/hyrax/dashboard/collections/_form_share_table.html.erb
1876
1882
  - app/views/hyrax/dashboard/collections/_list_collections.html.erb
1877
1883
  - app/views/hyrax/dashboard/collections/_list_works.html.erb
1884
+ - app/views/hyrax/dashboard/collections/_modal_parent_collection_remove_deny.html.erb
1878
1885
  - app/views/hyrax/dashboard/collections/_modal_remove_from_collection.html.erb
1879
1886
  - app/views/hyrax/dashboard/collections/_modal_remove_sub_collection.html.erb
1880
1887
  - app/views/hyrax/dashboard/collections/_show_actions.html.erb
@@ -2806,6 +2813,7 @@ files:
2806
2813
  - spec/support/matchers/api_responses.rb
2807
2814
  - spec/support/matchers/collection_type_property_matchers.rb
2808
2815
  - spec/support/matchers/response_matchers.rb
2816
+ - spec/support/optional_example.rb
2809
2817
  - spec/support/rake.rb
2810
2818
  - spec/support/selectors.rb
2811
2819
  - spec/support/spec_statistic.rb
@@ -2927,6 +2935,7 @@ files:
2927
2935
  - spec/views/hyrax/my/_search_header.html.erb_spec.rb
2928
2936
  - spec/views/hyrax/my/_work_action_menu.html.erb_spec.rb
2929
2937
  - spec/views/hyrax/my/collections/_list_collections.html.erb_spec.rb
2938
+ - spec/views/hyrax/my/collections/index.html.erb_spec.rb
2930
2939
  - spec/views/hyrax/my/facet.html.erb_spec.rb
2931
2940
  - spec/views/hyrax/my/works/_list_works.html.erb_spec.rb
2932
2941
  - spec/views/hyrax/my/works/index.html.erb_spec.rb
@@ -3532,6 +3541,7 @@ test_files:
3532
3541
  - spec/support/matchers/api_responses.rb
3533
3542
  - spec/support/matchers/collection_type_property_matchers.rb
3534
3543
  - spec/support/matchers/response_matchers.rb
3544
+ - spec/support/optional_example.rb
3535
3545
  - spec/support/rake.rb
3536
3546
  - spec/support/selectors.rb
3537
3547
  - spec/support/spec_statistic.rb
@@ -3653,6 +3663,7 @@ test_files:
3653
3663
  - spec/views/hyrax/my/_search_header.html.erb_spec.rb
3654
3664
  - spec/views/hyrax/my/_work_action_menu.html.erb_spec.rb
3655
3665
  - spec/views/hyrax/my/collections/_list_collections.html.erb_spec.rb
3666
+ - spec/views/hyrax/my/collections/index.html.erb_spec.rb
3656
3667
  - spec/views/hyrax/my/facet.html.erb_spec.rb
3657
3668
  - spec/views/hyrax/my/works/_list_works.html.erb_spec.rb
3658
3669
  - spec/views/hyrax/my/works/index.html.erb_spec.rb