geoblacklight 6.0.0.pre.beta.1 → 6.0.0.pre.beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +14 -3
- data/app/assets/stylesheets/geoblacklight/record.css +1 -2
- data/app/assets/stylesheets/geoblacklight/search.css +3 -4
- data/app/assets/stylesheets/geoblacklight.css +0 -1
- data/app/components/geoblacklight/document/download_link_component.html.erb +1 -1
- data/app/components/geoblacklight/document/download_links_component.html.erb +1 -1
- data/app/components/geoblacklight/document/download_links_component.rb +1 -1
- data/app/components/geoblacklight/document/preview_component.html.erb +1 -1
- data/app/components/geoblacklight/document/preview_component.rb +45 -0
- data/app/components/geoblacklight/iiif_drag_drop_component.html.erb +1 -1
- data/app/components/geoblacklight/iiif_drag_drop_component.rb +1 -1
- data/app/components/geoblacklight/login_link_component.html.erb +1 -1
- data/app/components/geoblacklight/login_link_component.rb +17 -1
- data/app/components/geoblacklight/metadata_description_markdown_component.rb +1 -1
- data/app/components/geoblacklight/relations/relation_component.html.erb +2 -4
- data/app/components/geoblacklight/relations/relation_component.rb +0 -4
- data/app/components/geoblacklight/search_result_component.html.erb +2 -4
- data/app/components/geoblacklight/search_result_component.rb +0 -3
- data/app/components/geoblacklight/static_map_component.rb +2 -3
- data/app/controllers/relations_controller.rb +2 -0
- data/app/controllers/viewer_record_controller.rb +2 -0
- data/app/helpers/geoblacklight_helper.rb +5 -19
- data/app/javascript/geoblacklight/controllers/overview_map_controller.js +4 -3
- data/app/javascript/geoblacklight/core.js +0 -2
- data/app/javascript/geoblacklight/initializers/field_truncation.js +1 -4
- data/app/models/concerns/geoblacklight/bbox_filter_field.rb +0 -13
- data/app/models/concerns/geoblacklight/solr_document/preview.rb +58 -0
- data/app/models/concerns/geoblacklight/solr_document.rb +20 -23
- data/app/views/catalog/_document_split.html.erb +1 -1
- data/config/importmap.rb +5 -6
- data/geoblacklight.gemspec +1 -1
- data/lib/generators/geoblacklight/install_generator.rb +3 -6
- data/lib/generators/geoblacklight/templates/assets/customizations.css +13 -4
- data/lib/generators/geoblacklight/templates/catalog_controller.rb +4 -6
- data/lib/generators/geoblacklight/templates/settings.yml +1 -25
- data/lib/geoblacklight/configuration/settings_builder.rb +0 -2
- data/lib/geoblacklight/configuration.rb +1 -19
- data/lib/geoblacklight/constants.rb +1 -0
- data/lib/geoblacklight/references.rb +0 -9
- data/lib/geoblacklight/version.rb +1 -1
- data/lib/geoblacklight.rb +0 -1
- data/spec/components/geoblacklight/citation_component_spec.rb +2 -2
- data/spec/components/geoblacklight/{item_map_viewer_component_spec.rb → document/preview_component_spec.rb} +37 -1
- data/spec/components/geoblacklight/document/sidebar_component_spec.rb +1 -1
- data/spec/components/geoblacklight/document_component_spec.rb +1 -1
- data/spec/components/geoblacklight/download_links_component_spec.rb +1 -1
- data/spec/components/geoblacklight/iiif_drag_drop_component_spec.rb +7 -7
- data/spec/components/geoblacklight/login_link_component_spec.rb +20 -12
- data/spec/components/geoblacklight/relations/relation_component_spec.rb +3 -11
- data/spec/components/geoblacklight/search_result_component_spec.rb +4 -12
- data/spec/components/geoblacklight/static_map_component_spec.rb +19 -10
- data/spec/factories/user.rb +6 -1
- data/spec/features/axe_spec.rb +1 -0
- data/spec/features/restricted_viewer_spec.rb +1 -3
- data/spec/features/search_results_map_spec.rb +13 -0
- data/spec/features/search_spec.rb +1 -1
- data/spec/features/sign_in_spec.rb +26 -0
- data/spec/features/truncated_metadata_spec.rb +0 -5
- data/spec/fixtures/solr_documents/README.md +63 -57
- data/spec/fixtures/solr_documents/b1g_iiif_manifest.json +1 -1
- data/spec/fixtures/solr_documents/baruch_documentation_download.json +1 -0
- data/spec/fixtures/solr_documents/bbox-spans-180.json +3 -3
- data/spec/fixtures/solr_documents/bluemarble.json +28 -0
- data/spec/fixtures/solr_documents/complex-geom.json +3 -3
- data/spec/fixtures/solr_documents/cornell-roads-fgdc.json +19 -0
- data/spec/fixtures/solr_documents/dalian.json +38 -0
- data/spec/fixtures/solr_documents/esri-tiled_map_layer.json +1 -1
- data/spec/fixtures/solr_documents/iiif-eastern-hemisphere.json +2 -2
- data/spec/fixtures/solr_documents/metadata_no_provider.json +0 -1
- data/spec/fixtures/solr_documents/modis-ndvi.json +36 -0
- data/spec/fixtures/solr_documents/panama.json +37 -0
- data/spec/fixtures/solr_documents/public_cog_princeton.json +0 -2
- data/spec/fixtures/solr_documents/stanford-geojson.json +39 -0
- data/spec/fixtures/solr_documents/usgs-htmc-index-ca-24000.json +36 -0
- data/spec/fixtures/solr_documents/usgs-tnm-index-dem1.json +28 -0
- data/spec/helpers/geoblacklight_helper_spec.rb +0 -32
- data/spec/lib/geoblacklight/references_spec.rb +8 -14
- data/spec/models/concerns/geoblacklight/bbox_filter_field_spec.rb +0 -24
- data/spec/models/concerns/geoblacklight/solr_document_spec.rb +30 -23
- data/spec/requests/bookmarks_spec.rb +1 -0
- data/spec/requests/catalog_search_spec.rb +1 -1
- data/spec/requests/catalog_show_spec.rb +2 -2
- data/spec/requests/index_view_spec.rb +6 -6
- data/spec/requests/metadata_spec.rb +1 -1
- data/spec/requests/missing_metadata_spec.rb +13 -13
- data/spec/requests/search_results_spec.rb +4 -3
- data/spec/requests/viewer_record_spec.rb +1 -3
- data/spec/requests/viewer_requests_spec.rb +3 -5
- data/spec/spec_helper.rb +11 -1
- data/spec/support/authentication.rb +37 -0
- data/spec/support/features/session_helpers.rb +15 -13
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +1 -1
- data/template.rb +1 -1
- metadata +17 -26
- data/app/assets/stylesheets/geoblacklight/index_maps.css +0 -29
- data/app/components/geoblacklight/item_map_viewer_component.html.erb +0 -1
- data/app/components/geoblacklight/item_map_viewer_component.rb +0 -52
- data/app/controllers/wms_controller.rb +0 -17
- data/app/javascript/geoblacklight/initializers/tooltips.js +0 -51
- data/app/models/concerns/geoblacklight/solr_document/inspection.rb +0 -17
- data/lib/geoblacklight/geometry.rb +0 -86
- data/lib/geoblacklight/item_viewer.rb +0 -84
- data/lib/geoblacklight/routes/wms.rb +0 -15
- data/lib/geoblacklight/wms_layer/feature_info_response.rb +0 -37
- data/lib/geoblacklight/wms_layer.rb +0 -34
- data/spec/controllers/wms_controller_spec.rb +0 -34
- data/spec/fixtures/solr_documents/no_locn_geometry.json +0 -17
- data/spec/fixtures/solr_documents/no_spatial.json +0 -28
- data/spec/javascripts/metadata_download_button_spec.js +0 -17
- data/spec/lib/geoblacklight/geometry_spec.rb +0 -60
- data/spec/lib/geoblacklight/item_viewer_spec.rb +0 -77
- data/spec/lib/geoblacklight/wms_layer/feature_info_response_spec.rb +0 -54
- data/spec/lib/geoblacklight/wms_layer_spec.rb +0 -115
- data/spec/models/concerns/geoblacklight/solr_document/inspection_spec.rb +0 -19
|
@@ -16,7 +16,7 @@ class TestAppGenerator < Rails::Generators::Base
|
|
|
16
16
|
# Install blacklight
|
|
17
17
|
def run_blacklight_generator
|
|
18
18
|
say_status("warning", "GENERATING BL", :yellow)
|
|
19
|
-
generate "blacklight:install", "
|
|
19
|
+
generate "blacklight:install", ENV["BLACKLIGHT_INSTALL_OPTIONS"].presence || "--devise --skip-solr"
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
# Install geoblacklight
|
data/template.rb
CHANGED
|
@@ -10,7 +10,7 @@ end
|
|
|
10
10
|
run "bundle install"
|
|
11
11
|
|
|
12
12
|
after_bundle do
|
|
13
|
-
generate "blacklight:install", ENV
|
|
13
|
+
generate "blacklight:install", ENV["BLACKLIGHT_INSTALL_OPTIONS"].presence || "--devise --skip-solr"
|
|
14
14
|
generate "geoblacklight:install"
|
|
15
15
|
rails_command "db:migrate"
|
|
16
16
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: geoblacklight
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 6.0.0.pre.beta.
|
|
4
|
+
version: 6.0.0.pre.beta.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mike Graves
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
- Jack Reed
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date:
|
|
13
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: rails
|
|
@@ -142,14 +142,14 @@ dependencies:
|
|
|
142
142
|
requirements:
|
|
143
143
|
- - "~>"
|
|
144
144
|
- !ruby/object:Gem::Version
|
|
145
|
-
version: '0.
|
|
145
|
+
version: '0.12'
|
|
146
146
|
type: :runtime
|
|
147
147
|
prerelease: false
|
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
|
149
149
|
requirements:
|
|
150
150
|
- - "~>"
|
|
151
151
|
- !ruby/object:Gem::Version
|
|
152
|
-
version: '0.
|
|
152
|
+
version: '0.12'
|
|
153
153
|
- !ruby/object:Gem::Dependency
|
|
154
154
|
name: mime-types
|
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -379,7 +379,6 @@ files:
|
|
|
379
379
|
- app/assets/stylesheets/geoblacklight.css
|
|
380
380
|
- app/assets/stylesheets/geoblacklight/global.css
|
|
381
381
|
- app/assets/stylesheets/geoblacklight/home.css
|
|
382
|
-
- app/assets/stylesheets/geoblacklight/index_maps.css
|
|
383
382
|
- app/assets/stylesheets/geoblacklight/record.css
|
|
384
383
|
- app/assets/stylesheets/geoblacklight/search.css
|
|
385
384
|
- app/assets/stylesheets/geoblacklight/viewers.css
|
|
@@ -459,8 +458,6 @@ files:
|
|
|
459
458
|
- app/components/geoblacklight/homepage_feature_facet_component.rb
|
|
460
459
|
- app/components/geoblacklight/iiif_drag_drop_component.html.erb
|
|
461
460
|
- app/components/geoblacklight/iiif_drag_drop_component.rb
|
|
462
|
-
- app/components/geoblacklight/item_map_viewer_component.html.erb
|
|
463
|
-
- app/components/geoblacklight/item_map_viewer_component.rb
|
|
464
461
|
- app/components/geoblacklight/locator_map_component.html.erb
|
|
465
462
|
- app/components/geoblacklight/locator_map_component.rb
|
|
466
463
|
- app/components/geoblacklight/login_link_component.html.erb
|
|
@@ -492,7 +489,6 @@ files:
|
|
|
492
489
|
- app/components/geoblacklight/web_services_wms_component.rb
|
|
493
490
|
- app/controllers/relations_controller.rb
|
|
494
491
|
- app/controllers/viewer_record_controller.rb
|
|
495
|
-
- app/controllers/wms_controller.rb
|
|
496
492
|
- app/helpers/geoblacklight_helper.rb
|
|
497
493
|
- app/javascript/geoblacklight/controllers/clipboard_controller.js
|
|
498
494
|
- app/javascript/geoblacklight/controllers/oembed_viewer_controller.js
|
|
@@ -501,7 +497,6 @@ files:
|
|
|
501
497
|
- app/javascript/geoblacklight/index.js
|
|
502
498
|
- app/javascript/geoblacklight/initializers/field_truncation.js
|
|
503
499
|
- app/javascript/geoblacklight/initializers/metadata_download.js
|
|
504
|
-
- app/javascript/geoblacklight/initializers/tooltips.js
|
|
505
500
|
- app/javascript/geoblacklight/initializers/truncation.js
|
|
506
501
|
- app/javascript/geoblacklight/initializers/viewer_requests.js
|
|
507
502
|
- app/javascript/geoblacklight/initializers/viewer_theme.js
|
|
@@ -511,7 +506,7 @@ files:
|
|
|
511
506
|
- app/models/concerns/geoblacklight/solr_document/arcgis.rb
|
|
512
507
|
- app/models/concerns/geoblacklight/solr_document/citation.rb
|
|
513
508
|
- app/models/concerns/geoblacklight/solr_document/finder.rb
|
|
514
|
-
- app/models/concerns/geoblacklight/solr_document/
|
|
509
|
+
- app/models/concerns/geoblacklight/solr_document/preview.rb
|
|
515
510
|
- app/models/concerns/geoblacklight/solr_document/thumbnail.rb
|
|
516
511
|
- app/models/concerns/geoblacklight/suppressed_records_search_behavior.rb
|
|
517
512
|
- app/presenters/geoblacklight/bbox_item_presenter.rb
|
|
@@ -551,8 +546,6 @@ files:
|
|
|
551
546
|
- lib/geoblacklight/deprecation.rb
|
|
552
547
|
- lib/geoblacklight/engine.rb
|
|
553
548
|
- lib/geoblacklight/exceptions.rb
|
|
554
|
-
- lib/geoblacklight/geometry.rb
|
|
555
|
-
- lib/geoblacklight/item_viewer.rb
|
|
556
549
|
- lib/geoblacklight/metadata.rb
|
|
557
550
|
- lib/geoblacklight/metadata/base.rb
|
|
558
551
|
- lib/geoblacklight/metadata/fgdc.rb
|
|
@@ -570,11 +563,8 @@ files:
|
|
|
570
563
|
- lib/geoblacklight/relations/relation_response.rb
|
|
571
564
|
- lib/geoblacklight/routes.rb
|
|
572
565
|
- lib/geoblacklight/routes/exportable.rb
|
|
573
|
-
- lib/geoblacklight/routes/wms.rb
|
|
574
566
|
- lib/geoblacklight/version.rb
|
|
575
567
|
- lib/geoblacklight/viewer_record.rb
|
|
576
|
-
- lib/geoblacklight/wms_layer.rb
|
|
577
|
-
- lib/geoblacklight/wms_layer/feature_info_response.rb
|
|
578
568
|
- lib/tasks/geoblacklight.rake
|
|
579
569
|
- lib/tasks/solr.rb
|
|
580
570
|
- package.json
|
|
@@ -597,13 +587,13 @@ files:
|
|
|
597
587
|
- spec/components/geoblacklight/arcgis_component_spec.rb
|
|
598
588
|
- spec/components/geoblacklight/citation_component_spec.rb
|
|
599
589
|
- spec/components/geoblacklight/display_note_component_spec.rb
|
|
590
|
+
- spec/components/geoblacklight/document/preview_component_spec.rb
|
|
600
591
|
- spec/components/geoblacklight/document/sidebar_component_spec.rb
|
|
601
592
|
- spec/components/geoblacklight/document_component_spec.rb
|
|
602
593
|
- spec/components/geoblacklight/download_links_component_spec.rb
|
|
603
594
|
- spec/components/geoblacklight/header_badges_component_spec.rb
|
|
604
595
|
- spec/components/geoblacklight/homepage_feature_facet_component_spec.rb
|
|
605
596
|
- spec/components/geoblacklight/iiif_drag_drop_component_spec.rb
|
|
606
|
-
- spec/components/geoblacklight/item_map_viewer_component_spec.rb
|
|
607
597
|
- spec/components/geoblacklight/locator_map_component_spec.rb
|
|
608
598
|
- spec/components/geoblacklight/login_link_component_spec.rb
|
|
609
599
|
- spec/components/geoblacklight/metadata_component_spec.rb
|
|
@@ -617,7 +607,6 @@ files:
|
|
|
617
607
|
- spec/components/geoblacklight/web_services_component_spec.rb
|
|
618
608
|
- spec/controllers/catalog_controller_spec.rb
|
|
619
609
|
- spec/controllers/relations_controller_spec.rb
|
|
620
|
-
- spec/controllers/wms_controller_spec.rb
|
|
621
610
|
- spec/factories/user.rb
|
|
622
611
|
- spec/features/axe_spec.rb
|
|
623
612
|
- spec/features/citations_spec.rb
|
|
@@ -630,6 +619,7 @@ files:
|
|
|
630
619
|
- spec/features/restricted_viewer_spec.rb
|
|
631
620
|
- spec/features/search_results_map_spec.rb
|
|
632
621
|
- spec/features/search_spec.rb
|
|
622
|
+
- spec/features/sign_in_spec.rb
|
|
633
623
|
- spec/features/sms_spec.rb
|
|
634
624
|
- spec/features/tilejson_spec.rb
|
|
635
625
|
- spec/features/tms_spec.rb
|
|
@@ -670,8 +660,11 @@ files:
|
|
|
670
660
|
- spec/fixtures/solr_documents/baruch_ancestor2.json
|
|
671
661
|
- spec/fixtures/solr_documents/baruch_documentation_download.json
|
|
672
662
|
- spec/fixtures/solr_documents/bbox-spans-180.json
|
|
663
|
+
- spec/fixtures/solr_documents/bluemarble.json
|
|
673
664
|
- spec/fixtures/solr_documents/complex-geom.json
|
|
665
|
+
- spec/fixtures/solr_documents/cornell-roads-fgdc.json
|
|
674
666
|
- spec/fixtures/solr_documents/cornell_html_metadata.json
|
|
667
|
+
- spec/fixtures/solr_documents/dalian.json
|
|
675
668
|
- spec/fixtures/solr_documents/display-note.json
|
|
676
669
|
- spec/fixtures/solr_documents/esri-dynamic-layer-all-layers.json
|
|
677
670
|
- spec/fixtures/solr_documents/esri-dynamic-layer-single-layer.json
|
|
@@ -687,10 +680,10 @@ files:
|
|
|
687
680
|
- spec/fixtures/solr_documents/index_map_point.json
|
|
688
681
|
- spec/fixtures/solr_documents/metadata_no_geom.json
|
|
689
682
|
- spec/fixtures/solr_documents/metadata_no_provider.json
|
|
683
|
+
- spec/fixtures/solr_documents/modis-ndvi.json
|
|
690
684
|
- spec/fixtures/solr_documents/multiple-downloads.json
|
|
691
|
-
- spec/fixtures/solr_documents/no_locn_geometry.json
|
|
692
|
-
- spec/fixtures/solr_documents/no_spatial.json
|
|
693
685
|
- spec/fixtures/solr_documents/oembed.json
|
|
686
|
+
- spec/fixtures/solr_documents/panama.json
|
|
694
687
|
- spec/fixtures/solr_documents/princeton-child1.json
|
|
695
688
|
- spec/fixtures/solr_documents/princeton-child2.json
|
|
696
689
|
- spec/fixtures/solr_documents/princeton-child3.json
|
|
@@ -701,24 +694,24 @@ files:
|
|
|
701
694
|
- spec/fixtures/solr_documents/public_pmtiles_princeton.json
|
|
702
695
|
- spec/fixtures/solr_documents/public_polygon.json
|
|
703
696
|
- spec/fixtures/solr_documents/restricted-line.json
|
|
697
|
+
- spec/fixtures/solr_documents/stanford-geojson.json
|
|
704
698
|
- spec/fixtures/solr_documents/the-related-record.json
|
|
705
699
|
- spec/fixtures/solr_documents/tilejson.json
|
|
706
700
|
- spec/fixtures/solr_documents/tms.json
|
|
707
701
|
- spec/fixtures/solr_documents/umn_metro_result1.json
|
|
708
702
|
- spec/fixtures/solr_documents/umn_state_result1.json
|
|
709
703
|
- spec/fixtures/solr_documents/umn_state_result2.json
|
|
704
|
+
- spec/fixtures/solr_documents/usgs-htmc-index-ca-24000.json
|
|
705
|
+
- spec/fixtures/solr_documents/usgs-tnm-index-dem1.json
|
|
710
706
|
- spec/fixtures/solr_documents/wmts-multiple.json
|
|
711
707
|
- spec/fixtures/solr_documents/wmts-single-layer.json
|
|
712
708
|
- spec/fixtures/solr_documents/xyz.json
|
|
713
709
|
- spec/helpers/geoblacklight_helper_spec.rb
|
|
714
|
-
- spec/javascripts/metadata_download_button_spec.js
|
|
715
710
|
- spec/lib/geoblacklight/bounding_box_spec.rb
|
|
716
711
|
- spec/lib/geoblacklight/configuration/default_settings_builder_spec.rb
|
|
717
712
|
- spec/lib/geoblacklight/configuration/relationships_config_spec.rb
|
|
718
713
|
- spec/lib/geoblacklight/configuration/settings_attributes_spec.rb
|
|
719
714
|
- spec/lib/geoblacklight/configuration/settings_builder_spec.rb
|
|
720
|
-
- spec/lib/geoblacklight/geometry_spec.rb
|
|
721
|
-
- spec/lib/geoblacklight/item_viewer_spec.rb
|
|
722
715
|
- spec/lib/geoblacklight/metadata/base_spec.rb
|
|
723
716
|
- spec/lib/geoblacklight/metadata/html_spec.rb
|
|
724
717
|
- spec/lib/geoblacklight/metadata_spec.rb
|
|
@@ -732,13 +725,10 @@ files:
|
|
|
732
725
|
- spec/lib/geoblacklight/relations/descendants_spec.rb
|
|
733
726
|
- spec/lib/geoblacklight/relations/relation_response_spec.rb
|
|
734
727
|
- spec/lib/geoblacklight/viewer_record_spec.rb
|
|
735
|
-
- spec/lib/geoblacklight/wms_layer/feature_info_response_spec.rb
|
|
736
|
-
- spec/lib/geoblacklight/wms_layer_spec.rb
|
|
737
728
|
- spec/models/concerns/geoblacklight/bbox_filter_field_spec.rb
|
|
738
729
|
- spec/models/concerns/geoblacklight/bbox_filter_query_spec.rb
|
|
739
730
|
- spec/models/concerns/geoblacklight/solr_document/citation_spec.rb
|
|
740
731
|
- spec/models/concerns/geoblacklight/solr_document/finder_spec.rb
|
|
741
|
-
- spec/models/concerns/geoblacklight/solr_document/inspection_spec.rb
|
|
742
732
|
- spec/models/concerns/geoblacklight/solr_document/thumbnail_spec.rb
|
|
743
733
|
- spec/models/concerns/geoblacklight/solr_document_spec.rb
|
|
744
734
|
- spec/models/concerns/geoblacklight/suppressed_records_search_behavior_spec.rb
|
|
@@ -760,6 +750,7 @@ files:
|
|
|
760
750
|
- spec/solr_config_spec.rb
|
|
761
751
|
- spec/solr_fixtures_spec.rb
|
|
762
752
|
- spec/spec_helper.rb
|
|
753
|
+
- spec/support/authentication.rb
|
|
763
754
|
- spec/support/features.rb
|
|
764
755
|
- spec/support/features/map_helpers.rb
|
|
765
756
|
- spec/support/features/session_helpers.rb
|
|
@@ -785,7 +776,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
785
776
|
- !ruby/object:Gem::Version
|
|
786
777
|
version: 2.5.2
|
|
787
778
|
requirements: []
|
|
788
|
-
rubygems_version:
|
|
779
|
+
rubygems_version: 4.0.3
|
|
789
780
|
specification_version: 4
|
|
790
781
|
summary: A discovery platform for geospatial holdings
|
|
791
782
|
test_files: []
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/* Styles for index maps */
|
|
2
|
-
|
|
3
|
-
/* Index map legend */
|
|
4
|
-
.index-map-legend {
|
|
5
|
-
margin-bottom: 0.5em;
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-direction: column;
|
|
8
|
-
justify-content: flex-start;
|
|
9
|
-
align-items: flex-start;
|
|
10
|
-
gap: 0.5em;
|
|
11
|
-
|
|
12
|
-
@media (min-width: 992px) {
|
|
13
|
-
flex-direction: row;
|
|
14
|
-
gap: 1em;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.index-map-legend-info {
|
|
19
|
-
display: flex;
|
|
20
|
-
flex: 0 0 auto;
|
|
21
|
-
gap: 0.5em;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.index-map-legend-swatch {
|
|
25
|
-
display: inline-block;
|
|
26
|
-
border: var(--bs-border-width) solid var(--bs-border-color);
|
|
27
|
-
width: 1.5em;
|
|
28
|
-
height: 1.5em;
|
|
29
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<%= display_tag %>
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Geoblacklight
|
|
4
|
-
class ItemMapViewerComponent < ViewComponent::Base
|
|
5
|
-
def initialize(document:)
|
|
6
|
-
super()
|
|
7
|
-
@document = document
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
# Use the appropriate viewer based on the protocol of the document
|
|
11
|
-
def display_tag
|
|
12
|
-
return oembed_tag if @document.viewer_protocol == "oembed"
|
|
13
|
-
ogm_viewer_tag
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
def render?
|
|
17
|
-
@document
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
private
|
|
21
|
-
|
|
22
|
-
def oembed_tag
|
|
23
|
-
tag.div(nil,
|
|
24
|
-
id: "oembed-viewer",
|
|
25
|
-
class: "viewer oembed-viewer",
|
|
26
|
-
data: {
|
|
27
|
-
controller: "oembed-viewer",
|
|
28
|
-
oembed_viewer_url_value: @document.viewer_endpoint
|
|
29
|
-
})
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
def ogm_viewer_tag
|
|
33
|
-
tag.ogm_viewer(nil,
|
|
34
|
-
:class => "viewer ogm-viewer",
|
|
35
|
-
"hide-title" => true,
|
|
36
|
-
"theme" => helpers.geoblacklight_viewer_theme,
|
|
37
|
-
"light-basemap" => Geoblacklight.configuration.light_basemap_url,
|
|
38
|
-
"dark-basemap" => Geoblacklight.configuration.dark_basemap_url,
|
|
39
|
-
"record-url" => helpers.viewer_solr_document_path(@document),
|
|
40
|
-
:data => {restricted_origins: restricted_origins})
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
# URLs where the viewer will send credentials (cookies) to, in order to try
|
|
44
|
-
# to preview restricted data
|
|
45
|
-
def restricted_origins
|
|
46
|
-
origins = Geoblacklight.configuration.restricted_origins
|
|
47
|
-
return if origins.blank? || !@document.restricted? || !helpers.document_available?(@document)
|
|
48
|
-
|
|
49
|
-
origins.to_json
|
|
50
|
-
end
|
|
51
|
-
end
|
|
52
|
-
end
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
class WmsController < ApplicationController
|
|
4
|
-
def handle
|
|
5
|
-
response = Geoblacklight::WmsLayer.new(wms_params).feature_info
|
|
6
|
-
|
|
7
|
-
respond_to do |format|
|
|
8
|
-
format.json { render json: response }
|
|
9
|
-
end
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
private
|
|
13
|
-
|
|
14
|
-
def wms_params
|
|
15
|
-
params.permit(Geoblacklight.configuration.gbl_params)
|
|
16
|
-
end
|
|
17
|
-
end
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Tooltip } from "bootstrap"
|
|
2
|
-
|
|
3
|
-
export default function initializeTooltips() {
|
|
4
|
-
document.body.addEventListener(
|
|
5
|
-
"mouseenter",
|
|
6
|
-
(event) => {
|
|
7
|
-
if (event.target.closest(".blacklight-icons.svg_tooltip svg")) {
|
|
8
|
-
const svgElement = event.target.closest(".blacklight-icons.svg_tooltip svg")
|
|
9
|
-
const svgTitleElement = svgElement.querySelector("title")
|
|
10
|
-
const titleText = svgTitleElement ? svgTitleElement.textContent : ""
|
|
11
|
-
|
|
12
|
-
if (titleText !== undefined && titleText !== "") {
|
|
13
|
-
// Initialize Bootstrap tooltip with native JavaScript
|
|
14
|
-
const tooltip = new Tooltip(svgElement, {
|
|
15
|
-
placement: "bottom",
|
|
16
|
-
title: titleText,
|
|
17
|
-
})
|
|
18
|
-
tooltip.show()
|
|
19
|
-
|
|
20
|
-
// Store the original title in the data-original-title attribute
|
|
21
|
-
// and remove the title element to prevent it from interfering with Bootstrap's tooltip.
|
|
22
|
-
svgElement.setAttribute("data-original-title", titleText)
|
|
23
|
-
svgTitleElement.remove()
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
true,
|
|
28
|
-
) // Use capture to ensure the event is caught as it bubbles up
|
|
29
|
-
|
|
30
|
-
document.body.addEventListener(
|
|
31
|
-
"mouseleave",
|
|
32
|
-
(event) => {
|
|
33
|
-
if (event.target.closest(".blacklight-icons.svg_tooltip svg")) {
|
|
34
|
-
const svgElement = event.target.closest(".blacklight-icons.svg_tooltip svg")
|
|
35
|
-
const originalTitle = svgElement.getAttribute("data-original-title")
|
|
36
|
-
|
|
37
|
-
if (originalTitle !== undefined && originalTitle !== "") {
|
|
38
|
-
// Restore the SVG title element from data-original-title
|
|
39
|
-
const newTitleElement = document.createElement("title")
|
|
40
|
-
newTitleElement.textContent = originalTitle
|
|
41
|
-
svgElement.prepend(newTitleElement)
|
|
42
|
-
svgElement.setAttribute("data-original-title", "")
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// Remove tooltips
|
|
47
|
-
document.querySelectorAll(".tooltip").forEach((elem) => elem.remove())
|
|
48
|
-
},
|
|
49
|
-
true,
|
|
50
|
-
) // Use capture to ensure the event is caught as it bubbles up
|
|
51
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Geoblacklight
|
|
4
|
-
module SolrDocument
|
|
5
|
-
##
|
|
6
|
-
# Module to provide inspection logic for solr document
|
|
7
|
-
module Inspection
|
|
8
|
-
##
|
|
9
|
-
# Returns boolean about whether document viewer protocol is inspectable
|
|
10
|
-
# @return [Boolean]
|
|
11
|
-
def inspectable?
|
|
12
|
-
%w[wms feature_layer dynamic_map_layer tiled_map_layer pmtiles]
|
|
13
|
-
.include? viewer_protocol
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
end
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "rgeo"
|
|
4
|
-
require "rgeo-geojson"
|
|
5
|
-
|
|
6
|
-
module Geoblacklight
|
|
7
|
-
# Transforms and parses geometry expressed in WKT or CSW WKT ENVELOPE syntax
|
|
8
|
-
class Geometry
|
|
9
|
-
attr_reader :geom
|
|
10
|
-
|
|
11
|
-
# @param [String] geom WKT or WKT ENVELOPE syntax formatted string
|
|
12
|
-
def initialize(geom)
|
|
13
|
-
@geom = geom
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
# Convert geometry to GeoJSON
|
|
17
|
-
# @return [String]
|
|
18
|
-
def geojson
|
|
19
|
-
obj = factory.parse_wkt(geometry_as_wkt)
|
|
20
|
-
RGeo::GeoJSON.encode(obj).to_json
|
|
21
|
-
rescue
|
|
22
|
-
Geoblacklight.logger.warn "Geometry is not valid: #{geom}"
|
|
23
|
-
default_extent
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
# Generate a wsen bounding box from the geometry
|
|
27
|
-
# @return [String] bounding box as comma delimited wsen "w, s, e, n"
|
|
28
|
-
def bounding_box
|
|
29
|
-
obj = factory.parse_wkt(geometry_as_wkt)
|
|
30
|
-
|
|
31
|
-
# Get the minimum bounding box for the geometry as a Polygon
|
|
32
|
-
bbox = obj.envelope
|
|
33
|
-
|
|
34
|
-
# Return as wsen string
|
|
35
|
-
minx = bbox.coordinates[0][0][0]
|
|
36
|
-
miny = bbox.coordinates[0][0][1]
|
|
37
|
-
maxx = bbox.coordinates[0][1][0]
|
|
38
|
-
maxy = bbox.coordinates[0][2][1]
|
|
39
|
-
"#{minx}, #{miny}, #{maxx}, #{maxy}"
|
|
40
|
-
rescue RGeo::Error::ParseError
|
|
41
|
-
Geoblacklight.logger.warn "Error parsing geometry: #{geom}"
|
|
42
|
-
default_extent
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
private
|
|
46
|
-
|
|
47
|
-
# Default extent as GeoJSON
|
|
48
|
-
# @return [String]
|
|
49
|
-
def default_extent
|
|
50
|
-
{
|
|
51
|
-
"type" => "Polygon",
|
|
52
|
-
"coordinates" => [
|
|
53
|
-
[
|
|
54
|
-
[-180.0, 90.0], [-180.0, -90.0], [180.0, -90.0], [180.0, 90.0], [-180.0, 90.0]
|
|
55
|
-
]
|
|
56
|
-
]
|
|
57
|
-
}.to_json
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
# Convert WKT ENVELOPE string to WKT POLYGON string
|
|
61
|
-
# @return [String]
|
|
62
|
-
def envelope_to_polygon
|
|
63
|
-
exp = /^\s*ENVELOPE\(
|
|
64
|
-
\s*([-.\d]+)\s*,
|
|
65
|
-
\s*([-.\d]+)\s*,
|
|
66
|
-
\s*([-.\d]+)\s*,
|
|
67
|
-
\s*([-.\d]+)\s*
|
|
68
|
-
\)\s*$/x # uses 'x' option for free-spacing mode
|
|
69
|
-
bbox_match = exp.match(geom)
|
|
70
|
-
minx, maxx, maxy, miny = bbox_match.captures
|
|
71
|
-
"POLYGON ((#{minx} #{maxy}, #{minx} #{miny}, #{maxx} #{miny}, #{maxx} #{maxy}, #{minx} #{maxy}))"
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
def factory
|
|
75
|
-
@factory ||= RGeo::Cartesian.factory
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
# Return geometry as valid WKT string
|
|
79
|
-
# @return [String]
|
|
80
|
-
def geometry_as_wkt
|
|
81
|
-
return geom unless geom.match?(/ENVELOPE/)
|
|
82
|
-
|
|
83
|
-
envelope_to_polygon
|
|
84
|
-
end
|
|
85
|
-
end
|
|
86
|
-
end
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Geoblacklight
|
|
4
|
-
class ItemViewer
|
|
5
|
-
def initialize(references)
|
|
6
|
-
@references = references
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
def viewer_protocol
|
|
10
|
-
return if viewer_preference.nil?
|
|
11
|
-
viewer_preference.keys.first.to_s
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def viewer_endpoint
|
|
15
|
-
return "" if viewer_preference.nil?
|
|
16
|
-
viewer_preference.values.first.to_s
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
def wms
|
|
20
|
-
@references.wms
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
def iiif
|
|
24
|
-
@references.iiif
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
def iiif_manifest
|
|
28
|
-
@references.iiif_manifest
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
def tiled_map_layer
|
|
32
|
-
@references.tiled_map_layer
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
def dynamic_map_layer
|
|
36
|
-
@references.dynamic_map_layer
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
def feature_layer
|
|
40
|
-
@references.feature_layer
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
def image_map_layer
|
|
44
|
-
@references.image_map_layer
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
def index_map
|
|
48
|
-
@references.index_map
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
def oembed
|
|
52
|
-
@references.oembed
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
def tms
|
|
56
|
-
@references.tms
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
def xyz
|
|
60
|
-
@references.xyz
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
def tilejson
|
|
64
|
-
@references.tilejson
|
|
65
|
-
end
|
|
66
|
-
|
|
67
|
-
def wmts
|
|
68
|
-
@references.wmts
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
def cog
|
|
72
|
-
@references.cog
|
|
73
|
-
end
|
|
74
|
-
|
|
75
|
-
def pmtiles
|
|
76
|
-
@references.pmtiles
|
|
77
|
-
end
|
|
78
|
-
|
|
79
|
-
def viewer_preference
|
|
80
|
-
[oembed, cog, pmtiles, index_map, tilejson, xyz, wmts, tms, wms, iiif_manifest, iiif, tiled_map_layer, dynamic_map_layer,
|
|
81
|
-
image_map_layer, feature_layer].compact.map(&:to_hash).first
|
|
82
|
-
end
|
|
83
|
-
end
|
|
84
|
-
end
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Geoblacklight
|
|
4
|
-
class FeatureInfoResponse
|
|
5
|
-
def initialize(response)
|
|
6
|
-
@response = response
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
def check
|
|
10
|
-
if error?
|
|
11
|
-
@response
|
|
12
|
-
else
|
|
13
|
-
format
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def format
|
|
18
|
-
JSON.parse(@response.body)
|
|
19
|
-
rescue
|
|
20
|
-
page = Nokogiri::HTML(@response.body)
|
|
21
|
-
properties = {}
|
|
22
|
-
values = {}
|
|
23
|
-
page.css("td").each_with_index do |td, index|
|
|
24
|
-
values[index] = td.text
|
|
25
|
-
end
|
|
26
|
-
page.css("th").each_with_index do |th, index|
|
|
27
|
-
properties[th.text] = values[index] unless index >= values.keys.count
|
|
28
|
-
end
|
|
29
|
-
{features: [{properties: properties, isHTML: true}]}
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
def error?
|
|
33
|
-
@response[:error] ||
|
|
34
|
-
@response.headers["content-type"].slice(0, 9) == "text/xml"
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
end
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Geoblacklight
|
|
4
|
-
class WmsLayer
|
|
5
|
-
def initialize(params)
|
|
6
|
-
@params = params.to_h.merge(Geoblacklight.configuration.wms_params)
|
|
7
|
-
@response = Geoblacklight::FeatureInfoResponse.new(request_response)
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
def url
|
|
11
|
-
@params["URL"]
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def search_params
|
|
15
|
-
@params.except("URL")
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def feature_info
|
|
19
|
-
@response.check
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
def request_response
|
|
23
|
-
conn = Faraday.new(url: url)
|
|
24
|
-
conn.get do |request|
|
|
25
|
-
request.params = search_params
|
|
26
|
-
request.options.timeout = Geoblacklight.configuration.timeout_wms
|
|
27
|
-
request.options.open_timeout = Geoblacklight.configuration.timeout_wms
|
|
28
|
-
end
|
|
29
|
-
rescue Faraday::ConnectionFailed, Faraday::TimeoutError => error
|
|
30
|
-
Geoblacklight.logger.error error.inspect
|
|
31
|
-
{error: error.inspect}
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
end
|