geoblacklight 4.1.1 → 4.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +3 -11
  3. data/.gitignore +9 -0
  4. data/Gemfile +14 -0
  5. data/Procfile.dev +3 -0
  6. data/README.md +5 -30
  7. data/app/assets/images/blacklight/geoblacklight-icons.json +1857 -966
  8. data/app/assets/javascripts/geoblacklight/modules/util.js +8 -3
  9. data/app/assets/javascripts/geoblacklight/templates/index_map_info.hbs +22 -1
  10. data/app/assets/javascripts/geoblacklight/viewers/cog.js +5 -0
  11. data/app/assets/javascripts/geoblacklight/viewers/pmtiles.js +5 -0
  12. data/app/controllers/download_controller.rb +1 -21
  13. data/app/frontend/clover/clover_initializer.js +29 -0
  14. data/app/frontend/entrypoints/application.js +28 -0
  15. data/app/frontend/entrypoints/clover.js +5 -0
  16. data/app/frontend/entrypoints/ol.js +5 -0
  17. data/app/frontend/openlayers/basemaps.js +47 -0
  18. data/app/frontend/openlayers/ol_initializer.js +105 -0
  19. data/app/frontend/stylesheets/openlayers.css +1 -0
  20. data/app/helpers/geoblacklight/application_helper.rb +8 -0
  21. data/app/helpers/geoblacklight_helper.rb +54 -0
  22. data/app/views/catalog/_citation.html.erb +1 -1
  23. data/app/views/catalog/_show_default_viewer_container.html.erb +1 -2
  24. data/app/views/catalog/_web_services_default.html.erb +6 -1
  25. data/app/views/catalog/_web_services_wfs.html.erb +6 -1
  26. data/app/views/catalog/_web_services_wms.html.erb +6 -1
  27. data/app/views/catalog/web_services.html.erb +16 -0
  28. data/bin/vite +29 -0
  29. data/config/locales/geoblacklight.en.yml +12 -2
  30. data/config/vite.json +14 -0
  31. data/geoblacklight.gemspec +7 -5
  32. data/lib/generators/geoblacklight/install_generator.rb +19 -4
  33. data/lib/generators/geoblacklight/templates/base.html.erb +52 -0
  34. data/lib/generators/geoblacklight/templates/catalog_controller.rb +0 -2
  35. data/lib/generators/geoblacklight/templates/settings.yml +4 -0
  36. data/lib/generators/geoblacklight/templates/vite.json +16 -0
  37. data/lib/geoblacklight/constants.rb +3 -1
  38. data/lib/geoblacklight/engine.rb +24 -0
  39. data/lib/geoblacklight/faraday_middleware/follow_redirects.rb +1 -1
  40. data/lib/geoblacklight/item_viewer.rb +13 -1
  41. data/lib/geoblacklight/metadata_transformer/base.rb +1 -1
  42. data/lib/geoblacklight/version.rb +1 -1
  43. data/package.json +8 -12
  44. data/spec/features/download_layer_spec.rb +1 -2
  45. data/spec/features/full_screen_controll_spec.rb +8 -1
  46. data/spec/features/home_page_spec.rb +3 -0
  47. data/spec/features/search_results_map_spec.rb +1 -0
  48. data/spec/features/web_services_modal_spec.rb +30 -0
  49. data/spec/fixtures/index_maps/index-map-point.geojson +949 -0
  50. data/spec/fixtures/index_maps/index-map-polygon-no-downloadurl.geojson +970 -0
  51. data/spec/fixtures/index_maps/index-map-polygon.geojson +970 -0
  52. data/spec/fixtures/index_maps/index-map-stanford.geojson +390 -0
  53. data/spec/fixtures/index_maps/index-map-v1-complex.geojson +12249 -0
  54. data/spec/fixtures/solr_documents/README.md +1 -0
  55. data/spec/fixtures/solr_documents/b1g_iiif_manifest.json +64 -0
  56. data/spec/fixtures/solr_documents/index-map-polygon-no-downloadurl.json +1 -1
  57. data/spec/fixtures/solr_documents/index-map-polygon.json +1 -1
  58. data/spec/fixtures/solr_documents/index-map-stanford.json +1 -1
  59. data/spec/fixtures/solr_documents/index-map-v1-complex.json +56 -0
  60. data/spec/fixtures/solr_documents/index_map_point.json +1 -1
  61. data/spec/fixtures/solr_documents/public_cog_princeton.json +57 -0
  62. data/spec/fixtures/solr_documents/public_pmtiles_princeton.json +41 -0
  63. data/spec/helpers/geoblacklight_helper_spec.rb +42 -0
  64. data/spec/spec_helper.rb +1 -1
  65. data/spec/test_app_templates/Gemfile.extra +0 -1
  66. data/spec/test_app_templates/lib/generators/test_app_generator.rb +7 -17
  67. data/vite.config.ts +8 -0
  68. metadata +74 -27
  69. data/spec/test_app_templates/solr_documents +0 -1
  70. /data/spec/{test_app_templates → fixtures}/metadata/fgdc.html +0 -0
  71. /data/spec/{test_app_templates → fixtures}/metadata/fgdc.xml +0 -0
  72. /data/spec/{test_app_templates → fixtures}/metadata/iso.html +0 -0
  73. /data/spec/{test_app_templates → fixtures}/metadata/iso.xml +0 -0
@@ -30,6 +30,7 @@ If you add a new document, please add it to the table below, and indicate its pu
30
30
  | [index-map-polygon](index-map-polygon.json) | Index of Digital Elevation Models (DEM), New York | cugir-008186-no-downloadurl | GeoJSON index map of polygons, with a downloadUrl for the index itself
31
31
  | [index-map-polygon-no-downloadurl](index-map-polygon-no-downloadurl.json) | Index of Digital Elevation Models (DEM), New York | cugir-008186 | GeoJSON index map of polygons, but lacking a downloadUrl for the index itself
32
32
  | [index-map-stanford](index-map-stanford.json) | Dabao Kinbōzu, Maps Index | stanford-fb897vt9938 | old-style (pre-GeoJSON) index map of rectangular polygons
33
+ | [index-map-v1-complex](index-map-v1-complex.json) | Millionth Map of Hispanic America Index | ark:-77981-gmgscj87k49 | OpenIndexMap with complex geometry (inset sheets, multiple editions) using specification version 1.0.0
33
34
  | [metadata_no_geom](metadata_no_geom.json) | Ames Library of South Asia Maps | 05d-p16022coll246-noGeo | This is a collection level record without spatial coordinates
34
35
  | [metadata_no_provider](metadata_no_provider.json)| Social Explorer | 99-0001-noprovider | This is a website record that does not have a Provider (aardvark)/ provider (GBL Metadata 1.0)
35
36
  | [multiple-downloads](multiple-downloads.json) | Test record with additional download formats | cugir-007950 | This is a test record containing new-style references as nested child documents In addition to the original shapefile download, the references section contains additional PDF and KMZ downloads
@@ -0,0 +1,64 @@
1
+ {
2
+ "id": "p16022coll229:3210",
3
+ "gbl_mdVersion_s": "Aardvark",
4
+ "dct_title_s": "Atlas de Finlande, 1910, Atlas",
5
+ "dct_description_sm": [
6
+ "At head of title: Socie\u0301te\u0301 de ge\u0301ographie de Finlande. Running title: Fennia, 30. This edition of the text differs from that which appeared as no. 30 in the series \"\"Fennia\"\" in that it was issued without series t.-p.; the atlas is the same as the one which accompanies the series edition (in French) Bibliographies at the end of the description of each map.",
7
+ "Texte: I. Nature (cartes nos. 1-23) II. Population et civilisation (cartes nos. 24-55)--Atlas (2 p. l., iii, 7 p. 55 double pl. (maps, charts, diagrs.))",
8
+ "55 double plate 44 centimeters",
9
+ "Historical Atlases"
10
+ ],
11
+ "dct_language_sm": [
12
+ "fin",
13
+ "swe",
14
+ "fre"
15
+ ],
16
+ "dct_creator_sm": [
17
+ "Sa\u0308llskapet fo\u0308r Finlands geografi, Helsingfors"
18
+ ],
19
+ "dct_publisher_sm": [
20
+ "J. Simelii arfvingars boktryckeriaktiebolag (Helsingfors), 1911"
21
+ ],
22
+ "schema_provider_s": "University of Minnesota",
23
+ "gbl_resourceClass_sm": [
24
+ "Maps"
25
+ ],
26
+ "dcat_keyword_sm": [
27
+ "Finland Maps",
28
+ "2022-creator-sprint",
29
+ "202212bbox"
30
+ ],
31
+ "dct_temporal_sm": [
32
+ "1911"
33
+ ],
34
+ "dct_issued_s": "1911",
35
+ "gbl_indexYear_im": [
36
+ 1911
37
+ ],
38
+ "gbl_dateRange_drsim": [
39
+ "[1911 TO 1911]"
40
+ ],
41
+ "dct_spatial_sm": [
42
+ "Finland"
43
+ ],
44
+ "locn_geometry": "POLYGON((19.08 70.09, 31.59 70.09, 31.59 59.45, 19.08 59.45, 19.08 70.09))",
45
+ "dcat_bbox": "ENVELOPE(19.08,31.59,70.09,59.45)",
46
+ "dcat_centroid": "64.77000000000001,25.335",
47
+ "pcdm_memberOf_sm": [
48
+ "64bd8c4c-8e60-4956-b43d-bdc3f93db488"
49
+ ],
50
+ "dct_isPartOf_sm": [
51
+ "05d-01",
52
+ "p16022coll229"
53
+ ],
54
+ "dct_rights_sm": [
55
+ "Use of this item may be governed by US and international copyright laws. You may be able to use this item, but copyright and other considerations may apply. For possible additional information or guidance on your use, please contact the contributing organization."
56
+ ],
57
+ "dct_accessRights_s": "Public",
58
+ "dct_format_s": "JPEG",
59
+ "dct_references_s": "{\"http://iiif.io/api/image\":\"https://cdm16022.contentdm.oclc.org/digital/iiif/p16022coll229/3210/info.json\",\"http://schema.org/url\":\"https://umedia.lib.umn.edu/item/p16022coll229:3210\",\"http://iiif.io/api/presentation#manifest\":\"https://cdm16022.contentdm.oclc.org/iiif/info/p16022coll229/3210/manifest.json\"}",
60
+ "dct_identifier_sm": [
61
+ "UMN_ALMA:9941944980001701"
62
+ ],
63
+ "gbl_mdModified_dt": "2023-12-29T20:59:48Z"
64
+ }
@@ -49,7 +49,7 @@
49
49
  "dct_accessRights_s": "Public",
50
50
  "dct_format_s": "GeoTIFF",
51
51
  "gbl_wxsIdentifier_s": "cugir008186",
52
- "dct_references_s": "{\"http://schema.org/downloadUrl\":\"https://s3.amazonaws.com/cugir-data/00/81/86/cugir-008186-index.geojson\",\"http://www.opengis.net/cat/csw/csdgm\":\"https://s3.amazonaws.com/cugir-data/00/81/86/fgdc.xml\",\"http://www.w3.org/1999/xhtml\":\"https://s3.amazonaws.com/cugir-data/00/81/86/fgdc.html\",\"https://openindexmaps.org\":\"https://s3.amazonaws.com/cugir-data/00/81/86/cugir-008186-index.geojson\"}",
52
+ "dct_references_s": "{\"http://schema.org/downloadUrl\":\"https://s3.amazonaws.com/cugir-data/00/81/86/cugir-008186-index.geojson\",\"http://www.opengis.net/cat/csw/csdgm\":\"https://s3.amazonaws.com/cugir-data/00/81/86/fgdc.xml\",\"http://www.w3.org/1999/xhtml\":\"https://s3.amazonaws.com/cugir-data/00/81/86/fgdc.html\",\"https://openindexmaps.org\":\"https://raw.githubusercontent.com/geoblacklight/geoblacklight/main/spec/fixtures/index_maps/index-map-polygon-no-downloadurl.geojson\"}",
53
53
  "id": "cugir-008186",
54
54
  "dct_identifier_sm": [
55
55
  "http://cugir.library.cornell.edu/catalog/cugir-008186"
@@ -49,7 +49,7 @@
49
49
  "dct_accessRights_s": "Public",
50
50
  "dct_format_s": "GeoTIFF",
51
51
  "gbl_wxsIdentifier_s": "cugir008186",
52
- "dct_references_s": "{\"http://www.opengis.net/cat/csw/csdgm\":\"https://s3.amazonaws.com/cugir-data/00/81/86/fgdc.xml\",\"http://www.w3.org/1999/xhtml\":\"https://s3.amazonaws.com/cugir-data/00/81/86/fgdc.html\",\"https://openindexmaps.org\":\"https://s3.amazonaws.com/cugir-data/00/81/86/cugir-008186-index.geojson\"}",
52
+ "dct_references_s": "{\"http://www.opengis.net/cat/csw/csdgm\":\"https://s3.amazonaws.com/cugir-data/00/81/86/fgdc.xml\",\"http://www.w3.org/1999/xhtml\":\"https://s3.amazonaws.com/cugir-data/00/81/86/fgdc.html\",\"https://openindexmaps.org\":\"https://raw.githubusercontent.com/geoblacklight/geoblacklight/main/spec/fixtures/index_maps/index-map-polygon.geojson\"}",
53
53
  "id": "cugir-008186-no-downloadurl",
54
54
  "dct_identifier_sm": [
55
55
  "http://cugir.library.cornell.edu/catalog/cugir-008186#no-downloadUrl"
@@ -57,7 +57,7 @@
57
57
  "dct_accessRights_s": "Public",
58
58
  "dct_format_s": "GeoJSON",
59
59
  "gbl_wxsIdentifier_s": "druid:fb897vt9938",
60
- "dct_references_s": "{\"http://schema.org/downloadUrl\":\"https://gist.githubusercontent.com/mejackreed/4a44f1f7cc4fbb926068738e903a9e96/raw/fedfb0e599d647920f084627b7dca8f88a358757/stanford-fb897vt9938.geojson\",\"http://www.w3.org/1999/xhtml\":\"http://opengeometadata.stanford.edu/metadata/edu.stanford.purl/druid:fb897vt9938/default.html\",\"http://schema.org/url\":\"http://purl.stanford.edu/fb897vt9938\",\"http://www.isotc211.org/schemas/2005/gmd/\":\"http://opengeometadata.stanford.edu/metadata/edu.stanford.purl/druid:fb897vt9938/iso19139.xml\",\"http://www.loc.gov/mods/v3\":\"http://purl.stanford.edu/fb897vt9938.mods\",\"https://openindexmaps.org\":\"https://gist.githubusercontent.com/mejackreed/4a44f1f7cc4fbb926068738e903a9e96/raw/fedfb0e599d647920f084627b7dca8f88a358757/stanford-fb897vt9938.geojson\"}",
60
+ "dct_references_s": "{\"http://schema.org/downloadUrl\":\"https://gist.githubusercontent.com/mejackreed/4a44f1f7cc4fbb926068738e903a9e96/raw/fedfb0e599d647920f084627b7dca8f88a358757/stanford-fb897vt9938.geojson\",\"http://www.w3.org/1999/xhtml\":\"http://opengeometadata.stanford.edu/metadata/edu.stanford.purl/druid:fb897vt9938/default.html\",\"http://schema.org/url\":\"http://purl.stanford.edu/fb897vt9938\",\"http://www.isotc211.org/schemas/2005/gmd/\":\"http://opengeometadata.stanford.edu/metadata/edu.stanford.purl/druid:fb897vt9938/iso19139.xml\",\"http://www.loc.gov/mods/v3\":\"http://purl.stanford.edu/fb897vt9938.mods\",\"https://openindexmaps.org\":\"https://raw.githubusercontent.com/geoblacklight/geoblacklight/main/spec/fixtures/index_maps/index-map-stanford.geojson\"}",
61
61
  "id": "stanford-fb897vt9938",
62
62
  "dct_identifier_sm": [
63
63
  "http://purl.stanford.edu/fb897vt9938"
@@ -0,0 +1,56 @@
1
+ {
2
+ "dct_title_s": "Millionth Map of Hispanic America",
3
+ "dct_alternative_sm": [
4
+ "index-map-v1-complex"
5
+ ],
6
+ "dct_description_sm": [
7
+ "GeoJSON index map of polygons using the OpenIndexMaps 1.0 schema. Complex geometry including inset maps (Multipolygon) and multiple editions of some sheets. ",
8
+ "Download links are provided for each sheet, record links to index map on GitHub."
9
+ ],
10
+ "dct_creator_sm": [
11
+ "American Geographical Society of New York"
12
+ ],
13
+ "dct_publisher_sm": [
14
+ "American Geographical Society of New York"
15
+ ],
16
+ "schema_provider_s": "American Geographical Society Library – UWM Libraries",
17
+ "gbl_resourceClass_sm": [
18
+ "Maps"
19
+ ],
20
+ "gbl_resourceType_sm": [
21
+ "Index maps",
22
+ "Topographic maps"
23
+ ],
24
+ "dct_subject_sm": [
25
+ "Topography"
26
+ ],
27
+ "dcat_keyword_sm": [
28
+ "GBL Fixture records"
29
+ ],
30
+ "dct_temporal_sm": [
31
+ "1922-1962"
32
+ ],
33
+ "gbl_indexYear_im": [
34
+ 1922,1924,1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1945,1947,1948,1949,1950,1951,1952,1955,1956,1958,1959,1960,1962
35
+ ],
36
+ "gbl_dateRange_drsim": [
37
+ "[1922 TO 1962]"
38
+ ],
39
+ "dct_spatial_sm": [
40
+ "Latin America",
41
+ "Central America",
42
+ "South America"
43
+ ],
44
+ "locn_geometry": "ENVELOPE(-119,-30,33,-56)",
45
+ "dcat_bbox": "ENVELOPE(-119,-30,33,-56)",
46
+ "dct_accessRights_s": "Public",
47
+ "dct_format_s": "GeoJSON",
48
+ "dct_references_s": "{\"http://schema.org/url\":\"https://digilib.uwm.edu/ark:/77981/gmgscj87k49\",\"https://openindexmaps.org\":\"https://raw.githubusercontent.com/geoblacklight/geoblacklight/main/spec/fixtures/index_maps/index-map-v1-complex.geojson\",\"http://schema.org/downloadUrl\":\"https://geodata.uwm.edu/public/gmgscj87k49/050bA1000000.geojson\"}",
49
+ "id": "ark:-77981-gmgscj87k49",
50
+ "dct_identifier_sm": [
51
+ "050-b A-1:1,000,000",
52
+ "ark:77981/gmgscj87k49"
53
+ ],
54
+ "gbl_mdModified_dt": "2024-02-01T22:14:16Z",
55
+ "gbl_mdVersion_s": "Aardvark"
56
+ }
@@ -46,7 +46,7 @@
46
46
  "dcat_centroid": "40.183,-74.75800000000001",
47
47
  "dct_accessRights_s": "Public",
48
48
  "dct_format_s": "GeoJSON",
49
- "dct_references_s": "{\"http://schema.org/downloadUrl\":\"https://raw.githubusercontent.com/OpenIndexMaps/edu.cornell/master/ny-aerial-photos-1960s.geojson\",\"https://openindexmaps.org\":\"https://raw.githubusercontent.com/OpenIndexMaps/edu.cornell/master/ny-aerial-photos-1960s.geojson\"}",
49
+ "dct_references_s": "{\"http://schema.org/downloadUrl\":\"https://raw.githubusercontent.com/OpenIndexMaps/edu.cornell/master/ny-aerial-photos-1960s.geojson\",\"https://openindexmaps.org\":\"https://raw.githubusercontent.com/geoblacklight/geoblacklight/main/spec/fixtures/index_maps/index-map-point.geojson\"}",
50
50
  "id": "cornell-ny-aerial-photos-1960s",
51
51
  "dct_identifier_sm": [
52
52
  "cornell-ny-aerial-photos-1960s"
@@ -0,0 +1,57 @@
1
+ {
2
+ "id": "princeton-dc7h14b252v",
3
+ "dct_identifier_sm": [
4
+ "ark:/88435/dc7h14b252v"
5
+ ],
6
+ "dct_title_s": "Map illustrating the journey of the Pundit Nain Singh through Great Tibet from Ladákh to Assam [cartographic material] : to accompany the paper by Captn. H. Trotter R.E. / [engraved by] Edwd. Weller. (geotiff)",
7
+ "dct_description_sm": [
8
+ "Relief shown by hachures and spot heights. The Pundit's route is colored red. Routes of previous explorers and major roads are also shown. Romanized name of Indian explorer: Nain Singh Rawat. British boundaries and approximate boundary between Nepal and Tibet are shown. Includes glossary of local terms for geographic features. From: The Journal of the Royal Geographical Society of London. Vol. 47, (1877), pp. 86-136; held in Firestone Library. Call number: G7 .J687 v.47 1877"
9
+ ],
10
+ "dct_language_sm": [
11
+ "en"
12
+ ],
13
+ "dct_publisher_sm": [
14
+ "London: published for the Journal of the Royal Geographical Society by J. Murray, Albemarle Street, 1877."
15
+ ],
16
+ "gbl_resourceClass_sm": [
17
+ "Maps"
18
+ ],
19
+ "gbl_resourceType_sm": [
20
+ "Raster data"
21
+ ],
22
+ "gbl_resourceClass_sm": [
23
+ "Maps"
24
+ ],
25
+ "gbl_indexYear_im": [
26
+ 1877
27
+ ],
28
+ "dct_spatial_sm": [
29
+ "Himalaya Mountains"
30
+ ],
31
+ "locn_geometry": "ENVELOPE(79.257732, 92.742268, 34.178571, 26.339286)",
32
+ "dcat_bbox": "ENVELOPE(79.257732, 92.742268, 34.178571, 26.339286)",
33
+ "dct_source_sm": [
34
+ "princeton-j098zd574"
35
+ ],
36
+ "dct_accessRights_s": "Public",
37
+ "dct_format_s": "GeoTIFF",
38
+ "dct_references_s": "{\"http://schema.org/url\":\"https://catalog.princeton.edu/catalog/9971226563506421\",\"http://schema.org/downloadUrl\":[{\"label\":\"GeoTIFF\",\"url\":\"https://figgy.princeton.edu/downloads/67d9ca18-49ee-44a6-8d87-3d4cbc70b0c5/file/a95c7f34-d4a8-49a5-a51a-ad782e43b37a\"}],\"http://schema.org/thumbnailUrl\":\"https://figgy.princeton.edu/downloads/67d9ca18-49ee-44a6-8d87-3d4cbc70b0c5/file/8b9b0834-0f3e-48ef-95d0-e065b30cd231\",\"https://github.com/cogeotiff/cog-spec\":\"https://geodata.lib.princeton.edu/13/f5/58/13f5582c32a54be98fc2982077d0456e/display_raster.tif\"}",
39
+ "schema_provider_s": "Princeton",
40
+ "gbl_mdModified_dt": "2024-01-30T21:42:24Z",
41
+ "gbl_mdVersion_s": "Aardvark",
42
+ "gbl_suppressed_b": false,
43
+ "gbl_resourceType_sm": [
44
+ "Raster data"
45
+ ],
46
+ "dct_subject_sm": [
47
+ "Himalaya Mountains—Discovery and exploration—Maps",
48
+ "Tibet—Discovery and exploration—Maps",
49
+ "Physical geography—Himalaya Mountains—Maps",
50
+ "Great Trigonometrical Survey of India",
51
+ "Himalaya Mountains—Maps",
52
+ "Tibet Autonomous Region (China)—Maps",
53
+ "India, Northeastern—Maps",
54
+ "Physical maps",
55
+ "Maps"
56
+ ]
57
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "gbl_mdVersion_s": "Aardvark",
3
+ "dct_identifier_sm": ["ark:/88435/t722hd30j"],
4
+ "id": "princeton-t722hd30j",
5
+ "dct_title_s": "Louisiana voting districts from 2010 Census",
6
+ "locn_geometry": "ENVELOPE(-94.043352, -88.758388, 33.019543, 28.855127)",
7
+ "dcat_bbox": "ENVELOPE(-94.043352, -88.758388, 33.019543, 28.855127)",
8
+ "schema_provider_s": "Princeton",
9
+ "dct_accessRights_s": "Public",
10
+ "dct_description_sm": ["Voting districts in Louisiana based on the US decennial Census of 2010. The TIGER/Line shapefiles and related database files (.dbf) are an extract of selected geographic and cartographic information from the U.S. Census Bureau's Master Address File / Topologically Integrated Geographic Encoding and Referencing (MAF/TIGER) Database (MTDB). The MTDB represents a seamless national file with no overlaps or gaps between parts, however, each TIGER/Line shapefile is designed to stand alone as an independent data set, or they can be combined to cover the entire nation. Voting district is the generic name for geographic entities such as precincts, wards, and election districts established by State governments for the purpose of conducting elections. States participating in the 2010 Census Redistricting Data Program as part of Public Law 94-171 (1975) provided the Census Bureau with boundaries, codes, and names for their VTDs. Each VTD is identified by a 1- to 6-character alphanumeric census code that is unique within county. For the 2010 Census, Rhode Island is the only State that did not participate in Phase 2 (the Voting District Project) of the Redistricting Data Program and no VTDs exist for this State in the 2010 Census data products. Note that only Montana and Oregon do not have complete coverage of VTDs for the 2010 Census."],
11
+ "dct_creator_sm": [
12
+ "US Census Bureau, Geography Division"
13
+ ],
14
+ "dct_subject_sm": [
15
+ "Census",
16
+ "voting districts",
17
+ "electoral districts",
18
+ "electoral boundaries",
19
+ "state legislative district",
20
+ "Boundaries"
21
+ ],
22
+ "dct_spatial_sm": [
23
+ "Louisiana"
24
+ ],
25
+ "dct_temporal_sm": [
26
+ "2010",
27
+ "2012",
28
+ "2012"
29
+ ],
30
+ "gbl_resourceType_sm": [
31
+ "Polygon data"
32
+ ],
33
+ "gbl_resourceClass_sm": [
34
+ "Datasets"
35
+ ],
36
+ "gbl_indexYear_im": [2010],
37
+ "gbl_mdModified_dt": "2020-05-20T23:57:56Z",
38
+ "dct_references_s": "{\"http://www.opengis.net/cat/csw/csdgm\":\"https://figgy.princeton.edu/downloads/75bc7983-c0fa-4d54-8422-490bc63185dc/file/0c4e793f-d149-44e1-8d46-59e695441420\",\"http://schema.org/downloadUrl\":\"https://figgy.princeton.edu/downloads/a287cc33-3c2b-4cca-bdd2-525bc18ece49/file/7f5a693a-617e-4fe8-88ce-5f3b2c24a017\",\"http://schema.org/thumbnailUrl\":\"https://figgy.princeton.edu/downloads/a287cc33-3c2b-4cca-bdd2-525bc18ece49/file/6b6a9b1e-50a9-47bd-8395-0bd697e1f9c5\",\"https://github.com/protomaps/PMTiles\":\"https://geodata.lib.princeton.edu/fe/d2/80/fed28076eaa04506b7956f10f61a2f77/display_vector.pmtiles\"}",
39
+ "dct_format_s": "Shapefile",
40
+ "dct_issued_dt": "2012-01-01T00:00:00Z"
41
+ }
@@ -357,4 +357,46 @@ describe GeoblacklightHelper, type: :helper do
357
357
  end
358
358
  end
359
359
  end
360
+
361
+ describe "#viewer_container" do
362
+ let(:document) { SolrDocument.new(document_attributes) }
363
+ let(:references_field) { Settings.FIELDS.REFERENCES }
364
+ let(:rights_field) { Settings.FIELDS.RIGHTS }
365
+
366
+ context "with pmtiles layer" do
367
+ let(:document_attributes) do
368
+ {
369
+ references_field => {
370
+ "https://github.com/protomaps/PMTiles" => "https://geodata.lib.princeton.edu/fe/d2/80/fed28076eaa04506b7956f10f61a2f77/display_vector.pmtiles"
371
+ }.to_json
372
+ }
373
+ end
374
+
375
+ it "renders an OpenLayers container" do
376
+ allow(helper).to receive(:geoblacklight_basemap).and_return("esri")
377
+ assign(:document, document)
378
+ node = Capybara.string(helper.viewer_container)
379
+ div = node.first("div")
380
+ expect(div[:id]).to eq "ol-map"
381
+ end
382
+ end
383
+
384
+ context "with iiif manifest layer" do
385
+ let(:document_attributes) do
386
+ {
387
+ references_field => {
388
+ "http://iiif.io/api/presentation#manifest" => "https://cdm16022.contentdm.oclc.org/iiif/info/p16022coll229/3210/manifest.json"
389
+ }.to_json
390
+ }
391
+ end
392
+
393
+ it "renders a Clover IIIF container" do
394
+ allow(helper).to receive(:geoblacklight_basemap).and_return("esri")
395
+ assign(:document, document)
396
+ node = Capybara.string(helper.viewer_container)
397
+ div = node.first("div")
398
+ expect(div[:id]).to eq "clover-viewer"
399
+ end
400
+ end
401
+ end
360
402
  end
data/spec/spec_helper.rb CHANGED
@@ -22,7 +22,7 @@ end
22
22
 
23
23
  require "factory_bot"
24
24
  require "database_cleaner"
25
-
25
+ require "action_cable/engine"
26
26
  require "engine_cart"
27
27
  EngineCart.load_application!
28
28
 
@@ -1,3 +1,2 @@
1
1
  gem 'sprockets', '< 4'
2
2
  gem 'view_component', '!= 2.26.0'
3
- gem 'faraday', ENV["FARADAY_VERSION"].to_s != "" ? ENV["FARADAY_VERSION"] : '>= 1.0'
@@ -5,26 +5,13 @@ require "rails/generators"
5
5
  class TestAppGenerator < Rails::Generators::Base
6
6
  source_root File.expand_path("../../../../spec/test_app_templates", __FILE__)
7
7
 
8
- def fix_sqlite3_version_requirement
9
- return unless Gem.loaded_specs["rails"].version.to_s <= "5.2.2"
10
-
11
- # Hack for https://github.com/rails/rails/issues/35153
12
- # Adapted from https://github.com/projectblacklight/blacklight/pull/2065
13
- gsub_file("Gemfile", /^gem 'sqlite3'$/, 'gem "sqlite3", "~> 1.3.6"')
14
- end
15
-
16
8
  def add_gems
17
9
  gem "blacklight"
18
- gem "webpacker" unless Rails.version.to_s.start_with? "6.1."
19
10
  Bundler.with_clean_env do
20
11
  run "bundle install"
21
12
  end
22
13
  end
23
14
 
24
- def install_webpacker
25
- run "bundle exec rails webpacker:install"
26
- end
27
-
28
15
  def run_blacklight_generator
29
16
  say_status("warning", "GENERATING BL", :yellow)
30
17
 
@@ -35,10 +22,13 @@ class TestAppGenerator < Rails::Generators::Base
35
22
  generate "geoblacklight:install", "-f"
36
23
  end
37
24
 
25
+ # Symlink fixture document directories so the test app doesn't have to be
26
+ # regenerated when they are changed or updated.
38
27
  def fixtures
39
- FileUtils.mkdir_p "spec/fixtures/solr_documents"
40
- directory "solr_documents", "spec/fixtures/solr_documents"
41
- FileUtils.mkdir_p "spec/fixtures/metadata"
42
- directory "metadata", "spec/fixtures/metadata"
28
+ solr_docs_path = Rails.root.join("..", "spec", "fixtures", "solr_documents")
29
+ metadata_path = Rails.root.join("..", "spec", "fixtures", "metadata")
30
+ FileUtils.mkdir_p "spec/fixtures"
31
+ FileUtils.symlink solr_docs_path, "spec/fixtures/solr_documents"
32
+ FileUtils.symlink metadata_path, "spec/fixtures/metadata"
43
33
  end
44
34
  end
data/vite.config.ts ADDED
@@ -0,0 +1,8 @@
1
+ import { defineConfig } from 'vite'
2
+ import RubyPlugin from 'vite-plugin-ruby'
3
+
4
+ export default defineConfig({
5
+ plugins: [
6
+ RubyPlugin(),
7
+ ],
8
+ })