geoblacklight 6.0.0.pre.alpha.6 → 6.0.0.pre.alpha.7

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 (110) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE.md +0 -1
  3. data/.github/workflows/ruby.yml +1 -1
  4. data/CODE_OF_CONDUCT.md +11 -11
  5. data/CONTRIBUTING.md +19 -9
  6. data/README.md +1 -1
  7. data/app/assets/stylesheets/geoblacklight/global.css +1 -1
  8. data/app/assets/stylesheets/geoblacklight/index_maps.css +1 -1
  9. data/app/assets/stylesheets/geoblacklight/record.css +15 -13
  10. data/app/assets/stylesheets/geoblacklight/viewers.css +88 -5
  11. data/app/components/geoblacklight/document/download_link_component.html.erb +1 -2
  12. data/app/components/geoblacklight/document/download_links_component.html.erb +3 -1
  13. data/app/components/geoblacklight/document/preview_component.html.erb +6 -0
  14. data/app/components/geoblacklight/document/preview_component.rb +14 -0
  15. data/app/components/geoblacklight/document_component.html.erb +1 -6
  16. data/app/components/geoblacklight/facets/bbox_field_component.html.erb +17 -0
  17. data/app/components/geoblacklight/facets/bbox_field_component.rb +7 -0
  18. data/app/components/geoblacklight/header_badge_component.html.erb +2 -0
  19. data/app/components/geoblacklight/header_badge_component.rb +21 -0
  20. data/app/components/geoblacklight/header_component.html.erb +1 -1
  21. data/app/components/geoblacklight/header_icons_component.html.erb +1 -1
  22. data/app/components/geoblacklight/header_icons_component.rb +8 -12
  23. data/app/components/geoblacklight/item_map_viewer_component.rb +6 -5
  24. data/app/components/geoblacklight/location_leaflet_map_component.rb +8 -9
  25. data/app/{views/catalog/_metadata.html.erb → components/geoblacklight/metadata_component.html.erb} +5 -7
  26. data/app/components/geoblacklight/metadata_component.rb +29 -0
  27. data/app/components/geoblacklight/metadata_description_markdown_component.rb +21 -0
  28. data/app/components/geoblacklight/relations_component.html.erb +2 -2
  29. data/app/components/geoblacklight/resource_header_badge_component.rb +37 -0
  30. data/app/components/geoblacklight/search_result_component.html.erb +15 -14
  31. data/app/components/geoblacklight/static_map_component.rb +5 -2
  32. data/app/helpers/geoblacklight_helper.rb +27 -50
  33. data/app/javascript/geoblacklight/controllers/leaflet_viewer_controller.js +19 -4
  34. data/app/javascript/geoblacklight/controllers/openlayers_viewer_controller.js +10 -2
  35. data/app/javascript/geoblacklight/leaflet/basemaps.js +8 -8
  36. data/app/javascript/geoblacklight/openlayers/basemaps.js +8 -8
  37. data/app/models/concerns/geoblacklight/solr_document.rb +9 -0
  38. data/app/views/catalog/_document_split.html.erb +1 -6
  39. data/app/views/catalog/_home_text.html.erb +1 -1
  40. data/app/views/catalog/metadata.html.erb +1 -1
  41. data/geoblacklight.gemspec +2 -1
  42. data/lib/generators/geoblacklight/templates/catalog_controller.rb +22 -30
  43. data/lib/generators/geoblacklight/templates/settings.yml +0 -5
  44. data/lib/geoblacklight/configuration/leaflet_config.rb +3 -2
  45. data/lib/geoblacklight/configuration/settings_builder.rb +0 -1
  46. data/lib/geoblacklight/configuration.rb +18 -5
  47. data/lib/geoblacklight/engine.rb +1 -0
  48. data/lib/geoblacklight/item_viewer.rb +1 -1
  49. data/lib/geoblacklight/version.rb +1 -1
  50. data/schema/readme.md +1 -1
  51. data/spec/components/geoblacklight/citation_component_spec.rb +1 -1
  52. data/spec/components/geoblacklight/document_component_spec.rb +10 -0
  53. data/spec/components/geoblacklight/metadata_component_spec.rb +67 -0
  54. data/spec/components/geoblacklight/metadata_description_markdown_component_spec.rb +38 -0
  55. data/spec/components/geoblacklight/viewer_help_text_component_spec.rb +1 -0
  56. data/spec/controllers/catalog_controller_spec.rb +8 -55
  57. data/spec/features/configurable_basemap_spec.rb +7 -7
  58. data/spec/features/home_page_spec.rb +0 -26
  59. data/spec/features/index_view_spec.rb +0 -24
  60. data/spec/features/layer_preview_spec.rb +1 -1
  61. data/spec/features/metadata_panel_spec.rb +18 -69
  62. data/spec/features/relations_spec.rb +0 -18
  63. data/spec/features/search_spec.rb +0 -22
  64. data/spec/features/sms_spec.rb +8 -8
  65. data/spec/features/web_services_modal_spec.rb +0 -83
  66. data/spec/fixtures/fgdc/SANB_a2725322-fgdc.xml +209 -0
  67. data/spec/fixtures/index_maps/index-map-point.geojson +13181 -949
  68. data/spec/fixtures/index_maps/index-map-polygon-no-downloadurl.geojson +21150 -970
  69. data/spec/fixtures/index_maps/index-map-polygon.geojson +21150 -970
  70. data/spec/fixtures/index_maps/index-map-stanford.geojson +269 -390
  71. data/spec/fixtures/index_maps/index-map-v1-complex.geojson +8596 -12247
  72. data/spec/fixtures/iso19139/{stanford-cg357zz0321.xml → SANB_a2725322-iso19139.xml} +130 -194
  73. data/spec/fixtures/metadata/fgdc.html +119 -59
  74. data/spec/fixtures/metadata/iso.html +258 -260
  75. data/spec/fixtures/mods/stanford-bc576pk4911.mods +98 -0
  76. data/spec/fixtures/solr_documents/README.md +48 -47
  77. data/spec/fixtures/solr_documents/actual-raster1.json +2 -3
  78. data/spec/fixtures/solr_documents/index-map-stanford.json +31 -27
  79. data/spec/fixtures/solr_documents/restricted-line.json +20 -31
  80. data/spec/helpers/geoblacklight_helper_spec.rb +0 -76
  81. data/spec/models/concerns/geoblacklight/solr_document/citation_spec.rb +1 -1
  82. data/spec/requests/bookmarks_spec.rb +13 -0
  83. data/spec/requests/catalog_search_spec.rb +43 -0
  84. data/spec/requests/catalog_show_spec.rb +48 -0
  85. data/spec/requests/home_page_spec.rb +42 -0
  86. data/spec/requests/index_view_spec.rb +27 -0
  87. data/spec/requests/metadata_spec.rb +40 -0
  88. data/spec/requests/missing_metadata_spec.rb +28 -0
  89. data/spec/requests/relations_spec.rb +28 -0
  90. data/spec/requests/search_history_spec.rb +13 -0
  91. data/spec/requests/search_results_spec.rb +62 -0
  92. data/spec/requests/web_services_spec.rb +51 -0
  93. metadata +44 -23
  94. data/spec/features/bookmarks_spec.rb +0 -12
  95. data/spec/features/data_dictionary_download_spec.rb +0 -18
  96. data/spec/features/empty_search_spec.rb +0 -13
  97. data/spec/features/exports_spec.rb +0 -14
  98. data/spec/features/help_text_spec.rb +0 -10
  99. data/spec/features/missing_metadata_spec.rb +0 -26
  100. data/spec/features/oembed_spec.rb +0 -11
  101. data/spec/features/saved_searches_spec.rb +0 -11
  102. data/spec/features/search_bar_spec.rb +0 -14
  103. data/spec/features/search_results_complex_geometry_spec.rb +0 -25
  104. data/spec/features/search_results_icons_spec.rb +0 -16
  105. data/spec/features/search_results_overlap_ratio_spec.rb +0 -57
  106. data/spec/features/show_page_metadata_spec.rb +0 -14
  107. data/spec/features/suppressed_records_spec.rb +0 -16
  108. data/spec/fixtures/fgdc/harvard-g7064-s2-1834-k3.xml +0 -1
  109. data/spec/fixtures/mods/fb897vt9938.mods +0 -111
  110. data/spec/fixtures/mods/stanford-cg357zz0321.mods +0 -113
@@ -10,20 +10,7 @@ def open_web_services_modal
10
10
  end
11
11
 
12
12
  RSpec.describe "web services tools", type: :feature do
13
- context "when no linkable references provided" do
14
- it "does not show up in tools" do
15
- visit solr_document_path "mit-001145244"
16
- expect(page).not_to have_link "Web services"
17
- end
18
- end
19
-
20
13
  context "when any reference is linked" do
21
- it "shows copy to clipboard button" do
22
- visit solr_document_path "princeton-dc7h14b252v"
23
- open_web_services_modal
24
- expect(page).to have_text "Copy"
25
- end
26
-
27
14
  it "copies the link to clipboard", js: true do
28
15
  sign_in # NOTE: this seems to be required for clipboard permissions to be granted succesfully
29
16
  page.driver.browser.add_permission("clipboard-read", "granted")
@@ -35,74 +22,4 @@ RSpec.describe "web services tools", type: :feature do
35
22
  expect(clip_text).to include("https://libimages1.princeton.edu/loris/figgy_prod/5a%2F20%2F58%2F5a20585db50d44959fe5ae44821fd174%2Fintermediate_file.jp2/info.json")
36
23
  end
37
24
  end
38
-
39
- context "when wms/wfs are provided" do
40
- it "shows up in tools" do
41
- visit solr_document_path "stanford-cg357zz0321"
42
- open_web_services_modal
43
- within ".modal-body" do
44
- expect(page).to have_css "input", count: 4
45
- expect(page).to have_css "label", text: "Web Feature Service (WFS)"
46
- expect(page).to have_css 'input[value="https://geowebservices-restricted.stanford.edu/geoserver/wfs"]'
47
- expect(page).to have_css 'input[value="druid:cg357zz0321"]', count: 2
48
- expect(page).to have_css "label", text: "Web Mapping Service (WMS)"
49
- expect(page).to have_css 'input[value="https://geowebservices-restricted.stanford.edu/geoserver/wms"]'
50
- end
51
- end
52
- end
53
-
54
- context "when xyz tile reference is provided" do
55
- it "shows up in tools" do
56
- visit solr_document_path "6f47b103-9955-4bbe-a364-387039623106-xyz"
57
- open_web_services_modal
58
- within ".modal-body" do
59
- expect(page).to have_css "label", text: "XYZ Tiles"
60
- expect(page).to have_css 'input[value="https://earthquake.usgs.gov/basemap/tiles/faults/{z}/{x}/{y}.png"]'
61
- end
62
- end
63
- end
64
-
65
- context "when wmts tile reference is provided" do
66
- it "shows up in tools" do
67
- visit solr_document_path "princeton-fk4544658v-wmts"
68
- open_web_services_modal
69
- within ".modal-body" do
70
- expect(page).to have_css "label", text: "Web Map Tile Service"
71
- expect(page).to have_css 'input[value="https://map-tiles-staging.princeton.edu/2a91d82c541c426cb787cc62afe8f248/mosaicjson/WMTSCapabilities.xml"]'
72
- end
73
- end
74
- end
75
-
76
- context "when tilejson reference is provided" do
77
- it "shows up in tools" do
78
- visit solr_document_path "princeton-fk4544658v-tilejson"
79
- open_web_services_modal
80
- within ".modal-body" do
81
- expect(page).to have_css "label", text: "TileJSON Document"
82
- expect(page).to have_css 'input[value="https://map-tiles-staging.princeton.edu/2a91d82c541c426cb787cc62afe8f248/mosaicjson/tilejson.json"]'
83
- end
84
- end
85
- end
86
-
87
- context "when a PMTiles reference is provided" do
88
- it "shows up in tools" do
89
- visit solr_document_path "princeton-t722hd30j"
90
- open_web_services_modal
91
- within ".modal-body" do
92
- expect(page).to have_css "label", text: "PMTiles Layer"
93
- expect(page).to have_css 'input[value="https://geodata.lib.princeton.edu/fe/d2/80/fed28076eaa04506b7956f10f61a2f77/display_vector.pmtiles"]'
94
- end
95
- end
96
- end
97
-
98
- context "when a COG reference is provided" do
99
- it "shows up in tools" do
100
- visit solr_document_path "princeton-dc7h14b252v"
101
- open_web_services_modal
102
- within ".modal-body" do
103
- expect(page).to have_css "label", text: "COG Layer"
104
- expect(page).to have_css 'input[value="https://geodata.lib.princeton.edu/13/f5/58/13f5582c32a54be98fc2982077d0456e/display_raster.tif"]'
105
- end
106
- end
107
- end
108
25
  end
@@ -0,0 +1,209 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <metadata>
3
+ <idinfo>
4
+ <citation>
5
+ <citeinfo>
6
+ <origin/>
7
+ <pubdate>20250814</pubdate>
8
+ <title>Clearwater, Los Angeles Co., Cal., Sept. 1927, including Hynes, Maps Index</title>
9
+ <geoform>vector digital data</geoform>
10
+ <pubinfo>
11
+ <pubplace/>
12
+ <publish>Stanford Digital Repository</publish>
13
+ </pubinfo>
14
+ <onlink>https://purl.stanford.edu/bc576pk4911</onlink>
15
+ <lworkcit>
16
+ <citeinfo>
17
+ <title>Sanborn Index Maps</title>
18
+ </citeinfo>
19
+ </lworkcit>
20
+ </citeinfo>
21
+ </citation>
22
+ <descript>
23
+ <abstract>This is an index to the map series 'Clearwater, Los Angeles Co., Cal., Sept. 1927, including Hynes'. The maps were created by the Sanborn Map Company (1927). This layer provides an index map that can be used to locate individual scanned map sheets.</abstract>
24
+ </descript>
25
+ <timeperd>
26
+ <timeinfo>
27
+ <sngdate>
28
+ <caldate>19270101</caldate>
29
+ </sngdate>
30
+ </timeinfo>
31
+ <current>ground condition</current>
32
+ </timeperd>
33
+ <status>
34
+ <progress>Complete</progress>
35
+ <update>As needed</update>
36
+ </status>
37
+ <spdom>
38
+ <bounding>
39
+ <westbc>-118.168715</westbc>
40
+ <eastbc>-118.164620</eastbc>
41
+ <northbc>33.897317</northbc>
42
+ <southbc>33.883095</southbc>
43
+ </bounding>
44
+ </spdom>
45
+ <keywords>
46
+ <theme>
47
+ <themekt>lcsh</themekt>
48
+ <themekey>Grids (Cartography)</themekey>
49
+ <themekey>Fire insurance</themekey>
50
+ <themekey>Cities and towns</themekey>
51
+ <themekey>Fire risk assessment</themekey>
52
+ <themekey>Index maps</themekey>
53
+ </theme>
54
+ <theme>
55
+ <themekt>ISO 19115 Topic Categories</themekt>
56
+ <themekey>boundaries</themekey>
57
+ </theme>
58
+ <place>
59
+ <placekt>geonames</placekt>
60
+ <placekey>Los Angeles County (Calif.)</placekey>
61
+ <placekey>Clearwater (Calif.)</placekey>
62
+ </place>
63
+ </keywords>
64
+ <accconst>This work is in the Public Domain, meaning that it is not subject to copyright.</accconst>
65
+ <useconst>None</useconst>
66
+ <ptcontac>
67
+ <cntinfo>
68
+ <cntorgp>
69
+ <cntorg>Stanford Geospatial Center</cntorg>
70
+ </cntorgp>
71
+ <cntemail>brannerlibrary@stanford.edu</cntemail>
72
+ </cntinfo>
73
+ </ptcontac>
74
+ <native>Microsoft Windows 10 Version 10.0 (Build 17763) ; Esri ArcGIS 13.3.0.52636</native>
75
+ </idinfo>
76
+ <dataqual>
77
+ <lineage>
78
+ <srcinfo>
79
+ <srccite>
80
+ <citeinfo>
81
+ <title>Clearwater, Los Angeles Co., Cal., Sept. 1927, including Hynes</title>
82
+ </citeinfo>
83
+ </srccite>
84
+ <typesrc>None</typesrc>
85
+ <srccitea>Clearwater, Los Angeles Co., Cal., Sept. 1927, including Hynes</srccitea>
86
+ <srccontr>Map series</srccontr>
87
+ </srcinfo>
88
+ </lineage>
89
+ </dataqual>
90
+ <spdoinfo>
91
+ <direct>Vector</direct>
92
+ <ptvctinf>
93
+ <sdtsterm>
94
+ <sdtstype>GT-polygon composed of chains</sdtstype>
95
+ <ptvctcnt>2</ptvctcnt>
96
+ </sdtsterm>
97
+ </ptvctinf>
98
+ </spdoinfo>
99
+ <eainfo>
100
+ <detailed>
101
+ <enttyp>
102
+ <enttypl>SANB_a2725322</enttypl>
103
+ </enttyp>
104
+ <attr>
105
+ <attrlabl>FID</attrlabl>
106
+ <attrdef/>
107
+ <attrdef>Internal feature number.</attrdef>
108
+ <attrdefs>Esri</attrdefs>
109
+ <attrdomv>
110
+ <udom>Sequential unique whole numbers that are automatically generated.</udom>
111
+ </attrdomv>
112
+ </attr>
113
+ <attr>
114
+ <attrlabl>Shape</attrlabl>
115
+ <attrdef/>
116
+ <attrdef>Feature geometry.</attrdef>
117
+ <attrdefs>Esri</attrdefs>
118
+ <attrdomv>
119
+ <udom>Coordinates defining the features.</udom>
120
+ </attrdomv>
121
+ </attr>
122
+ <attr>
123
+ <attrlabl>Id</attrlabl>
124
+ <attrdef/>
125
+ </attr>
126
+ <attr>
127
+ <attrlabl>label</attrlabl>
128
+ <attrdef>Map sheet number</attrdef>
129
+ </attr>
130
+ <attr>
131
+ <attrlabl>call_short</attrlabl>
132
+ <attrdef/>
133
+ </attr>
134
+ <attr>
135
+ <attrlabl>call_num</attrlabl>
136
+ <attrdef>Call number</attrdef>
137
+ </attr>
138
+ <attr>
139
+ <attrlabl>recId</attrlabl>
140
+ <attrdef>DRUID</attrdef>
141
+ </attr>
142
+ <attr>
143
+ <attrlabl>websiteUrl</attrlabl>
144
+ <attrdef>PURL</attrdef>
145
+ </attr>
146
+ <attr>
147
+ <attrlabl>title</attrlabl>
148
+ <attrdef/>
149
+ </attr>
150
+ <attr>
151
+ <attrlabl>ckey</attrlabl>
152
+ <attrdef/>
153
+ </attr>
154
+ <attr>
155
+ <attrlabl>available</attrlabl>
156
+ <attrdef>Available</attrdef>
157
+ </attr>
158
+ <attr>
159
+ <attrlabl>iiifUrl</attrlabl>
160
+ <attrdef>IIIF URL</attrdef>
161
+ </attr>
162
+ </detailed>
163
+ </eainfo>
164
+ <distinfo>
165
+ <distrib>
166
+ <cntinfo>
167
+ <cntorgp>
168
+ <cntorg>Stanford Geospatial Center</cntorg>
169
+ </cntorgp>
170
+ <cntaddr>
171
+ <addrtype>physical</addrtype>
172
+ <address>Branner Earth Sciences Library</address>
173
+ <address>Mitchell Building, 2nd Floor</address>
174
+ <address>397 Panama Mall</address>
175
+ <city>Stanford</city>
176
+ <state>California</state>
177
+ <postal>94305</postal>
178
+ </cntaddr>
179
+ <cntvoice>650-723-2746</cntvoice>
180
+ <cntemail>brannerlibrary@stanford.edu</cntemail>
181
+ </cntinfo>
182
+ </distrib>
183
+ <distliab>See access and use constraints information.</distliab>
184
+ </distinfo>
185
+ <metainfo>
186
+ <metd>20250814</metd>
187
+ <metc>
188
+ <cntinfo>
189
+ <cntorgp>
190
+ <cntorg>Stanford Geospatial Center</cntorg>
191
+ </cntorgp>
192
+ <cntaddr>
193
+ <addrtype>mailing and physical</addrtype>
194
+ <address>Mitchell Bldg. 2nd floor</address>
195
+ <address>397 Panama Mall</address>
196
+ <city>Stanford</city>
197
+ <state>California</state>
198
+ <postal>94305</postal>
199
+ <country>US</country>
200
+ </cntaddr>
201
+ <cntvoice>650-723-2746</cntvoice>
202
+ <cntemail>brannerlibrary@stanford.edu</cntemail>
203
+ </cntinfo>
204
+ </metc>
205
+ <metstdn>FGDC Content Standard for Digital Geospatial Metadata</metstdn>
206
+ <metstdv>FGDC-STD-001-1998</metstdv>
207
+ <mettc>local time</mettc>
208
+ </metainfo>
209
+ </metadata>