geoblacklight 4.0.0.pre.alpha.2 → 4.0.0.pre.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (202) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE.md +1 -1
  3. data/.github/workflows/ruby.yml +27 -103
  4. data/.gitignore +1 -0
  5. data/.rubocop.yml +6 -6
  6. data/.rubocop_todo.yml +0 -3
  7. data/.solr_wrapper +2 -0
  8. data/README.md +1 -4
  9. data/Rakefile +0 -1
  10. data/app/assets/images/blacklight/child-item.svg +3 -0
  11. data/app/assets/images/blacklight/collections.svg +4 -0
  12. data/app/assets/images/blacklight/datasets.svg +7 -0
  13. data/app/assets/images/blacklight/geoblacklight-icons.json +363 -332
  14. data/app/assets/images/blacklight/imagery.svg +4 -0
  15. data/app/assets/images/blacklight/maps.svg +4 -0
  16. data/app/assets/images/blacklight/parent-item.svg +3 -0
  17. data/app/assets/images/blacklight/university-of-colorado-boulder.svg +6 -0
  18. data/app/assets/images/blacklight/websites.svg +4 -0
  19. data/app/assets/javascripts/geoblacklight/controls/fullscreen.js +8 -0
  20. data/app/assets/javascripts/geoblacklight/geoblacklight.js +2 -1
  21. data/app/assets/javascripts/geoblacklight/viewers/esri.js +1 -0
  22. data/app/assets/javascripts/geoblacklight/viewers/index_map.js +1 -0
  23. data/app/assets/javascripts/geoblacklight/viewers/tilejson.js +33 -0
  24. data/app/assets/javascripts/geoblacklight/viewers/tms.js +2 -2
  25. data/app/assets/javascripts/geoblacklight/viewers/viewer.js +3 -0
  26. data/app/assets/javascripts/geoblacklight/viewers/wms.js +2 -2
  27. data/app/assets/javascripts/geoblacklight/viewers/wmts.js +85 -0
  28. data/app/assets/javascripts/geoblacklight/viewers/xyz.js +10 -0
  29. data/app/assets/stylesheets/geoblacklight/geoblacklight.scss +1 -0
  30. data/app/assets/stylesheets/geoblacklight/modules/_base.scss +0 -1
  31. data/app/assets/stylesheets/geoblacklight/modules/_styles.scss +5 -1
  32. data/app/assets/stylesheets/geoblacklight/modules/downloads.scss +20 -47
  33. data/app/assets/stylesheets/geoblacklight/modules/index_maps.scss +68 -0
  34. data/app/assets/stylesheets/geoblacklight/modules/item.scss +16 -0
  35. data/app/assets/stylesheets/geoblacklight/modules/modal.scss +6 -0
  36. data/app/assets/stylesheets/geoblacklight/modules/sidebar.scss +4 -0
  37. data/app/components/geoblacklight/icon_facet_item_component.rb +33 -0
  38. data/app/helpers/geoblacklight_helper.rb +6 -45
  39. data/app/models/concerns/geoblacklight/bbox_filter_field.rb +64 -0
  40. data/app/models/concerns/geoblacklight/bbox_filter_query.rb +50 -0
  41. data/app/models/concerns/geoblacklight/solr_document.rb +1 -1
  42. data/app/models/concerns/geoblacklight/suppressed_records_search_behavior.rb +31 -0
  43. data/app/presenters/geoblacklight/bbox_item_presenter.rb +9 -0
  44. data/app/views/catalog/_downloads_collapse.html.erb +27 -0
  45. data/app/views/catalog/_header_icons.html.erb +2 -2
  46. data/app/views/catalog/_index_split_default.html.erb +2 -2
  47. data/app/views/catalog/_show_default_viewer_container.html.erb +17 -0
  48. data/app/views/catalog/_show_downloads.html.erb +10 -21
  49. data/app/views/catalog/_show_sidebar.html.erb +3 -0
  50. data/app/views/catalog/_show_web_services.html.erb +11 -0
  51. data/app/views/catalog/_web_services.html.erb +3 -2
  52. data/app/views/catalog/web_services.html.erb +1 -1
  53. data/app/views/shared/_header_navbar.html.erb +13 -3
  54. data/config/locales/geoblacklight.en.yml +5 -1
  55. data/geoblacklight.gemspec +7 -7
  56. data/lib/generators/geoblacklight/install_generator.rb +1 -1
  57. data/lib/generators/geoblacklight/templates/assets/_customizations.scss +5 -4
  58. data/lib/generators/geoblacklight/templates/assets/application.scss +0 -3
  59. data/lib/generators/geoblacklight/templates/catalog_controller.rb +86 -57
  60. data/lib/generators/geoblacklight/templates/settings.gbl_v1.yml +5 -5
  61. data/lib/generators/geoblacklight/templates/settings.yml +43 -25
  62. data/lib/geoblacklight/bounding_box.rb +5 -1
  63. data/lib/geoblacklight/constants.rb +3 -0
  64. data/lib/geoblacklight/engine.rb +3 -2
  65. data/lib/geoblacklight/faraday_middleware/follow_redirects.rb +176 -0
  66. data/lib/geoblacklight/item_viewer.rb +13 -1
  67. data/lib/geoblacklight/metadata/base.rb +2 -1
  68. data/lib/geoblacklight/version.rb +1 -1
  69. data/lib/geoblacklight/view_helper_override.rb +2 -28
  70. data/lib/geoblacklight.rb +0 -10
  71. data/lib/tasks/geoblacklight.rake +1 -1
  72. data/schema/geoblacklight-schema-aardvark.json +3 -23
  73. data/solr/conf/schema.xml +37 -43
  74. data/solr/conf/solrconfig.xml +17 -17
  75. data/spec/components/geoblacklight/icon_facet_item_component_spec.rb +17 -0
  76. data/spec/config/initializers/rails_config_spec.rb +1 -1
  77. data/spec/controllers/catalog_controller_spec.rb +1 -1
  78. data/spec/controllers/wms_controller_spec.rb +1 -1
  79. data/spec/features/download_layer_spec.rb +31 -14
  80. data/spec/features/esri_viewer_spec.rb +5 -1
  81. data/spec/features/full_screen_controll_spec.rb +15 -0
  82. data/spec/features/home_page_spec.rb +2 -2
  83. data/spec/features/index_map_spec.rb +2 -2
  84. data/spec/features/missing_metadata_spec.rb +1 -1
  85. data/spec/features/multiple_downloads_spec.rb +2 -1
  86. data/spec/features/relations_spec.rb +12 -1
  87. data/spec/features/saved_searches_spec.rb +1 -1
  88. data/spec/features/search_results_complex_geometry_spec.rb +24 -0
  89. data/spec/features/search_results_icons_spec.rb +16 -0
  90. data/spec/features/search_results_map_spec.rb +2 -2
  91. data/spec/features/search_spec.rb +17 -0
  92. data/spec/features/show_page_download_spec.rb +29 -0
  93. data/spec/features/show_page_metadata_spec.rb +2 -2
  94. data/spec/features/split_view.html.erb_spec.rb +12 -1
  95. data/spec/features/tilejson_spec.rb +22 -0
  96. data/spec/features/tms_spec.rb +2 -2
  97. data/spec/features/web_services_modal_spec.rb +35 -2
  98. data/spec/features/wmts_spec.rb +34 -0
  99. data/spec/features/xyz_spec.rb +10 -0
  100. data/spec/fixtures/manifests/tilejson.json +21 -0
  101. data/spec/fixtures/manifests/wmts-multiple.xml +813 -0
  102. data/spec/fixtures/manifests/wmts-single.xml +126 -0
  103. data/spec/fixtures/solr_documents/README.md +46 -43
  104. data/spec/fixtures/solr_documents/actual-papermap1.json +2 -1
  105. data/spec/fixtures/solr_documents/actual-point1.json +2 -1
  106. data/spec/fixtures/solr_documents/actual-polygon1.json +2 -1
  107. data/spec/fixtures/solr_documents/actual-raster1.json +3 -2
  108. data/spec/fixtures/solr_documents/b1g_wabash_child_15.json +62 -0
  109. data/spec/fixtures/solr_documents/b1g_wabash_child_16.json +64 -0
  110. data/spec/fixtures/solr_documents/b1g_wabash_child_17.json +62 -0
  111. data/spec/fixtures/solr_documents/b1g_wabash_child_18.json +62 -0
  112. data/spec/fixtures/solr_documents/b1g_wabash_parent.json +59 -0
  113. data/spec/fixtures/solr_documents/baruch_ancestor1.json +2 -1
  114. data/spec/fixtures/solr_documents/baruch_ancestor2.json +2 -1
  115. data/spec/fixtures/solr_documents/baruch_documentation_download.json +1 -1
  116. data/spec/fixtures/solr_documents/bbox-spans-180.json +2 -1
  117. data/spec/fixtures/solr_documents/cornell_html_metadata.json +4 -3
  118. data/spec/fixtures/solr_documents/esri-dynamic-layer-all-layers.json +3 -2
  119. data/spec/fixtures/solr_documents/esri-dynamic-layer-single-layer.json +3 -2
  120. data/spec/fixtures/solr_documents/esri-feature-layer.json +2 -1
  121. data/spec/fixtures/solr_documents/esri-image-map-layer.json +3 -2
  122. data/spec/fixtures/solr_documents/esri-tiled_map_layer.json +2 -1
  123. data/spec/fixtures/solr_documents/esri-wms-layer.json +2 -1
  124. data/spec/fixtures/solr_documents/harvard_raster.json +3 -2
  125. data/spec/fixtures/solr_documents/iiif-eastern-hemisphere.json +3 -2
  126. data/spec/fixtures/solr_documents/index-map-polygon-no-downloadurl.json +2 -1
  127. data/spec/fixtures/solr_documents/index-map-polygon.json +2 -1
  128. data/spec/fixtures/solr_documents/index-map-stanford.json +2 -1
  129. data/spec/fixtures/solr_documents/index_map_point.json +3 -2
  130. data/spec/fixtures/solr_documents/metadata_no_provider.json +2 -1
  131. data/spec/fixtures/solr_documents/multiple-downloads.json +3 -2
  132. data/spec/fixtures/solr_documents/no_spatial.json +1 -4
  133. data/spec/fixtures/solr_documents/oembed.json +2 -1
  134. data/spec/fixtures/solr_documents/princeton-child1.json +3 -2
  135. data/spec/fixtures/solr_documents/princeton-child2.json +3 -2
  136. data/spec/fixtures/solr_documents/princeton-child3.json +2 -1
  137. data/spec/fixtures/solr_documents/princeton-child4.json +3 -2
  138. data/spec/fixtures/solr_documents/princeton-parent.json +5 -3
  139. data/spec/fixtures/solr_documents/public_direct_download.json +2 -1
  140. data/spec/fixtures/solr_documents/public_iiif_princeton.json +3 -2
  141. data/spec/fixtures/solr_documents/public_polygon_mit.json +2 -1
  142. data/spec/fixtures/solr_documents/restricted-line.json +2 -1
  143. data/spec/fixtures/solr_documents/tilejson.json +48 -0
  144. data/spec/fixtures/solr_documents/tms.json +15 -18
  145. data/spec/fixtures/solr_documents/umn_metro_result1.json +5 -3
  146. data/spec/fixtures/solr_documents/umn_state_result1.json +3 -2
  147. data/spec/fixtures/solr_documents/umn_state_result2.json +3 -5
  148. data/spec/fixtures/solr_documents/uva_slug_colon.json +2 -1
  149. data/spec/fixtures/solr_documents/wmts-multiple.json +41 -0
  150. data/spec/fixtures/solr_documents/wmts-single-layer.json +48 -0
  151. data/spec/fixtures/solr_documents/xyz.json +46 -0
  152. data/spec/helpers/geoblacklight_helper_spec.rb +12 -35
  153. data/spec/lib/geoblacklight/document_presenter_spec.rb +3 -3
  154. data/spec/lib/geoblacklight/download/geojson_download_spec.rb +1 -1
  155. data/spec/lib/geoblacklight/download/geotiff_download_spec.rb +1 -1
  156. data/spec/lib/geoblacklight/download/kmz_download_spec.rb +1 -1
  157. data/spec/lib/geoblacklight/download/shapefile_download_spec.rb +1 -1
  158. data/spec/lib/geoblacklight/download_spec.rb +2 -2
  159. data/spec/lib/geoblacklight/metadata/base_spec.rb +19 -1
  160. data/spec/lib/geoblacklight/metadata_transformer/fgdc_spec.rb +1 -1
  161. data/spec/lib/geoblacklight/metadata_transformer/iso19139_spec.rb +1 -1
  162. data/spec/lib/geoblacklight/references_spec.rb +5 -3
  163. data/spec/lib/geoblacklight/relation/relation_response_spec.rb +5 -0
  164. data/spec/lib/geoblacklight/view_helper_override_spec.rb +0 -10
  165. data/spec/lib/geoblacklight/wms_layer_spec.rb +1 -1
  166. data/spec/models/concerns/geoblacklight/bbox_filter_field_spec.rb +96 -0
  167. data/spec/models/concerns/geoblacklight/bbox_filter_query_spec.rb +105 -0
  168. data/spec/models/concerns/geoblacklight/solr_document/inspection_spec.rb +2 -1
  169. data/spec/models/concerns/geoblacklight/suppressed_records_search_behavior_spec.rb +31 -0
  170. data/spec/presenters/geoblacklight/bbox_item_presenter_spec.rb +36 -0
  171. data/spec/spec_helper.rb +8 -3
  172. data/spec/test_app_templates/Gemfile.extra +1 -0
  173. data/spec/test_app_templates/lib/generators/test_app_generator.rb +4 -4
  174. data/spec/views/catalog/_show_downloads.html.erb_spec.rb +5 -5
  175. data/template.rb +2 -4
  176. data/vendor/assets/images/fullscreen.png +0 -0
  177. data/vendor/assets/images/fullscreen@2x.png +0 -0
  178. data/vendor/assets/javascripts/Leaflet.fullscreen.js +152 -0
  179. data/vendor/assets/javascripts/esri-leaflet.js +10 -3
  180. data/vendor/assets/javascripts/esri-leaflet.js.map +1 -1
  181. data/vendor/assets/javascripts/leaflet-iiif.js +39 -18
  182. data/vendor/assets/javascripts/leaflet-src.js.erb +14126 -0
  183. data/vendor/assets/javascripts/leaflet-src.js.map +1 -1
  184. data/vendor/assets/stylesheets/leaflet.css +640 -634
  185. data/vendor/assets/stylesheets/leaflet.fullscreen.css +40 -0
  186. metadata +108 -53
  187. data/app/models/concerns/geoblacklight/spatial_search_behavior.rb +0 -71
  188. data/app/views/catalog/_download_generated_link.html.erb +0 -4
  189. data/app/views/catalog/_download_link.html.erb +0 -3
  190. data/app/views/catalog/_downloads_generated.html.erb +0 -6
  191. data/app/views/catalog/_downloads_primary.html.erb +0 -21
  192. data/app/views/catalog/_downloads_secondary.html.erb +0 -39
  193. data/app/views/catalog/_icon_facet.html.erb +0 -16
  194. data/bin/coverage.rb +0 -36
  195. data/lib/generators/geoblacklight/templates/Procfile +0 -3
  196. data/lib/generators/geoblacklight/templates/package.json +0 -14
  197. data/lib/generators/geoblacklight/templates/webpacker.yml +0 -67
  198. data/lib/generators/geoblacklight/webpacker_generator.rb +0 -36
  199. data/lib/geoblacklight/catalog_helper_override.rb +0 -14
  200. data/spec/models/concerns/geoblacklight/spatial_search_behavior_spec.rb +0 -97
  201. data/vendor/assets/javascripts/leaflet.js.erb +0 -13922
  202. data/vendor/assets/stylesheets/leaflet-label.css +0 -54
@@ -1,45 +1,42 @@
1
1
  {
2
- "dct_title_s": "Quaternary Fault and Fold Database of the United States",
2
+ "dct_title_s": "Agricultural Districts, Columbia County NY, 2009 (TMS)",
3
3
  "dct_alternative_sm": [
4
4
  "tms"
5
5
  ],
6
6
  "dct_description_sm": [
7
- "Quaternary Fault and Fold Database of the United States"
7
+ "These GIS files represent geographic boundaries for lands that are under the protection of NYS Agricultural District Law, administered by the New York State Department of Agriculture and Markets. The boundaries are derived from New York State Agricultural District, 1:24,000-scale, maps produced at county agencies. The district boundaries correspond to tax parcel data. District boundaries are joined into a file representing all of the Agricultural Districts within an entire county. Note that 2003 legislation allows lands to be added to districts on an annual basis. Electronic data provided here may predate those additions. Tax parcel detail and secondary rights-of-way are not included in this dataset. Rights-of-way for state and federal highways, railroads and utilities are only included when they are delineated on the original 1:24,000 scale maps. The data files are in ArcGIS shapefile format. A Geographic Information System (ArcGIS) file intended to represent the lands within agricultural district. Please note that boundaries may be generalizations; precise information can be obtained from the county or town tax parcel information."
8
8
  ],
9
9
  "dct_language_sm": [
10
10
  "eng"
11
11
  ],
12
- "dct_publisher_sm": [
13
- "Geological Survey (U.S.)"
14
- ],
15
- "schema_provider_s": "Stanford",
12
+ "schema_provider_s": "Cornell",
16
13
  "gbl_resourceClass_sm": [
17
14
  "Datasets"
18
15
  ],
19
16
  "gbl_resourceType_sm": [
20
- "Polyline data"
17
+ "Polygon"
21
18
  ],
22
19
  "dct_subject_sm": [
23
- "Earthquakes",
24
- "Faults"
20
+ "New York State Agricultural District boundaries",
21
+ "Agriculture and Markets",
22
+ "Agricultural Districts Mapping Program"
25
23
  ],
26
24
  "dcat_keyword_sm": [
27
25
  "GBL Fixture records"
28
26
  ],
29
27
  "dct_temporal_sm": [
30
- "2020"
28
+ "2009"
31
29
  ],
32
- "dct_issued_s": "1905-07-12",
30
+ "dct_issued_s": "2009-02-13",
33
31
  "dct_spatial_sm": [
34
- "Earth (Planet)",
35
- "North America"
32
+ "Columbia County NY"
36
33
  ],
37
- "locn_geometry": "ENVELOPE(-156.02,-70.8,65.59,18.93)",
38
- "dcat_centroid_ss": "42.260000000000005,-113.41",
34
+ "locn_geometry": "ENVELOPE(-73.918247, -73.367, 42.507614, 41.978298)",
35
+ "dcat_bbox": "ENVELOPE(-73.918247, -73.367, 42.507614, 41.978298)",
39
36
  "dct_accessRights_s": "Public",
40
37
  "dct_format_s": "Shapefile",
41
- "dct_references_s": "{\"http://schema.org/url\":\"https://www.usgs.gov/natural-hazards/earthquake-hazards/faults\",\"https://wiki.osgeo.org/wiki/Tile_Map_Service_Specification\":\"https://earthquake.usgs.gov/basemap/tiles/faults/{z}/{x}/{y}.png\",\"http://schema.org/downloadUrl\":\"https://earthquake.usgs.gov/static/lfs/nshm/qfaults/Qfaults_GIS.zip\"}",
42
- "id": "6f47b103-9955-4bbe-a364-387039623106",
43
- "gbl_mdModified_dt": "2021-06-11T18:44:16Z",
38
+ "dct_references_s": "{\"https://wiki.osgeo.org/wiki/Tile_Map_Service_Specification\":\"https://cugir.library.cornell.edu/geoserver/gwc/service/tms/1.0.0/cugir%3Acugir007957@EPSG%3A3857@png/{z}/{x}/{y}.png\",\"http://schema.org/downloadUrl\":\"https://cugir-data.s3.amazonaws.com/00/79/57/cugir-007957.zip\"}",
39
+ "id": "cugir-007957",
40
+ "gbl_mdModified_dt": "2019-05-24T23:12:06.151Z",
44
41
  "gbl_mdVersion_s": "Aardvark"
45
42
  }
@@ -25,7 +25,7 @@
25
25
  "Polygon data"
26
26
  ],
27
27
  "dcat_theme_sm": [
28
- "Planning and Cadastral"
28
+ "Property"
29
29
  ],
30
30
  "dcat_keyword_sm": [
31
31
  "GBL Fixture records"
@@ -35,7 +35,8 @@
35
35
  ],
36
36
  "dct_issued_s": "2015-10-01",
37
37
  "gbl_indexYear_im": [
38
- "2014"
38
+ "2014",
39
+ "2030"
39
40
  ],
40
41
  "gbl_dateRange_drsim": [
41
42
  "[2014 TO 2014]"
@@ -44,7 +45,8 @@
44
45
  "Minnesota"
45
46
  ],
46
47
  "locn_geometry": "ENVELOPE(-94.012,-92.732,45.415,44.471)",
47
- "dcat_centroid_ss": "44.943,-93.372",
48
+ "dcat_bbox": "ENVELOPE(-94.012,-92.732,45.415,44.471)",
49
+ "dcat_centroid": "44.943,-93.372",
48
50
  "dct_accessRights_s": "Public",
49
51
  "dct_format_s": "Shapefile",
50
52
  "dct_references_s": "{\"http://schema.org/downloadUrl\":\"ftp://ftp.gisdata.mn.gov/pub/gdrs/data/pub/us_mn_state_metc/plan_frmwrk2030dev_plan_ar2011/shp_plan_frmwrk2030dev_plan_ar2011.zip\",\"urn:x-esri:serviceType:ArcGIS#FeatureLayer\":\"https://arcgis.metc.state.mn.us/server/rest/services/GISLibrary/Framework2030PlanningAreas2011/FeatureServer/0\",\"http://schema.org/url\":\"https://gisdata.mn.gov/dataset/02236876-9c21-42f6-9870-d2562da8e44f\"}",
@@ -24,7 +24,7 @@
24
24
  "Raster data"
25
25
  ],
26
26
  "dcat_theme_sm": [
27
- "Imagery and Base Maps"
27
+ "Imagery"
28
28
  ],
29
29
  "dcat_keyword_sm": [
30
30
  "GBL Fixture records"
@@ -43,7 +43,8 @@
43
43
  "Minnesota"
44
44
  ],
45
45
  "locn_geometry": "ENVELOPE(-97.612501,-88.842351,49.464145,42.906949)",
46
- "dcat_centroid_ss": "46.185547,-93.227426",
46
+ "dcat_bbox": "ENVELOPE(-97.612501,-88.842351,49.464145,42.906949)",
47
+ "dcat_centroid": "46.185547,-93.227426",
47
48
  "dct_accessRights_s": "Public",
48
49
  "dct_format_s": "ArcGRID",
49
50
  "dct_references_s": "{\"http://schema.org/downloadUrl\":\"ftp://gdrs.dnr.state.mn.us/gdrs/data/pub/us_mn_state_dnr/fgdb_base_usgs_scanned_topo_100k_drg.zip\",\"http://schema.org/url\":\"https://gisdata.mn.gov/dataset/2eddde2f-c222-41ca-bd07-2fd74a21f4de\"}",
@@ -24,14 +24,11 @@
24
24
  "Raster data"
25
25
  ],
26
26
  "dcat_theme_sm": [
27
- "Imagery and Base Maps"
27
+ "Imagery"
28
28
  ],
29
29
  "dcat_keyword_sm": [
30
30
  "GBL Fixture records"
31
31
  ],
32
- "dct_isPartOf_sm": [
33
- "Minnesota Geospatial Commons"
34
- ],
35
32
  "dct_temporal_sm": [
36
33
  "1998"
37
34
  ],
@@ -46,7 +43,8 @@
46
43
  "Minnesota"
47
44
  ],
48
45
  "locn_geometry": "ENVELOPE(-97.991522,-87.177541,49.892443,42.891013)",
49
- "dcat_centroid_ss": "46.391728,-92.5845315",
46
+ "dcat_bbox": "ENVELOPE(-97.991522,-87.177541,49.892443,42.891013)",
47
+ "dcat_centroid": "46.391728,-92.5845315",
50
48
  "dct_accessRights_s": "Public",
51
49
  "dct_format_s": "GeoTIFF",
52
50
  "dct_references_s": "{\"http://schema.org/downloadUrl\":\"ftp://ftp.gisdata.mn.gov/pub/gdrs/data/pub/us_mn_state_dnr/base_usgs_scanned_topo_250k_drg/fgdb_base_usgs_scanned_topo_250k_drg.zip\",\"http://schema.org/url\":\"https://gisdata.mn.gov/dataset/e9c71086-6b25-4950-8e1c-84c2794e3382\"}",
@@ -34,7 +34,8 @@
34
34
  "[2015 TO 2018]"
35
35
  ],
36
36
  "locn_geometry": "ENVELOPE(-76.346,-76.176,36.971,36.82)",
37
- "dcat_centroid_ss": "36.8955,-76.261",
37
+ "dcat_bbox": "ENVELOPE(-76.346,-76.176,36.971,36.82)",
38
+ "dcat_centroid": "36.8955,-76.261",
38
39
  "dct_accessRights_s": "Public",
39
40
  "dct_format_s": "Shapefile",
40
41
  "gbl_wxsIdentifier_s": "Norfolk:police_point",
@@ -0,0 +1,41 @@
1
+ {
2
+ "gbl_mdVersion_s": "Aardvark",
3
+ "dct_identifier_sm": [
4
+ "ark:/99999/fk4db9hn29"
5
+ ],
6
+ "id": "princeton-fk4db9hn29",
7
+ "dct_title_s": "Orthofoto 2016 Wien (WMTS)",
8
+ "locn_geometry": "ENVELOPE(16.133423, 16.626434, 48.3348, 48.106056)",
9
+ "dcat_bbox": "ENVELOPE(16.133423, 16.626434, 48.3348, 48.106056)",
10
+ "schema_provider_s": "Princeton",
11
+ "dct_accessRights_s": "Public",
12
+ "dct_description_sm": [
13
+ "The Vienna orthophoto from the year 2016 covers the entire city area with a pixel size of 15 centimeters. The aerial images were taken on 18th and 27th of March and 5th of April 2016."
14
+ ],
15
+ "dct_creator_sm": [
16
+ "Magistrat Wien - Magistratsabteilung 41 - Stadtvermessung"
17
+ ],
18
+ "dct_spatial_sm": [
19
+ "Vienna",
20
+ "Austria"
21
+ ],
22
+ "dct_temporal_sm": [
23
+ "2022"
24
+ ],
25
+ "gbl_indexYear_im": [
26
+ "2022"
27
+ ],
28
+ "gbl_mdModified_dt": "2022-02-04T22:13:37Z",
29
+ "gbl_wxsIdentifier_s": "lb2016",
30
+ "dct_references_s": "{\"http://www.opengis.net/def/serviceType/ogc/wmts\":\"https://maps.wien.gv.at/wmts/1.0.0/WMTSCapabilities.xml\"}",
31
+ "layer_geom_type_s": "Raster",
32
+ "gbl_resourceClass_sm": [
33
+ "Imagery"
34
+ ],
35
+ "gbl_resourceType_sm": [
36
+ "Aerial photographs",
37
+ "Raster data"
38
+ ],
39
+ "dct_format_s": "GeoTIFF",
40
+ "dct_issued_s": "2016-01-01T00:00:00Z"
41
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "gbl_mdVersion_s": "Aardvark",
3
+ "dct_identifier_sm": [
4
+ "ark:/99999/fk4544658v"
5
+ ],
6
+ "id": "princeton-fk4544658v-wmts",
7
+ "dct_title_s": "The Balkans [and] Turkey : G.S.G.S. no. 2097 / War Office. General Staff. Geographical Section (WMTS Fixture)",
8
+ "locn_geometry": "ENVELOPE(19.333333, 29.333333, 43.083333, 39.75)",
9
+ "dcat_bbox": "ENVELOPE(19.333333, 29.333333, 43.083333, 39.75)",
10
+ "schema_provider_s": "Princeton",
11
+ "dct_accessRights_s": "Public",
12
+ "dct_description_sm": [
13
+ "Relief shown by contours approximately 100 feet interval, spot heights, and shading. Title varies; some sheets are titled \"Turkey\". Shows international boundaries, railways, 2 categories of roads, telegraph lines, places of worship, ruins. Constantinople latest edition map has a glossary."
14
+ ],
15
+ "dct_creator_sm": [
16
+ "Great Britain. War Office. General Staff. Geographical Section"
17
+ ],
18
+ "dct_language_sm": [
19
+ "eng"
20
+ ],
21
+ "dct_publisher_sm": [
22
+ "[London] : War Office. General Staff. Geographical Section. General Staff, 1908-25."
23
+ ],
24
+ "dct_subject_sm": [
25
+ "Balkan Peninsula Maps",
26
+ "Turkey Maps",
27
+ "Topographic Maps"
28
+ ],
29
+ "dct_spatial_sm": [
30
+ "Balkan Peninsula",
31
+ "Turkey"
32
+ ],
33
+ "dct_issued_s": 1908,
34
+ "gbl_indexYear_im": [
35
+ "1908"
36
+ ],
37
+ "gbl_mdModified_dt": "2022-02-03T22:13:40Z",
38
+ "gbl_wxsIdentifier_s": "mosaic",
39
+ "dct_references_s": "{\"http://schema.org/url\":\"https://catalog.princeton.edu/catalog/99125413918506421\",\"http://schema.org/thumbnailUrl\":\"https://figgy-staging.princeton.edu/downloads/6b55d939-7188-4bce-9550-0ac535441f22/file/9042b887-da2e-4aa9-9ca5-d3ba77f440c4\",\"http://iiif.io/api/image\":\"https://iiif-cloud-staging.princeton.edu/iiif/2/05%2F71%2F04%2F0571046f9c7149a3b950899323f70788%2Fintermediate_file/info.json\",\"http://iiif.io/api/presentation#manifest\":\"https://figgy-staging.princeton.edu/concern/scanned_maps/2a91d82c-541c-426c-b787-cc62afe8f248/manifest\",\"http://www.opengis.net/def/serviceType/ogc/wmts\":\"https://map-tiles-staging.princeton.edu/mosaicjson/WMTSCapabilities.xml?id=2a91d82c541c426cb787cc62afe8f248\"}",
40
+ "gbl_resourceClass_sm": [
41
+ "Maps",
42
+ "Web services"
43
+ ],
44
+ "gbl_resourceType_sm": [
45
+ "Military maps",
46
+ "Topographic maps"
47
+ ]
48
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "dct_identifier_sm": [
3
+ "6f47b103-9955-4bbe-a364-387039623106"
4
+ ],
5
+ "dct_title_s": "Quaternary Fault and Fold Database of the United States (XYZ)",
6
+ "dct_description_sm":[
7
+ "Quaternary Fault and Fold Database of the United States"
8
+ ],
9
+ "dct_accessRights_s": "Public",
10
+ "schema_provider_s": "Stanford",
11
+ "dct_references_s": "{\"http://schema.org/url\":\"https://www.usgs.gov/natural-hazards/earthquake-hazards/faults\",\"https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames\":\"https://earthquake.usgs.gov/basemap/tiles/faults/{z}/{x}/{y}.png\",\"http://schema.org/downloadUrl\":\"https://earthquake.usgs.gov/static/lfs/nshm/qfaults/Qfaults_GIS.zip\"}",
12
+ "id": "6f47b103-9955-4bbe-a364-387039623106-xyz",
13
+ "gbl_resourceClass_sm": [
14
+ "Datasets",
15
+ "Web services"
16
+ ],
17
+ "gbl_resourceType_sm": [
18
+ "Line data"
19
+ ],
20
+ "dct_format_s": "Shapefile",
21
+ "dct_language_sm": [
22
+ "eng"
23
+ ],
24
+ "dct_publisher_sm": [
25
+ "Geological Survey (U.S.)"
26
+ ],
27
+ "dct_subject_sm": [
28
+ "Earthquakes",
29
+ "Faults"
30
+ ],
31
+ "dct_issued_s": 2020,
32
+ "gbl_indexYear_im": [
33
+ "2020"
34
+ ],
35
+ "dct_temporal_sm": [
36
+ "2020"
37
+ ],
38
+ "dct_spatial_sm": [
39
+ "Earth (Planet)",
40
+ "North America"
41
+ ],
42
+ "locn_geometry": "ENVELOPE(-156.02, -70.80, 65.59, 18.93)",
43
+ "dcat_bbox": "ENVELOPE(-156.02, -70.80, 65.59, 18.93)",
44
+ "gbl_mdModified_dt": "2021-06-11T17:55:01Z",
45
+ "gbl_mdVersion_s": "Aardvark"
46
+ }
@@ -5,17 +5,6 @@ describe GeoblacklightHelper, type: :helper do
5
5
  include BlacklightHelper
6
6
  include ActionView::Helpers::UrlHelper
7
7
  include ActionView::Helpers::TranslationHelper
8
- describe '#render_facet_links' do
9
- let(:subject_field) { Settings.FIELDS.SUBJECT }
10
- it 'contains unique links' do
11
- expect(self).to receive(:search_catalog_path).exactly(3).times.and_return("http://example.com/catalog?f[#{subject_field}][]=category")
12
- html = Capybara.string(render_facet_links(subject_field, %w[Test Test Earth Science]))
13
- expect(html).to have_css 'a', count: 3
14
- expect(html).to have_css 'a', text: 'Test', count: 1
15
- expect(html).to have_css 'a', text: 'Earth', count: 1
16
- expect(html).to have_css 'a', text: 'Science', count: 1
17
- end
18
- end
19
8
 
20
9
  describe '#geoblacklight_icon' do
21
10
  it 'supports in use cases' do
@@ -59,8 +48,7 @@ describe GeoblacklightHelper, type: :helper do
59
48
  let(:url) { 'http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH/data.zip' }
60
49
 
61
50
  it 'generates a link to download the original file' do
62
- puts download_link_file(label, id, url)
63
- expect(download_link_file(label, id, url)).to eq '<a contentUrl="http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH/data.zip" class="btn btn-default download download-original" data-download="trigger" data-download-type="direct" data-download-id="test-id" href="http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH/data.zip">Test Link Text</a>'
51
+ expect(download_link_file(label, id, url)).to eq '<a contentUrl="http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH/data.zip" data-download="trigger" data-download-type="direct" data-download-id="test-id" href="http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH/data.zip">Test Link Text</a>'
64
52
  end
65
53
  end
66
54
 
@@ -74,7 +62,7 @@ describe GeoblacklightHelper, type: :helper do
74
62
  end
75
63
 
76
64
  it 'generates a link to the HGL route' do
77
- expect(download_link_hgl(text, document)).to eq '<a class="btn btn-default download download-original" data-blacklight-modal="trigger" data-download="trigger" data-download-type="harvard-hgl" data-download-id="test-id" href="/download/hgl/test-id">Test Link Text</a>'
65
+ expect(download_link_hgl(text, document)).to eq '<a data-blacklight-modal="trigger" data-download="trigger" data-download-type="harvard-hgl" data-download-id="test-id" href="/download/hgl/test-id">Test Link Text</a>'
78
66
  end
79
67
  end
80
68
 
@@ -95,7 +83,7 @@ describe GeoblacklightHelper, type: :helper do
95
83
 
96
84
  it 'generates a link to download the JPG file from the IIIF server' do
97
85
  assign(:document, document)
98
- expect(helper.download_link_iiif).to eq '<a contentUrl="https://example.edu/image/full/full/0/default.jpg" class="btn btn-default download download-generated" data-download="trigger" href="https://example.edu/image/full/full/0/default.jpg">Original JPG</a>'
86
+ expect(helper.download_link_iiif).to eq '<a contentUrl="https://example.edu/image/full/full/0/default.jpg" data-download="trigger" href="https://example.edu/image/full/full/0/default.jpg">Original JPG</a>'
99
87
  end
100
88
  end
101
89
 
@@ -109,7 +97,10 @@ describe GeoblacklightHelper, type: :helper do
109
97
  end
110
98
 
111
99
  it 'generates a link to download the JPG file from the IIIF server' do
112
- expect(download_link_generated(download_type, document)).to eq '<a class="btn btn-default download download-generated" data-download-path="/download/test-id?type=SHAPEFILE" data-download="trigger" data-download-type="SHAPEFILE" data-download-id="test-id" href="">Export</a>'
100
+ # Stub I18n to ensure the link can be customized via `export_` labels.
101
+ allow(helper).to receive(:t).and_call_original
102
+ allow(helper).to receive(:t).with('geoblacklight.download.export_shapefile_link').and_return('Shapefile Export Customization')
103
+ expect(helper.download_link_generated(download_type, document)).to eq '<a data-download-path="/download/test-id?type=SHAPEFILE" data-download="trigger" data-download-type="SHAPEFILE" data-download-id="test-id" href="">Export Shapefile Export Customization</a>'
113
104
  end
114
105
  end
115
106
 
@@ -149,8 +140,8 @@ describe GeoblacklightHelper, type: :helper do
149
140
  let(:document_attributes) do
150
141
  {
151
142
  value: 'This is a really long string that should get truncated when it gets rendered'\
152
- 'in the index view to give a brief description of the contents of a particular document'\
153
- 'indexed into Solr'
143
+ 'in the index view to give a brief description of the contents of a particular document'\
144
+ 'indexed into Solr'
154
145
  }
155
146
  end
156
147
  it 'truncates longer strings to 150 characters' do
@@ -164,8 +155,8 @@ describe GeoblacklightHelper, type: :helper do
164
155
  let(:document_attributes) do
165
156
  {
166
157
  value: ['This is a really long string that should get truncated when it gets rendered'\
167
- 'in the index view to give a brief description of the contents of a particular document'\
168
- 'indexed into Solr']
158
+ 'in the index view to give a brief description of the contents of a particular document'\
159
+ 'indexed into Solr']
169
160
  }
170
161
  end
171
162
  it 'truncates longer strings to 150 characters' do
@@ -190,20 +181,6 @@ describe GeoblacklightHelper, type: :helper do
190
181
  end
191
182
  end
192
183
 
193
- context 'when CartoHelper methods are within scope' do
194
- include CartoHelper
195
-
196
- before do
197
- allow(helper).to receive(:application_name).and_return('GeoBlacklight')
198
- end
199
-
200
- describe '#carto_link' do
201
- it 'aliases CartoHelper#carto_link' do
202
- expect(helper.carto_link('http://demo.org/wfs/layer.json')).to eq(helper.carto_link('http://demo.org/wfs/layer.json'))
203
- end
204
- end
205
- end
206
-
207
184
  describe '#render_web_services' do
208
185
  let(:reference) { instance_double(Geoblacklight::Reference, type: 'wms') }
209
186
  it 'with a reference to a defined partial' do
@@ -227,7 +204,7 @@ describe GeoblacklightHelper, type: :helper do
227
204
 
228
205
  describe '#leaflet_options' do
229
206
  it 'returns a hash of options for leaflet' do
230
- expect(leaflet_options[:VIEWERS][:WMS][:CONTROLS]).to eq(['Opacity'])
207
+ expect(leaflet_options[:VIEWERS][:WMS][:CONTROLS]).to eq(%w[Opacity Fullscreen])
231
208
  end
232
209
  end
233
210
 
@@ -7,7 +7,7 @@ describe Geoblacklight::DocumentPresenter do
7
7
  let(:request_context) { double(document_index_view_type: 'list') }
8
8
  let(:blacklight_config) do
9
9
  Blacklight::Configuration.new.configure do |config|
10
- config.add_index_field 'layer_id_s'
10
+ config.add_index_field 'gbl_wxsIdentifier_s'
11
11
  config.add_index_field 'index_display'
12
12
  config.add_index_field 'period'
13
13
  config.add_index_field 'multi_display'
@@ -21,7 +21,7 @@ describe Geoblacklight::DocumentPresenter do
21
21
  let(:document) do
22
22
  SolrDocument.new(
23
23
  id: 1,
24
- layer_id_s: 'druid:abc123',
24
+ gbl_wxsIdentifier_s: 'druid:abc123',
25
25
  non_index_field: 'do not render',
26
26
  period: 'Ends with period.',
27
27
  multi_display: %w[blue blah]
@@ -31,7 +31,7 @@ describe Geoblacklight::DocumentPresenter do
31
31
  describe '#index_fields_display' do
32
32
  let(:rendered_index_text) { subject.index_fields_display }
33
33
  let(:multi_valued_text) { document['multi_display'].join(' and ') }
34
- let(:combined_fields) { document['layer_id_s'] + '. ' + document['period'] }
34
+ let(:combined_fields) { document['gbl_wxsIdentifier_s'] + '. ' + document['period'] }
35
35
 
36
36
  context 'with multi-valued field' do
37
37
  it 'each value is separated by comma' do
@@ -2,7 +2,7 @@
2
2
  require 'spec_helper'
3
3
 
4
4
  describe Geoblacklight::GeojsonDownload do
5
- let(:document) { SolrDocument.new(Settings.FIELDS.ID => 'test', solr_wfs_url: 'http://www.example.com/wfs', Settings.FIELDS.WXS_IDENTIFIER => 'stanford-test', Settings.FIELDS.SPATIAL_EXTENT => 'ENVELOPE(-180, 180, 90, -90)') }
5
+ let(:document) { SolrDocument.new(Settings.FIELDS.ID => 'test', solr_wfs_url: 'http://www.example.com/wfs', Settings.FIELDS.WXS_IDENTIFIER => 'stanford-test', Settings.FIELDS.GEOMETRY => 'ENVELOPE(-180, 180, 90, -90)') }
6
6
  let(:download) { described_class.new(document) }
7
7
  describe '#initialize' do
8
8
  it 'initializes as a GeojsonDownload object with specific options' do
@@ -2,7 +2,7 @@
2
2
  require 'spec_helper'
3
3
 
4
4
  describe Geoblacklight::GeotiffDownload do
5
- let(:document) { SolrDocument.new(Settings.FIELDS.ID => 'test', Settings.FIELDS.WXS_IDENTIFIER => 'stanford-test', Settings.FIELDS.SPATIAL_EXTENT => 'ENVELOPE(-180, 180, 90, -90)') }
5
+ let(:document) { SolrDocument.new(Settings.FIELDS.ID => 'test', Settings.FIELDS.WXS_IDENTIFIER => 'stanford-test', Settings.FIELDS.GEOMETRY => 'ENVELOPE(-180, 180, 90, -90)') }
6
6
  let(:download) { described_class.new(document) }
7
7
  describe '#initialize' do
8
8
  it 'initializes as a GeotiffDownload object with specific options' do
@@ -2,7 +2,7 @@
2
2
  require 'spec_helper'
3
3
 
4
4
  describe Geoblacklight::KmzDownload do
5
- let(:document) { SolrDocument.new(Settings.FIELDS.ID => 'test', solr_wfs_url: 'http://www.example.com/wfs', Settings.FIELDS.WXS_IDENTIFIER => 'stanford-test', Settings.FIELDS.SPATIAL_EXTENT => 'ENVELOPE(-180, 180, 90, -90)') }
5
+ let(:document) { SolrDocument.new(Settings.FIELDS.ID => 'test', solr_wfs_url: 'http://www.example.com/wfs', Settings.FIELDS.WXS_IDENTIFIER => 'stanford-test', Settings.FIELDS.GEOMETRY => 'ENVELOPE(-180, 180, 90, -90)') }
6
6
  let(:download) { described_class.new(document) }
7
7
  describe '#initialize' do
8
8
  it 'initializes as a KmzDownload object with specific options' do
@@ -2,7 +2,7 @@
2
2
  require 'spec_helper'
3
3
 
4
4
  describe Geoblacklight::ShapefileDownload do
5
- let(:document) { SolrDocument.new(Settings.FIELDS.ID => 'test', solr_wfs_url: 'http://www.example.com/wfs', Settings.FIELDS.WXS_IDENTIFIER => 'stanford-test', Settings.FIELDS.SPATIAL_EXTENT => 'ENVELOPE(-180, 180, 90, -90)') }
5
+ let(:document) { SolrDocument.new(Settings.FIELDS.ID => 'test', solr_wfs_url: 'http://www.example.com/wfs', Settings.FIELDS.WXS_IDENTIFIER => 'stanford-test', Settings.FIELDS.GEOMETRY => 'ENVELOPE(-180, 180, 90, -90)') }
6
6
  let(:download) { described_class.new(document) }
7
7
  describe '#initialize' do
8
8
  it 'initializes as a ShapefileDownload object with specific options' do
@@ -171,8 +171,8 @@ describe Geoblacklight::Download do
171
171
 
172
172
  it 'creates a download url with params' do
173
173
  expect(download.url_with_params).to eq 'http://www.example.com/wms/?ser' \
174
- 'vice=wfs&version=2.0.0&request=GetFeature&srsName=EPSG%3A4326&output' \
175
- 'format=SHAPE-ZIP&typeName='
174
+ 'vice=wfs&version=2.0.0&request=GetFeature&srsName=EPSG%3A4326&output' \
175
+ 'format=SHAPE-ZIP&typeName='
176
176
  end
177
177
  end
178
178
  end
@@ -27,6 +27,24 @@ describe Geoblacklight::Metadata::Base do
27
27
  end
28
28
  end
29
29
 
30
+ context "when there's a redirect" do
31
+ before do
32
+ allow(Faraday).to receive(:new).and_call_original
33
+ WebMock.disable_net_connect!(allow_localhost: true, allow: 'chromedriver.storage.googleapis.com')
34
+ stub_request(:get, 'http://purl.stanford.edu/cg357zz0321.mods').to_return(status: 301, headers: { location: 'https://purl.stanford.edu/cg357zz0321.mods' })
35
+ stub_request(:get, 'https://purl.stanford.edu/cg357zz0321.mods').to_return(status: 200, headers: { 'content-type' => 'application/xml' }, body: '<test>data</test>')
36
+ end
37
+
38
+ after do
39
+ WebMock.allow_net_connect!(net_http_connect_on_start: true)
40
+ end
41
+
42
+ it 'follows the redirect' do
43
+ expect(metadata.document).to be_a Nokogiri::XML::Document
44
+ expect(metadata.document.text).to eq 'data'
45
+ end
46
+ end
47
+
30
48
  context 'when attempts to connect to an endpoint URL fail' do
31
49
  subject { metadata.document }
32
50
 
@@ -119,7 +137,7 @@ describe Geoblacklight::Metadata::Base do
119
137
  allow(response).to receive(:body).and_return('<?xml version="1.0" encoding="utf-8" ?><!DOCTYPE metadata SYSTEM "http://www.fgdc.gov/metadata/fgdc-std-001-1998.dtd"><metadata></metadata>')
120
138
  end
121
139
 
122
- it 'retrieves the metadata and transforms it into the HTML' do
140
+ it 'retrieves the metadata and transforms it into the HTML' do
123
141
  allow(geocombine_metadata).to receive(:to_html).and_return(html)
124
142
  allow(connection).to receive(:get).and_return(response)
125
143
 
@@ -6,7 +6,7 @@ describe Geoblacklight::MetadataTransformer::Fgdc do
6
6
  described_class.new(metadata)
7
7
  end
8
8
  let(:fgdc_html) { File.read(Rails.root.join('spec', 'fixtures', 'metadata', 'fgdc.html')) }
9
- let(:metadata) { instance_double('Geoblacklight::Metadata::Fgdc') }
9
+ let(:metadata) { instance_double(Geoblacklight::Metadata::Fgdc) }
10
10
 
11
11
  describe '#transform' do
12
12
  before do
@@ -6,7 +6,7 @@ describe Geoblacklight::MetadataTransformer::Iso19139 do
6
6
  described_class.new(metadata)
7
7
  end
8
8
  let(:iso_html) { File.read(Rails.root.join('spec', 'fixtures', 'metadata', 'iso.html')) }
9
- let(:metadata) { instance_double('Geoblacklight::Metadata::Iso19139') }
9
+ let(:metadata) { instance_double(Geoblacklight::Metadata::Iso19139) }
10
10
 
11
11
  describe '#transform' do
12
12
  before do
@@ -132,10 +132,12 @@ describe Geoblacklight::References do
132
132
  expect(complex_shapefile.shown_metadata_refs.last.type.to_s).to eq 'iso19139'
133
133
  end
134
134
  context 'with an overridden order for the formats' do
135
- let(:settings_klass) { class_double('Settings').as_stubbed_const }
136
135
  before do
137
- allow(settings_klass).to receive(:METADATA_SHOWN).and_return %w[iso19139 mods]
138
- allow(settings_klass).to receive(:FIELDS).and_return OpenStruct.new(FORMAT: 'dc_format_s')
136
+ stub_const('Settings', Module.new)
137
+ allow(Settings).to receive_messages(
138
+ METADATA_SHOWN: %w[iso19139 mods],
139
+ FIELDS: OpenStruct.new(FORMAT: 'dct_format_s')
140
+ )
139
141
  end
140
142
  it 'is ordered by the configuration' do
141
143
  expect(complex_shapefile.shown_metadata_refs.first.type.to_s).to eq 'iso19139'
@@ -41,6 +41,8 @@ describe Geoblacklight::Relation::RelationResponse do
41
41
 
42
42
  describe '#query_type' do
43
43
  it 'fails for a bad query type request' do
44
+ # Cache the existing relationship values and add a test value
45
+ relationships = Settings.RELATIONSHIPS_SHOWN
44
46
  Settings.add_source!({
45
47
  RELATIONSHIPS_SHOWN: {
46
48
  BAD: {
@@ -54,6 +56,9 @@ describe Geoblacklight::Relation::RelationResponse do
54
56
  Settings.reload!
55
57
 
56
58
  expect { relation_resp.BAD }.to raise_error(ArgumentError)
59
+
60
+ # Restore relationship values
61
+ Settings.RELATIONSHIPS_SHOWN = relationships
57
62
  end
58
63
  end
59
64
  end
@@ -12,16 +12,6 @@ describe Geoblacklight::ViewHelperOverride do
12
12
  .extend(described_class)
13
13
  end
14
14
 
15
- describe 'spatial_parameters?' do
16
- it 'does not have spatial parameters' do
17
- fake_controller.params = {}
18
- expect(fake_controller.spatial_parameters?).to be_falsey
19
- end
20
- it 'has spatial parameters' do
21
- fake_controller.params = { bbox: '123' }
22
- expect(fake_controller.spatial_parameters?).to be_truthy
23
- end
24
- end
25
15
  describe 'render_search_to_s_bbox' do
26
16
  it 'returns an empty string for no bbox' do
27
17
  fake_controller.params = {}
@@ -4,7 +4,7 @@ require 'spec_helper'
4
4
  describe Geoblacklight::WmsLayer do
5
5
  let(:wms_layer) { described_class.new(params) }
6
6
  let(:rails_4_params) { { 'URL' => 'http://www.example.com/', 'X' => '277' } }
7
- let(:rails_5_params) { instance_double('ActionController::Parameters') }
7
+ let(:rails_5_params) { instance_double(ActionController::Parameters) }
8
8
 
9
9
  before do
10
10
  allow(rails_5_params).to receive(:to_h).and_return('URL' => 'http://www.example.com/', 'X' => '277')