blacklight 7.10.0 → 7.11.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (147) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +56 -7
  3. data/.rubocop_todo.yml +113 -98
  4. data/.travis.yml +0 -2
  5. data/Gemfile +0 -7
  6. data/README.md +1 -0
  7. data/VERSION +1 -1
  8. data/app/assets/javascripts/blacklight/blacklight.js +1 -2
  9. data/app/components/blacklight/document/bookmark_component.html.erb +16 -0
  10. data/app/components/blacklight/document/bookmark_component.rb +19 -0
  11. data/app/components/blacklight/document/citation_component.html.erb +9 -0
  12. data/app/components/blacklight/document/citation_component.rb +24 -0
  13. data/app/components/blacklight/document/more_like_this_component.html.erb +12 -0
  14. data/app/components/blacklight/document/more_like_this_component.rb +21 -0
  15. data/app/components/blacklight/document_component.html.erb +29 -0
  16. data/app/components/blacklight/document_component.rb +121 -0
  17. data/app/components/blacklight/document_metadata_component.html.erb +5 -0
  18. data/app/components/blacklight/document_metadata_component.rb +21 -0
  19. data/app/components/blacklight/facet_item_component.rb +6 -6
  20. data/app/components/blacklight/metadata_field_component.html.erb +8 -0
  21. data/app/components/blacklight/metadata_field_component.rb +31 -0
  22. data/app/components/blacklight/metadata_field_layout_component.html.erb +2 -0
  23. data/app/components/blacklight/metadata_field_layout_component.rb +16 -0
  24. data/app/components/blacklight/response/facet_group_component.html.erb +25 -0
  25. data/app/components/blacklight/response/facet_group_component.rb +19 -0
  26. data/app/components/blacklight/response/pagination_component.html.erb +3 -0
  27. data/app/components/blacklight/response/pagination_component.rb +17 -0
  28. data/app/components/blacklight/response/sort_component.html.erb +6 -0
  29. data/app/components/blacklight/response/sort_component.rb +16 -0
  30. data/app/components/blacklight/response/spellcheck_component.html.erb +7 -0
  31. data/app/components/blacklight/response/spellcheck_component.rb +20 -0
  32. data/app/components/blacklight/search_bar_component.html.erb +29 -0
  33. data/app/components/blacklight/search_bar_component.rb +45 -0
  34. data/app/components/blacklight/search_context_component.html.erb +10 -0
  35. data/app/components/blacklight/search_context_component.rb +30 -0
  36. data/app/components/blacklight/system/dropdown_component.html.erb +12 -0
  37. data/app/components/blacklight/system/dropdown_component.rb +42 -0
  38. data/app/components/blacklight/system/modal_component.html.erb +25 -0
  39. data/app/components/blacklight/system/modal_component.rb +9 -0
  40. data/app/controllers/concerns/blacklight/catalog.rb +5 -4
  41. data/app/controllers/concerns/blacklight/default_component_configuration.rb +2 -2
  42. data/app/controllers/concerns/blacklight/searchable.rb +11 -0
  43. data/app/helpers/blacklight/blacklight_helper_behavior.rb +14 -3
  44. data/app/helpers/blacklight/catalog_helper_behavior.rb +1 -0
  45. data/app/helpers/blacklight/component_helper_behavior.rb +2 -2
  46. data/app/helpers/blacklight/configuration_helper_behavior.rb +6 -0
  47. data/app/helpers/blacklight/facets_helper_behavior.rb +1 -1
  48. data/app/helpers/blacklight/icon_helper_behavior.rb +2 -2
  49. data/app/helpers/blacklight/search_history_constraints_helper_behavior.rb +7 -10
  50. data/app/helpers/blacklight/url_helper_behavior.rb +3 -3
  51. data/app/javascript/blacklight/search_context.js +0 -1
  52. data/app/models/blacklight/icon.rb +1 -0
  53. data/app/models/concerns/blacklight/document.rb +1 -0
  54. data/app/models/record_mailer.rb +1 -1
  55. data/app/presenters/blacklight/document_presenter.rb +7 -1
  56. data/app/presenters/blacklight/field_presenter.rb +1 -0
  57. data/app/presenters/blacklight/rendering/microdata.rb +1 -1
  58. data/app/services/blacklight/field_retriever.rb +1 -0
  59. data/app/services/blacklight/search_service.rb +1 -0
  60. data/app/views/catalog/_bookmark_control.html.erb +1 -36
  61. data/app/views/catalog/_citation.html.erb +4 -25
  62. data/app/views/catalog/_did_you_mean.html.erb +1 -5
  63. data/app/views/catalog/_document.atom.builder +3 -3
  64. data/app/views/catalog/_document.html.erb +5 -5
  65. data/app/views/catalog/_facet_group.html.erb +5 -19
  66. data/app/views/catalog/_index.html.erb +1 -10
  67. data/app/views/catalog/_paginate_compact.html.erb +6 -6
  68. data/app/views/catalog/_per_page_widget.html.erb +9 -12
  69. data/app/views/catalog/_previous_next_doc.html.erb +1 -12
  70. data/app/views/catalog/_results_pagination.html.erb +1 -3
  71. data/app/views/catalog/_search_form.html.erb +6 -27
  72. data/app/views/catalog/_show.html.erb +6 -8
  73. data/app/views/catalog/_show_main_content.html.erb +19 -13
  74. data/app/views/catalog/_show_sidebar.html.erb +1 -11
  75. data/app/views/catalog/_sort_widget.html.erb +5 -12
  76. data/app/views/catalog/email.html.erb +7 -7
  77. data/app/views/catalog/email_success.html.erb +5 -12
  78. data/app/views/catalog/facet.html.erb +14 -17
  79. data/app/views/catalog/index.atom.builder +0 -1
  80. data/app/views/catalog/sms.html.erb +7 -7
  81. data/app/views/catalog/sms_success.html.erb +5 -12
  82. data/blacklight.gemspec +3 -2
  83. data/config/i18n-tasks.yml +3 -0
  84. data/config/locales/blacklight.ar.yml +2 -0
  85. data/config/locales/blacklight.de.yml +2 -0
  86. data/config/locales/blacklight.en.yml +2 -0
  87. data/config/locales/blacklight.es.yml +4 -2
  88. data/config/locales/blacklight.fr.yml +2 -0
  89. data/config/locales/blacklight.hu.yml +2 -0
  90. data/config/locales/blacklight.it.yml +2 -0
  91. data/config/locales/blacklight.nl.yml +2 -0
  92. data/config/locales/blacklight.pt-BR.yml +2 -0
  93. data/config/locales/blacklight.sq.yml +2 -0
  94. data/config/locales/blacklight.zh.yml +2 -0
  95. data/lib/blacklight.rb +10 -0
  96. data/lib/blacklight/configuration.rb +8 -3
  97. data/lib/blacklight/configuration/fields.rb +5 -7
  98. data/lib/blacklight/engine.rb +1 -1
  99. data/lib/blacklight/nested_open_struct_with_hash_access.rb +1 -0
  100. data/lib/blacklight/search_state.rb +21 -7
  101. data/lib/blacklight/solr/response.rb +1 -0
  102. data/lib/blacklight/solr/response/facets.rb +9 -8
  103. data/lib/generators/blacklight/models_generator.rb +2 -0
  104. data/lib/generators/blacklight/templates/config/blacklight.yml +1 -0
  105. data/lib/railties/blacklight.rake +18 -13
  106. data/package.json +1 -1
  107. data/spec/components/blacklight/constraint_layout_component_spec.rb +1 -0
  108. data/spec/components/blacklight/document_component_spec.rb +129 -0
  109. data/spec/components/blacklight/document_metadata_component_spec.rb +0 -0
  110. data/spec/components/blacklight/metadata_field_component_spec.rb +41 -0
  111. data/spec/controllers/blacklight/search_fields_spec.rb +2 -2
  112. data/spec/controllers/catalog_controller_spec.rb +20 -0
  113. data/spec/features/search_context_spec.rb +12 -2
  114. data/spec/features/search_filters_spec.rb +4 -0
  115. data/spec/features/search_results_spec.rb +1 -0
  116. data/spec/features/sitelinks_search_box.rb +1 -0
  117. data/spec/helpers/blacklight/configuration_helper_behavior_spec.rb +3 -0
  118. data/spec/helpers/blacklight/render_partials_helper_behavior_spec.rb +1 -0
  119. data/spec/helpers/blacklight/search_history_constraints_helper_behavior_spec.rb +2 -0
  120. data/spec/helpers/blacklight/url_helper_behavior_spec.rb +1 -1
  121. data/spec/helpers/blacklight_helper_spec.rb +14 -1
  122. data/spec/helpers/catalog_helper_spec.rb +1 -4
  123. data/spec/lib/blacklight/search_state_spec.rb +32 -0
  124. data/spec/models/blacklight/configuration_spec.rb +5 -0
  125. data/spec/models/blacklight/document/cache_key_spec.rb +1 -0
  126. data/spec/models/blacklight/document/email_spec.rb +2 -0
  127. data/spec/models/blacklight/document/sms_spec.rb +2 -0
  128. data/spec/models/blacklight/facet_paginator_spec.rb +3 -0
  129. data/spec/models/blacklight/icon_spec.rb +6 -0
  130. data/spec/models/blacklight/solr/document_spec.rb +10 -0
  131. data/spec/models/blacklight/solr/response/facets_spec.rb +1 -1
  132. data/spec/models/blacklight/solr/response/group_response_spec.rb +2 -0
  133. data/spec/models/blacklight/solr/search_builder_spec.rb +10 -0
  134. data/spec/models/record_mailer_spec.rb +9 -0
  135. data/spec/models/search_spec.rb +1 -0
  136. data/spec/presenters/blacklight/show_presenter_spec.rb +8 -0
  137. data/spec/routing/catalog_routing_spec.rb +4 -0
  138. data/spec/services/blacklight/search_service_spec.rb +7 -0
  139. data/spec/spec_helper.rb +1 -1
  140. data/spec/views/catalog/_document.html.erb_spec.rb +13 -11
  141. data/spec/views/catalog/_facet_group.html.erb_spec.rb +1 -0
  142. data/spec/views/catalog/_facet_index_navigation.html.erb_spec.rb +1 -0
  143. data/spec/views/catalog/_previous_next_doc.html.erb_spec.rb +4 -0
  144. data/spec/views/catalog/index.atom.builder_spec.rb +40 -3
  145. data/spec/views/catalog/show.html.erb_spec.rb +14 -0
  146. data/tasks/blacklight.rake +7 -7
  147. metadata +56 -6
@@ -19,6 +19,7 @@ ensure
19
19
  system "docker-compose stop solr"
20
20
  end
21
21
 
22
+ # rubocop:disable Rails/RakeEnvironment
22
23
  desc "Run test suite"
23
24
  task :ci do
24
25
  with_solr do
@@ -54,14 +55,13 @@ namespace :blacklight do
54
55
  Rake::Task['blacklight:internal:seed'].invoke
55
56
 
56
57
  within_test_app do
57
- begin
58
- puts "Starting Blacklight (Rails server)"
59
- system "bin/rails s #{args[:rails_server_args]}"
60
- rescue Interrupt
61
- # We expect folks to Ctrl-c to stop the server so don't barf at them
62
- puts "\nStopping Blacklight (Rails server)"
63
- end
58
+ puts "Starting Blacklight (Rails server)"
59
+ system "bin/rails s #{args[:rails_server_args]}"
60
+ rescue Interrupt
61
+ # We expect folks to Ctrl-c to stop the server so don't barf at them
62
+ puts "\nStopping Blacklight (Rails server)"
64
63
  end
65
64
  end
66
65
  end
67
66
  end
67
+ # rubocop:enable Rails/RakeEnvironment
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.10.0
4
+ version: 7.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Rochkind
@@ -17,7 +17,7 @@ authors:
17
17
  autorequire:
18
18
  bindir: exe
19
19
  cert_chain: []
20
- date: 2020-07-06 00:00:00.000000000 Z
20
+ date: 2020-10-01 00:00:00.000000000 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: rails
@@ -261,28 +261,42 @@ dependencies:
261
261
  requirements:
262
262
  - - "~>"
263
263
  - !ruby/object:Gem::Version
264
- version: 0.63.0
264
+ version: '0.85'
265
265
  type: :development
266
266
  prerelease: false
267
267
  version_requirements: !ruby/object:Gem::Requirement
268
268
  requirements:
269
269
  - - "~>"
270
270
  - !ruby/object:Gem::Version
271
- version: 0.63.0
271
+ version: '0.85'
272
+ - !ruby/object:Gem::Dependency
273
+ name: rubocop-rails
274
+ requirement: !ruby/object:Gem::Requirement
275
+ requirements:
276
+ - - "~>"
277
+ - !ruby/object:Gem::Version
278
+ version: '2.6'
279
+ type: :development
280
+ prerelease: false
281
+ version_requirements: !ruby/object:Gem::Requirement
282
+ requirements:
283
+ - - "~>"
284
+ - !ruby/object:Gem::Version
285
+ version: '2.6'
272
286
  - !ruby/object:Gem::Dependency
273
287
  name: rubocop-rspec
274
288
  requirement: !ruby/object:Gem::Requirement
275
289
  requirements:
276
290
  - - "~>"
277
291
  - !ruby/object:Gem::Version
278
- version: '1.8'
292
+ version: '1.43'
279
293
  type: :development
280
294
  prerelease: false
281
295
  version_requirements: !ruby/object:Gem::Requirement
282
296
  requirements:
283
297
  - - "~>"
284
298
  - !ruby/object:Gem::Version
285
- version: '1.8'
299
+ version: '1.43'
286
300
  - !ruby/object:Gem::Dependency
287
301
  name: i18n-tasks
288
302
  requirement: !ruby/object:Gem::Requirement
@@ -354,6 +368,16 @@ files:
354
368
  - app/builders/blacklight/action_builder.rb
355
369
  - app/components/blacklight/constraint_layout_component.html.erb
356
370
  - app/components/blacklight/constraint_layout_component.rb
371
+ - app/components/blacklight/document/bookmark_component.html.erb
372
+ - app/components/blacklight/document/bookmark_component.rb
373
+ - app/components/blacklight/document/citation_component.html.erb
374
+ - app/components/blacklight/document/citation_component.rb
375
+ - app/components/blacklight/document/more_like_this_component.html.erb
376
+ - app/components/blacklight/document/more_like_this_component.rb
377
+ - app/components/blacklight/document_component.html.erb
378
+ - app/components/blacklight/document_component.rb
379
+ - app/components/blacklight/document_metadata_component.html.erb
380
+ - app/components/blacklight/document_metadata_component.rb
357
381
  - app/components/blacklight/facet_field_component.html.erb
358
382
  - app/components/blacklight/facet_field_component.rb
359
383
  - app/components/blacklight/facet_field_list_component.html.erb
@@ -361,6 +385,26 @@ files:
361
385
  - app/components/blacklight/facet_field_no_layout_component.rb
362
386
  - app/components/blacklight/facet_item_component.rb
363
387
  - app/components/blacklight/facet_item_pivot_component.rb
388
+ - app/components/blacklight/metadata_field_component.html.erb
389
+ - app/components/blacklight/metadata_field_component.rb
390
+ - app/components/blacklight/metadata_field_layout_component.html.erb
391
+ - app/components/blacklight/metadata_field_layout_component.rb
392
+ - app/components/blacklight/response/facet_group_component.html.erb
393
+ - app/components/blacklight/response/facet_group_component.rb
394
+ - app/components/blacklight/response/pagination_component.html.erb
395
+ - app/components/blacklight/response/pagination_component.rb
396
+ - app/components/blacklight/response/sort_component.html.erb
397
+ - app/components/blacklight/response/sort_component.rb
398
+ - app/components/blacklight/response/spellcheck_component.html.erb
399
+ - app/components/blacklight/response/spellcheck_component.rb
400
+ - app/components/blacklight/search_bar_component.html.erb
401
+ - app/components/blacklight/search_bar_component.rb
402
+ - app/components/blacklight/search_context_component.html.erb
403
+ - app/components/blacklight/search_context_component.rb
404
+ - app/components/blacklight/system/dropdown_component.html.erb
405
+ - app/components/blacklight/system/dropdown_component.rb
406
+ - app/components/blacklight/system/modal_component.html.erb
407
+ - app/components/blacklight/system/modal_component.rb
364
408
  - app/controllers/bookmarks_controller.rb
365
409
  - app/controllers/catalog_controller.rb
366
410
  - app/controllers/concerns/blacklight/base.rb
@@ -622,9 +666,12 @@ files:
622
666
  - lib/railties/blacklight.rake
623
667
  - package.json
624
668
  - spec/components/blacklight/constraint_layout_component_spec.rb
669
+ - spec/components/blacklight/document_component_spec.rb
670
+ - spec/components/blacklight/document_metadata_component_spec.rb
625
671
  - spec/components/blacklight/facet_field_list_component_spec.rb
626
672
  - spec/components/blacklight/facet_item_component_spec.rb
627
673
  - spec/components/blacklight/facet_item_pivot_component_spec.rb
674
+ - spec/components/blacklight/metadata_field_component_spec.rb
628
675
  - spec/controllers/alternate_controller_spec.rb
629
676
  - spec/controllers/application_controller_spec.rb
630
677
  - spec/controllers/blacklight/base_spec.rb
@@ -779,9 +826,12 @@ summary: Blacklight provides a discovery interface for any Solr (http://lucene.a
779
826
  index.
780
827
  test_files:
781
828
  - spec/components/blacklight/constraint_layout_component_spec.rb
829
+ - spec/components/blacklight/document_component_spec.rb
830
+ - spec/components/blacklight/document_metadata_component_spec.rb
782
831
  - spec/components/blacklight/facet_field_list_component_spec.rb
783
832
  - spec/components/blacklight/facet_item_component_spec.rb
784
833
  - spec/components/blacklight/facet_item_pivot_component_spec.rb
834
+ - spec/components/blacklight/metadata_field_component_spec.rb
785
835
  - spec/controllers/alternate_controller_spec.rb
786
836
  - spec/controllers/application_controller_spec.rb
787
837
  - spec/controllers/blacklight/base_spec.rb