commonwealth-vlr-engine 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +91 -0
- data/.gitmodules +3 -0
- data/Gemfile +20 -0
- data/LICENSE +202 -0
- data/README.md +38 -0
- data/Rakefile +43 -0
- data/app/assets/images/commonwealth-vlr-engine/bplLoginButton.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/dc_audio-icon.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/dc_collection-icon.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/dc_image-icon.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/dc_institution-icon.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/dc_moving-image-icon.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/dc_text-icon.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/facebookLoginButton.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/loading-wdl-grid.gif +0 -0
- data/app/assets/images/commonwealth-vlr-engine/loading-wdl.gif +0 -0
- data/app/assets/images/commonwealth-vlr-engine/loading.gif +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/fullpage_grouphover.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/fullpage_hover.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/fullpage_pressed.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/fullpage_rest.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/home_grouphover.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/home_hover.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/home_pressed.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/home_rest.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/next_grouphover.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/next_hover.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/next_pressed.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/next_rest.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/previous_grouphover.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/previous_hover.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/previous_pressed.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/previous_rest.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/rotateleft_grouphover.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/rotateleft_hover.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/rotateleft_pressed.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/rotateleft_rest.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/rotateright_grouphover.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/rotateright_hover.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/rotateright_pressed.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/rotateright_rest.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/zoomin_grouphover.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/zoomin_hover.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/zoomin_pressed.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/zoomin_rest.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/zoomout_grouphover.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/zoomout_hover.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/zoomout_pressed.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/openseadragon/zoomout_rest.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/vlr_logo_img.png +0 -0
- data/app/assets/javascripts/blacklight_gallery.js +1 -0
- data/app/assets/javascripts/blacklight_google_analytics/blacklight_google_analytics.js.erb +165 -0
- data/app/assets/javascripts/bootstrap-accessibility-plugin/bootstrap-accessibility.js +586 -0
- data/app/assets/javascripts/commonwealth-vlr-engine.js +22 -0
- data/app/assets/javascripts/commonwealth-vlr-engine/collection_facets.js +5 -0
- data/app/assets/javascripts/commonwealth-vlr-engine/disable_dropdown_nav.js +21 -0
- data/app/assets/javascripts/commonwealth-vlr-engine/feedback_alerts.js.erb +19 -0
- data/app/assets/javascripts/commonwealth-vlr-engine/folder_tools.js +26 -0
- data/app/assets/javascripts/commonwealth-vlr-engine/multi_img_viewer.js.erb +20 -0
- data/app/assets/javascripts/commonwealth-vlr-engine/ocr_search_utils.js.erb +32 -0
- data/app/assets/javascripts/commonwealth-vlr-engine/volumes_list.js +5 -0
- data/app/assets/javascripts/openseadragon.js +2 -0
- data/app/assets/javascripts/respond/respond.min.js +6 -0
- data/app/assets/javascripts/wdl-viewer/fd-slider.js +1303 -0
- data/app/assets/javascripts/wdl-viewer/jquery-deparam.js +113 -0
- data/app/assets/javascripts/wdl-viewer/jquery.ba-throttle-debounce.min.js +9 -0
- data/app/assets/javascripts/wdl-viewer/jquery.hammer.min.js +7 -0
- data/app/assets/javascripts/wdl-viewer/modernizr-wdl.min.js +3 -0
- data/app/assets/javascripts/wdl-viewer/wdl-search.js +33 -0
- data/app/assets/javascripts/wdl-viewer/wdl-viewer_commonwealth.js +1147 -0
- data/app/assets/stylesheets/blacklight_advanced_search.css +5 -0
- data/app/assets/stylesheets/blacklight_gallery.css +1 -0
- data/app/assets/stylesheets/blacklight_maps.css +1 -0
- data/app/assets/stylesheets/bootstrap-accessibility-plugin/bootstrap-accessibility.css +105 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/advanced_search.scss +139 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/basic_search.scss +47 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/book_viewer.scss +576 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/carousel.scss +94 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/cmmnwlth_defaults.scss +45 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/cmmnwlth_shared.scss +75 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/collections.scss +563 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/commonwealth-vlr-engine.css +32 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/facets.scss +111 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/feedback.scss +10 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/folders.scss +276 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/footer.scss +47 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/header.scss +329 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/home.scss +269 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/index.scss +580 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/institutions.scss +246 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/pages.scss +31 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/search_inside.scss +172 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/searches.scss +55 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/show.scss +840 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/signin.scss +43 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/users.scss +18 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/vlr_dependencies.css +8 -0
- data/app/assets/stylesheets/ie_fixes.css +16 -0
- data/app/assets/stylesheets/openseadragon.css +1 -0
- data/app/assets/stylesheets/wdl-viewer/fd-slider.min.css +2 -0
- data/app/controllers/blacklight_advanced_search/advanced_controller.rb +66 -0
- data/app/controllers/bookmarks_controller.rb +38 -0
- data/app/controllers/collections_controller.rb +128 -0
- data/app/controllers/commonwealth_vlr_engine/application_controller.rb +8 -0
- data/app/controllers/feedback_controller.rb +39 -0
- data/app/controllers/folder_items_actions_controller.rb +72 -0
- data/app/controllers/folder_items_controller.rb +90 -0
- data/app/controllers/folders_controller.rb +132 -0
- data/app/controllers/iiif_manifest_controller.rb +74 -0
- data/app/controllers/image_viewer_controller.rb +34 -0
- data/app/controllers/institutions_controller.rb +62 -0
- data/app/controllers/ocr_search_controller.rb +78 -0
- data/app/controllers/pages_controller.rb +5 -0
- data/app/controllers/users/omniauth_callbacks_controller.rb +10 -0
- data/app/controllers/users/registrations_controller.rb +3 -0
- data/app/controllers/users/sessions_controller.rb +3 -0
- data/app/controllers/users_controller.rb +27 -0
- data/app/helpers/blacklight_maps_helper.rb +3 -0
- data/app/helpers/collections_helper.rb +3 -0
- data/app/helpers/commonwealth_vlr_engine/application_helper.rb +200 -0
- data/app/helpers/commonwealth_vlr_engine/blacklight_helper.rb +35 -0
- data/app/helpers/commonwealth_vlr_engine/blacklight_url_helper.rb +53 -0
- data/app/helpers/commonwealth_vlr_engine/catalog_helper.rb +414 -0
- data/app/helpers/commonwealth_vlr_engine/collections_helper_behavior.rb +19 -0
- data/app/helpers/commonwealth_vlr_engine/component_helper.rb +22 -0
- data/app/helpers/commonwealth_vlr_engine/facets_helper.rb +20 -0
- data/app/helpers/commonwealth_vlr_engine/feedback_helper_behavior.rb +14 -0
- data/app/helpers/commonwealth_vlr_engine/folders_helper_behavior.rb +9 -0
- data/app/helpers/commonwealth_vlr_engine/image_viewer_helper_behavior.rb +14 -0
- data/app/helpers/commonwealth_vlr_engine/institutions_helper_behavior.rb +31 -0
- data/app/helpers/commonwealth_vlr_engine/layout_helper.rb +22 -0
- data/app/helpers/commonwealth_vlr_engine/ocr_search_helper_behavior.rb +48 -0
- data/app/helpers/commonwealth_vlr_engine/pages_helper_behavior.rb +38 -0
- data/app/helpers/commonwealth_vlr_engine/vlr_blacklight_maps_helper_behavior.rb +59 -0
- data/app/helpers/feedback_helper.rb +3 -0
- data/app/helpers/folders_helper.rb +3 -0
- data/app/helpers/image_viewer_helper.rb +3 -0
- data/app/helpers/institutions_helper.rb +3 -0
- data/app/helpers/ocr_search_helper.rb +3 -0
- data/app/helpers/pages_helper.rb +3 -0
- data/app/mailers/notifier.rb +5 -0
- data/app/models/carousel_slide.rb +7 -0
- data/app/models/record_mailer.rb +18 -0
- data/app/models/user.rb +15 -0
- data/app/views/advanced/_advanced_search_date.html.erb +23 -0
- data/app/views/advanced/_advanced_search_facets.html.erb +5 -0
- data/app/views/advanced/_advanced_search_fields.html.erb +39 -0
- data/app/views/advanced/_advanced_search_form.html.erb +51 -0
- data/app/views/advanced/_advanced_search_help.html.erb +13 -0
- data/app/views/advanced/_facet_layout.html.erb +9 -0
- data/app/views/advanced/_facet_limit.html.erb +15 -0
- data/app/views/advanced/index.html.erb +29 -0
- data/app/views/blacklight_advanced_search/_facet_limit.html.erb +12 -0
- data/app/views/bookmarks/_tools.html.erb +25 -0
- data/app/views/bookmarks/index.html.erb +64 -0
- data/app/views/bookmarks/update.js.erb +1 -0
- data/app/views/bpluser/folders/_folder.html.erb +36 -0
- data/app/views/catalog/_add_this.html.erb +10 -0
- data/app/views/catalog/_az_links.html.erb +15 -0
- data/app/views/catalog/_basic_search.html.erb +67 -0
- data/app/views/catalog/_citation.html.erb +50 -0
- data/app/views/catalog/_constraints.html.erb +26 -0
- data/app/views/catalog/_document_collections_gallery.html.erb +7 -0
- data/app/views/catalog/_facet_limit_series.html.erb +21 -0
- data/app/views/catalog/_facets.html.erb +31 -0
- data/app/views/catalog/_facets_series.html.erb +4 -0
- data/app/views/catalog/_folder_item_control.html.erb +64 -0
- data/app/views/catalog/_index_collections_gallery.html.erb +12 -0
- data/app/views/catalog/_index_gallery.html.erb +11 -0
- data/app/views/catalog/_index_header_default.html.erb +22 -0
- data/app/views/catalog/_index_list_collection.html.erb +33 -0
- data/app/views/catalog/_index_list_default.html.erb +13 -0
- data/app/views/catalog/_index_map_institutions.html.erb +10 -0
- data/app/views/catalog/_index_masonry.html.erb +8 -0
- data/app/views/catalog/_index_slideshow.html.erb +18 -0
- data/app/views/catalog/_more_like_this.html.erb +9 -0
- data/app/views/catalog/_opengraph.html.erb +16 -0
- data/app/views/catalog/_previous_next_doc.html.erb +22 -0
- data/app/views/catalog/_results_pagination.html.erb +9 -0
- data/app/views/catalog/_search_form.html.erb +23 -0
- data/app/views/catalog/_search_header.html.erb +5 -0
- data/app/views/catalog/_show_default.html.erb +75 -0
- data/app/views/catalog/_show_main_content.html.erb +27 -0
- data/app/views/catalog/_show_more_like_this.html.erb +15 -0
- data/app/views/catalog/_show_partials/_show_book_viewer_link.html.erb +25 -0
- data/app/views/catalog/_show_partials/_show_default_img.html.erb +32 -0
- data/app/views/catalog/_show_partials/_show_default_metadata.html.erb +486 -0
- data/app/views/catalog/_show_partials/_show_default_simple_img_viewer.html.erb +45 -0
- data/app/views/catalog/_show_partials/_show_downloads.html.erb +14 -0
- data/app/views/catalog/_show_partials/_show_flagged_notice.html.erb +29 -0
- data/app/views/catalog/_show_partials/_show_multi_img.html.erb +42 -0
- data/app/views/catalog/_show_partials/_show_multi_img_pagination.html.erb +20 -0
- data/app/views/catalog/_show_partials/_show_oai_item_img.html.erb +5 -0
- data/app/views/catalog/_show_partials/_show_oai_item_link.html.erb +8 -0
- data/app/views/catalog/_show_partials/_show_prev_next_carousel_links.html.erb +17 -0
- data/app/views/catalog/_show_partials/_show_volumes.html.erb +52 -0
- data/app/views/catalog/_show_sidebar.html.erb +1 -0
- data/app/views/catalog/_show_tools.html.erb +42 -0
- data/app/views/catalog/_zero_results.html.erb +20 -0
- data/app/views/catalog/email.html.erb +6 -0
- data/app/views/catalog/index.html.erb +17 -0
- data/app/views/catalog/metadata_view.html.erb +7 -0
- data/app/views/catalog/show.html.erb +13 -0
- data/app/views/collections/_search_form_collection.html.erb +23 -0
- data/app/views/collections/index.html.erb +30 -0
- data/app/views/collections/show.html.erb +116 -0
- data/app/views/devise/confirmations/new.html.erb +14 -0
- data/app/views/devise/mailer/reset_password_instructions.html.erb +13 -0
- data/app/views/devise/passwords/edit.html.erb +33 -0
- data/app/views/devise/passwords/new.html.erb +31 -0
- data/app/views/devise/registrations/edit.html.erb +83 -0
- data/app/views/devise/registrations/new.html.erb +53 -0
- data/app/views/devise/sessions/new.html.erb +75 -0
- data/app/views/devise/shared/_links.erb +29 -0
- data/app/views/feedback/complete.html.erb +9 -0
- data/app/views/feedback/show.html.erb +61 -0
- data/app/views/folder_items/create.js.erb +1 -0
- data/app/views/folder_items/destroy.js.erb +1 -0
- data/app/views/folder_items/item_actions.js.erb +2 -0
- data/app/views/folder_items/update.js.erb +1 -0
- data/app/views/folders/_in_folder.html.erb +2 -0
- data/app/views/folders/_new_edit_form_fields.html.erb +36 -0
- data/app/views/folders/edit.html.erb +25 -0
- data/app/views/folders/index.html.erb +73 -0
- data/app/views/folders/new.html.erb +27 -0
- data/app/views/folders/public_list.html.erb +44 -0
- data/app/views/folders/show.html.erb +98 -0
- data/app/views/image_viewer/_book_viewer_help.html.erb +125 -0
- data/app/views/image_viewer/_render_book_viewer.html.erb +185 -0
- data/app/views/image_viewer/book_viewer.html.erb +57 -0
- data/app/views/image_viewer/show.js.erb +19 -0
- data/app/views/institutions/_intro_text.html.erb +1 -0
- data/app/views/institutions/_map_institutions_search.html.erb +9 -0
- data/app/views/institutions/_search_form_institution.html.erb +24 -0
- data/app/views/institutions/index.html.erb +31 -0
- data/app/views/institutions/show.html.erb +104 -0
- data/app/views/layouts/_google_analytics.html.erb +9 -0
- data/app/views/layouts/book_viewer.html.erb +37 -0
- data/app/views/layouts/commonwealth-vlr-engine.html.erb +59 -0
- data/app/views/notifier/feedback.text.erb +6 -0
- data/app/views/ocr_search/_index_ocr_list.html.erb +17 -0
- data/app/views/ocr_search/_search_form_ocr.html.erb +23 -0
- data/app/views/ocr_search/_snippets_more.html.erb +15 -0
- data/app/views/ocr_search/_zero_results_ocr.html.erb +9 -0
- data/app/views/ocr_search/index.html.erb +49 -0
- data/app/views/pages/_carousel.html.erb +46 -0
- data/app/views/pages/_home_partials/_banner.html.erb +23 -0
- data/app/views/pages/_home_partials/_browse.html.erb +55 -0
- data/app/views/pages/_home_partials/_context.html.erb +24 -0
- data/app/views/pages/_home_partials/_home_content.html.erb +14 -0
- data/app/views/pages/about.html.erb +10 -0
- data/app/views/pages/about_site.html.erb +6 -0
- data/app/views/pages/explore.html.erb +32 -0
- data/app/views/pages/home.html.erb +3 -0
- data/app/views/record_mailer/email_record.text.erb +7 -0
- data/app/views/saved_searches/index.html.erb +60 -0
- data/app/views/search_history/index.html.erb +59 -0
- data/app/views/shared/_error_messages.html.erb +9 -0
- data/app/views/shared/_flash_msg_maintenance.html.erb +6 -0
- data/app/views/shared/_folder_item_actions.html.erb +66 -0
- data/app/views/shared/_folder_tools.html.erb +4 -0
- data/app/views/shared/_footer.html.erb +14 -0
- data/app/views/shared/_header_navbar.html.erb +34 -0
- data/app/views/shared/_nav_links.html.erb +58 -0
- data/app/views/shared/_search_form_header.html.erb +16 -0
- data/app/views/shared/_tools.html.erb +14 -0
- data/app/views/shared/_user_util_links.html.erb +43 -0
- data/app/views/users/show.html.erb +33 -0
- data/commonwealth-vlr-engine.gemspec +47 -0
- data/config/initializers/patch_blacklight_advanced_search.rb +74 -0
- data/config/initializers/patch_blacklight_maps.rb +20 -0
- data/config/jetty.yml +7 -0
- data/config/locales/commonwealth-vlr-engine.en.yml +463 -0
- data/config/routes.rb +92 -0
- data/lib/commonwealth-vlr-engine.rb +55 -0
- data/lib/commonwealth-vlr-engine/commonwealth_search_builder.rb +66 -0
- data/lib/commonwealth-vlr-engine/controller.rb +69 -0
- data/lib/commonwealth-vlr-engine/controller_override.rb +238 -0
- data/lib/commonwealth-vlr-engine/engine.rb +40 -0
- data/lib/commonwealth-vlr-engine/finder.rb +285 -0
- data/lib/commonwealth-vlr-engine/iiif_manifest.rb +189 -0
- data/lib/commonwealth-vlr-engine/notifier.rb +33 -0
- data/lib/commonwealth-vlr-engine/pages.rb +33 -0
- data/lib/commonwealth-vlr-engine/render_constraints_override.rb +57 -0
- data/lib/commonwealth-vlr-engine/route_sets.rb +49 -0
- data/lib/commonwealth-vlr-engine/routes.rb +21 -0
- data/lib/commonwealth-vlr-engine/version.rb +3 -0
- data/lib/generators/commonwealth_vlr_engine/controller_generator.rb +92 -0
- data/lib/generators/commonwealth_vlr_engine/environment_generator.rb +49 -0
- data/lib/generators/commonwealth_vlr_engine/install_generator.rb +57 -0
- data/lib/generators/commonwealth_vlr_engine/localassets_generator.rb +29 -0
- data/lib/generators/commonwealth_vlr_engine/model_generator.rb +65 -0
- data/lib/generators/commonwealth_vlr_engine/routes_generator.rb +39 -0
- data/lib/generators/commonwealth_vlr_engine/templates/commonwealth_vlr_engine.css.scss +4 -0
- data/lib/generators/commonwealth_vlr_engine/templates/config/contact_emails.yml.sample +13 -0
- data/lib/generators/commonwealth_vlr_engine/templates/config/fedora.yml.sample +6 -0
- data/lib/generators/commonwealth_vlr_engine/templates/config/geojson_static_file.yml.sample +11 -0
- data/lib/generators/commonwealth_vlr_engine/templates/config/google_analytics.yml.sample +10 -0
- data/lib/generators/commonwealth_vlr_engine/templates/config/iiif_server.yml.sample +10 -0
- data/lib/generators/commonwealth_vlr_engine/templates/config/initializers/a_load_commonwealth_vlr_configs.rb +14 -0
- data/lib/generators/commonwealth_vlr_engine/templates/config/initializers/devise.rb +269 -0
- data/lib/generators/commonwealth_vlr_engine/templates/config/initializers/secret_token.rb +8 -0
- data/lib/generators/commonwealth_vlr_engine/templates/config/locales/blacklight.en.yml +44 -0
- data/lib/generators/commonwealth_vlr_engine/templates/config/locales/devise.en.yml +12 -0
- data/lib/generators/commonwealth_vlr_engine/templates/config/omniauth-facebook.yml.sample +14 -0
- data/lib/generators/commonwealth_vlr_engine/templates/config/omniauth-polaris.yml.sample +20 -0
- data/lib/generators/commonwealth_vlr_engine/templates/config/vlr.yml +13 -0
- data/lib/generators/commonwealth_vlr_engine/yml_generator.rb +29 -0
- data/lib/railties/commonwealth_vlr_engine.rake +6 -0
- data/solr_conf/conf/schema.xml +476 -0
- data/solr_conf/conf/solrconfig.xml +286 -0
- data/spec/controllers/catalog_controller_spec.rb +67 -0
- data/spec/controllers/collections_controller_spec.rb +127 -0
- data/spec/controllers/feedback_controller_spec.rb +51 -0
- data/spec/controllers/folder_items_actions_controller_spec.rb +99 -0
- data/spec/controllers/folder_items_controller_spec.rb +90 -0
- data/spec/controllers/folders_controller_spec.rb +368 -0
- data/spec/controllers/iiif_manifest_controller_spec.rb +85 -0
- data/spec/controllers/image_viewer_controller_spec.rb +50 -0
- data/spec/controllers/institutions_controller_spec.rb +64 -0
- data/spec/controllers/ocr_search_controller_spec.rb +71 -0
- data/spec/controllers/pages_controller_spec.rb +58 -0
- data/spec/controllers/users_controller_spec.rb +62 -0
- data/spec/features/catalog/_az_links_spec.rb +27 -0
- data/spec/features/catalog/_show_partials/_show_book_viewer_link_spec.rb +47 -0
- data/spec/features/catalog/_show_partials/_show_default_simple_img_viewer_spec.rb +19 -0
- data/spec/features/catalog/_show_partials/_show_flagged_notice_spec.rb +23 -0
- data/spec/features/catalog/_show_partials/_show_multi_img_spec.rb +18 -0
- data/spec/features/catalog/_show_partials/_show_volumes_spec.rb +24 -0
- data/spec/features/collections/index_spec.rb +35 -0
- data/spec/features/feedback/show_spec.rb +47 -0
- data/spec/features/image_viewer/book_viewer_spec.rb +67 -0
- data/spec/features/institutions/index_spec.rb +31 -0
- data/spec/features/institutions/map_view_spec.rb +37 -0
- data/spec/features/more_like_this_search_spec.rb +23 -0
- data/spec/features/ocr_search/index_spec.rb +89 -0
- data/spec/fixtures/sample_rss_feed.xml +56 -0
- data/spec/fixtures/sample_solr_documents.yml +2748 -0
- data/spec/helpers/application_helper_spec.rb +114 -0
- data/spec/helpers/catalog_helper_spec.rb +386 -0
- data/spec/helpers/collections_helper_spec.rb +28 -0
- data/spec/helpers/component_helper_spec.rb +34 -0
- data/spec/helpers/folders_helper_spec.rb +31 -0
- data/spec/helpers/image_viewer_helper_spec.rb +15 -0
- data/spec/helpers/institutions_helper_spec.rb +53 -0
- data/spec/helpers/ocr_search_helper_spec.rb +70 -0
- data/spec/helpers/pages_helper_spec.rb +21 -0
- data/spec/lib/commonwealth-vlr-engine/commonwealth_search_builder_spec.rb +101 -0
- data/spec/lib/commonwealth-vlr-engine/controller_override_spec.rb +41 -0
- data/spec/lib/commonwealth-vlr-engine/controller_spec.rb +33 -0
- data/spec/lib/commonwealth-vlr-engine/finder_spec.rb +140 -0
- data/spec/lib/commonwealth-vlr-engine/iiif_manifest_spec.rb +157 -0
- data/spec/lib/commonwealth-vlr-engine/render_constraints_override_spec.rb +97 -0
- data/spec/mailers/notifier_spec.rb +31 -0
- data/spec/models/carousel_slide_spec.rb +38 -0
- data/spec/spec_helper.rb +40 -0
- data/spec/tasks/vlr_engine_rake_spec.rb +28 -0
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +23 -0
- data/tasks/vlr_engine.rake +46 -0
- metadata +788 -0
@@ -0,0 +1,85 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe IiifManifestController do
|
4
|
+
|
5
|
+
render_views
|
6
|
+
|
7
|
+
describe 'get manifest' do
|
8
|
+
|
9
|
+
before(:each) do
|
10
|
+
get :manifest, :id => 'bpl-dev:h702q6403'
|
11
|
+
@response_body = JSON.parse(response.body)
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'should render an IIIF manifest' do
|
15
|
+
expect(response).to be_success
|
16
|
+
expect(@response_body).to have_content('http://iiif.io/api/presentation/2/context.json')
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'should conform to the IIIF manifest spec' do
|
20
|
+
expect(@response_body["sequences"].length).to eq(1)
|
21
|
+
expect(@response_body["sequences"].first["canvases"].length).to eq(2)
|
22
|
+
expect(@response_body["sequences"].first["canvases"].first["images"].first["resource"]["@id"]).to have_content('h702q641c')
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
describe 'get canvas' do
|
28
|
+
|
29
|
+
before(:each) do
|
30
|
+
get :canvas, :id => 'bpl-dev:h702q6403', :canvas_object_id => 'bpl-dev:h702q641c'
|
31
|
+
@response_body = JSON.parse(response.body)
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'should render an IIIF canvas' do
|
35
|
+
expect(response).to be_success
|
36
|
+
expect(@response_body).to have_content('http://iiif.io/api/presentation/2/context.json')
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'should conform to the IIIF manifest spec' do
|
40
|
+
expect(@response_body).to have_content('h702q6403/canvas/h702q641c')
|
41
|
+
expect(@response_body["images"].length).to eq(1)
|
42
|
+
expect(@response_body["images"].first["resource"]["@id"]).to have_content('h702q641c')
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
|
47
|
+
describe 'get annotation' do
|
48
|
+
|
49
|
+
before(:each) do
|
50
|
+
get :annotation, :id => 'bpl-dev:h702q6403', :annotation_object_id => 'bpl-dev:h702q641c'
|
51
|
+
@response_body = JSON.parse(response.body)
|
52
|
+
end
|
53
|
+
|
54
|
+
it 'should render an IIIF annotation' do
|
55
|
+
expect(response).to be_success
|
56
|
+
expect(@response_body).to have_content('http://iiif.io/api/presentation/2/context.json')
|
57
|
+
end
|
58
|
+
|
59
|
+
it 'should conform to the IIIF manifest spec' do
|
60
|
+
expect(@response_body).to have_content('h702q6403/annotation/h702q641c')
|
61
|
+
expect(@response_body["resource"]["@id"]).to have_content('h702q641c')
|
62
|
+
end
|
63
|
+
|
64
|
+
end
|
65
|
+
|
66
|
+
describe 'get collection' do
|
67
|
+
|
68
|
+
before(:each) do
|
69
|
+
get :collection, :id => 'bpl-dev:3j334b469'
|
70
|
+
@response_body = JSON.parse(response.body)
|
71
|
+
end
|
72
|
+
|
73
|
+
it 'should render an IIIF Collection' do
|
74
|
+
expect(response).to be_success
|
75
|
+
expect(@response_body).to have_content('http://iiif.io/api/presentation/2/context.json')
|
76
|
+
end
|
77
|
+
|
78
|
+
it 'should conform to the IIIF manifest spec' do
|
79
|
+
expect(@response_body["@type"]).to eq('sc:Collection')
|
80
|
+
expect(@response_body["manifests"].first["@id"]).to include('3j334603p')
|
81
|
+
end
|
82
|
+
|
83
|
+
end
|
84
|
+
|
85
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe ImageViewerController do
|
4
|
+
|
5
|
+
render_views
|
6
|
+
|
7
|
+
include CommonwealthVlrEngine::Finder
|
8
|
+
|
9
|
+
before(:each) do
|
10
|
+
@item_id = 'bpl-dev:h702q6403'
|
11
|
+
@first_image_pid = 'bpl-dev:h702q641c'
|
12
|
+
@second_image_pid = 'bpl-dev:h702q642n'
|
13
|
+
end
|
14
|
+
|
15
|
+
describe "GET 'show'" do
|
16
|
+
it 'should render the partial using ajax with the new image' do
|
17
|
+
xhr :get, :show, :id => @item_id, :view => @second_image_pid
|
18
|
+
expect(response).to be_success
|
19
|
+
# not great, but OK for now
|
20
|
+
expect(response.body).to match /#{@second_image_pid}/
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
describe 'get #book_viewer' do
|
25
|
+
it 'should render the book viewer' do
|
26
|
+
get :book_viewer, :id => @item_id
|
27
|
+
expect(response).to be_success
|
28
|
+
expect(response.body).to have_selector('#viewer')
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
describe "private methods" do
|
33
|
+
|
34
|
+
# for testing private methods
|
35
|
+
class ImageViewerControllerTestClass < ImageViewerController
|
36
|
+
end
|
37
|
+
|
38
|
+
before(:each) do
|
39
|
+
@mock_controller = ImageViewerControllerTestClass.new
|
40
|
+
end
|
41
|
+
|
42
|
+
describe "get_page_sequence" do
|
43
|
+
it "should return the correct page sequence" do
|
44
|
+
expect(@mock_controller.send(:get_page_sequence,@item_id,@first_image_pid)).to eq({current: @first_image_pid, index: 1, total: 2, prev: nil, next: @second_image_pid})
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe InstitutionsController do
|
4
|
+
|
5
|
+
render_views
|
6
|
+
|
7
|
+
describe "GET 'index'" do
|
8
|
+
|
9
|
+
it "should show the institutions page" do
|
10
|
+
get :index
|
11
|
+
expect(response).to be_success
|
12
|
+
expect(response.body).to have_selector("div.blacklight-institution")
|
13
|
+
expect(assigns(:document_list)).not_to be_nil
|
14
|
+
end
|
15
|
+
|
16
|
+
describe "remove_unwanted_views" do
|
17
|
+
|
18
|
+
it "should not show the gallery, masonry, or slideshow views" do
|
19
|
+
get :index
|
20
|
+
expect(response.body).to_not have_selector(".view-type-gallery")
|
21
|
+
expect(response.body).to_not have_selector(".view-type-masonry")
|
22
|
+
expect(response.body).to_not have_selector(".view-type-slideshow")
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
describe "map view" do
|
28
|
+
|
29
|
+
it "should show the map on institutions page" do
|
30
|
+
get :index, :view => 'maps'
|
31
|
+
expect(response.body).to have_selector("#institutions-index-map")
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
|
38
|
+
describe "GET 'show'" do
|
39
|
+
|
40
|
+
before(:each) do
|
41
|
+
@institution_id = 'bpl-dev:abcd12345'
|
42
|
+
end
|
43
|
+
|
44
|
+
it "should show the institution page" do
|
45
|
+
get :show, :id => @institution_id
|
46
|
+
expect(response).to be_success
|
47
|
+
expect(response.body).to have_selector("div.blacklight-institution")
|
48
|
+
expect(assigns(:document)).not_to be_nil
|
49
|
+
end
|
50
|
+
|
51
|
+
it "should show some facets" do
|
52
|
+
get :show, :id => @institution_id
|
53
|
+
expect(response.body).to have_selector("#facets")
|
54
|
+
end
|
55
|
+
|
56
|
+
it "should show a list of collections" do
|
57
|
+
get :show, :id => @institution_id
|
58
|
+
expect(response.body).to have_selector("#institution_collections")
|
59
|
+
expect(assigns(:document_list)).not_to be_nil
|
60
|
+
end
|
61
|
+
|
62
|
+
end
|
63
|
+
|
64
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe OcrSearchController do
|
4
|
+
|
5
|
+
describe "GET 'index'" do
|
6
|
+
|
7
|
+
describe 'with no ocr_q search params' do
|
8
|
+
|
9
|
+
it 'should render the page' do
|
10
|
+
get :index, :id => 'bpl-dev:7s75dn48d'
|
11
|
+
expect(response).to be_success
|
12
|
+
expect(assigns(:document_list)).to be_empty
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
|
17
|
+
describe 'with ocr_q search params' do
|
18
|
+
|
19
|
+
before { get :index, :id => 'bpl-dev:7s75dn48d', :ocr_q => 'instruction' }
|
20
|
+
|
21
|
+
it 'should render the page' do
|
22
|
+
expect(response).to be_success
|
23
|
+
expect(assigns(:document_list).length).to eq(2)
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'should include highlighting in the Solr response' do
|
27
|
+
expect(assigns(:response)['highlighting']).not_to be_empty
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
describe 'private methods' do
|
35
|
+
|
36
|
+
# for testing private methods
|
37
|
+
class OcrSearchControllerTestClass < OcrSearchController
|
38
|
+
end
|
39
|
+
|
40
|
+
before(:each) do
|
41
|
+
@mock_controller = OcrSearchControllerTestClass.new
|
42
|
+
end
|
43
|
+
|
44
|
+
describe 'modify_config_for_ocr' do
|
45
|
+
|
46
|
+
let(:blacklight_config) { @mock_controller.blacklight_config }
|
47
|
+
|
48
|
+
before { @mock_controller.send(:modify_config_for_ocr) }
|
49
|
+
|
50
|
+
it 'should set add_facet_fields_to_solr_request to false' do
|
51
|
+
expect(blacklight_config.add_facet_fields_to_solr_request).to eq(false)
|
52
|
+
end
|
53
|
+
|
54
|
+
let(:ocr_field) { blacklight_config.index_fields[blacklight_config.ocr_search_field] }
|
55
|
+
|
56
|
+
it 'should add the ocr_search_field to the index_fields config' do
|
57
|
+
expect(ocr_field.class).to eq(Blacklight::Configuration::IndexField)
|
58
|
+
expect(ocr_field.highlight).to eq(true)
|
59
|
+
end
|
60
|
+
|
61
|
+
end
|
62
|
+
|
63
|
+
describe 'start_new_search_session?' do
|
64
|
+
it 'should return false' do
|
65
|
+
expect(@mock_controller.send(:start_new_search_session?)).to eq(false)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
end
|
70
|
+
|
71
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe PagesController do
|
4
|
+
|
5
|
+
render_views
|
6
|
+
|
7
|
+
describe "GET 'home'" do
|
8
|
+
|
9
|
+
before do
|
10
|
+
@controller.send(:current_or_guest_user).save
|
11
|
+
get :home
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'should respond to the #home action' do
|
15
|
+
expect(response).to be_success
|
16
|
+
expect(assigns(:carousel_slides)).to_not be_nil
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'should render the home page' do
|
20
|
+
expect(response.body).to have_selector('#content_home')
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
describe "GET 'about'" do
|
26
|
+
|
27
|
+
it 'should render the the #about action' do
|
28
|
+
get :about
|
29
|
+
expect(response).to be_success
|
30
|
+
expect(assigns(:nav_li_active)).to_not be_nil
|
31
|
+
expect(response.body).to have_selector('.about_content')
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
describe "GET 'about_site'" do
|
37
|
+
|
38
|
+
it 'should render the the #about_site action' do
|
39
|
+
get :about_site
|
40
|
+
expect(response).to be_success
|
41
|
+
expect(assigns(:nav_li_active)).to_not be_nil
|
42
|
+
expect(response.body).to have_selector('.about_content')
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
|
47
|
+
describe "GET 'explore'" do
|
48
|
+
|
49
|
+
it 'should render the the #explore action' do
|
50
|
+
get :explore
|
51
|
+
expect(response).to be_success
|
52
|
+
expect(assigns(:nav_li_active)).to_not be_nil
|
53
|
+
expect(response.body).to have_selector('.explore_content')
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe UsersController do
|
4
|
+
|
5
|
+
render_views
|
6
|
+
|
7
|
+
before(:each) do
|
8
|
+
@test_user_attr = {
|
9
|
+
:email => 'testy@example.com',
|
10
|
+
:password => 'password'
|
11
|
+
}
|
12
|
+
@test_user = User.create!(@test_user_attr)
|
13
|
+
end
|
14
|
+
|
15
|
+
describe 'Get show' do
|
16
|
+
|
17
|
+
describe 'non-logged-in user' do
|
18
|
+
it 'should redirect to the sign-in page' do
|
19
|
+
get :show, :id => @test_user.id
|
20
|
+
expect(response).to redirect_to(new_user_session_path)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
describe 'logged-in user' do
|
25
|
+
|
26
|
+
describe 'trying to view wrong account' do
|
27
|
+
|
28
|
+
before(:each) do
|
29
|
+
sign_in @test_user
|
30
|
+
@test_user2_attr = {
|
31
|
+
:email => 'testy2@example.com',
|
32
|
+
:password => 'password'
|
33
|
+
}
|
34
|
+
@test_user2 = User.create!(@test_user2_attr)
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'should redirect to the home page' do
|
38
|
+
get :show, :id => @test_user2.id
|
39
|
+
expect(response).to redirect_to(root_path)
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
|
44
|
+
describe 'viewing correct account' do
|
45
|
+
|
46
|
+
before(:each) do
|
47
|
+
sign_in @test_user
|
48
|
+
end
|
49
|
+
|
50
|
+
it 'should show the user#show page' do
|
51
|
+
get :show, :id => @test_user.id
|
52
|
+
expect(response).to be_success
|
53
|
+
expect(response.body).to have_selector('#user_account_links_list')
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
61
|
+
|
62
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
include CommonwealthVlrEngine::CollectionsHelperBehavior
|
4
|
+
|
5
|
+
# set this helper to return true so AZ links are rendered
|
6
|
+
def should_render_col_az?
|
7
|
+
true
|
8
|
+
end
|
9
|
+
|
10
|
+
describe 'a-z links' do
|
11
|
+
|
12
|
+
it 'should show the a-z links' do
|
13
|
+
visit collections_path
|
14
|
+
within ('.item_az_links') do
|
15
|
+
expect(page).to have_selector('.az_link')
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'should show correct results after clicking a letter link' do
|
20
|
+
visit collections_path
|
21
|
+
within ('.item_az_links') do
|
22
|
+
click_link('C')
|
23
|
+
end
|
24
|
+
expect(page).to have_selector('.document-title-heading', :text => 'Carte de Visite Collection')
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'show book viewer link', js: true do
|
4
|
+
|
5
|
+
before(:each) do
|
6
|
+
visit solr_document_path(:id => 'bpl-dev:7s75dn48d')
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'should display the read link' do
|
10
|
+
expect(page).to have_selector('.book_viewer_link')
|
11
|
+
end
|
12
|
+
|
13
|
+
describe 'search inside link' do
|
14
|
+
|
15
|
+
it 'should display the search link' do
|
16
|
+
expect(page).to have_selector('.search_inside_link')
|
17
|
+
end
|
18
|
+
|
19
|
+
describe 'search inside modal' do
|
20
|
+
|
21
|
+
before { click_link(I18n.t('blacklight.ocr.search.link')) }
|
22
|
+
|
23
|
+
it 'should render the search inside partial as a Bootstrap modal within the page' do
|
24
|
+
expect(page).to have_selector('.modal-header')
|
25
|
+
expect(page).to have_selector('#item_metadata')
|
26
|
+
end
|
27
|
+
|
28
|
+
describe 'preserve the modal view' do
|
29
|
+
|
30
|
+
before do
|
31
|
+
within 'form.ocr-search-form' do
|
32
|
+
fill_in 'ocr_q', with: 'instruction'
|
33
|
+
click_button('search')
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'should display the results in the modal window within the page' do
|
38
|
+
expect(page).to have_selector('#item_metadata')
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|