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.
- checksums.yaml +4 -4
- data/README.md +8 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/advanced_search.scss +1 -1
- data/app/assets/stylesheets/commonwealth-vlr-engine/basic_search.scss +6 -1
- data/app/assets/stylesheets/commonwealth-vlr-engine/commonwealth-vlr-engine.css +1 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/folders.scss +1 -1
- data/app/assets/stylesheets/commonwealth-vlr-engine/header.scss +9 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/home.scss +9 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/twitter_typeahead.scss +9 -0
- data/app/controllers/blacklight_advanced_search/advanced_controller.rb +12 -48
- data/app/controllers/bookmarks_controller.rb +8 -8
- data/app/controllers/collections_controller.rb +10 -26
- data/app/controllers/folder_items_actions_controller.rb +2 -2
- data/app/controllers/folders_controller.rb +10 -6
- data/app/controllers/image_viewer_controller.rb +2 -2
- data/app/controllers/institutions_controller.rb +13 -12
- data/app/controllers/ocr_search_controller.rb +2 -8
- data/app/controllers/saved_searches_controller.rb +8 -0
- data/app/controllers/search_history_controller.rb +8 -0
- data/app/helpers/commonwealth_vlr_engine/application_helper.rb +37 -37
- data/app/helpers/commonwealth_vlr_engine/blacklight_helper.rb +3 -11
- data/app/helpers/commonwealth_vlr_engine/blacklight_url_helper.rb +1 -16
- data/app/helpers/commonwealth_vlr_engine/catalog_helper.rb +1 -1
- data/app/helpers/commonwealth_vlr_engine/collections_helper_behavior.rb +1 -1
- data/app/helpers/commonwealth_vlr_engine/institutions_helper_behavior.rb +2 -2
- data/app/helpers/commonwealth_vlr_engine/vlr_blacklight_maps_helper_behavior.rb +10 -6
- data/app/views/advanced/_advanced_search_fields.html.erb +2 -2
- data/app/views/advanced/_advanced_search_form.html.erb +2 -2
- data/app/views/advanced/index.html.erb +1 -1
- data/app/views/bookmarks/index.html.erb +1 -1
- data/app/views/catalog/_basic_search.html.erb +5 -3
- data/app/views/catalog/_constraints.html.erb +1 -1
- data/app/views/catalog/_facet_limit_series.html.erb +7 -5
- data/app/views/catalog/_index_gallery.html.erb +1 -3
- data/app/views/catalog/{_index_map_institutions.html.erb → _index_mapview_institutions.html.erb} +0 -0
- data/app/views/catalog/_search_form.html.erb +14 -4
- data/app/views/catalog/_show_partials/_show_default_metadata.html.erb +9 -0
- data/app/views/catalog/_show_partials/_show_flagged_notice.html.erb +1 -1
- data/app/views/catalog/_show_tools.html.erb +2 -2
- data/app/views/catalog/_zero_results.html.erb +1 -1
- data/app/views/collections/_search_form_collection.html.erb +1 -1
- data/app/views/collections/show.html.erb +1 -1
- data/app/views/feedback/complete.html.erb +1 -1
- data/app/views/institutions/_search_form_institution.html.erb +1 -1
- data/app/views/layouts/commonwealth-vlr-engine.html.erb +2 -2
- data/app/views/ocr_search/_search_form_ocr.html.erb +1 -1
- data/app/views/pages/home.html.erb +2 -1
- data/app/views/saved_searches/index.html.erb +4 -4
- data/app/views/search_history/index.html.erb +5 -5
- data/app/views/shared/_folder_item_actions.html.erb +1 -2
- data/app/views/shared/_footer.html.erb +1 -1
- data/app/views/shared/_header_navbar.html.erb +1 -1
- data/app/views/shared/_nav_links.html.erb +2 -2
- data/app/views/shared/_search_form_header.html.erb +9 -3
- data/app/views/shared/_sitelinks_search_box.html.erb +12 -0
- data/app/views/shared/_tools.html.erb +2 -2
- data/app/views/shared/_user_util_links.html.erb +2 -2
- data/app/views/users/show.html.erb +2 -2
- data/commonwealth-vlr-engine.gemspec +4 -4
- data/config/initializers/assets.rb +2 -0
- data/config/locales/commonwealth-vlr-engine.en.yml +4 -0
- data/config/routes.rb +1 -0
- data/lib/commonwealth-vlr-engine.rb +6 -16
- data/lib/commonwealth-vlr-engine/controller_override.rb +82 -47
- data/lib/commonwealth-vlr-engine/engine.rb +6 -4
- data/lib/commonwealth-vlr-engine/render_constraints_override.rb +3 -2
- data/lib/commonwealth-vlr-engine/search_builder/collections_search_builder.rb +14 -0
- data/lib/commonwealth-vlr-engine/{commonwealth_search_builder.rb → search_builder/commonwealth_search_builder_behavior.rb} +9 -2
- data/lib/commonwealth-vlr-engine/search_builder/flagged_search_builder.rb +14 -0
- data/lib/commonwealth-vlr-engine/search_builder/institutions_search_builder.rb +11 -0
- data/lib/commonwealth-vlr-engine/search_builder/mlt_search_builder.rb +15 -0
- data/lib/commonwealth-vlr-engine/search_builder/ocr_search_builder.rb +10 -0
- data/lib/commonwealth-vlr-engine/version.rb +1 -1
- data/lib/generators/commonwealth_vlr_engine/controller_generator.rb +1 -2
- data/lib/generators/commonwealth_vlr_engine/localassets_generator.rb +1 -1
- data/lib/generators/commonwealth_vlr_engine/model_generator.rb +3 -16
- data/lib/generators/commonwealth_vlr_engine/routes_generator.rb +8 -0
- data/lib/generators/commonwealth_vlr_engine/templates/commonwealth_search_builder.rb +17 -0
- data/lib/generators/commonwealth_vlr_engine/templates/{commonwealth_vlr_engine.css.scss → commonwealth_vlr_engine.scss} +0 -0
- data/spec/controllers/catalog_controller_spec.rb +20 -3
- data/spec/controllers/collections_controller_spec.rb +2 -2
- data/spec/controllers/folder_items_actions_controller_spec.rb +2 -2
- data/spec/controllers/institutions_controller_spec.rb +13 -0
- data/spec/controllers/ocr_search_controller_spec.rb +4 -0
- data/spec/features/more_like_this_search_spec.rb +1 -1
- data/spec/features/ocr_search/index_spec.rb +1 -1
- data/spec/helpers/institutions_helper_spec.rb +10 -5
- data/spec/lib/commonwealth-vlr-engine/search_builder/collections_search_builder_spec.rb +19 -0
- data/spec/lib/commonwealth-vlr-engine/search_builder/commonwealth_search_builder_behavior_spec.rb +116 -0
- data/spec/lib/commonwealth-vlr-engine/search_builder/flagged_search_builder_spec.rb +19 -0
- data/spec/lib/commonwealth-vlr-engine/search_builder/institutions_search_builder_spec.rb +19 -0
- data/spec/lib/commonwealth-vlr-engine/search_builder/mlt_search_builder_spec.rb +19 -0
- data/spec/lib/commonwealth-vlr-engine/search_builder/ocr_search_builder_spec.rb +19 -0
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +2 -0
- data/tasks/vlr_engine.rake +1 -1
- metadata +38 -23
- data/app/views/bookmarks/_tools.html.erb +0 -25
- data/app/views/catalog/_index_list_default.html.erb +0 -13
- data/lib/commonwealth-vlr-engine/route_sets.rb +0 -49
- data/lib/commonwealth-vlr-engine/routes.rb +0 -21
- data/spec/lib/commonwealth-vlr-engine/commonwealth_search_builder_spec.rb +0 -101
- 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
|