commonwealth-vlr-engine 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -0
  3. data/app/assets/stylesheets/commonwealth-vlr-engine/advanced_search.scss +1 -1
  4. data/app/assets/stylesheets/commonwealth-vlr-engine/basic_search.scss +6 -1
  5. data/app/assets/stylesheets/commonwealth-vlr-engine/commonwealth-vlr-engine.css +1 -0
  6. data/app/assets/stylesheets/commonwealth-vlr-engine/folders.scss +1 -1
  7. data/app/assets/stylesheets/commonwealth-vlr-engine/header.scss +9 -0
  8. data/app/assets/stylesheets/commonwealth-vlr-engine/home.scss +9 -0
  9. data/app/assets/stylesheets/commonwealth-vlr-engine/twitter_typeahead.scss +9 -0
  10. data/app/controllers/blacklight_advanced_search/advanced_controller.rb +12 -48
  11. data/app/controllers/bookmarks_controller.rb +8 -8
  12. data/app/controllers/collections_controller.rb +10 -26
  13. data/app/controllers/folder_items_actions_controller.rb +2 -2
  14. data/app/controllers/folders_controller.rb +10 -6
  15. data/app/controllers/image_viewer_controller.rb +2 -2
  16. data/app/controllers/institutions_controller.rb +13 -12
  17. data/app/controllers/ocr_search_controller.rb +2 -8
  18. data/app/controllers/saved_searches_controller.rb +8 -0
  19. data/app/controllers/search_history_controller.rb +8 -0
  20. data/app/helpers/commonwealth_vlr_engine/application_helper.rb +37 -37
  21. data/app/helpers/commonwealth_vlr_engine/blacklight_helper.rb +3 -11
  22. data/app/helpers/commonwealth_vlr_engine/blacklight_url_helper.rb +1 -16
  23. data/app/helpers/commonwealth_vlr_engine/catalog_helper.rb +1 -1
  24. data/app/helpers/commonwealth_vlr_engine/collections_helper_behavior.rb +1 -1
  25. data/app/helpers/commonwealth_vlr_engine/institutions_helper_behavior.rb +2 -2
  26. data/app/helpers/commonwealth_vlr_engine/vlr_blacklight_maps_helper_behavior.rb +10 -6
  27. data/app/views/advanced/_advanced_search_fields.html.erb +2 -2
  28. data/app/views/advanced/_advanced_search_form.html.erb +2 -2
  29. data/app/views/advanced/index.html.erb +1 -1
  30. data/app/views/bookmarks/index.html.erb +1 -1
  31. data/app/views/catalog/_basic_search.html.erb +5 -3
  32. data/app/views/catalog/_constraints.html.erb +1 -1
  33. data/app/views/catalog/_facet_limit_series.html.erb +7 -5
  34. data/app/views/catalog/_index_gallery.html.erb +1 -3
  35. data/app/views/catalog/{_index_map_institutions.html.erb → _index_mapview_institutions.html.erb} +0 -0
  36. data/app/views/catalog/_search_form.html.erb +14 -4
  37. data/app/views/catalog/_show_partials/_show_default_metadata.html.erb +9 -0
  38. data/app/views/catalog/_show_partials/_show_flagged_notice.html.erb +1 -1
  39. data/app/views/catalog/_show_tools.html.erb +2 -2
  40. data/app/views/catalog/_zero_results.html.erb +1 -1
  41. data/app/views/collections/_search_form_collection.html.erb +1 -1
  42. data/app/views/collections/show.html.erb +1 -1
  43. data/app/views/feedback/complete.html.erb +1 -1
  44. data/app/views/institutions/_search_form_institution.html.erb +1 -1
  45. data/app/views/layouts/commonwealth-vlr-engine.html.erb +2 -2
  46. data/app/views/ocr_search/_search_form_ocr.html.erb +1 -1
  47. data/app/views/pages/home.html.erb +2 -1
  48. data/app/views/saved_searches/index.html.erb +4 -4
  49. data/app/views/search_history/index.html.erb +5 -5
  50. data/app/views/shared/_folder_item_actions.html.erb +1 -2
  51. data/app/views/shared/_footer.html.erb +1 -1
  52. data/app/views/shared/_header_navbar.html.erb +1 -1
  53. data/app/views/shared/_nav_links.html.erb +2 -2
  54. data/app/views/shared/_search_form_header.html.erb +9 -3
  55. data/app/views/shared/_sitelinks_search_box.html.erb +12 -0
  56. data/app/views/shared/_tools.html.erb +2 -2
  57. data/app/views/shared/_user_util_links.html.erb +2 -2
  58. data/app/views/users/show.html.erb +2 -2
  59. data/commonwealth-vlr-engine.gemspec +4 -4
  60. data/config/initializers/assets.rb +2 -0
  61. data/config/locales/commonwealth-vlr-engine.en.yml +4 -0
  62. data/config/routes.rb +1 -0
  63. data/lib/commonwealth-vlr-engine.rb +6 -16
  64. data/lib/commonwealth-vlr-engine/controller_override.rb +82 -47
  65. data/lib/commonwealth-vlr-engine/engine.rb +6 -4
  66. data/lib/commonwealth-vlr-engine/render_constraints_override.rb +3 -2
  67. data/lib/commonwealth-vlr-engine/search_builder/collections_search_builder.rb +14 -0
  68. data/lib/commonwealth-vlr-engine/{commonwealth_search_builder.rb → search_builder/commonwealth_search_builder_behavior.rb} +9 -2
  69. data/lib/commonwealth-vlr-engine/search_builder/flagged_search_builder.rb +14 -0
  70. data/lib/commonwealth-vlr-engine/search_builder/institutions_search_builder.rb +11 -0
  71. data/lib/commonwealth-vlr-engine/search_builder/mlt_search_builder.rb +15 -0
  72. data/lib/commonwealth-vlr-engine/search_builder/ocr_search_builder.rb +10 -0
  73. data/lib/commonwealth-vlr-engine/version.rb +1 -1
  74. data/lib/generators/commonwealth_vlr_engine/controller_generator.rb +1 -2
  75. data/lib/generators/commonwealth_vlr_engine/localassets_generator.rb +1 -1
  76. data/lib/generators/commonwealth_vlr_engine/model_generator.rb +3 -16
  77. data/lib/generators/commonwealth_vlr_engine/routes_generator.rb +8 -0
  78. data/lib/generators/commonwealth_vlr_engine/templates/commonwealth_search_builder.rb +17 -0
  79. data/lib/generators/commonwealth_vlr_engine/templates/{commonwealth_vlr_engine.css.scss → commonwealth_vlr_engine.scss} +0 -0
  80. data/spec/controllers/catalog_controller_spec.rb +20 -3
  81. data/spec/controllers/collections_controller_spec.rb +2 -2
  82. data/spec/controllers/folder_items_actions_controller_spec.rb +2 -2
  83. data/spec/controllers/institutions_controller_spec.rb +13 -0
  84. data/spec/controllers/ocr_search_controller_spec.rb +4 -0
  85. data/spec/features/more_like_this_search_spec.rb +1 -1
  86. data/spec/features/ocr_search/index_spec.rb +1 -1
  87. data/spec/helpers/institutions_helper_spec.rb +10 -5
  88. data/spec/lib/commonwealth-vlr-engine/search_builder/collections_search_builder_spec.rb +19 -0
  89. data/spec/lib/commonwealth-vlr-engine/search_builder/commonwealth_search_builder_behavior_spec.rb +116 -0
  90. data/spec/lib/commonwealth-vlr-engine/search_builder/flagged_search_builder_spec.rb +19 -0
  91. data/spec/lib/commonwealth-vlr-engine/search_builder/institutions_search_builder_spec.rb +19 -0
  92. data/spec/lib/commonwealth-vlr-engine/search_builder/mlt_search_builder_spec.rb +19 -0
  93. data/spec/lib/commonwealth-vlr-engine/search_builder/ocr_search_builder_spec.rb +19 -0
  94. data/spec/test_app_templates/lib/generators/test_app_generator.rb +2 -0
  95. data/tasks/vlr_engine.rake +1 -1
  96. metadata +38 -23
  97. data/app/views/bookmarks/_tools.html.erb +0 -25
  98. data/app/views/catalog/_index_list_default.html.erb +0 -13
  99. data/lib/commonwealth-vlr-engine/route_sets.rb +0 -49
  100. data/lib/commonwealth-vlr-engine/routes.rb +0 -21
  101. data/spec/lib/commonwealth-vlr-engine/commonwealth_search_builder_spec.rb +0 -101
  102. data/spec/lib/commonwealth-vlr-engine/controller_override_spec.rb +0 -41
@@ -1,41 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe CommonwealthVlrEngine::ControllerOverride do
4
-
5
- class ControllerOverrideTestClass < CatalogController
6
- #include CommonwealthVlrEngine::ControllerOverride
7
- end
8
-
9
- before { @obj = ControllerOverrideTestClass.new }
10
-
11
- describe 'search_params_logic' do
12
-
13
- it 'should have exclude_unwanted_models included' do
14
- expect(@obj.search_params_logic).to include(:exclude_unwanted_models)
15
- end
16
-
17
- it 'should have exclude_unpublished_items included' do
18
- expect(@obj.search_params_logic).to include(:exclude_unpublished_items)
19
- end
20
-
21
- end
22
-
23
- describe 'search_builder_class' do
24
-
25
- it 'should have CommonwealthSearchBuilder included' do
26
- expect(@obj.blacklight_config.search_builder_class).to include(CommonwealthVlrEngine::CommonwealthSearchBuilder)
27
- end
28
-
29
- end
30
-
31
- describe 'add_institution_fields' do
32
-
33
- # this spec needs more work. not sure how to set appropriate institution stuff so it will pass
34
- # subject { @obj.send(:add_institution_fields) } ## not sure if I should use this??
35
- it 'should add institution facets to the blacklight_config' #do
36
- # expect(@obj.blacklight_config.facet_fields).to include('physical_location_ssim')
37
- #end
38
-
39
- end
40
-
41
- end