geoblacklight 4.7.0 → 5.0.0.pre.alpha.11
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.
- checksums.yaml +4 -4
- data/.github/workflows/build-demo-app.yml +153 -0
- data/.github/workflows/prune-containers.yml +19 -0
- data/.github/workflows/ruby.yml +54 -55
- data/.gitignore +2 -2
- data/CONTRIBUTING.md +62 -44
- data/Gemfile +3 -27
- data/Rakefile +42 -67
- data/app/assets/images/blacklight/logo.svg +31 -1
- data/app/assets/stylesheets/geoblacklight/geoblacklight.scss +1 -2
- data/app/assets/stylesheets/geoblacklight/modules/_base.scss +1 -1
- data/app/assets/stylesheets/geoblacklight/modules/_blacklight_overrides.scss +24 -26
- data/app/assets/stylesheets/geoblacklight/modules/downloads.scss +13 -0
- data/app/assets/stylesheets/geoblacklight/modules/home.scss +2 -17
- data/app/assets/stylesheets/geoblacklight/modules/icon-customization.scss +48 -23
- data/app/assets/stylesheets/geoblacklight/modules/index_maps.scss +1 -15
- data/app/assets/stylesheets/geoblacklight/modules/item.scss +13 -11
- data/app/assets/stylesheets/geoblacklight/modules/layer_opacity.scss +3 -3
- data/app/assets/stylesheets/geoblacklight/modules/leaflet.scss +4 -0
- data/app/assets/stylesheets/geoblacklight/modules/modal.scss +0 -15
- data/app/assets/stylesheets/geoblacklight/modules/results.scss +10 -19
- data/app/assets/stylesheets/geoblacklight/modules/sidebar.scss +2 -2
- data/app/components/blacklight/icons/american_geographical_society_library_uwm_libraries_component.rb +46 -0
- data/app/components/blacklight/icons/arizona_component.rb +24 -0
- data/app/components/blacklight/icons/arrow_circle_down_component.rb +23 -0
- data/app/components/blacklight/icons/baruch_cuny_component.rb +23 -0
- data/app/components/blacklight/icons/book_component.rb +23 -0
- data/app/components/blacklight/icons/bookmark_component.rb +23 -0
- data/app/components/blacklight/icons/cd_rom_component.rb +23 -0
- data/app/components/blacklight/icons/child_item_component.rb +23 -0
- data/app/components/blacklight/icons/circle_info_solid_component.rb +23 -0
- data/app/components/blacklight/icons/citation_component.rb +23 -0
- data/app/components/blacklight/icons/collection_component.rb +23 -0
- data/app/components/blacklight/icons/collections_component.rb +24 -0
- data/app/components/blacklight/icons/columbia_component.rb +23 -0
- data/app/components/blacklight/icons/cornell_component.rb +25 -0
- data/app/components/blacklight/icons/datasets_component.rb +27 -0
- data/app/components/blacklight/icons/dvd_rom_component.rb +23 -0
- data/app/components/blacklight/icons/email_component.rb +23 -0
- data/app/components/blacklight/icons/esri_globe_component.rb +51 -0
- data/app/components/blacklight/icons/fire_solid_component.rb +23 -0
- data/app/components/blacklight/icons/george_mason_component.rb +24 -0
- data/app/components/blacklight/icons/globe_component.rb +23 -0
- data/app/components/blacklight/icons/harvard_component.rb +23 -0
- data/app/components/blacklight/icons/home_component.rb +23 -0
- data/app/components/blacklight/icons/iiif_drag_drop_component.rb +31 -0
- data/app/components/blacklight/icons/image_component.rb +23 -0
- data/app/components/blacklight/icons/imagery_component.rb +24 -0
- data/app/components/blacklight/icons/indiana_component.rb +23 -0
- data/app/components/blacklight/icons/leaf_component.rb +23 -0
- data/app/components/blacklight/icons/lewis_clark_component.rb +25 -0
- data/app/components/blacklight/icons/lightbulb_solid_component.rb +23 -0
- data/app/components/blacklight/icons/line_component.rb +24 -0
- data/app/components/blacklight/icons/map_component.rb +23 -0
- data/app/components/blacklight/icons/map_marker_component.rb +23 -0
- data/app/components/blacklight/icons/maps_component.rb +24 -0
- data/app/components/blacklight/icons/massgis_component.rb +23 -0
- data/app/components/blacklight/icons/metadata_component.rb +23 -0
- data/app/components/blacklight/icons/michigan_state_university_component.rb +25 -0
- data/app/components/blacklight/icons/mit_component.rb +23 -0
- data/app/components/blacklight/icons/mixed_component.rb +25 -0
- data/app/components/blacklight/icons/multilinestring_component.rb +26 -0
- data/app/components/blacklight/icons/multipoint_component.rb +23 -0
- data/app/components/blacklight/icons/multipolygon_component.rb +26 -0
- data/app/components/blacklight/icons/northwestern_university_component.rb +24 -0
- data/app/components/blacklight/icons/nyu_component.rb +26 -0
- data/app/components/blacklight/icons/pagelines_brands_component.rb +23 -0
- data/app/components/blacklight/icons/paper_map_component.rb +23 -0
- data/app/components/blacklight/icons/parent_item_component.rb +23 -0
- data/app/components/blacklight/icons/pennsylvania_state_university_component.rb +25 -0
- data/app/components/blacklight/icons/point_component.rb +23 -0
- data/app/components/blacklight/icons/polygon_component.rb +24 -0
- data/app/components/blacklight/icons/polyline_component.rb +26 -0
- data/app/components/blacklight/icons/princeton_component.rb +23 -0
- data/app/components/blacklight/icons/public_component.rb +23 -0
- data/app/components/blacklight/icons/purdue_university_component.rb +25 -0
- data/app/components/blacklight/icons/raster_component.rb +23 -0
- data/app/components/blacklight/icons/restricted_component.rb +23 -0
- data/app/components/blacklight/icons/rutgers_component.rb +25 -0
- data/app/components/blacklight/icons/sms_component.rb +23 -0
- data/app/components/blacklight/icons/stanford_component.rb +23 -0
- data/app/components/blacklight/icons/table_component.rb +23 -0
- data/app/components/blacklight/icons/tags_component.rb +23 -0
- data/app/components/blacklight/icons/texas_component.rb +23 -0
- data/app/components/blacklight/icons/the_ohio_state_university_component.rb +26 -0
- data/app/components/blacklight/icons/triangle_exclamation_solid_component.rb +23 -0
- data/app/components/blacklight/icons/tufts_component.rb +23 -0
- data/app/components/blacklight/icons/ucla_component.rb +23 -0
- data/app/components/blacklight/icons/university_of_california_berkeley_component.rb +24 -0
- data/app/components/blacklight/icons/university_of_chicago_component.rb +25 -0
- data/app/components/blacklight/icons/university_of_colorado_boulder_component.rb +26 -0
- data/app/components/blacklight/icons/university_of_illinois_urbana_champaign_component.rb +25 -0
- data/app/components/blacklight/icons/university_of_iowa_component.rb +24 -0
- data/app/components/blacklight/icons/university_of_maryland_component.rb +24 -0
- data/app/components/blacklight/icons/university_of_michigan_component.rb +24 -0
- data/app/components/blacklight/icons/university_of_minnesota_component.rb +24 -0
- data/app/components/blacklight/icons/university_of_nebraska_lincoln_component.rb +27 -0
- data/app/components/blacklight/icons/university_of_wisconsin_madison_component.rb +24 -0
- data/app/components/blacklight/icons/uva_component.rb +23 -0
- data/app/components/blacklight/icons/web_services_component.rb +23 -0
- data/app/components/blacklight/icons/websites_component.rb +24 -0
- data/app/components/geoblacklight/arcgis_component.html.erb +3 -0
- data/app/components/geoblacklight/arcgis_component.rb +25 -0
- data/app/components/geoblacklight/attribute_table_component.html.erb +17 -0
- data/app/components/geoblacklight/attribute_table_component.rb +17 -0
- data/app/components/geoblacklight/data_dictionary_download_component.html.erb +3 -0
- data/app/components/geoblacklight/data_dictionary_download_component.rb +16 -0
- data/app/components/geoblacklight/display_note_component.rb +1 -1
- data/app/components/geoblacklight/document/citation_component.html.erb +1 -0
- data/app/components/geoblacklight/document/citation_component.rb +19 -0
- data/app/components/geoblacklight/document/sidebar_component.html.erb +12 -0
- data/app/components/geoblacklight/document/sidebar_component.rb +8 -0
- data/app/components/geoblacklight/document_component.html.erb +43 -0
- data/app/components/geoblacklight/document_component.rb +6 -0
- data/app/components/geoblacklight/download_links_component.html.erb +31 -0
- data/app/components/geoblacklight/download_links_component.rb +80 -0
- data/app/components/geoblacklight/header_component.html.erb +14 -0
- data/app/components/geoblacklight/header_component.rb +9 -0
- data/app/components/geoblacklight/header_icons_component.html.erb +3 -0
- data/app/components/geoblacklight/header_icons_component.rb +29 -0
- data/app/components/geoblacklight/iiif_drag_drop_component.html.erb +3 -0
- data/app/components/geoblacklight/iiif_drag_drop_component.rb +16 -0
- data/app/components/geoblacklight/index_map_inspect_component.rb +15 -0
- data/app/components/geoblacklight/index_map_legend_component.html.erb +14 -0
- data/app/components/geoblacklight/index_map_legend_component.rb +17 -0
- data/app/components/geoblacklight/item_map_viewer_component.html.erb +1 -0
- data/app/components/geoblacklight/item_map_viewer_component.rb +87 -0
- data/app/components/geoblacklight/location_leaflet_map_component.html.erb +1 -0
- data/app/components/geoblacklight/location_leaflet_map_component.rb +49 -0
- data/app/components/geoblacklight/login_link_component.html.erb +5 -0
- data/app/components/geoblacklight/login_link_component.rb +17 -0
- data/app/components/geoblacklight/relations_component.html.erb +23 -0
- data/app/components/geoblacklight/relations_component.rb +25 -0
- data/app/components/geoblacklight/search_result_component.html.erb +44 -0
- data/app/components/geoblacklight/search_result_component.rb +28 -0
- data/app/components/geoblacklight/static_map_component.html.erb +9 -0
- data/app/components/geoblacklight/static_map_component.rb +36 -0
- data/app/components/geoblacklight/viewer_help_text_component.html.erb +1 -0
- data/app/components/geoblacklight/viewer_help_text_component.rb +46 -0
- data/app/components/geoblacklight/web_services_component.html.erb +1 -0
- data/app/components/geoblacklight/web_services_component.rb +26 -0
- data/app/{views/catalog/_web_services_default.html.erb → components/geoblacklight/web_services_default_component.html.erb} +3 -5
- data/app/components/geoblacklight/web_services_default_component.rb +11 -0
- data/app/components/geoblacklight/web_services_link_component.html.erb +3 -0
- data/app/components/geoblacklight/web_services_link_component.rb +22 -0
- data/app/{views/catalog/_web_services_wfs.html.erb → components/geoblacklight/web_services_wfs_component.html.erb} +4 -7
- data/app/components/geoblacklight/web_services_wfs_component.rb +12 -0
- data/app/components/geoblacklight/web_services_wms_component.html.erb +10 -0
- data/app/components/geoblacklight/web_services_wms_component.rb +12 -0
- data/app/controllers/download_controller.rb +8 -29
- data/app/controllers/relation_controller.rb +0 -1
- data/app/helpers/geoblacklight_helper.rb +10 -247
- data/app/javascript/geoblacklight/controllers/clipboard_controller.js +11 -0
- data/app/javascript/geoblacklight/controllers/clover_viewer_controller.js +47 -0
- data/app/javascript/geoblacklight/controllers/downloads_controller.js +56 -0
- data/app/javascript/geoblacklight/controllers/leaflet_viewer_controller.js +217 -0
- data/app/javascript/geoblacklight/controllers/oembed_viewer_controller.js +18 -0
- data/app/javascript/geoblacklight/controllers/openlayers_viewer_controller.js +63 -0
- data/app/javascript/geoblacklight/controllers/search_results_controller.js +50 -0
- data/app/javascript/geoblacklight/core.js +69 -0
- data/app/javascript/geoblacklight/index.js +29 -0
- data/app/javascript/geoblacklight/initializers/metadata_download.js +54 -0
- data/app/javascript/geoblacklight/initializers/popovers.js +11 -0
- data/app/javascript/geoblacklight/initializers/relations.js +40 -0
- data/app/javascript/geoblacklight/initializers/tooltips.js +55 -0
- data/app/javascript/geoblacklight/initializers/truncation.js +45 -0
- data/app/javascript/geoblacklight/leaflet/basemaps.js +74 -0
- data/app/javascript/geoblacklight/leaflet/constants.js +18 -0
- data/app/javascript/geoblacklight/leaflet/controls/geosearch.js +160 -0
- data/app/javascript/geoblacklight/leaflet/controls/layer_opacity.js +120 -0
- data/app/javascript/geoblacklight/leaflet/inspection.js +195 -0
- data/app/javascript/geoblacklight/leaflet/layer_index_map.js +120 -0
- data/app/javascript/geoblacklight/leaflet/layer_wmts.js +59 -0
- data/app/javascript/geoblacklight/leaflet/layers.js +153 -0
- data/app/javascript/geoblacklight/leaflet/utils.js +83 -0
- data/app/javascript/geoblacklight/openlayers/basemaps.js +47 -0
- data/app/javascript/geoblacklight/openlayers/layers.js +44 -0
- data/app/models/concerns/geoblacklight/solr_document/citation.rb +20 -15
- data/app/models/concerns/geoblacklight/solr_document/inspection.rb +1 -1
- data/app/models/concerns/geoblacklight/solr_document.rb +23 -59
- data/app/presenters/geoblacklight/bbox_item_presenter.rb +1 -1
- data/app/views/catalog/_citation.html.erb +16 -33
- data/app/views/catalog/_document_split.html.erb +18 -3
- data/app/views/catalog/_home_text.html.erb +2 -2
- data/app/views/catalog/_metadata.html.erb +1 -1
- data/app/views/catalog/index.html.erb +8 -4
- data/app/views/catalog/metadata/_markup.html.erb +1 -1
- data/app/views/catalog/metadata.html.erb +14 -13
- data/app/views/catalog/web_services.html.erb +19 -28
- data/app/views/relation/index.html.erb +2 -12
- data/app/views/relation/index.json.jbuilder +1 -1
- data/compose.yml +14 -0
- data/config/importmap.rb +20 -0
- data/config/locales/geoblacklight.en.yml +15 -24
- data/geoblacklight.gemspec +8 -8
- data/lib/generators/geoblacklight/assets/importmap_generator.rb +87 -0
- data/lib/generators/geoblacklight/assets/vite_generator.rb +90 -0
- data/lib/generators/geoblacklight/assets_generator.rb +12 -37
- data/lib/generators/geoblacklight/install_generator.rb +11 -63
- data/lib/generators/geoblacklight/templates/assets/_customizations.scss +13 -19
- data/lib/generators/geoblacklight/templates/assets/application.js +17 -0
- data/lib/generators/geoblacklight/templates/assets/application.scss +9 -4
- data/lib/generators/geoblacklight/templates/assets/geoblacklight.scss +11 -0
- data/lib/generators/geoblacklight/templates/base.html.erb +9 -12
- data/lib/generators/geoblacklight/templates/catalog_controller.rb +11 -18
- data/lib/generators/geoblacklight/templates/demo-app/Dockerfile +31 -0
- data/lib/generators/geoblacklight/templates/demo-app/compose.yml +26 -0
- data/lib/generators/geoblacklight/templates/demo-app/start-server.sh +21 -0
- data/lib/generators/geoblacklight/templates/package.json +7 -1
- data/lib/generators/geoblacklight/templates/settings.yml +45 -59
- data/lib/generators/geoblacklight/templates/vite.config.ts +22 -7
- data/lib/geoblacklight/bounding_box.rb +16 -0
- data/lib/geoblacklight/constants.rb +0 -1
- data/lib/geoblacklight/download/csv_download.rb +22 -0
- data/lib/geoblacklight/download/geojson_download.rb +1 -1
- data/lib/geoblacklight/download/geotiff_download.rb +1 -1
- data/lib/geoblacklight/download/kmz_download.rb +1 -1
- data/lib/geoblacklight/download/shapefile_download.rb +1 -1
- data/lib/geoblacklight/download.rb +1 -1
- data/lib/geoblacklight/engine.rb +15 -20
- data/lib/geoblacklight/geometry.rb +0 -7
- data/lib/geoblacklight/item_viewer.rb +1 -8
- data/lib/geoblacklight/metadata/base.rb +2 -1
- data/lib/geoblacklight/references.rb +27 -23
- data/lib/geoblacklight/routes/downloadable.rb +0 -1
- data/lib/geoblacklight/routes.rb +0 -3
- data/lib/geoblacklight/version.rb +1 -1
- data/lib/geoblacklight/wms_layer/feature_info_response.rb +9 -6
- data/lib/geoblacklight.rb +6 -47
- data/lib/tasks/geoblacklight.rake +24 -77
- data/package.json +22 -16
- data/solr/conf/schema.xml +15 -13
- data/solr/conf/solrconfig.xml +6 -4
- data/spec/components/blacklight/icons/american_geographical_society_library_uwm_libraries_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/arizona_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/arrow_circle_down_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/baruch_cuny_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/book_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/bookmark_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/cd_rom_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/child_item_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/circle_info_solid_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/citation_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/collection_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/collections_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/columbia_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/cornell_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/datasets_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/dvd_rom_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/email_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/esri_globe_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/fire_solid_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/george_mason_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/globe_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/harvard_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/home_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/iiif_drag_drop_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/image_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/imagery_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/indiana_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/leaf_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/lewis_clark_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/lightbulb_solid_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/line_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/map_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/map_marker_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/maps_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/massgis_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/metadata_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/michigan_state_university_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/mit_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/mixed_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/multilinestring_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/multipoint_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/multipolygon_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/northwestern_university_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/nyu_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/pagelines_brands_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/paper_map_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/parent_item_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/pennsylvania_state_university_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/point_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/polygon_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/polyline_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/princeton_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/public_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/purdue_university_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/raster_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/restricted_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/rutgers_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/sms_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/stanford_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/table_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/tags_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/texas_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/the_ohio_state_university_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/triangle_exclamation_solid_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/tufts_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/ucla_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/university_of_california_berkeley_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/university_of_chicago_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/university_of_colorado_boulder_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/university_of_illinois_urbana_champaign_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/university_of_iowa_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/university_of_maryland_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/university_of_michigan_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/university_of_minnesota_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/university_of_nebraska_lincoln_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/university_of_wisconsin_madison_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/uva_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/web_services_component_spec.rb +15 -0
- data/spec/components/blacklight/icons/websites_component_spec.rb +15 -0
- data/spec/components/geoblacklight/arcgis_component_spec.rb +31 -0
- data/spec/components/geoblacklight/attribute_table_component_spec.rb +37 -0
- data/spec/components/geoblacklight/citation_component_spec.rb +37 -0
- data/spec/components/geoblacklight/document_component_spec.rb +92 -0
- data/spec/components/geoblacklight/download_links_component_spec.rb +102 -0
- data/spec/components/geoblacklight/header_icons_component_spec.rb +56 -0
- data/spec/components/geoblacklight/iiif_drag_drop_component_spec.rb +30 -0
- data/spec/components/geoblacklight/index_map_legend_component_spec.rb +42 -0
- data/spec/components/geoblacklight/item_map_viewer_component_spec.rb +36 -0
- data/spec/components/geoblacklight/login_link_component_spec.rb +33 -0
- data/spec/{lib/geoblacklight/document_presenter_spec.rb → components/geoblacklight/search_result_component_spec.rb} +19 -11
- data/spec/components/geoblacklight/static_map_component_spec.rb +22 -0
- data/spec/components/geoblacklight/viewer_help_text_component_spec.rb +28 -0
- data/spec/components/geoblacklight/web_services_component_spec.rb +45 -0
- data/spec/controllers/download_controller_spec.rb +12 -35
- data/spec/features/axe_spec.rb +66 -0
- data/spec/features/bookmarks_spec.rb +1 -1
- data/spec/features/citations_spec.rb +7 -3
- data/spec/features/configurable_basemap_spec.rb +0 -56
- data/spec/features/download_layer_spec.rb +24 -39
- data/spec/features/esri_viewer_spec.rb +1 -1
- data/spec/features/exports_spec.rb +0 -15
- data/spec/features/{full_screen_controll_spec.rb → full_screen_control_spec.rb} +6 -6
- data/spec/features/home_page_spec.rb +12 -7
- data/spec/features/iiif_viewer_spec.rb +1 -1
- data/spec/features/index_map_spec.rb +16 -9
- data/spec/features/{split_view.html.erb_spec.rb → index_view_spec.rb} +15 -13
- data/spec/features/layer_inspection_spec.rb +2 -2
- data/spec/features/layer_preview_spec.rb +1 -1
- data/spec/features/missing_metadata_spec.rb +5 -5
- data/spec/features/oembed_spec.rb +2 -2
- data/spec/features/saved_searches_spec.rb +4 -1
- data/spec/features/search_results_complex_geometry_spec.rb +2 -2
- data/spec/features/search_results_icons_spec.rb +3 -3
- data/spec/features/search_results_map_spec.rb +4 -36
- data/spec/features/search_results_overlap_ratio_spec.rb +1 -1
- data/spec/features/show_page_download_spec.rb +0 -8
- data/spec/features/tilejson_spec.rb +2 -2
- data/spec/features/web_services_modal_spec.rb +57 -39
- data/spec/features/wmts_spec.rb +4 -4
- data/spec/fixtures/solr_documents/README.md +2 -1
- data/spec/fixtures/solr_documents/complex-geom.json +61 -0
- data/spec/fixtures/solr_documents/esri-tiled_map_layer.json +45 -24
- data/spec/fixtures/solr_documents/harvard_raster.json +1 -1
- data/spec/fixtures/solr_documents/multiple-downloads.json +1 -0
- data/spec/helpers/geoblacklight_helper_spec.rb +8 -173
- data/spec/lib/geoblacklight/download/csv_download_spec.rb +21 -0
- data/spec/lib/geoblacklight/geometry_spec.rb +0 -15
- data/spec/lib/geoblacklight/reference_spec.rb +17 -19
- data/spec/lib/geoblacklight/references_spec.rb +30 -40
- data/spec/lib/geoblacklight/wms_layer/feature_info_response_spec.rb +8 -6
- data/spec/lib/geoblacklight/wms_layer_spec.rb +14 -0
- data/spec/models/concerns/geoblacklight/solr_document/citation_spec.rb +1 -17
- data/spec/models/concerns/geoblacklight/solr_document_spec.rb +1 -69
- data/spec/spec_helper.rb +2 -31
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +4 -4
- data/template.rb +13 -11
- data/test/leaflet/layers.test.js +17 -0
- data/vite.config.ts +34 -23
- metadata +315 -273
- data/.hound.yml +0 -8
- data/.jshintignore +0 -2
- data/.jshintrc +0 -67
- data/.solr_wrapper +0 -7
- data/app/assets/images/blacklight/american-geographical-society-library-uwm-libraries.svg +0 -26
- data/app/assets/images/blacklight/arrow-circle-down.svg +0 -3
- data/app/assets/images/blacklight/baruch-cuny.svg +0 -3
- data/app/assets/images/blacklight/book.svg +0 -3
- data/app/assets/images/blacklight/bookmark.svg +0 -3
- data/app/assets/images/blacklight/cd-rom.svg +0 -3
- data/app/assets/images/blacklight/chicago.svg +0 -4
- data/app/assets/images/blacklight/child-item.svg +0 -3
- data/app/assets/images/blacklight/circle-info-solid.svg +0 -1
- data/app/assets/images/blacklight/citation.svg +0 -3
- data/app/assets/images/blacklight/collection.svg +0 -3
- data/app/assets/images/blacklight/collections.svg +0 -4
- data/app/assets/images/blacklight/columbia.svg +0 -3
- data/app/assets/images/blacklight/cornell.svg +0 -5
- data/app/assets/images/blacklight/datasets.svg +0 -7
- data/app/assets/images/blacklight/dvd-rom.svg +0 -3
- data/app/assets/images/blacklight/email.svg +0 -3
- data/app/assets/images/blacklight/esri-globe.svg +0 -31
- data/app/assets/images/blacklight/fire-solid.svg +0 -1
- data/app/assets/images/blacklight/geoblacklight-icons.json +0 -3312
- data/app/assets/images/blacklight/george-mason.svg +0 -4
- data/app/assets/images/blacklight/globe.svg +0 -3
- data/app/assets/images/blacklight/harvard.svg +0 -3
- data/app/assets/images/blacklight/home.svg +0 -3
- data/app/assets/images/blacklight/illinois.svg +0 -4
- data/app/assets/images/blacklight/image.svg +0 -3
- data/app/assets/images/blacklight/imagery.svg +0 -4
- data/app/assets/images/blacklight/indiana.svg +0 -3
- data/app/assets/images/blacklight/iowa.svg +0 -3
- data/app/assets/images/blacklight/leaf.svg +0 -3
- data/app/assets/images/blacklight/lewis-clark.svg +0 -5
- data/app/assets/images/blacklight/lightbulb-solid.svg +0 -1
- data/app/assets/images/blacklight/line.svg +0 -4
- data/app/assets/images/blacklight/map-marker.svg +0 -3
- data/app/assets/images/blacklight/map.svg +0 -3
- data/app/assets/images/blacklight/maps.svg +0 -4
- data/app/assets/images/blacklight/maryland.svg +0 -3
- data/app/assets/images/blacklight/massgis.svg +0 -3
- data/app/assets/images/blacklight/metadata.svg +0 -3
- data/app/assets/images/blacklight/michigan-state-university.svg +0 -5
- data/app/assets/images/blacklight/michigan-state.svg +0 -4
- data/app/assets/images/blacklight/michigan.svg +0 -3
- data/app/assets/images/blacklight/minnesota.svg +0 -3
- data/app/assets/images/blacklight/mit.svg +0 -3
- data/app/assets/images/blacklight/mixed.svg +0 -5
- data/app/assets/images/blacklight/multilinestring.svg +0 -6
- data/app/assets/images/blacklight/multipoint.svg +0 -3
- data/app/assets/images/blacklight/multipolygon.svg +0 -6
- data/app/assets/images/blacklight/nebraska.svg +0 -4
- data/app/assets/images/blacklight/northwestern-university.svg +0 -5
- data/app/assets/images/blacklight/nyu.svg +0 -6
- data/app/assets/images/blacklight/ohio-state.svg +0 -5
- data/app/assets/images/blacklight/pagelines-brands.svg +0 -3
- data/app/assets/images/blacklight/paper-map.svg +0 -3
- data/app/assets/images/blacklight/parent-item.svg +0 -3
- data/app/assets/images/blacklight/penn-state.svg +0 -4
- data/app/assets/images/blacklight/pennsylvania-state-university.svg +0 -5
- data/app/assets/images/blacklight/point.svg +0 -3
- data/app/assets/images/blacklight/polygon.svg +0 -4
- data/app/assets/images/blacklight/polyline.svg +0 -6
- data/app/assets/images/blacklight/princeton.svg +0 -3
- data/app/assets/images/blacklight/public.svg +0 -3
- data/app/assets/images/blacklight/purdue-university.svg +0 -5
- data/app/assets/images/blacklight/purdue.svg +0 -4
- data/app/assets/images/blacklight/raster.svg +0 -3
- data/app/assets/images/blacklight/restricted.svg +0 -3
- data/app/assets/images/blacklight/rutgers.svg +0 -5
- data/app/assets/images/blacklight/search.svg +0 -5
- data/app/assets/images/blacklight/sms.svg +0 -3
- data/app/assets/images/blacklight/stanford.svg +0 -3
- data/app/assets/images/blacklight/table.svg +0 -3
- data/app/assets/images/blacklight/tags.svg +0 -3
- data/app/assets/images/blacklight/texas.svg +0 -3
- data/app/assets/images/blacklight/the-ohio-state-university.svg +0 -6
- data/app/assets/images/blacklight/triangle-exclamation-solid.svg +0 -1
- data/app/assets/images/blacklight/tufts.svg +0 -3
- data/app/assets/images/blacklight/ucla.svg +0 -3
- data/app/assets/images/blacklight/university-of-arizona.svg +0 -4
- data/app/assets/images/blacklight/university-of-california-berkeley.svg +0 -4
- data/app/assets/images/blacklight/university-of-chicago.svg +0 -5
- data/app/assets/images/blacklight/university-of-colorado-boulder.svg +0 -6
- data/app/assets/images/blacklight/university-of-illinois-urbana-champaign.svg +0 -5
- data/app/assets/images/blacklight/university-of-iowa.svg +0 -4
- data/app/assets/images/blacklight/university-of-maryland.svg +0 -4
- data/app/assets/images/blacklight/university-of-michigan.svg +0 -4
- data/app/assets/images/blacklight/university-of-minnesota.svg +0 -4
- data/app/assets/images/blacklight/university-of-nebraska-lincoln.svg +0 -7
- data/app/assets/images/blacklight/university-of-wisconsin-madison.svg +0 -4
- data/app/assets/images/blacklight/uva.svg +0 -3
- data/app/assets/images/blacklight/web_services.svg +0 -3
- data/app/assets/images/blacklight/websites.svg +0 -4
- data/app/assets/images/blacklight/wisconsin.svg +0 -3
- data/app/assets/javascripts/geoblacklight/basemaps.js +0 -63
- data/app/assets/javascripts/geoblacklight/controls/fullscreen.js +0 -8
- data/app/assets/javascripts/geoblacklight/controls/opacity.js +0 -6
- data/app/assets/javascripts/geoblacklight/controls.js +0 -1
- data/app/assets/javascripts/geoblacklight/downloaders/downloader.js +0 -61
- data/app/assets/javascripts/geoblacklight/downloaders/hgl_downloader.js +0 -32
- data/app/assets/javascripts/geoblacklight/downloaders.js +0 -1
- data/app/assets/javascripts/geoblacklight/geoblacklight.js +0 -60
- data/app/assets/javascripts/geoblacklight/modules/bookmarks.js +0 -43
- data/app/assets/javascripts/geoblacklight/modules/download.js +0 -11
- data/app/assets/javascripts/geoblacklight/modules/geosearch.js +0 -133
- data/app/assets/javascripts/geoblacklight/modules/help_text.js +0 -7
- data/app/assets/javascripts/geoblacklight/modules/home.js +0 -16
- data/app/assets/javascripts/geoblacklight/modules/item.js +0 -32
- data/app/assets/javascripts/geoblacklight/modules/layer_opacity.js +0 -68
- data/app/assets/javascripts/geoblacklight/modules/metadata.js +0 -15
- data/app/assets/javascripts/geoblacklight/modules/metadata_download_button.js +0 -58
- data/app/assets/javascripts/geoblacklight/modules/relations.js +0 -14
- data/app/assets/javascripts/geoblacklight/modules/results.js +0 -81
- data/app/assets/javascripts/geoblacklight/modules/svg_tooltips.js +0 -31
- data/app/assets/javascripts/geoblacklight/modules/util.js +0 -48
- data/app/assets/javascripts/geoblacklight/modules.js +0 -1
- data/app/assets/javascripts/geoblacklight/templates/index_map_download.hbs +0 -19
- data/app/assets/javascripts/geoblacklight/templates/index_map_info.hbs +0 -61
- data/app/assets/javascripts/geoblacklight/viewers/cog.js +0 -5
- data/app/assets/javascripts/geoblacklight/viewers/esri/dynamic_map_layer.js +0 -85
- data/app/assets/javascripts/geoblacklight/viewers/esri/feature_layer.js +0 -76
- data/app/assets/javascripts/geoblacklight/viewers/esri/image_map_layer.js +0 -14
- data/app/assets/javascripts/geoblacklight/viewers/esri/tiled_map_layer.js +0 -50
- data/app/assets/javascripts/geoblacklight/viewers/esri.js +0 -78
- data/app/assets/javascripts/geoblacklight/viewers/iiif.js +0 -25
- data/app/assets/javascripts/geoblacklight/viewers/index_map.js +0 -71
- data/app/assets/javascripts/geoblacklight/viewers/map.js +0 -94
- data/app/assets/javascripts/geoblacklight/viewers/oembed.js +0 -13
- data/app/assets/javascripts/geoblacklight/viewers/pmtiles.js +0 -5
- data/app/assets/javascripts/geoblacklight/viewers/tilejson.js +0 -33
- data/app/assets/javascripts/geoblacklight/viewers/tms.js +0 -10
- data/app/assets/javascripts/geoblacklight/viewers/viewer.js +0 -68
- data/app/assets/javascripts/geoblacklight/viewers/wms.js +0 -74
- data/app/assets/javascripts/geoblacklight/viewers/wmts.js +0 -85
- data/app/assets/javascripts/geoblacklight/viewers/xyz.js +0 -10
- data/app/assets/javascripts/geoblacklight/viewers.js +0 -1
- data/app/assets/stylesheets/geoblacklight/modules/mixins.scss +0 -5
- data/app/helpers/arcgis_helper.rb +0 -17
- data/app/helpers/blacklight_helper.rb +0 -15
- data/app/helpers/carto_helper.rb +0 -36
- data/app/helpers/geoblacklight/geoblacklight_helper_behavior.rb +0 -24
- data/app/javascript/clover/clover_initializer.js +0 -29
- data/app/javascript/index.js +0 -7
- data/app/javascript/openlayers/basemaps.js +0 -27
- data/app/javascript/openlayers/ol_initializer.js +0 -131
- data/app/javascript/stylesheets/openlayers.css +0 -1
- data/app/models/concerns/geoblacklight/solr_document/carto.rb +0 -24
- data/app/presenters/geoblacklight/document_presenter.rb +0 -34
- data/app/views/catalog/_arcgis.html.erb +0 -4
- data/app/views/catalog/_carto.html.erb +0 -4
- data/app/views/catalog/_data_dictionary.html.erb +0 -5
- data/app/views/catalog/_downloads_collapse.html.erb +0 -30
- data/app/views/catalog/_header_icons.html.erb +0 -3
- data/app/views/catalog/_index_split_default.html.erb +0 -30
- data/app/views/catalog/_results_pagination.html.erb +0 -12
- data/app/views/catalog/_show_default_attribute_table.html.erb +0 -19
- data/app/views/catalog/_show_default_display_note.html.erb +0 -7
- data/app/views/catalog/_show_default_viewer_container.html.erb +0 -28
- data/app/views/catalog/_show_downloads.html.erb +0 -26
- data/app/views/catalog/_show_header_default.html.erb +0 -4
- data/app/views/catalog/_show_sidebar.html.erb +0 -16
- data/app/views/catalog/_show_sidebar_static_map.html.erb +0 -13
- data/app/views/catalog/_show_web_services.html.erb +0 -11
- data/app/views/catalog/_web_services.html.erb +0 -9
- data/app/views/catalog/_web_services_wms.html.erb +0 -13
- data/app/views/download/hgl.html.erb +0 -27
- data/app/views/relation/_relations.html.erb +0 -15
- data/app/views/shared/_header_navbar.html.erb +0 -46
- data/babel.config.json +0 -4
- data/jest.config.js +0 -25
- data/lib/generators/geoblacklight/templates/assets/_blacklight.scss +0 -1
- data/lib/generators/geoblacklight/templates/assets/_geoblacklight.scss +0 -1
- data/lib/generators/geoblacklight/templates/assets/geoblacklight.js +0 -9
- data/lib/generators/geoblacklight/templates/clover.js +0 -5
- data/lib/generators/geoblacklight/templates/ol.js +0 -6
- data/lib/generators/geoblacklight/templates/package-test.json +0 -10
- data/lib/generators/geoblacklight/templates/settings.gbl_v1.yml +0 -195
- data/lib/geoblacklight/deprecated_configuration.rb +0 -519
- data/lib/geoblacklight/download/hgl_download.rb +0 -25
- data/lib/geoblacklight/view_helper_override.rb +0 -27
- data/setupJest.js +0 -14
- data/spec/helpers/arcgis_helper_spec.rb +0 -16
- data/spec/helpers/carto_helper_spec.rb +0 -13
- data/spec/helpers/geoblacklight/geoblacklight_helper_behavior_spec.rb +0 -27
- data/spec/javascripts/util_spec.js +0 -10
- data/spec/lib/geoblacklight/deprecated_configuration_spec.rb +0 -597
- data/spec/lib/geoblacklight/download/hgl_download_spec.rb +0 -62
- data/spec/lib/geoblacklight/view_helper_override_spec.rb +0 -30
- data/spec/models/concerns/geoblacklight/solr_document/carto_spec.rb +0 -43
- data/spec/test_app_templates/Gemfile.extra +0 -2
- data/spec/views/catalog/_document_split.html.erb_spec.rb +0 -7
- data/spec/views/catalog/_index_split.html.erb_spec.rb +0 -7
- data/spec/views/catalog/_results_pagination.html.erb_spec.rb +0 -11
- data/spec/views/catalog/_show_downloads.html.erb_spec.rb +0 -43
- data/spec/views/catalog/_show_tools.html.erb_spec.rb +0 -38
- data/vendor/assets/images/fullscreen.png +0 -0
- data/vendor/assets/images/fullscreen@2x.png +0 -0
- data/vendor/assets/images/layers-2x.png +0 -0
- data/vendor/assets/images/layers.png +0 -0
- data/vendor/assets/images/marker-icon-2x.png +0 -0
- data/vendor/assets/images/marker-icon.png +0 -0
- data/vendor/assets/images/marker-shadow.png +0 -0
- data/vendor/assets/javascripts/Leaflet.fullscreen.js +0 -152
- data/vendor/assets/javascripts/esri-leaflet.js +0 -12
- data/vendor/assets/javascripts/esri-leaflet.js.map +0 -1
- data/vendor/assets/javascripts/leaflet-iiif.js +0 -323
- data/vendor/assets/javascripts/leaflet-src.js.erb +0 -14126
- data/vendor/assets/javascripts/leaflet-src.js.map +0 -1
- data/vendor/assets/javascripts/native.history.js +0 -1
- data/vendor/assets/stylesheets/leaflet.css +0 -640
- data/vendor/assets/stylesheets/leaflet.fullscreen.css +0 -40
- /data/app/{views/catalog/_show_default_viewer_information.html.erb → components/geoblacklight/index_map_inspect_component.html.erb} +0 -0
|
@@ -34,33 +34,31 @@ describe Geoblacklight::Reference do
|
|
|
34
34
|
end
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
-
describe "
|
|
38
|
-
|
|
39
|
-
let(:iso19139_reference) do
|
|
40
|
-
described_class.new(["http://www.isotc211.org/schemas/2005/gmd/", "https://raw.githubusercontent.com/OpenGeoMetadata/edu.stanford.purl/master/cg/357/zz/0321/iso19139.xml"])
|
|
41
|
-
end
|
|
37
|
+
describe "#uri" do
|
|
38
|
+
subject { described_class.new(urls).send(:uri) }
|
|
42
39
|
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
context "when key has one trailing slash" do
|
|
41
|
+
let(:urls) do
|
|
42
|
+
["http://www.isotc211.org/schemas/2005/gmd/", "https://raw.githubusercontent.com/OpenGeoMetadata/edu.stanford.purl/master/cg/357/zz/0321/iso19139.xml"]
|
|
45
43
|
end
|
|
44
|
+
|
|
45
|
+
it { is_expected.to eq "http://www.isotc211.org/schemas/2005/gmd" }
|
|
46
46
|
end
|
|
47
|
-
context "key does not have trailing slashes" do
|
|
48
|
-
let(:iso19139_reference) do
|
|
49
|
-
described_class.new(["http://www.isotc211.org/schemas/2005/gmd", "https://raw.githubusercontent.com/OpenGeoMetadata/edu.stanford.purl/master/cg/357/zz/0321/iso19139.xml"])
|
|
50
|
-
end
|
|
51
47
|
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
context "when key does not have trailing slashes" do
|
|
49
|
+
let(:urls) do
|
|
50
|
+
["http://www.isotc211.org/schemas/2005/gmd", "https://raw.githubusercontent.com/OpenGeoMetadata/edu.stanford.purl/master/cg/357/zz/0321/iso19139.xml"]
|
|
54
51
|
end
|
|
52
|
+
|
|
53
|
+
it { is_expected.to eq "http://www.isotc211.org/schemas/2005/gmd" }
|
|
55
54
|
end
|
|
56
|
-
context "key has trailing slashes" do
|
|
57
|
-
let(:fgdc_reference) do
|
|
58
|
-
described_class.new(["http://www.opengis.net/cat/csw/csdgm////", "https://raw.githubusercontent.com/OpenGeoMetadata/edu.harvard/master/217/121/227/77/fgdc.xml"])
|
|
59
|
-
end
|
|
60
55
|
|
|
61
|
-
|
|
62
|
-
|
|
56
|
+
context "when key has multiple trailing slashes" do
|
|
57
|
+
let(:urls) do
|
|
58
|
+
["http://www.opengis.net/cat/csw/csdgm////", "https://raw.githubusercontent.com/OpenGeoMetadata/edu.harvard/master/217/121/227/77/fgdc.xml"]
|
|
63
59
|
end
|
|
60
|
+
|
|
61
|
+
it { is_expected.to eq "http://www.opengis.net/cat/csw/csdgm" }
|
|
64
62
|
end
|
|
65
63
|
end
|
|
66
64
|
end
|
|
@@ -177,13 +177,13 @@ describe Geoblacklight::References do
|
|
|
177
177
|
it "returns available downloads by format" do
|
|
178
178
|
types = complex_shapefile.download_types
|
|
179
179
|
expect(types.first[1]).to eq wfs: "http://hgl.harvard.edu:8080/geoserver/wfs"
|
|
180
|
-
expect(types.count).to eq
|
|
180
|
+
expect(types.count).to eq 4
|
|
181
181
|
expect(direct_download_only.download_types).to be_nil
|
|
182
182
|
end
|
|
183
183
|
it "onlies return available downloads if no direct is present" do
|
|
184
184
|
types = typical_ogp_shapefile.download_types
|
|
185
185
|
expect(types.first[1]).to eq wfs: "http://hgl.harvard.edu:8080/geoserver/wfs"
|
|
186
|
-
expect(types.count).to eq
|
|
186
|
+
expect(types.count).to eq 4
|
|
187
187
|
end
|
|
188
188
|
end
|
|
189
189
|
describe "#esri_webservices" do
|
|
@@ -209,46 +209,36 @@ describe Geoblacklight::References do
|
|
|
209
209
|
end
|
|
210
210
|
end
|
|
211
211
|
describe "downloads_by_format" do
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
def initialize(attributes)
|
|
234
|
-
@attributes = attributes
|
|
235
|
-
end
|
|
236
|
-
|
|
237
|
-
def [](key)
|
|
238
|
-
@attributes[key]
|
|
239
|
-
end
|
|
212
|
+
context "using default settings for vector download formats" do
|
|
213
|
+
it "returns shapefile" do
|
|
214
|
+
expect(typical_ogp_shapefile.downloads_by_format.count).to eq 4
|
|
215
|
+
expect(typical_ogp_shapefile.downloads_by_format[:csv][:wfs]).to eq "http://hgl.harvard.edu:8080/geoserver/wfs"
|
|
216
|
+
expect(typical_ogp_shapefile.downloads_by_format[:geojson][:wfs]).to eq "http://hgl.harvard.edu:8080/geoserver/wfs"
|
|
217
|
+
expect(typical_ogp_shapefile.downloads_by_format[:kmz][:wms]).to eq "http://hgl.harvard.edu:8080/geoserver/wms"
|
|
218
|
+
expect(typical_ogp_shapefile.downloads_by_format[:shapefile][:wfs]).to eq "http://hgl.harvard.edu:8080/geoserver/wfs"
|
|
219
|
+
end
|
|
220
|
+
it "returns geotiff" do
|
|
221
|
+
expect(typical_ogp_geotiff.downloads_by_format.count).to eq 1
|
|
222
|
+
expect(typical_ogp_geotiff.downloads_by_format[:geotiff][:wms]).to eq "http://hgl.harvard.edu:8080/geoserver/wms"
|
|
223
|
+
end
|
|
224
|
+
it "returns arcgrid as geotiff" do
|
|
225
|
+
expect(typical_arcgrid.downloads_by_format.count).to eq 1
|
|
226
|
+
expect(typical_arcgrid.downloads_by_format[:geotiff][:wms]).to eq "http://hgl.harvard.edu:8080/geoserver/wms"
|
|
227
|
+
end
|
|
228
|
+
it "does not return shapefile if wms and wfs are not present" do
|
|
229
|
+
expect(no_service_shapefile.downloads_by_format).to be_nil
|
|
230
|
+
end
|
|
231
|
+
it "does not return GeoTIFF if wms is not present" do
|
|
232
|
+
expect(direct_download_only.downloads_by_format).to be_nil
|
|
240
233
|
end
|
|
241
234
|
end
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
expect(Geoblacklight.deprecation).to receive(:warn).with(/does not respond to #file_format/)
|
|
250
|
-
|
|
251
|
-
expect(described_class.new(document).format).to eq "Shapefile"
|
|
235
|
+
context "using custom settings which include incorrect settings" do
|
|
236
|
+
before do
|
|
237
|
+
allow(typical_ogp_shapefile).to receive(:format_list).and_return(["noformat"])
|
|
238
|
+
end
|
|
239
|
+
it "returns no formats for download" do
|
|
240
|
+
expect(typical_ogp_shapefile.downloads_by_format.count).to eq 0
|
|
241
|
+
end
|
|
252
242
|
end
|
|
253
243
|
end
|
|
254
244
|
end
|
|
@@ -29,15 +29,17 @@ describe Geoblacklight::FeatureInfoResponse do
|
|
|
29
29
|
describe "#format" do
|
|
30
30
|
it "returns a formated response" do
|
|
31
31
|
expect(response.format).not_to be_nil
|
|
32
|
-
expect(response.format[:
|
|
33
|
-
expect(response.format[:
|
|
34
|
-
expect(response.format[:
|
|
32
|
+
expect(response.format[:features][0][:properties].keys.length).to eq 2
|
|
33
|
+
expect(response.format[:features][0][:isHTML]).to be true
|
|
34
|
+
expect(response.format[:features][0][:properties]["Header1"]).to eq "value1"
|
|
35
|
+
expect(response.format[:features][0][:properties]["Header2"]).to eq "value2"
|
|
35
36
|
end
|
|
36
37
|
it "returns a formated response when multiple features are retrieved" do
|
|
37
38
|
expect(response_multiple_features.format).not_to be_nil
|
|
38
|
-
expect(
|
|
39
|
-
expect(
|
|
40
|
-
expect(
|
|
39
|
+
expect(response.format[:features][0][:properties].keys.length).to eq 2
|
|
40
|
+
expect(response.format[:features][0][:isHTML]).to be true
|
|
41
|
+
expect(response.format[:features][0][:properties]["Header1"]).to eq "value1"
|
|
42
|
+
expect(response.format[:features][0][:properties]["Header2"]).to eq "value2"
|
|
41
43
|
end
|
|
42
44
|
end
|
|
43
45
|
|
|
@@ -57,6 +57,20 @@ describe Geoblacklight::WmsLayer do
|
|
|
57
57
|
end
|
|
58
58
|
end
|
|
59
59
|
|
|
60
|
+
describe "#feature_info" do
|
|
61
|
+
let(:response) { instance_double(Geoblacklight::FeatureInfoResponse) }
|
|
62
|
+
let(:params) { rails_4_params }
|
|
63
|
+
|
|
64
|
+
before do
|
|
65
|
+
allow(Geoblacklight::FeatureInfoResponse).to receive(:new).and_return(response)
|
|
66
|
+
allow(response).to receive(:check)
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
it "returns the response from the FeatureInfoResponse object" do
|
|
70
|
+
expect(wms_layer.feature_info).to eq(response.check)
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
60
74
|
describe "#request_response" do
|
|
61
75
|
subject(:wms_layer) { described_class.new(params) }
|
|
62
76
|
let(:params) { rails_4_params }
|
|
@@ -9,23 +9,7 @@ describe Geoblacklight::SolrDocument::Citation do
|
|
|
9
9
|
|
|
10
10
|
it "creates a citation" do
|
|
11
11
|
expect(document.geoblacklight_citation("http://example.com"))
|
|
12
|
-
.to eq "United States. National Oceanic and Atmospheric Administration. Circuit Rider Productions. (2002). 10 Meter Contours: Russian River Basin, California. [Shapefile]. Circuit Rider Productions.
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
describe "with more than one publisher" do
|
|
16
|
-
let(:document) { SolrDocument.new(fixture.merge(Settings.FIELDS.PUBLISHER => ["First", "Second"])) }
|
|
17
|
-
|
|
18
|
-
it "warns that GeoBlacklight 5 keeps only the first publisher" do
|
|
19
|
-
expect(Geoblacklight.deprecation).to receive(:warn).with(/will lose its other publishers/)
|
|
20
|
-
document.geoblacklight_citation("http://example.com")
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
describe "with a single publisher" do
|
|
25
|
-
it "does not warn" do
|
|
26
|
-
expect(Geoblacklight.deprecation).not_to receive(:warn)
|
|
27
|
-
document.geoblacklight_citation("http://example.com")
|
|
28
|
-
end
|
|
12
|
+
.to eq "United States. National Oceanic and Atmospheric Administration. Circuit Rider Productions. (2002). 10 Meter Contours: Russian River Basin, California. [Shapefile]. Circuit Rider Productions. http://purl.stanford.edu/cg357zz0321"
|
|
29
13
|
end
|
|
30
14
|
end
|
|
31
15
|
end
|
|
@@ -64,54 +64,6 @@ describe Geoblacklight::SolrDocument do
|
|
|
64
64
|
end
|
|
65
65
|
end
|
|
66
66
|
end
|
|
67
|
-
describe "deprecations for GeoBlacklight 5 behavior changes" do
|
|
68
|
-
describe "#restricted?" do
|
|
69
|
-
describe "with rights data that is present but blank" do
|
|
70
|
-
let(:document_attributes) { {rights_field => ""} }
|
|
71
|
-
it "warns that GeoBlacklight 5 stops treating the document as restricted" do
|
|
72
|
-
expect(Geoblacklight.deprecation).to receive(:warn).with(
|
|
73
|
-
/#restricted\? returns true for a document whose .* is present but blank/
|
|
74
|
-
)
|
|
75
|
-
expect(document.restricted?).to be true
|
|
76
|
-
end
|
|
77
|
-
end
|
|
78
|
-
|
|
79
|
-
describe "without rights data at all" do
|
|
80
|
-
let(:document_attributes) { {} }
|
|
81
|
-
it "does not warn" do
|
|
82
|
-
expect(Geoblacklight.deprecation).not_to receive(:warn)
|
|
83
|
-
expect(document.restricted?).to be true
|
|
84
|
-
end
|
|
85
|
-
end
|
|
86
|
-
end
|
|
87
|
-
|
|
88
|
-
describe "#geom_field and #wxs_identifier" do
|
|
89
|
-
describe "when the Solr field is missing" do
|
|
90
|
-
let(:document_attributes) { {} }
|
|
91
|
-
it "warns that GeoBlacklight 5 returns nil rather than an empty string" do
|
|
92
|
-
expect(Geoblacklight.deprecation).to receive(:warn).with(/#geom_field returns "" for a document/)
|
|
93
|
-
expect(document.geom_field).to eq ""
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
it "warns for wxs_identifier too" do
|
|
97
|
-
expect(Geoblacklight.deprecation).to receive(:warn).with(/#wxs_identifier returns "" for a document/)
|
|
98
|
-
expect(document.wxs_identifier).to eq ""
|
|
99
|
-
end
|
|
100
|
-
end
|
|
101
|
-
|
|
102
|
-
describe "when the Solr field is present" do
|
|
103
|
-
let(:document_attributes) do
|
|
104
|
-
{Settings.FIELDS.GEOMETRY => "ENVELOPE(-1,1,1,-1)", Settings.FIELDS.WXS_IDENTIFIER => "cite:foo"}
|
|
105
|
-
end
|
|
106
|
-
it "does not warn" do
|
|
107
|
-
expect(Geoblacklight.deprecation).not_to receive(:warn)
|
|
108
|
-
expect(document.geom_field).to eq "ENVELOPE(-1,1,1,-1)"
|
|
109
|
-
expect(document.wxs_identifier).to eq "cite:foo"
|
|
110
|
-
end
|
|
111
|
-
end
|
|
112
|
-
end
|
|
113
|
-
end
|
|
114
|
-
|
|
115
67
|
describe "#downloadable?" do
|
|
116
68
|
describe "available direct download" do
|
|
117
69
|
let(:document_attributes) do
|
|
@@ -180,26 +132,6 @@ describe Geoblacklight::SolrDocument do
|
|
|
180
132
|
expect(document.direct_download).to be_nil
|
|
181
133
|
end
|
|
182
134
|
end
|
|
183
|
-
describe "hgl_download" do
|
|
184
|
-
describe "with an hgl download" do
|
|
185
|
-
let(:document_attributes) do
|
|
186
|
-
{
|
|
187
|
-
references_field => {
|
|
188
|
-
"http://schema.org/DownloadAction" => "http://example.com/harvard"
|
|
189
|
-
}.to_json
|
|
190
|
-
}
|
|
191
|
-
end
|
|
192
|
-
it "returns an hgl download hash" do
|
|
193
|
-
expect(document.hgl_download[:hgl]).to eq("http://example.com/harvard")
|
|
194
|
-
end
|
|
195
|
-
end
|
|
196
|
-
describe "without an hgl download" do
|
|
197
|
-
let(:document_attributes) { {} }
|
|
198
|
-
it "returns nil" do
|
|
199
|
-
expect(document.direct_download).to be_nil
|
|
200
|
-
end
|
|
201
|
-
end
|
|
202
|
-
end
|
|
203
135
|
describe "#oembed" do
|
|
204
136
|
describe "with an oembed url" do
|
|
205
137
|
let(:document_attributes) do
|
|
@@ -281,7 +213,7 @@ describe Geoblacklight::SolrDocument do
|
|
|
281
213
|
end
|
|
282
214
|
let(:document_attributes) { {} }
|
|
283
215
|
it "returns leaflet protocol" do
|
|
284
|
-
expect(document.viewer_protocol).to
|
|
216
|
+
expect(document.viewer_protocol).to be nil
|
|
285
217
|
end
|
|
286
218
|
end
|
|
287
219
|
describe "viewer_endpoint" do
|
data/spec/spec_helper.rb
CHANGED
|
@@ -35,24 +35,7 @@ require "selenium-webdriver"
|
|
|
35
35
|
require "webmock/rspec"
|
|
36
36
|
WebMock.allow_net_connect!(net_http_connect_on_start: true)
|
|
37
37
|
|
|
38
|
-
Capybara.
|
|
39
|
-
# Set up Chrome options
|
|
40
|
-
options = Selenium::WebDriver::Chrome::Options.new
|
|
41
|
-
options.add_argument("--headless")
|
|
42
|
-
options.add_argument("--disable-gpu")
|
|
43
|
-
options.add_argument("--no-sandbox")
|
|
44
|
-
options.add_argument("--window-size=1280,1024")
|
|
45
|
-
|
|
46
|
-
# Allow longer TCP reads to prevent timeout in the case of loading fixture
|
|
47
|
-
# eee6150b-ce2f-4837-9d17-ce72a0c1c26f, as part of relations_spec.rb
|
|
48
|
-
client = Selenium::WebDriver::Remote::Http::Default.new
|
|
49
|
-
client.read_timeout = 120 # seconds
|
|
50
|
-
|
|
51
|
-
Capybara::Selenium::Driver.new(app, browser: :chrome, options: options, http_client: client)
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
Capybara.javascript_driver = :chrome_headless
|
|
55
|
-
Capybara.default_max_wait_time = 120
|
|
38
|
+
Capybara.javascript_driver = :selenium_chrome_headless
|
|
56
39
|
|
|
57
40
|
require "geoblacklight"
|
|
58
41
|
|
|
@@ -62,20 +45,8 @@ FactoryBot.definition_file_paths = [File.expand_path("../factories", __FILE__)]
|
|
|
62
45
|
FactoryBot.find_definitions
|
|
63
46
|
|
|
64
47
|
RSpec.configure do |config|
|
|
65
|
-
config.use_transactional_fixtures =
|
|
48
|
+
config.use_transactional_fixtures = true
|
|
66
49
|
|
|
67
|
-
config.before do
|
|
68
|
-
DatabaseCleaner.strategy = if Capybara.current_driver == :rack_test
|
|
69
|
-
:transaction
|
|
70
|
-
else
|
|
71
|
-
:truncation
|
|
72
|
-
end
|
|
73
|
-
DatabaseCleaner.start
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
config.after do
|
|
77
|
-
DatabaseCleaner.clean
|
|
78
|
-
end
|
|
79
50
|
if Rails::VERSION::MAJOR >= 5
|
|
80
51
|
config.include ::Rails.application.routes.url_helpers
|
|
81
52
|
config.include ::Rails.application.routes.mounted_helpers
|
|
@@ -8,7 +8,7 @@ class TestAppGenerator < Rails::Generators::Base
|
|
|
8
8
|
def add_gems
|
|
9
9
|
gem "blacklight"
|
|
10
10
|
|
|
11
|
-
Bundler.
|
|
11
|
+
Bundler.with_unbundled_env do
|
|
12
12
|
run "bundle install"
|
|
13
13
|
end
|
|
14
14
|
end
|
|
@@ -17,8 +17,8 @@ class TestAppGenerator < Rails::Generators::Base
|
|
|
17
17
|
run "yarn install && yarn build"
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
#
|
|
21
|
-
#
|
|
20
|
+
# This makes the assets available in the test app so that changes made in
|
|
21
|
+
# local development can be picked up automatically
|
|
22
22
|
def link_frontend
|
|
23
23
|
run "yarn link"
|
|
24
24
|
end
|
|
@@ -26,7 +26,7 @@ class TestAppGenerator < Rails::Generators::Base
|
|
|
26
26
|
def run_blacklight_generator
|
|
27
27
|
say_status("warning", "GENERATING BL", :yellow)
|
|
28
28
|
|
|
29
|
-
generate "blacklight:install", "--devise"
|
|
29
|
+
generate "blacklight:install", "--devise", "--skip-solr"
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
# Install geoblacklight with the `test` option
|
data/template.rb
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
gem "blacklight", "~>
|
|
4
|
-
gem "geoblacklight", "~> 4.0"
|
|
5
|
-
gem "sprockets", "< 4.0" # Use sprockets less than 4.0, let webpacker users set this up themselves
|
|
3
|
+
gem "blacklight", "~> 8.0"
|
|
6
4
|
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
# Ensure the app generates with Propshaft; sprockets is no longer supported
|
|
6
|
+
# https://github.com/geoblacklight/geoblacklight/issues/1265
|
|
7
|
+
ENV["ENGINE_CART_RAILS_OPTIONS"] = ENV["ENGINE_CART_RAILS_OPTIONS"].to_s + " -a propshaft"
|
|
8
|
+
|
|
9
|
+
# Install latest version of geoblacklight gem if running
|
|
10
|
+
# generator with a development branch.
|
|
11
|
+
if ENV["BRANCH"]
|
|
12
|
+
gem "geoblacklight", github: "geoblacklight/geoblacklight", branch: ENV["BRANCH"]
|
|
13
|
+
else
|
|
14
|
+
gem "geoblacklight", "~> 4.0"
|
|
15
|
+
end
|
|
14
16
|
|
|
15
17
|
run "bundle install"
|
|
16
18
|
|
|
17
|
-
generate "blacklight:install", "--devise"
|
|
19
|
+
generate "blacklight:install", "--devise", "--skip-solr"
|
|
18
20
|
generate "geoblacklight:install", "-f"
|
|
19
21
|
|
|
20
22
|
rake "db:migrate"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { wmsLayer, wmtsLayer } from "../../app/javascript/leaflet/layers";
|
|
2
|
+
import { describe, expect, it } from "vitest";
|
|
3
|
+
|
|
4
|
+
describe("leaflet/layers", () => {
|
|
5
|
+
describe("wmsLayer", () => {
|
|
6
|
+
it("returns a WMS tile layer", () => {
|
|
7
|
+
const url = "http://example.com/wms";
|
|
8
|
+
const layerId = "layerId";
|
|
9
|
+
const opacity = 0.5;
|
|
10
|
+
const detectRetina = true;
|
|
11
|
+
const layer = wmsLayer(url, { layerId, opacity, detectRetina });
|
|
12
|
+
expect(layer.options.layers).toEqual(layerId);
|
|
13
|
+
expect(layer.options.opacity).toEqual(opacity);
|
|
14
|
+
expect(layer.options.detectRetina).toEqual(detectRetina);
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
});
|
data/vite.config.ts
CHANGED
|
@@ -1,24 +1,35 @@
|
|
|
1
|
-
import { resolve } from
|
|
2
|
-
import { defineConfig } from
|
|
3
|
-
import
|
|
1
|
+
import { resolve } from "path";
|
|
2
|
+
import { defineConfig } from "vite";
|
|
3
|
+
import includePaths from "rollup-plugin-includepaths";
|
|
4
4
|
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
5
|
+
export default defineConfig(() => {
|
|
6
|
+
return {
|
|
7
|
+
build: {
|
|
8
|
+
outDir: "app/assets/javascripts/geoblacklight",
|
|
9
|
+
emptyOutDir: true,
|
|
10
|
+
manifest: true,
|
|
11
|
+
minify: false,
|
|
12
|
+
sourcemap: true,
|
|
13
|
+
lib: {
|
|
14
|
+
entry: resolve(__dirname, "app/javascript/geoblacklight/index.js"),
|
|
15
|
+
name: "@geoblacklight/frontend",
|
|
16
|
+
fileName: "geoblacklight",
|
|
17
|
+
},
|
|
18
|
+
// Rewrite importmap-friendly bare specifiers like geoblacklight/foo/bar
|
|
19
|
+
// to bundler-friendly local paths like ./foo/bar
|
|
20
|
+
rollupOptions: {
|
|
21
|
+
plugins: [
|
|
22
|
+
includePaths({
|
|
23
|
+
paths: ["app/javascript"],
|
|
24
|
+
extensions: [".js"],
|
|
25
|
+
include: {},
|
|
26
|
+
external: [],
|
|
27
|
+
}),
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
test: {
|
|
32
|
+
environment: "jsdom",
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
});
|