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.
Files changed (586) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/build-demo-app.yml +153 -0
  3. data/.github/workflows/prune-containers.yml +19 -0
  4. data/.github/workflows/ruby.yml +54 -55
  5. data/.gitignore +2 -2
  6. data/CONTRIBUTING.md +62 -44
  7. data/Gemfile +3 -27
  8. data/Rakefile +42 -67
  9. data/app/assets/images/blacklight/logo.svg +31 -1
  10. data/app/assets/stylesheets/geoblacklight/geoblacklight.scss +1 -2
  11. data/app/assets/stylesheets/geoblacklight/modules/_base.scss +1 -1
  12. data/app/assets/stylesheets/geoblacklight/modules/_blacklight_overrides.scss +24 -26
  13. data/app/assets/stylesheets/geoblacklight/modules/downloads.scss +13 -0
  14. data/app/assets/stylesheets/geoblacklight/modules/home.scss +2 -17
  15. data/app/assets/stylesheets/geoblacklight/modules/icon-customization.scss +48 -23
  16. data/app/assets/stylesheets/geoblacklight/modules/index_maps.scss +1 -15
  17. data/app/assets/stylesheets/geoblacklight/modules/item.scss +13 -11
  18. data/app/assets/stylesheets/geoblacklight/modules/layer_opacity.scss +3 -3
  19. data/app/assets/stylesheets/geoblacklight/modules/leaflet.scss +4 -0
  20. data/app/assets/stylesheets/geoblacklight/modules/modal.scss +0 -15
  21. data/app/assets/stylesheets/geoblacklight/modules/results.scss +10 -19
  22. data/app/assets/stylesheets/geoblacklight/modules/sidebar.scss +2 -2
  23. data/app/components/blacklight/icons/american_geographical_society_library_uwm_libraries_component.rb +46 -0
  24. data/app/components/blacklight/icons/arizona_component.rb +24 -0
  25. data/app/components/blacklight/icons/arrow_circle_down_component.rb +23 -0
  26. data/app/components/blacklight/icons/baruch_cuny_component.rb +23 -0
  27. data/app/components/blacklight/icons/book_component.rb +23 -0
  28. data/app/components/blacklight/icons/bookmark_component.rb +23 -0
  29. data/app/components/blacklight/icons/cd_rom_component.rb +23 -0
  30. data/app/components/blacklight/icons/child_item_component.rb +23 -0
  31. data/app/components/blacklight/icons/circle_info_solid_component.rb +23 -0
  32. data/app/components/blacklight/icons/citation_component.rb +23 -0
  33. data/app/components/blacklight/icons/collection_component.rb +23 -0
  34. data/app/components/blacklight/icons/collections_component.rb +24 -0
  35. data/app/components/blacklight/icons/columbia_component.rb +23 -0
  36. data/app/components/blacklight/icons/cornell_component.rb +25 -0
  37. data/app/components/blacklight/icons/datasets_component.rb +27 -0
  38. data/app/components/blacklight/icons/dvd_rom_component.rb +23 -0
  39. data/app/components/blacklight/icons/email_component.rb +23 -0
  40. data/app/components/blacklight/icons/esri_globe_component.rb +51 -0
  41. data/app/components/blacklight/icons/fire_solid_component.rb +23 -0
  42. data/app/components/blacklight/icons/george_mason_component.rb +24 -0
  43. data/app/components/blacklight/icons/globe_component.rb +23 -0
  44. data/app/components/blacklight/icons/harvard_component.rb +23 -0
  45. data/app/components/blacklight/icons/home_component.rb +23 -0
  46. data/app/components/blacklight/icons/iiif_drag_drop_component.rb +31 -0
  47. data/app/components/blacklight/icons/image_component.rb +23 -0
  48. data/app/components/blacklight/icons/imagery_component.rb +24 -0
  49. data/app/components/blacklight/icons/indiana_component.rb +23 -0
  50. data/app/components/blacklight/icons/leaf_component.rb +23 -0
  51. data/app/components/blacklight/icons/lewis_clark_component.rb +25 -0
  52. data/app/components/blacklight/icons/lightbulb_solid_component.rb +23 -0
  53. data/app/components/blacklight/icons/line_component.rb +24 -0
  54. data/app/components/blacklight/icons/map_component.rb +23 -0
  55. data/app/components/blacklight/icons/map_marker_component.rb +23 -0
  56. data/app/components/blacklight/icons/maps_component.rb +24 -0
  57. data/app/components/blacklight/icons/massgis_component.rb +23 -0
  58. data/app/components/blacklight/icons/metadata_component.rb +23 -0
  59. data/app/components/blacklight/icons/michigan_state_university_component.rb +25 -0
  60. data/app/components/blacklight/icons/mit_component.rb +23 -0
  61. data/app/components/blacklight/icons/mixed_component.rb +25 -0
  62. data/app/components/blacklight/icons/multilinestring_component.rb +26 -0
  63. data/app/components/blacklight/icons/multipoint_component.rb +23 -0
  64. data/app/components/blacklight/icons/multipolygon_component.rb +26 -0
  65. data/app/components/blacklight/icons/northwestern_university_component.rb +24 -0
  66. data/app/components/blacklight/icons/nyu_component.rb +26 -0
  67. data/app/components/blacklight/icons/pagelines_brands_component.rb +23 -0
  68. data/app/components/blacklight/icons/paper_map_component.rb +23 -0
  69. data/app/components/blacklight/icons/parent_item_component.rb +23 -0
  70. data/app/components/blacklight/icons/pennsylvania_state_university_component.rb +25 -0
  71. data/app/components/blacklight/icons/point_component.rb +23 -0
  72. data/app/components/blacklight/icons/polygon_component.rb +24 -0
  73. data/app/components/blacklight/icons/polyline_component.rb +26 -0
  74. data/app/components/blacklight/icons/princeton_component.rb +23 -0
  75. data/app/components/blacklight/icons/public_component.rb +23 -0
  76. data/app/components/blacklight/icons/purdue_university_component.rb +25 -0
  77. data/app/components/blacklight/icons/raster_component.rb +23 -0
  78. data/app/components/blacklight/icons/restricted_component.rb +23 -0
  79. data/app/components/blacklight/icons/rutgers_component.rb +25 -0
  80. data/app/components/blacklight/icons/sms_component.rb +23 -0
  81. data/app/components/blacklight/icons/stanford_component.rb +23 -0
  82. data/app/components/blacklight/icons/table_component.rb +23 -0
  83. data/app/components/blacklight/icons/tags_component.rb +23 -0
  84. data/app/components/blacklight/icons/texas_component.rb +23 -0
  85. data/app/components/blacklight/icons/the_ohio_state_university_component.rb +26 -0
  86. data/app/components/blacklight/icons/triangle_exclamation_solid_component.rb +23 -0
  87. data/app/components/blacklight/icons/tufts_component.rb +23 -0
  88. data/app/components/blacklight/icons/ucla_component.rb +23 -0
  89. data/app/components/blacklight/icons/university_of_california_berkeley_component.rb +24 -0
  90. data/app/components/blacklight/icons/university_of_chicago_component.rb +25 -0
  91. data/app/components/blacklight/icons/university_of_colorado_boulder_component.rb +26 -0
  92. data/app/components/blacklight/icons/university_of_illinois_urbana_champaign_component.rb +25 -0
  93. data/app/components/blacklight/icons/university_of_iowa_component.rb +24 -0
  94. data/app/components/blacklight/icons/university_of_maryland_component.rb +24 -0
  95. data/app/components/blacklight/icons/university_of_michigan_component.rb +24 -0
  96. data/app/components/blacklight/icons/university_of_minnesota_component.rb +24 -0
  97. data/app/components/blacklight/icons/university_of_nebraska_lincoln_component.rb +27 -0
  98. data/app/components/blacklight/icons/university_of_wisconsin_madison_component.rb +24 -0
  99. data/app/components/blacklight/icons/uva_component.rb +23 -0
  100. data/app/components/blacklight/icons/web_services_component.rb +23 -0
  101. data/app/components/blacklight/icons/websites_component.rb +24 -0
  102. data/app/components/geoblacklight/arcgis_component.html.erb +3 -0
  103. data/app/components/geoblacklight/arcgis_component.rb +25 -0
  104. data/app/components/geoblacklight/attribute_table_component.html.erb +17 -0
  105. data/app/components/geoblacklight/attribute_table_component.rb +17 -0
  106. data/app/components/geoblacklight/data_dictionary_download_component.html.erb +3 -0
  107. data/app/components/geoblacklight/data_dictionary_download_component.rb +16 -0
  108. data/app/components/geoblacklight/display_note_component.rb +1 -1
  109. data/app/components/geoblacklight/document/citation_component.html.erb +1 -0
  110. data/app/components/geoblacklight/document/citation_component.rb +19 -0
  111. data/app/components/geoblacklight/document/sidebar_component.html.erb +12 -0
  112. data/app/components/geoblacklight/document/sidebar_component.rb +8 -0
  113. data/app/components/geoblacklight/document_component.html.erb +43 -0
  114. data/app/components/geoblacklight/document_component.rb +6 -0
  115. data/app/components/geoblacklight/download_links_component.html.erb +31 -0
  116. data/app/components/geoblacklight/download_links_component.rb +80 -0
  117. data/app/components/geoblacklight/header_component.html.erb +14 -0
  118. data/app/components/geoblacklight/header_component.rb +9 -0
  119. data/app/components/geoblacklight/header_icons_component.html.erb +3 -0
  120. data/app/components/geoblacklight/header_icons_component.rb +29 -0
  121. data/app/components/geoblacklight/iiif_drag_drop_component.html.erb +3 -0
  122. data/app/components/geoblacklight/iiif_drag_drop_component.rb +16 -0
  123. data/app/components/geoblacklight/index_map_inspect_component.rb +15 -0
  124. data/app/components/geoblacklight/index_map_legend_component.html.erb +14 -0
  125. data/app/components/geoblacklight/index_map_legend_component.rb +17 -0
  126. data/app/components/geoblacklight/item_map_viewer_component.html.erb +1 -0
  127. data/app/components/geoblacklight/item_map_viewer_component.rb +87 -0
  128. data/app/components/geoblacklight/location_leaflet_map_component.html.erb +1 -0
  129. data/app/components/geoblacklight/location_leaflet_map_component.rb +49 -0
  130. data/app/components/geoblacklight/login_link_component.html.erb +5 -0
  131. data/app/components/geoblacklight/login_link_component.rb +17 -0
  132. data/app/components/geoblacklight/relations_component.html.erb +23 -0
  133. data/app/components/geoblacklight/relations_component.rb +25 -0
  134. data/app/components/geoblacklight/search_result_component.html.erb +44 -0
  135. data/app/components/geoblacklight/search_result_component.rb +28 -0
  136. data/app/components/geoblacklight/static_map_component.html.erb +9 -0
  137. data/app/components/geoblacklight/static_map_component.rb +36 -0
  138. data/app/components/geoblacklight/viewer_help_text_component.html.erb +1 -0
  139. data/app/components/geoblacklight/viewer_help_text_component.rb +46 -0
  140. data/app/components/geoblacklight/web_services_component.html.erb +1 -0
  141. data/app/components/geoblacklight/web_services_component.rb +26 -0
  142. data/app/{views/catalog/_web_services_default.html.erb → components/geoblacklight/web_services_default_component.html.erb} +3 -5
  143. data/app/components/geoblacklight/web_services_default_component.rb +11 -0
  144. data/app/components/geoblacklight/web_services_link_component.html.erb +3 -0
  145. data/app/components/geoblacklight/web_services_link_component.rb +22 -0
  146. data/app/{views/catalog/_web_services_wfs.html.erb → components/geoblacklight/web_services_wfs_component.html.erb} +4 -7
  147. data/app/components/geoblacklight/web_services_wfs_component.rb +12 -0
  148. data/app/components/geoblacklight/web_services_wms_component.html.erb +10 -0
  149. data/app/components/geoblacklight/web_services_wms_component.rb +12 -0
  150. data/app/controllers/download_controller.rb +8 -29
  151. data/app/controllers/relation_controller.rb +0 -1
  152. data/app/helpers/geoblacklight_helper.rb +10 -247
  153. data/app/javascript/geoblacklight/controllers/clipboard_controller.js +11 -0
  154. data/app/javascript/geoblacklight/controllers/clover_viewer_controller.js +47 -0
  155. data/app/javascript/geoblacklight/controllers/downloads_controller.js +56 -0
  156. data/app/javascript/geoblacklight/controllers/leaflet_viewer_controller.js +217 -0
  157. data/app/javascript/geoblacklight/controllers/oembed_viewer_controller.js +18 -0
  158. data/app/javascript/geoblacklight/controllers/openlayers_viewer_controller.js +63 -0
  159. data/app/javascript/geoblacklight/controllers/search_results_controller.js +50 -0
  160. data/app/javascript/geoblacklight/core.js +69 -0
  161. data/app/javascript/geoblacklight/index.js +29 -0
  162. data/app/javascript/geoblacklight/initializers/metadata_download.js +54 -0
  163. data/app/javascript/geoblacklight/initializers/popovers.js +11 -0
  164. data/app/javascript/geoblacklight/initializers/relations.js +40 -0
  165. data/app/javascript/geoblacklight/initializers/tooltips.js +55 -0
  166. data/app/javascript/geoblacklight/initializers/truncation.js +45 -0
  167. data/app/javascript/geoblacklight/leaflet/basemaps.js +74 -0
  168. data/app/javascript/geoblacklight/leaflet/constants.js +18 -0
  169. data/app/javascript/geoblacklight/leaflet/controls/geosearch.js +160 -0
  170. data/app/javascript/geoblacklight/leaflet/controls/layer_opacity.js +120 -0
  171. data/app/javascript/geoblacklight/leaflet/inspection.js +195 -0
  172. data/app/javascript/geoblacklight/leaflet/layer_index_map.js +120 -0
  173. data/app/javascript/geoblacklight/leaflet/layer_wmts.js +59 -0
  174. data/app/javascript/geoblacklight/leaflet/layers.js +153 -0
  175. data/app/javascript/geoblacklight/leaflet/utils.js +83 -0
  176. data/app/javascript/geoblacklight/openlayers/basemaps.js +47 -0
  177. data/app/javascript/geoblacklight/openlayers/layers.js +44 -0
  178. data/app/models/concerns/geoblacklight/solr_document/citation.rb +20 -15
  179. data/app/models/concerns/geoblacklight/solr_document/inspection.rb +1 -1
  180. data/app/models/concerns/geoblacklight/solr_document.rb +23 -59
  181. data/app/presenters/geoblacklight/bbox_item_presenter.rb +1 -1
  182. data/app/views/catalog/_citation.html.erb +16 -33
  183. data/app/views/catalog/_document_split.html.erb +18 -3
  184. data/app/views/catalog/_home_text.html.erb +2 -2
  185. data/app/views/catalog/_metadata.html.erb +1 -1
  186. data/app/views/catalog/index.html.erb +8 -4
  187. data/app/views/catalog/metadata/_markup.html.erb +1 -1
  188. data/app/views/catalog/metadata.html.erb +14 -13
  189. data/app/views/catalog/web_services.html.erb +19 -28
  190. data/app/views/relation/index.html.erb +2 -12
  191. data/app/views/relation/index.json.jbuilder +1 -1
  192. data/compose.yml +14 -0
  193. data/config/importmap.rb +20 -0
  194. data/config/locales/geoblacklight.en.yml +15 -24
  195. data/geoblacklight.gemspec +8 -8
  196. data/lib/generators/geoblacklight/assets/importmap_generator.rb +87 -0
  197. data/lib/generators/geoblacklight/assets/vite_generator.rb +90 -0
  198. data/lib/generators/geoblacklight/assets_generator.rb +12 -37
  199. data/lib/generators/geoblacklight/install_generator.rb +11 -63
  200. data/lib/generators/geoblacklight/templates/assets/_customizations.scss +13 -19
  201. data/lib/generators/geoblacklight/templates/assets/application.js +17 -0
  202. data/lib/generators/geoblacklight/templates/assets/application.scss +9 -4
  203. data/lib/generators/geoblacklight/templates/assets/geoblacklight.scss +11 -0
  204. data/lib/generators/geoblacklight/templates/base.html.erb +9 -12
  205. data/lib/generators/geoblacklight/templates/catalog_controller.rb +11 -18
  206. data/lib/generators/geoblacklight/templates/demo-app/Dockerfile +31 -0
  207. data/lib/generators/geoblacklight/templates/demo-app/compose.yml +26 -0
  208. data/lib/generators/geoblacklight/templates/demo-app/start-server.sh +21 -0
  209. data/lib/generators/geoblacklight/templates/package.json +7 -1
  210. data/lib/generators/geoblacklight/templates/settings.yml +45 -59
  211. data/lib/generators/geoblacklight/templates/vite.config.ts +22 -7
  212. data/lib/geoblacklight/bounding_box.rb +16 -0
  213. data/lib/geoblacklight/constants.rb +0 -1
  214. data/lib/geoblacklight/download/csv_download.rb +22 -0
  215. data/lib/geoblacklight/download/geojson_download.rb +1 -1
  216. data/lib/geoblacklight/download/geotiff_download.rb +1 -1
  217. data/lib/geoblacklight/download/kmz_download.rb +1 -1
  218. data/lib/geoblacklight/download/shapefile_download.rb +1 -1
  219. data/lib/geoblacklight/download.rb +1 -1
  220. data/lib/geoblacklight/engine.rb +15 -20
  221. data/lib/geoblacklight/geometry.rb +0 -7
  222. data/lib/geoblacklight/item_viewer.rb +1 -8
  223. data/lib/geoblacklight/metadata/base.rb +2 -1
  224. data/lib/geoblacklight/references.rb +27 -23
  225. data/lib/geoblacklight/routes/downloadable.rb +0 -1
  226. data/lib/geoblacklight/routes.rb +0 -3
  227. data/lib/geoblacklight/version.rb +1 -1
  228. data/lib/geoblacklight/wms_layer/feature_info_response.rb +9 -6
  229. data/lib/geoblacklight.rb +6 -47
  230. data/lib/tasks/geoblacklight.rake +24 -77
  231. data/package.json +22 -16
  232. data/solr/conf/schema.xml +15 -13
  233. data/solr/conf/solrconfig.xml +6 -4
  234. data/spec/components/blacklight/icons/american_geographical_society_library_uwm_libraries_component_spec.rb +15 -0
  235. data/spec/components/blacklight/icons/arizona_component_spec.rb +15 -0
  236. data/spec/components/blacklight/icons/arrow_circle_down_component_spec.rb +15 -0
  237. data/spec/components/blacklight/icons/baruch_cuny_component_spec.rb +15 -0
  238. data/spec/components/blacklight/icons/book_component_spec.rb +15 -0
  239. data/spec/components/blacklight/icons/bookmark_component_spec.rb +15 -0
  240. data/spec/components/blacklight/icons/cd_rom_component_spec.rb +15 -0
  241. data/spec/components/blacklight/icons/child_item_component_spec.rb +15 -0
  242. data/spec/components/blacklight/icons/circle_info_solid_component_spec.rb +15 -0
  243. data/spec/components/blacklight/icons/citation_component_spec.rb +15 -0
  244. data/spec/components/blacklight/icons/collection_component_spec.rb +15 -0
  245. data/spec/components/blacklight/icons/collections_component_spec.rb +15 -0
  246. data/spec/components/blacklight/icons/columbia_component_spec.rb +15 -0
  247. data/spec/components/blacklight/icons/cornell_component_spec.rb +15 -0
  248. data/spec/components/blacklight/icons/datasets_component_spec.rb +15 -0
  249. data/spec/components/blacklight/icons/dvd_rom_component_spec.rb +15 -0
  250. data/spec/components/blacklight/icons/email_component_spec.rb +15 -0
  251. data/spec/components/blacklight/icons/esri_globe_component_spec.rb +15 -0
  252. data/spec/components/blacklight/icons/fire_solid_component_spec.rb +15 -0
  253. data/spec/components/blacklight/icons/george_mason_component_spec.rb +15 -0
  254. data/spec/components/blacklight/icons/globe_component_spec.rb +15 -0
  255. data/spec/components/blacklight/icons/harvard_component_spec.rb +15 -0
  256. data/spec/components/blacklight/icons/home_component_spec.rb +15 -0
  257. data/spec/components/blacklight/icons/iiif_drag_drop_component_spec.rb +15 -0
  258. data/spec/components/blacklight/icons/image_component_spec.rb +15 -0
  259. data/spec/components/blacklight/icons/imagery_component_spec.rb +15 -0
  260. data/spec/components/blacklight/icons/indiana_component_spec.rb +15 -0
  261. data/spec/components/blacklight/icons/leaf_component_spec.rb +15 -0
  262. data/spec/components/blacklight/icons/lewis_clark_component_spec.rb +15 -0
  263. data/spec/components/blacklight/icons/lightbulb_solid_component_spec.rb +15 -0
  264. data/spec/components/blacklight/icons/line_component_spec.rb +15 -0
  265. data/spec/components/blacklight/icons/map_component_spec.rb +15 -0
  266. data/spec/components/blacklight/icons/map_marker_component_spec.rb +15 -0
  267. data/spec/components/blacklight/icons/maps_component_spec.rb +15 -0
  268. data/spec/components/blacklight/icons/massgis_component_spec.rb +15 -0
  269. data/spec/components/blacklight/icons/metadata_component_spec.rb +15 -0
  270. data/spec/components/blacklight/icons/michigan_state_university_component_spec.rb +15 -0
  271. data/spec/components/blacklight/icons/mit_component_spec.rb +15 -0
  272. data/spec/components/blacklight/icons/mixed_component_spec.rb +15 -0
  273. data/spec/components/blacklight/icons/multilinestring_component_spec.rb +15 -0
  274. data/spec/components/blacklight/icons/multipoint_component_spec.rb +15 -0
  275. data/spec/components/blacklight/icons/multipolygon_component_spec.rb +15 -0
  276. data/spec/components/blacklight/icons/northwestern_university_component_spec.rb +15 -0
  277. data/spec/components/blacklight/icons/nyu_component_spec.rb +15 -0
  278. data/spec/components/blacklight/icons/pagelines_brands_component_spec.rb +15 -0
  279. data/spec/components/blacklight/icons/paper_map_component_spec.rb +15 -0
  280. data/spec/components/blacklight/icons/parent_item_component_spec.rb +15 -0
  281. data/spec/components/blacklight/icons/pennsylvania_state_university_component_spec.rb +15 -0
  282. data/spec/components/blacklight/icons/point_component_spec.rb +15 -0
  283. data/spec/components/blacklight/icons/polygon_component_spec.rb +15 -0
  284. data/spec/components/blacklight/icons/polyline_component_spec.rb +15 -0
  285. data/spec/components/blacklight/icons/princeton_component_spec.rb +15 -0
  286. data/spec/components/blacklight/icons/public_component_spec.rb +15 -0
  287. data/spec/components/blacklight/icons/purdue_university_component_spec.rb +15 -0
  288. data/spec/components/blacklight/icons/raster_component_spec.rb +15 -0
  289. data/spec/components/blacklight/icons/restricted_component_spec.rb +15 -0
  290. data/spec/components/blacklight/icons/rutgers_component_spec.rb +15 -0
  291. data/spec/components/blacklight/icons/sms_component_spec.rb +15 -0
  292. data/spec/components/blacklight/icons/stanford_component_spec.rb +15 -0
  293. data/spec/components/blacklight/icons/table_component_spec.rb +15 -0
  294. data/spec/components/blacklight/icons/tags_component_spec.rb +15 -0
  295. data/spec/components/blacklight/icons/texas_component_spec.rb +15 -0
  296. data/spec/components/blacklight/icons/the_ohio_state_university_component_spec.rb +15 -0
  297. data/spec/components/blacklight/icons/triangle_exclamation_solid_component_spec.rb +15 -0
  298. data/spec/components/blacklight/icons/tufts_component_spec.rb +15 -0
  299. data/spec/components/blacklight/icons/ucla_component_spec.rb +15 -0
  300. data/spec/components/blacklight/icons/university_of_california_berkeley_component_spec.rb +15 -0
  301. data/spec/components/blacklight/icons/university_of_chicago_component_spec.rb +15 -0
  302. data/spec/components/blacklight/icons/university_of_colorado_boulder_component_spec.rb +15 -0
  303. data/spec/components/blacklight/icons/university_of_illinois_urbana_champaign_component_spec.rb +15 -0
  304. data/spec/components/blacklight/icons/university_of_iowa_component_spec.rb +15 -0
  305. data/spec/components/blacklight/icons/university_of_maryland_component_spec.rb +15 -0
  306. data/spec/components/blacklight/icons/university_of_michigan_component_spec.rb +15 -0
  307. data/spec/components/blacklight/icons/university_of_minnesota_component_spec.rb +15 -0
  308. data/spec/components/blacklight/icons/university_of_nebraska_lincoln_component_spec.rb +15 -0
  309. data/spec/components/blacklight/icons/university_of_wisconsin_madison_component_spec.rb +15 -0
  310. data/spec/components/blacklight/icons/uva_component_spec.rb +15 -0
  311. data/spec/components/blacklight/icons/web_services_component_spec.rb +15 -0
  312. data/spec/components/blacklight/icons/websites_component_spec.rb +15 -0
  313. data/spec/components/geoblacklight/arcgis_component_spec.rb +31 -0
  314. data/spec/components/geoblacklight/attribute_table_component_spec.rb +37 -0
  315. data/spec/components/geoblacklight/citation_component_spec.rb +37 -0
  316. data/spec/components/geoblacklight/document_component_spec.rb +92 -0
  317. data/spec/components/geoblacklight/download_links_component_spec.rb +102 -0
  318. data/spec/components/geoblacklight/header_icons_component_spec.rb +56 -0
  319. data/spec/components/geoblacklight/iiif_drag_drop_component_spec.rb +30 -0
  320. data/spec/components/geoblacklight/index_map_legend_component_spec.rb +42 -0
  321. data/spec/components/geoblacklight/item_map_viewer_component_spec.rb +36 -0
  322. data/spec/components/geoblacklight/login_link_component_spec.rb +33 -0
  323. data/spec/{lib/geoblacklight/document_presenter_spec.rb → components/geoblacklight/search_result_component_spec.rb} +19 -11
  324. data/spec/components/geoblacklight/static_map_component_spec.rb +22 -0
  325. data/spec/components/geoblacklight/viewer_help_text_component_spec.rb +28 -0
  326. data/spec/components/geoblacklight/web_services_component_spec.rb +45 -0
  327. data/spec/controllers/download_controller_spec.rb +12 -35
  328. data/spec/features/axe_spec.rb +66 -0
  329. data/spec/features/bookmarks_spec.rb +1 -1
  330. data/spec/features/citations_spec.rb +7 -3
  331. data/spec/features/configurable_basemap_spec.rb +0 -56
  332. data/spec/features/download_layer_spec.rb +24 -39
  333. data/spec/features/esri_viewer_spec.rb +1 -1
  334. data/spec/features/exports_spec.rb +0 -15
  335. data/spec/features/{full_screen_controll_spec.rb → full_screen_control_spec.rb} +6 -6
  336. data/spec/features/home_page_spec.rb +12 -7
  337. data/spec/features/iiif_viewer_spec.rb +1 -1
  338. data/spec/features/index_map_spec.rb +16 -9
  339. data/spec/features/{split_view.html.erb_spec.rb → index_view_spec.rb} +15 -13
  340. data/spec/features/layer_inspection_spec.rb +2 -2
  341. data/spec/features/layer_preview_spec.rb +1 -1
  342. data/spec/features/missing_metadata_spec.rb +5 -5
  343. data/spec/features/oembed_spec.rb +2 -2
  344. data/spec/features/saved_searches_spec.rb +4 -1
  345. data/spec/features/search_results_complex_geometry_spec.rb +2 -2
  346. data/spec/features/search_results_icons_spec.rb +3 -3
  347. data/spec/features/search_results_map_spec.rb +4 -36
  348. data/spec/features/search_results_overlap_ratio_spec.rb +1 -1
  349. data/spec/features/show_page_download_spec.rb +0 -8
  350. data/spec/features/tilejson_spec.rb +2 -2
  351. data/spec/features/web_services_modal_spec.rb +57 -39
  352. data/spec/features/wmts_spec.rb +4 -4
  353. data/spec/fixtures/solr_documents/README.md +2 -1
  354. data/spec/fixtures/solr_documents/complex-geom.json +61 -0
  355. data/spec/fixtures/solr_documents/esri-tiled_map_layer.json +45 -24
  356. data/spec/fixtures/solr_documents/harvard_raster.json +1 -1
  357. data/spec/fixtures/solr_documents/multiple-downloads.json +1 -0
  358. data/spec/helpers/geoblacklight_helper_spec.rb +8 -173
  359. data/spec/lib/geoblacklight/download/csv_download_spec.rb +21 -0
  360. data/spec/lib/geoblacklight/geometry_spec.rb +0 -15
  361. data/spec/lib/geoblacklight/reference_spec.rb +17 -19
  362. data/spec/lib/geoblacklight/references_spec.rb +30 -40
  363. data/spec/lib/geoblacklight/wms_layer/feature_info_response_spec.rb +8 -6
  364. data/spec/lib/geoblacklight/wms_layer_spec.rb +14 -0
  365. data/spec/models/concerns/geoblacklight/solr_document/citation_spec.rb +1 -17
  366. data/spec/models/concerns/geoblacklight/solr_document_spec.rb +1 -69
  367. data/spec/spec_helper.rb +2 -31
  368. data/spec/test_app_templates/lib/generators/test_app_generator.rb +4 -4
  369. data/template.rb +13 -11
  370. data/test/leaflet/layers.test.js +17 -0
  371. data/vite.config.ts +34 -23
  372. metadata +315 -273
  373. data/.hound.yml +0 -8
  374. data/.jshintignore +0 -2
  375. data/.jshintrc +0 -67
  376. data/.solr_wrapper +0 -7
  377. data/app/assets/images/blacklight/american-geographical-society-library-uwm-libraries.svg +0 -26
  378. data/app/assets/images/blacklight/arrow-circle-down.svg +0 -3
  379. data/app/assets/images/blacklight/baruch-cuny.svg +0 -3
  380. data/app/assets/images/blacklight/book.svg +0 -3
  381. data/app/assets/images/blacklight/bookmark.svg +0 -3
  382. data/app/assets/images/blacklight/cd-rom.svg +0 -3
  383. data/app/assets/images/blacklight/chicago.svg +0 -4
  384. data/app/assets/images/blacklight/child-item.svg +0 -3
  385. data/app/assets/images/blacklight/circle-info-solid.svg +0 -1
  386. data/app/assets/images/blacklight/citation.svg +0 -3
  387. data/app/assets/images/blacklight/collection.svg +0 -3
  388. data/app/assets/images/blacklight/collections.svg +0 -4
  389. data/app/assets/images/blacklight/columbia.svg +0 -3
  390. data/app/assets/images/blacklight/cornell.svg +0 -5
  391. data/app/assets/images/blacklight/datasets.svg +0 -7
  392. data/app/assets/images/blacklight/dvd-rom.svg +0 -3
  393. data/app/assets/images/blacklight/email.svg +0 -3
  394. data/app/assets/images/blacklight/esri-globe.svg +0 -31
  395. data/app/assets/images/blacklight/fire-solid.svg +0 -1
  396. data/app/assets/images/blacklight/geoblacklight-icons.json +0 -3312
  397. data/app/assets/images/blacklight/george-mason.svg +0 -4
  398. data/app/assets/images/blacklight/globe.svg +0 -3
  399. data/app/assets/images/blacklight/harvard.svg +0 -3
  400. data/app/assets/images/blacklight/home.svg +0 -3
  401. data/app/assets/images/blacklight/illinois.svg +0 -4
  402. data/app/assets/images/blacklight/image.svg +0 -3
  403. data/app/assets/images/blacklight/imagery.svg +0 -4
  404. data/app/assets/images/blacklight/indiana.svg +0 -3
  405. data/app/assets/images/blacklight/iowa.svg +0 -3
  406. data/app/assets/images/blacklight/leaf.svg +0 -3
  407. data/app/assets/images/blacklight/lewis-clark.svg +0 -5
  408. data/app/assets/images/blacklight/lightbulb-solid.svg +0 -1
  409. data/app/assets/images/blacklight/line.svg +0 -4
  410. data/app/assets/images/blacklight/map-marker.svg +0 -3
  411. data/app/assets/images/blacklight/map.svg +0 -3
  412. data/app/assets/images/blacklight/maps.svg +0 -4
  413. data/app/assets/images/blacklight/maryland.svg +0 -3
  414. data/app/assets/images/blacklight/massgis.svg +0 -3
  415. data/app/assets/images/blacklight/metadata.svg +0 -3
  416. data/app/assets/images/blacklight/michigan-state-university.svg +0 -5
  417. data/app/assets/images/blacklight/michigan-state.svg +0 -4
  418. data/app/assets/images/blacklight/michigan.svg +0 -3
  419. data/app/assets/images/blacklight/minnesota.svg +0 -3
  420. data/app/assets/images/blacklight/mit.svg +0 -3
  421. data/app/assets/images/blacklight/mixed.svg +0 -5
  422. data/app/assets/images/blacklight/multilinestring.svg +0 -6
  423. data/app/assets/images/blacklight/multipoint.svg +0 -3
  424. data/app/assets/images/blacklight/multipolygon.svg +0 -6
  425. data/app/assets/images/blacklight/nebraska.svg +0 -4
  426. data/app/assets/images/blacklight/northwestern-university.svg +0 -5
  427. data/app/assets/images/blacklight/nyu.svg +0 -6
  428. data/app/assets/images/blacklight/ohio-state.svg +0 -5
  429. data/app/assets/images/blacklight/pagelines-brands.svg +0 -3
  430. data/app/assets/images/blacklight/paper-map.svg +0 -3
  431. data/app/assets/images/blacklight/parent-item.svg +0 -3
  432. data/app/assets/images/blacklight/penn-state.svg +0 -4
  433. data/app/assets/images/blacklight/pennsylvania-state-university.svg +0 -5
  434. data/app/assets/images/blacklight/point.svg +0 -3
  435. data/app/assets/images/blacklight/polygon.svg +0 -4
  436. data/app/assets/images/blacklight/polyline.svg +0 -6
  437. data/app/assets/images/blacklight/princeton.svg +0 -3
  438. data/app/assets/images/blacklight/public.svg +0 -3
  439. data/app/assets/images/blacklight/purdue-university.svg +0 -5
  440. data/app/assets/images/blacklight/purdue.svg +0 -4
  441. data/app/assets/images/blacklight/raster.svg +0 -3
  442. data/app/assets/images/blacklight/restricted.svg +0 -3
  443. data/app/assets/images/blacklight/rutgers.svg +0 -5
  444. data/app/assets/images/blacklight/search.svg +0 -5
  445. data/app/assets/images/blacklight/sms.svg +0 -3
  446. data/app/assets/images/blacklight/stanford.svg +0 -3
  447. data/app/assets/images/blacklight/table.svg +0 -3
  448. data/app/assets/images/blacklight/tags.svg +0 -3
  449. data/app/assets/images/blacklight/texas.svg +0 -3
  450. data/app/assets/images/blacklight/the-ohio-state-university.svg +0 -6
  451. data/app/assets/images/blacklight/triangle-exclamation-solid.svg +0 -1
  452. data/app/assets/images/blacklight/tufts.svg +0 -3
  453. data/app/assets/images/blacklight/ucla.svg +0 -3
  454. data/app/assets/images/blacklight/university-of-arizona.svg +0 -4
  455. data/app/assets/images/blacklight/university-of-california-berkeley.svg +0 -4
  456. data/app/assets/images/blacklight/university-of-chicago.svg +0 -5
  457. data/app/assets/images/blacklight/university-of-colorado-boulder.svg +0 -6
  458. data/app/assets/images/blacklight/university-of-illinois-urbana-champaign.svg +0 -5
  459. data/app/assets/images/blacklight/university-of-iowa.svg +0 -4
  460. data/app/assets/images/blacklight/university-of-maryland.svg +0 -4
  461. data/app/assets/images/blacklight/university-of-michigan.svg +0 -4
  462. data/app/assets/images/blacklight/university-of-minnesota.svg +0 -4
  463. data/app/assets/images/blacklight/university-of-nebraska-lincoln.svg +0 -7
  464. data/app/assets/images/blacklight/university-of-wisconsin-madison.svg +0 -4
  465. data/app/assets/images/blacklight/uva.svg +0 -3
  466. data/app/assets/images/blacklight/web_services.svg +0 -3
  467. data/app/assets/images/blacklight/websites.svg +0 -4
  468. data/app/assets/images/blacklight/wisconsin.svg +0 -3
  469. data/app/assets/javascripts/geoblacklight/basemaps.js +0 -63
  470. data/app/assets/javascripts/geoblacklight/controls/fullscreen.js +0 -8
  471. data/app/assets/javascripts/geoblacklight/controls/opacity.js +0 -6
  472. data/app/assets/javascripts/geoblacklight/controls.js +0 -1
  473. data/app/assets/javascripts/geoblacklight/downloaders/downloader.js +0 -61
  474. data/app/assets/javascripts/geoblacklight/downloaders/hgl_downloader.js +0 -32
  475. data/app/assets/javascripts/geoblacklight/downloaders.js +0 -1
  476. data/app/assets/javascripts/geoblacklight/geoblacklight.js +0 -60
  477. data/app/assets/javascripts/geoblacklight/modules/bookmarks.js +0 -43
  478. data/app/assets/javascripts/geoblacklight/modules/download.js +0 -11
  479. data/app/assets/javascripts/geoblacklight/modules/geosearch.js +0 -133
  480. data/app/assets/javascripts/geoblacklight/modules/help_text.js +0 -7
  481. data/app/assets/javascripts/geoblacklight/modules/home.js +0 -16
  482. data/app/assets/javascripts/geoblacklight/modules/item.js +0 -32
  483. data/app/assets/javascripts/geoblacklight/modules/layer_opacity.js +0 -68
  484. data/app/assets/javascripts/geoblacklight/modules/metadata.js +0 -15
  485. data/app/assets/javascripts/geoblacklight/modules/metadata_download_button.js +0 -58
  486. data/app/assets/javascripts/geoblacklight/modules/relations.js +0 -14
  487. data/app/assets/javascripts/geoblacklight/modules/results.js +0 -81
  488. data/app/assets/javascripts/geoblacklight/modules/svg_tooltips.js +0 -31
  489. data/app/assets/javascripts/geoblacklight/modules/util.js +0 -48
  490. data/app/assets/javascripts/geoblacklight/modules.js +0 -1
  491. data/app/assets/javascripts/geoblacklight/templates/index_map_download.hbs +0 -19
  492. data/app/assets/javascripts/geoblacklight/templates/index_map_info.hbs +0 -61
  493. data/app/assets/javascripts/geoblacklight/viewers/cog.js +0 -5
  494. data/app/assets/javascripts/geoblacklight/viewers/esri/dynamic_map_layer.js +0 -85
  495. data/app/assets/javascripts/geoblacklight/viewers/esri/feature_layer.js +0 -76
  496. data/app/assets/javascripts/geoblacklight/viewers/esri/image_map_layer.js +0 -14
  497. data/app/assets/javascripts/geoblacklight/viewers/esri/tiled_map_layer.js +0 -50
  498. data/app/assets/javascripts/geoblacklight/viewers/esri.js +0 -78
  499. data/app/assets/javascripts/geoblacklight/viewers/iiif.js +0 -25
  500. data/app/assets/javascripts/geoblacklight/viewers/index_map.js +0 -71
  501. data/app/assets/javascripts/geoblacklight/viewers/map.js +0 -94
  502. data/app/assets/javascripts/geoblacklight/viewers/oembed.js +0 -13
  503. data/app/assets/javascripts/geoblacklight/viewers/pmtiles.js +0 -5
  504. data/app/assets/javascripts/geoblacklight/viewers/tilejson.js +0 -33
  505. data/app/assets/javascripts/geoblacklight/viewers/tms.js +0 -10
  506. data/app/assets/javascripts/geoblacklight/viewers/viewer.js +0 -68
  507. data/app/assets/javascripts/geoblacklight/viewers/wms.js +0 -74
  508. data/app/assets/javascripts/geoblacklight/viewers/wmts.js +0 -85
  509. data/app/assets/javascripts/geoblacklight/viewers/xyz.js +0 -10
  510. data/app/assets/javascripts/geoblacklight/viewers.js +0 -1
  511. data/app/assets/stylesheets/geoblacklight/modules/mixins.scss +0 -5
  512. data/app/helpers/arcgis_helper.rb +0 -17
  513. data/app/helpers/blacklight_helper.rb +0 -15
  514. data/app/helpers/carto_helper.rb +0 -36
  515. data/app/helpers/geoblacklight/geoblacklight_helper_behavior.rb +0 -24
  516. data/app/javascript/clover/clover_initializer.js +0 -29
  517. data/app/javascript/index.js +0 -7
  518. data/app/javascript/openlayers/basemaps.js +0 -27
  519. data/app/javascript/openlayers/ol_initializer.js +0 -131
  520. data/app/javascript/stylesheets/openlayers.css +0 -1
  521. data/app/models/concerns/geoblacklight/solr_document/carto.rb +0 -24
  522. data/app/presenters/geoblacklight/document_presenter.rb +0 -34
  523. data/app/views/catalog/_arcgis.html.erb +0 -4
  524. data/app/views/catalog/_carto.html.erb +0 -4
  525. data/app/views/catalog/_data_dictionary.html.erb +0 -5
  526. data/app/views/catalog/_downloads_collapse.html.erb +0 -30
  527. data/app/views/catalog/_header_icons.html.erb +0 -3
  528. data/app/views/catalog/_index_split_default.html.erb +0 -30
  529. data/app/views/catalog/_results_pagination.html.erb +0 -12
  530. data/app/views/catalog/_show_default_attribute_table.html.erb +0 -19
  531. data/app/views/catalog/_show_default_display_note.html.erb +0 -7
  532. data/app/views/catalog/_show_default_viewer_container.html.erb +0 -28
  533. data/app/views/catalog/_show_downloads.html.erb +0 -26
  534. data/app/views/catalog/_show_header_default.html.erb +0 -4
  535. data/app/views/catalog/_show_sidebar.html.erb +0 -16
  536. data/app/views/catalog/_show_sidebar_static_map.html.erb +0 -13
  537. data/app/views/catalog/_show_web_services.html.erb +0 -11
  538. data/app/views/catalog/_web_services.html.erb +0 -9
  539. data/app/views/catalog/_web_services_wms.html.erb +0 -13
  540. data/app/views/download/hgl.html.erb +0 -27
  541. data/app/views/relation/_relations.html.erb +0 -15
  542. data/app/views/shared/_header_navbar.html.erb +0 -46
  543. data/babel.config.json +0 -4
  544. data/jest.config.js +0 -25
  545. data/lib/generators/geoblacklight/templates/assets/_blacklight.scss +0 -1
  546. data/lib/generators/geoblacklight/templates/assets/_geoblacklight.scss +0 -1
  547. data/lib/generators/geoblacklight/templates/assets/geoblacklight.js +0 -9
  548. data/lib/generators/geoblacklight/templates/clover.js +0 -5
  549. data/lib/generators/geoblacklight/templates/ol.js +0 -6
  550. data/lib/generators/geoblacklight/templates/package-test.json +0 -10
  551. data/lib/generators/geoblacklight/templates/settings.gbl_v1.yml +0 -195
  552. data/lib/geoblacklight/deprecated_configuration.rb +0 -519
  553. data/lib/geoblacklight/download/hgl_download.rb +0 -25
  554. data/lib/geoblacklight/view_helper_override.rb +0 -27
  555. data/setupJest.js +0 -14
  556. data/spec/helpers/arcgis_helper_spec.rb +0 -16
  557. data/spec/helpers/carto_helper_spec.rb +0 -13
  558. data/spec/helpers/geoblacklight/geoblacklight_helper_behavior_spec.rb +0 -27
  559. data/spec/javascripts/util_spec.js +0 -10
  560. data/spec/lib/geoblacklight/deprecated_configuration_spec.rb +0 -597
  561. data/spec/lib/geoblacklight/download/hgl_download_spec.rb +0 -62
  562. data/spec/lib/geoblacklight/view_helper_override_spec.rb +0 -30
  563. data/spec/models/concerns/geoblacklight/solr_document/carto_spec.rb +0 -43
  564. data/spec/test_app_templates/Gemfile.extra +0 -2
  565. data/spec/views/catalog/_document_split.html.erb_spec.rb +0 -7
  566. data/spec/views/catalog/_index_split.html.erb_spec.rb +0 -7
  567. data/spec/views/catalog/_results_pagination.html.erb_spec.rb +0 -11
  568. data/spec/views/catalog/_show_downloads.html.erb_spec.rb +0 -43
  569. data/spec/views/catalog/_show_tools.html.erb_spec.rb +0 -38
  570. data/vendor/assets/images/fullscreen.png +0 -0
  571. data/vendor/assets/images/fullscreen@2x.png +0 -0
  572. data/vendor/assets/images/layers-2x.png +0 -0
  573. data/vendor/assets/images/layers.png +0 -0
  574. data/vendor/assets/images/marker-icon-2x.png +0 -0
  575. data/vendor/assets/images/marker-icon.png +0 -0
  576. data/vendor/assets/images/marker-shadow.png +0 -0
  577. data/vendor/assets/javascripts/Leaflet.fullscreen.js +0 -152
  578. data/vendor/assets/javascripts/esri-leaflet.js +0 -12
  579. data/vendor/assets/javascripts/esri-leaflet.js.map +0 -1
  580. data/vendor/assets/javascripts/leaflet-iiif.js +0 -323
  581. data/vendor/assets/javascripts/leaflet-src.js.erb +0 -14126
  582. data/vendor/assets/javascripts/leaflet-src.js.map +0 -1
  583. data/vendor/assets/javascripts/native.history.js +0 -1
  584. data/vendor/assets/stylesheets/leaflet.css +0 -640
  585. data/vendor/assets/stylesheets/leaflet.fullscreen.css +0 -40
  586. /data/app/{views/catalog/_show_default_viewer_information.html.erb → components/geoblacklight/index_map_inspect_component.html.erb} +0 -0
@@ -1,519 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "pathname"
4
- require "yaml"
5
-
6
- module Geoblacklight
7
- ##
8
- # Boot time checks for application configuration that GeoBlacklight 5 removes.
9
- #
10
- # These cases cannot be caught by deprecating a method, because nothing in
11
- # GeoBlacklight calls them:
12
- #
13
- # * An overridden template keeps working on 4.x and is simply never rendered
14
- # again on 5.x, so the customization disappears silently.
15
- # * A removed setting is only ever read by JavaScript, or by code that 5.x
16
- # deletes outright.
17
- #
18
- # So we look at the application's own files and settings once, at boot.
19
- module DeprecatedConfiguration
20
- ##
21
- # Templates GeoBlacklight 5 no longer ships, mapped to their replacement.
22
- # An application that has copied one of these into app/views will keep the
23
- # file after upgrading, but GeoBlacklight 5 will not render it.
24
- TEMPLATES = {
25
- "catalog/_arcgis" => "use Geoblacklight::ArcgisComponent instead",
26
- "catalog/_carto" => "the Carto OneClick integration is removed without replacement",
27
- "catalog/_data_dictionary" => "use Geoblacklight::DataDictionaryDownloadComponent instead",
28
- "catalog/_downloads_collapse" => "use Geoblacklight::DownloadLinksComponent instead",
29
- "catalog/_header_icons" => "use Geoblacklight::HeaderIconsComponent instead",
30
- "catalog/_index_split_default" => "use Geoblacklight::SearchResultComponent instead",
31
- "catalog/_results_pagination" => "GeoBlacklight no longer overrides this template; override Blacklight's copy instead",
32
- "catalog/_show_default_attribute_table" => "use Geoblacklight::AttributeTableComponent instead",
33
- "catalog/_show_default_display_note" => "use Geoblacklight::DisplayNoteComponent instead",
34
- "catalog/_show_default_viewer_container" => "use Geoblacklight::ItemMapViewerComponent instead",
35
- "catalog/_show_default_viewer_information" => "it is removed without replacement",
36
- "catalog/_show_downloads" => "use Geoblacklight::DownloadLinksComponent instead",
37
- "catalog/_show_header_default" => "use the title slot of Geoblacklight::DocumentComponent instead",
38
- "catalog/_show_sidebar" => "use Geoblacklight::Document::SidebarComponent instead",
39
- "catalog/_show_sidebar_static_map" => "use Geoblacklight::StaticMapComponent instead",
40
- "catalog/_show_web_services" => "use Geoblacklight::WebServicesLinkComponent instead",
41
- "catalog/_web_services" => "use Geoblacklight::WebServicesComponent instead",
42
- "catalog/_web_services_default" => "use Geoblacklight::WebServicesDefaultComponent instead",
43
- "catalog/_web_services_wfs" => "use Geoblacklight::WebServicesWfsComponent instead",
44
- "catalog/_web_services_wms" => "use Geoblacklight::WebServicesWmsComponent instead",
45
- "download/hgl" => "the Harvard Geospatial Library download integration is removed without replacement",
46
- "relation/_relations" => "use Geoblacklight::RelationsComponent instead",
47
- "shared/_header_navbar" => "set config.header_component to a subclass of Geoblacklight::HeaderComponent instead"
48
- }.freeze
49
-
50
- ##
51
- # Settings keys GeoBlacklight 5 no longer reads, mapped to their replacement.
52
- # Each entry is the dotted path to check, e.g. "LEAFLET.VIEWERS".
53
- SETTINGS = {
54
- "APPLICATION_LOGO_URL" => "it was only used by the Carto OneClick integration, which is removed without replacement",
55
- "CARTO_ONECLICK_LINK" => "the Carto OneClick integration is removed without replacement",
56
- "LEAFLET.VIEWERS" => "viewer controls are no longer configurable per protocol"
57
- }.freeze
58
-
59
- ##
60
- # Settings whose default GeoBlacklight 5 changes. The installer only writes
61
- # config/settings.yml once, so an application upgrading from 4.x carries its
62
- # old value forward silently. We warn only when the value is still the 4.x
63
- # default, so an application that has deliberately chosen a value is left alone.
64
- CHANGED_SETTINGS = {
65
- "ARCGIS_BASE_URL" => {
66
- from: "https://www.arcgis.com/home/webmap/viewer.html",
67
- to: "https://www.arcgis.com/apps/mapviewer/index.html",
68
- because: "Esri retired the classic map viewer. The old URL still redirects and keeps the urls= " \
69
- "parameter, so \"Open in ArcGIS\" works today; update the setting so you stop relying " \
70
- "on that redirect"
71
- },
72
- "TIMEOUT_DOWNLOAD" => {
73
- from: 16,
74
- to: 180,
75
- because: "16 seconds is too short for many generated downloads"
76
- },
77
- "WMS_PARAMS.INFO_FORMAT" => {
78
- from: "text/html",
79
- to: "application/json",
80
- because: "GeoBlacklight 5 asks GetFeatureInfo for JSON. It still builds an attribute table from " \
81
- "an HTML response, but marks it isHTML, so it cannot highlight the clicked feature on " \
82
- "the map and cannot tell an empty result from a real one"
83
- }
84
- }.freeze
85
-
86
- ##
87
- # Individual setting values that stop matching anything in GeoBlacklight 5. These
88
- # are only present when an application configured them deliberately, so the check
89
- # is silent for a stock application.
90
- STALE_SETTING_VALUES = {
91
- "SIDEBAR_STATIC_MAP" => {
92
- value: "map",
93
- because: "Geoblacklight::StaticMapComponent will stop rendering the sidebar map for those documents"
94
- },
95
- "HELP_TEXT.viewer_protocol" => {
96
- value: "map",
97
- because: "Geoblacklight::ViewerHelpTextComponent will stop rendering help text for those documents"
98
- }
99
- }.freeze
100
-
101
- ##
102
- # Provider icon slugs that GeoBlacklight 5 renames, and routes through
103
- # Settings.ICON_MAPPING. It ships no label for the new name.
104
- ICON_RENAMES = {
105
- "chicago" => "university-of-chicago",
106
- "illinois" => "university-of-illinois-urbana-champaign",
107
- "iowa" => "university-of-iowa",
108
- "maryland" => "university-of-maryland",
109
- "michigan" => "university-of-michigan",
110
- "michigan-state" => "michigan-state-university",
111
- "minnesota" => "university-of-minnesota",
112
- "nebraska" => "university-of-nebraska-lincoln",
113
- "ohio-state" => "the-ohio-state-university",
114
- "penn-state" => "pennsylvania-state-university",
115
- "purdue" => "purdue-university",
116
- "wisconsin" => "university-of-wisconsin-madison"
117
- }.freeze
118
-
119
- ##
120
- # Translation keys GeoBlacklight 5 stops looking up, mapped to what happens
121
- # instead. An application that translated or reworded one of these keeps the
122
- # translation in its own locale file, where GeoBlacklight 5 never reads it again,
123
- # so the customization disappears with no error.
124
- LOCALE_KEYS = {
125
- "geoblacklight.citation.retrieved_from" =>
126
- "GeoBlacklight 5 ends a citation with the document's identifier URL, its schema.org/url reference " \
127
- "or the catalog URL, rather than with a translated suffix",
128
- "geoblacklight.tools.open_carto" =>
129
- "the Carto OneClick integration is removed without replacement",
130
- "geoblacklight.references.services_close" =>
131
- "GeoBlacklight 5 uses blacklight.modal.close"
132
- }.merge(
133
- %w[hgl_success hgl_request hgl_request_button hgl_close hgl_instructions hgl_email].to_h do |key|
134
- ["geoblacklight.download.#{key}",
135
- "the Harvard Geospatial Library download integration is removed without replacement"]
136
- end
137
- ).merge(
138
- ICON_RENAMES.to_h do |short, long|
139
- ["blacklight.icon.#{short}",
140
- "GeoBlacklight 5 routes this provider through Settings.ICON_MAPPING and looks up " \
141
- "blacklight.icon.#{long} instead"]
142
- end
143
- ).freeze
144
-
145
- ##
146
- # Readers that GeoBlacklight 5 declares with Blacklight's `attribute`. Those are
147
- # defined directly on the SolrDocument class, and a method on the class wins over
148
- # one from an included module, so an application concern that overrides any of
149
- # these silently stops taking effect and `super` no longer reaches GeoBlacklight.
150
- DOCUMENT_ATTRIBUTE_READERS = %w[
151
- display_note geom_field wxs_identifier file_format rights_field_data provider
152
- resource_type resource_class title creator publisher identifiers issued format
153
- ].freeze
154
-
155
- ##
156
- # Settings that do not exist in 4.x but that GeoBlacklight 5 requires.
157
- REQUIRED_SETTINGS = {
158
- "DOWNLOAD_FORMATS.VECTOR" => "GeoBlacklight 5 builds the vector download list from this setting instead " \
159
- "of hardcoding Shapefile, KMZ and GeoJSON, and Geoblacklight::References#vector_download_formats " \
160
- "raises NoMethodError without it"
161
- }.freeze
162
-
163
- ##
164
- # RELATIONSHIPS_SHOWN keys that GeoBlacklight 4.1 replaced with an
165
- # _ANCESTORS/_DESCENDANTS pair, mapped to the key that took over the same
166
- # query_type. GeoBlacklight 5 does not read the old names, so a relationship
167
- # configured under one is simply not displayed any more.
168
- #
169
- # config/settings.yml is only written when GeoBlacklight is first installed, so an
170
- # application generated by GeoBlacklight 4.0 still has the old shape unless somebody
171
- # reconciled the block by hand. GeoBlacklight 3.x had no RELATIONSHIPS_SHOWN at all,
172
- # so 4.0 is the only generation this applies to.
173
- RELATIONSHIP_RENAMES = {
174
- "MEMBER_OF" => "MEMBER_OF_ANCESTORS",
175
- "RELATION" => "RELATION_ANCESTORS",
176
- "REPLACED_BY" => "REPLACES_DESCENDANTS",
177
- "REPLACES" => "REPLACES_ANCESTORS",
178
- "VERSION_OF" => "VERSION_OF_DESCENDANTS"
179
- }.freeze
180
-
181
- ##
182
- # The GeoBlacklight 4 install generator injected
183
- # `<%= javascript_tag '$.fx.off = true;' if Rails.env.test? %>` into the
184
- # application layout. GeoBlacklight 5 does not ship jQuery, so the line raises
185
- # "$ is not defined" once the application's tests run. Nothing else reports it: the
186
- # layout is not one of the TEMPLATES GeoBlacklight removes, so the application keeps
187
- # the file and only finds out when the suite breaks.
188
- JQUERY_ANIMATIONS = /\$\.fx\.off/
189
-
190
- ##
191
- # Warn about every deprecated template and setting we can see.
192
- # @param root [Pathname] the application root to inspect
193
- def self.warn!(root = Rails.root)
194
- if root
195
- warn_about_templates(root)
196
- warn_about_helper_override(root)
197
- warn_about_locale_keys(root)
198
- warn_about_jquery_animations(root)
199
- end
200
- warn_about_settings
201
- warn_about_changed_settings
202
- warn_about_required_settings
203
- warn_about_stale_setting_values
204
- warn_about_relationship_keys
205
- warn_about_document_overrides
206
- warn_about_catalog_controller
207
- end
208
-
209
- ##
210
- # GeoBlacklight 5 changes GeoblacklightHelper substantially: about twenty methods
211
- # are removed, document_available? takes an argument, and viewer_protocol can be
212
- # nil. An application that has copied the helper into app/helpers shadows
213
- # GeoBlacklight's own, which also suppresses every method level deprecation in it,
214
- # so this is the only warning such an application gets.
215
- # @param root [Pathname] the application root to inspect
216
- def self.warn_about_helper_override(root)
217
- override = File.join(root, "app", "helpers", "geoblacklight_helper.rb")
218
- return unless File.exist?(override)
219
-
220
- Geoblacklight.deprecation.warn(
221
- "#{relative_to(override, root)} overrides GeoblacklightHelper, which shadows GeoBlacklight's own " \
222
- "copy and hides the deprecations for the helper methods GeoBlacklight 5 removes. Before upgrading: " \
223
- "document_available? has to accept an optional document, and viewer_protocol can return nil, so " \
224
- "viewer_protocol.camelize raises for a document with no viewer reference"
225
- )
226
- end
227
-
228
- ##
229
- # Show partials the 4.x install generator lists in the application's own
230
- # CatalogController, all of which GeoBlacklight 5 removes.
231
- SHOW_PARTIALS = %w[
232
- show_default_display_note show_default_viewer_container
233
- show_default_attribute_table show_default_viewer_information
234
- ].freeze
235
-
236
- ##
237
- # Show tools the 4.x install generator registers with `partial:`. GeoBlacklight 5
238
- # removes all three partials, and Blacklight 8 wants a `component:` instead.
239
- SHOW_TOOL_PARTIALS = %w[arcgis carto data_dictionary].freeze
240
-
241
- ##
242
- # Everything the application's own CatalogController needs before GeoBlacklight 5,
243
- # reported as a single to-do list. One warning per file the application has to
244
- # edit keeps the boot output readable: a stock 4.x app trips every one of these
245
- # checks, and warning separately would mean six lines on every rails, rake and
246
- # rspec invocation. It is also why none of this is reported from the partials
247
- # themselves, which would warn several times per request instead.
248
- def self.warn_about_catalog_controller
249
- return unless defined?(::CatalogController)
250
-
251
- problems = catalog_controller_problems(::CatalogController)
252
- return if problems.empty?
253
-
254
- Geoblacklight.deprecation.warn(
255
- "app/controllers/catalog_controller.rb needs these changes before GeoBlacklight 5: " +
256
- problems.join("; ")
257
- )
258
- rescue
259
- # A boot time diagnostic must never be the reason an application fails to start.
260
- nil
261
- end
262
-
263
- ##
264
- # @param controller [Class]
265
- # @return [Array<String>]
266
- def self.catalog_controller_problems(controller)
267
- config = controller.blacklight_config
268
- problems = []
269
-
270
- if config.index.document_presenter_class.to_s == "Geoblacklight::DocumentPresenter"
271
- problems << "remove `config.index.document_presenter_class = Geoblacklight::DocumentPresenter`, " \
272
- "because GeoBlacklight 5 removes that class and the reference will not resolve"
273
- end
274
-
275
- stale = SHOW_PARTIALS & config.show.partials.map(&:to_s)
276
- if stale.any?
277
- problems << "remove #{stale.join(", ")} from `config.show.partials`, because GeoBlacklight 5 " \
278
- "ships none of those partials"
279
- end
280
-
281
- if config.show.document_component.nil?
282
- problems << "set `config.show.document_component = Geoblacklight::DocumentComponent`, or the record " \
283
- "page loses the map viewer and the attribute table"
284
- end
285
- if config.index.document_component.nil?
286
- problems << "set `config.index.document_component = Geoblacklight::SearchResultComponent`, or search " \
287
- "results lose the map data attributes and the icons"
288
- end
289
- if config.header_component.to_s.start_with?("Blacklight::")
290
- problems << "set `config.header_component = Geoblacklight::HeaderComponent`, because GeoBlacklight 5 " \
291
- "renders the masthead there rather than from shared/_header_navbar"
292
- end
293
-
294
- config.show.document_actions.each do |key, action|
295
- next unless action.component.nil?
296
- next unless SHOW_TOOL_PARTIALS.include?(action.partial.to_s)
297
- problems << "register the #{key.inspect} show tool with a `component:` rather than " \
298
- "`partial: #{action.partial.to_s.inspect}`, because GeoBlacklight 5 removes that partial"
299
- end
300
-
301
- problems << web_services_problem(controller)
302
- problems.compact
303
- end
304
-
305
- ##
306
- # Blacklight 8's action_documents returns only the documents, so the 4.x
307
- # destructuring leaves @documents nil.
308
- # @param controller [Class]
309
- # @return [String, nil]
310
- def self.web_services_problem(controller)
311
- source = controller.instance_method(:web_services).source_location&.first
312
- return unless source && File.exist?(source)
313
- return unless File.read(source).match?(/@response\s*,\s*@documents\s*=\s*action_documents/)
314
-
315
- "replace `@response, @documents = action_documents` in #web_services with `@docs = action_documents`, " \
316
- "because Blacklight 8 returns only the documents"
317
- rescue
318
- nil
319
- end
320
-
321
- ##
322
- # Warn about application modules whose overrides of a SolrDocument reader stop
323
- # winning in GeoBlacklight 5. Only module overrides are reported: a definition in
324
- # the SolrDocument class body still takes precedence over the `attribute` reader.
325
- def self.warn_about_document_overrides
326
- return unless defined?(::SolrDocument)
327
-
328
- document = ::SolrDocument
329
- DOCUMENT_ATTRIBUTE_READERS.each do |reader|
330
- next unless document.method_defined?(reader) || document.private_method_defined?(reader)
331
-
332
- method = document.instance_method(reader)
333
- # A C implemented method is Ruby's, not the application's: Kernel#format, for
334
- # one, answers private_method_defined?("format") on any document class.
335
- next if method.source_location.nil?
336
-
337
- owner = method.owner
338
- next if owner.is_a?(Class)
339
- next if owner.name.to_s.start_with?("Geoblacklight", "Blacklight")
340
-
341
- Geoblacklight.deprecation.warn(
342
- "#{owner}##{reader} overrides Geoblacklight::SolrDocument##{reader}; GeoBlacklight 5 defines " \
343
- "that reader directly on #{document} with Blacklight's `attribute`, so an override in an " \
344
- "included module is ignored. Move it into the #{document} class body, after " \
345
- "`include Geoblacklight::SolrDocument`"
346
- )
347
- end
348
- rescue NameError
349
- nil
350
- end
351
-
352
- def self.warn_about_stale_setting_values
353
- return unless defined?(::Settings)
354
-
355
- STALE_SETTING_VALUES.each do |setting, stale|
356
- next unless Array(setting_value(setting)).include?(stale[:value])
357
- Geoblacklight.deprecation.warn(
358
- "Settings.#{setting} lists #{stale[:value].inspect}, which never matches in GeoBlacklight 5 " \
359
- "because SolrDocument#viewer_protocol returns nil rather than #{stale[:value].inspect} for a " \
360
- "document with no viewer reference; #{stale[:because]}"
361
- )
362
- end
363
- end
364
-
365
- ##
366
- # @param root [Pathname] the application root to inspect
367
- def self.warn_about_templates(root)
368
- TEMPLATES.each do |template, advice|
369
- Dir.glob(File.join(root, "app", "views", "#{template}.*")).sort.each do |override|
370
- Geoblacklight.deprecation.warn(
371
- "#{relative_to(override, root)} overrides #{template}, which is removed in " \
372
- "GeoBlacklight 5; #{advice}"
373
- )
374
- end
375
- end
376
- end
377
-
378
- ##
379
- # @param root [Pathname] the application root to inspect
380
- def self.warn_about_locale_keys(root)
381
- Dir.glob(File.join(root, "config", "locales", "**", "*.{yml,yaml}")).sort.each do |path|
382
- defined_keys = locale_keys(path)
383
-
384
- LOCALE_KEYS.each do |key, advice|
385
- next unless defined_keys.include?(key)
386
- Geoblacklight.deprecation.warn(
387
- "#{relative_to(path, root)} defines #{key}, which GeoBlacklight 5 no longer looks up; #{advice}"
388
- )
389
- end
390
- end
391
- end
392
-
393
- ##
394
- # @param root [Pathname] the application root to inspect
395
- def self.warn_about_jquery_animations(root)
396
- Dir.glob(File.join(root, "app", "views", "layouts", "**", "*.{erb,haml}")).sort.each do |layout|
397
- next unless disables_jquery_animations?(layout)
398
-
399
- Geoblacklight.deprecation.warn(
400
- "#{relative_to(layout, root)} turns jQuery animations off with $.fx.off, which the " \
401
- "GeoBlacklight 4 install generator added; GeoBlacklight 5 does not ship jQuery, so remove that " \
402
- "javascript_tag line or the test environment raises \"$ is not defined\""
403
- )
404
- end
405
- end
406
-
407
- ##
408
- # @param path [String]
409
- # @return [Boolean]
410
- def self.disables_jquery_animations?(path)
411
- File.file?(path) && File.read(path).match?(JQUERY_ANIMATIONS)
412
- rescue SystemCallError
413
- # An unreadable layout is somebody else's problem; a boot time diagnostic
414
- # must never be the reason an application fails to start.
415
- false
416
- end
417
-
418
- ##
419
- # Reported as a single warning rather than one per key. An application still on the
420
- # GeoBlacklight 4.0 shape trips every entry, and all of them are fixed by replacing
421
- # the same block of the same file.
422
- def self.warn_about_relationship_keys
423
- return unless defined?(::Settings)
424
-
425
- stale = RELATIONSHIP_RENAMES.select { |old, _| setting_present?("RELATIONSHIPS_SHOWN.#{old}") }
426
- return if stale.empty?
427
-
428
- Geoblacklight.deprecation.warn(
429
- "Settings.RELATIONSHIPS_SHOWN defines #{stale.keys.join(", ")}, which GeoBlacklight 4.1 replaced " \
430
- "with _ANCESTORS and _DESCENDANTS pairs; GeoBlacklight 5 does not read the old names, so those " \
431
- "relationships stop being displayed. Rename to #{stale.values.join(", ")}, and note that each pair's " \
432
- "other half is new configuration rather than a rename"
433
- )
434
- end
435
-
436
- ##
437
- # The dotted keys a locale file defines, with the leading locale dropped so that a
438
- # translation into any locale matches.
439
- # @param path [String]
440
- # @return [Array<String>]
441
- def self.locale_keys(path)
442
- loaded = YAML.load_file(path, aliases: true)
443
- return [] unless loaded.is_a?(Hash)
444
-
445
- loaded.each_value.flat_map { |tree| tree.is_a?(Hash) ? dotted_keys(tree) : [] }
446
- rescue
447
- # A locale file we cannot parse is not ours to complain about.
448
- []
449
- end
450
-
451
- ##
452
- # @param tree [Hash]
453
- # @return [Array<String>]
454
- def self.dotted_keys(tree, prefix = [])
455
- tree.flat_map do |key, value|
456
- path = prefix + [key.to_s]
457
- value.is_a?(Hash) ? dotted_keys(value, path) : [path.join(".")]
458
- end
459
- end
460
- private_class_method :dotted_keys
461
-
462
- def self.warn_about_settings
463
- return unless defined?(::Settings)
464
-
465
- SETTINGS.each do |setting, advice|
466
- next unless setting_present?(setting)
467
- Geoblacklight.deprecation.warn(
468
- "Settings.#{setting} is deprecated and will be removed in GeoBlacklight 5; #{advice}"
469
- )
470
- end
471
- end
472
-
473
- def self.warn_about_changed_settings
474
- return unless defined?(::Settings)
475
-
476
- CHANGED_SETTINGS.each do |setting, change|
477
- next unless setting_value(setting) == change[:from]
478
- Geoblacklight.deprecation.warn(
479
- "Settings.#{setting} is set to the GeoBlacklight 4 default #{change[:from].inspect}, which is " \
480
- "deprecated; GeoBlacklight 5 uses #{change[:to].inspect} because #{change[:because]}"
481
- )
482
- end
483
- end
484
-
485
- def self.warn_about_required_settings
486
- return unless defined?(::Settings)
487
-
488
- REQUIRED_SETTINGS.each do |setting, advice|
489
- next unless setting_value(setting).nil?
490
- Geoblacklight.deprecation.warn(
491
- "Settings.#{setting} is not set; GeoBlacklight 5 requires it because #{advice}"
492
- )
493
- end
494
- end
495
-
496
- ##
497
- # Walk a dotted settings path without raising when an ancestor is missing.
498
- # @param setting [String] e.g. "LEAFLET.VIEWERS"
499
- # @return [Object, nil] the value, or nil if any step of the path is missing
500
- def self.setting_value(setting)
501
- setting.split(".").reduce(::Settings) do |node, key|
502
- return nil unless node.respond_to?(key)
503
- node.public_send(key)
504
- end
505
- end
506
-
507
- ##
508
- # @param setting [String] e.g. "LEAFLET.VIEWERS"
509
- # @return [Boolean]
510
- def self.setting_present?(setting)
511
- setting_value(setting).present?
512
- end
513
-
514
- def self.relative_to(path, root)
515
- Pathname.new(path).relative_path_from(Pathname.new(root)).to_s
516
- end
517
- private_class_method :relative_to
518
- end
519
- end
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Geoblacklight
4
- # @deprecated The Harvard Geospatial Library download integration is removed
5
- # without replacement in GeoBlacklight 5.
6
- class HglDownload < Geoblacklight::Download
7
- def initialize(document, email, options = {})
8
- Geoblacklight.deprecation.warn(
9
- "Geoblacklight::HglDownload is deprecated without replacement and will be removed in GeoBlacklight 5"
10
- )
11
- request_params = {
12
- "LayerName" => document[Settings.FIELDS.WXS_IDENTIFIER].sub(/^cite:/, ""),
13
- "UserEmail" => email
14
- }
15
- super(document, {
16
- request_params: request_params,
17
- service_type: "hgl"
18
- }.merge(options))
19
- end
20
-
21
- def get
22
- initiate_download
23
- end
24
- end
25
- end
@@ -1,27 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Geoblacklight
4
- # Override Blacklight helpers to inject behavior
5
- #
6
- # @deprecated This module is removed in GeoBlacklight 5. Blacklight renders
7
- # saved search constraints through Blacklight::ConstraintsComponent, and the
8
- # bbox constraint is supplied by Geoblacklight::BboxItemPresenter.
9
- module ViewHelperOverride
10
- # This overrides Blacklight's own helper, so Blacklight calls it on every
11
- # search history page even in an unmodified application. Warning here would
12
- # be noise, so only the GeoBlacklight-specific method below is deprecated,
13
- # and this call to it is silenced.
14
- def render_search_to_s(params)
15
- super + Geoblacklight.deprecation.silence { render_search_to_s_bbox(params) }
16
- end
17
-
18
- # @deprecated
19
- def render_search_to_s_bbox(params)
20
- return "".html_safe if params["bbox"].blank?
21
-
22
- render_search_to_s_element(t("geoblacklight.bbox_label"), render_filter_value(params["bbox"]))
23
- end
24
- Geoblacklight.deprecation.deprecate_methods(Geoblacklight::ViewHelperOverride,
25
- render_search_to_s_bbox: "use Blacklight::ConstraintsComponent instead")
26
- end
27
- end
data/setupJest.js DELETED
@@ -1,14 +0,0 @@
1
- import { JSDOM } from 'jsdom';
2
- import $ from 'jquery';
3
- const GeoBlacklight = require('./app/assets/javascripts/geoblacklight/geoblacklight');
4
-
5
- const jsdom = new JSDOM('<html></html>', { pretendToBeVisual: true });
6
- const { window } = jsdom;
7
-
8
- global.GeoBlacklight = GeoBlacklight;
9
- global.window = window;
10
- global.jQuery = $;
11
- global.$ = global.jQuery;
12
-
13
- import * as L from 'leaflet.js.erb';
14
- global.leaflet = L;
@@ -1,16 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "spec_helper"
4
-
5
- describe ArcgisHelper, type: :helper do
6
- describe "#arcgis_link" do
7
- let(:application_name) { "My GeoBlacklight Deployment" }
8
-
9
- it "creates a valid ArcGIS online url with correct params" do
10
- expect(arcgis_link("http://example.com/foo/MapServer")).to eq "https://www.arcgis.com/home/webmap/viewer.html?urls=http%3A%2F%2Fexample.com%2Ffoo%2FMapServer"
11
- end
12
- it "handles multiple urls" do
13
- expect(arcgis_link(["http://example.com/foo/MapServer", "http://example.com/foo/FeatureServer"])).to eq "https://www.arcgis.com/home/webmap/viewer.html?urls=http%3A%2F%2Fexample.com%2Ffoo%2FMapServer&urls=http%3A%2F%2Fexample.com%2Ffoo%2FFeatureServer"
14
- end
15
- end
16
- end
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "spec_helper"
4
-
5
- describe CartoHelper, type: :helper do
6
- describe "#carto_link" do
7
- let(:application_name) { "My GeoBlacklight Deployment" }
8
-
9
- it "removes spaces from application_name to produce valid Carto request URL" do
10
- expect(carto_link("http://demo.org/wfs/layer.json")).to eq "http://oneclick.carto.com/?file=http%3A%2F%2Fdemo.org%2Fwfs%2Flayer.json&provider=MyGeoBlacklightDeployment&logo=http%3A%2F%2Fgeoblacklight.org%2Fimages%2Fgeoblacklight-logo.png"
11
- end
12
- end
13
- end
@@ -1,27 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "spec_helper"
4
-
5
- describe Geoblacklight::GeoblacklightHelperBehavior do
6
- let(:dummy_class) do
7
- Class.new.extend(described_class)
8
- end
9
- let(:presenter) { instance_double(Geoblacklight::DocumentPresenter, index_fields_display: "druid:abc123") }
10
-
11
- describe "#geoblacklight_present" do
12
- before do
13
- expect(dummy_class).to receive(:presenter).and_return(presenter)
14
- end
15
-
16
- context "as a Symbol" do
17
- it "calls defined presenter class" do
18
- expect(dummy_class.geoblacklight_present(:index_fields_display)).to eq "druid:abc123"
19
- end
20
- end
21
- context "as a String" do
22
- it "calls defined presenter class" do
23
- expect(dummy_class.geoblacklight_present("index_fields_display")).to eq "druid:abc123"
24
- end
25
- end
26
- end
27
- end
@@ -1,10 +0,0 @@
1
- const Util = require('../../app/assets/javascripts/geoblacklight/modules/util');
2
-
3
- describe('GeoBlacklight.Util', function() {
4
- describe('linkify', function() {
5
- it('returns a linkified string', function() {
6
- expect(Util.linkify('http://www.example.com'))
7
- .toEqual("<a href='http://www.example.com'>http://www.example.com</a>");
8
- });
9
- });
10
- });