geoblacklight 4.5.1 → 4.7.0
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 +1 -1
- data/Gemfile +0 -1
- data/app/assets/javascripts/geoblacklight/basemaps.js +60 -82
- data/app/assets/javascripts/geoblacklight/viewers/map.js +22 -5
- data/app/controllers/download_controller.rb +5 -0
- data/app/controllers/relation_controller.rb +1 -0
- data/app/helpers/arcgis_helper.rb +3 -0
- data/app/helpers/blacklight_helper.rb +4 -0
- data/app/helpers/carto_helper.rb +5 -0
- data/app/helpers/geoblacklight/geoblacklight_helper_behavior.rb +7 -1
- data/app/helpers/geoblacklight_helper.rb +74 -21
- data/app/javascript/openlayers/basemaps.js +0 -20
- data/app/javascript/openlayers/ol_initializer.js +27 -2
- data/app/models/concerns/geoblacklight/solr_document/carto.rb +7 -0
- data/app/models/concerns/geoblacklight/solr_document/citation.rb +7 -0
- data/app/models/concerns/geoblacklight/solr_document/inspection.rb +1 -1
- data/app/models/concerns/geoblacklight/solr_document.rb +30 -2
- data/app/presenters/geoblacklight/document_presenter.rb +9 -0
- data/app/views/catalog/_arcgis.html.erb +1 -1
- data/app/views/catalog/_carto.html.erb +1 -1
- data/app/views/catalog/_downloads_collapse.html.erb +3 -0
- data/app/views/catalog/_index_split_default.html.erb +1 -1
- data/app/views/catalog/_show_default_attribute_table.html.erb +1 -1
- data/app/views/catalog/_show_default_viewer_container.html.erb +3 -3
- data/app/views/catalog/_show_downloads.html.erb +3 -0
- data/app/views/catalog/_show_sidebar.html.erb +1 -1
- data/app/views/catalog/_show_sidebar_static_map.html.erb +3 -0
- data/app/views/catalog/_web_services.html.erb +1 -1
- data/geoblacklight.gemspec +2 -2
- data/lib/generators/geoblacklight/install_generator.rb +1 -1
- data/lib/generators/geoblacklight/templates/catalog_controller.rb +3 -4
- data/lib/generators/geoblacklight/templates/settings.yml +19 -0
- data/lib/geoblacklight/deprecated_configuration.rb +519 -0
- data/lib/geoblacklight/download/hgl_download.rb +5 -0
- data/lib/geoblacklight/engine.rb +14 -0
- data/lib/geoblacklight/geometry.rb +7 -0
- data/lib/geoblacklight/item_viewer.rb +8 -1
- data/lib/geoblacklight/references.rb +15 -0
- data/lib/geoblacklight/version.rb +1 -1
- data/lib/geoblacklight/view_helper_override.rb +12 -1
- data/lib/geoblacklight.rb +17 -0
- data/lib/tasks/geoblacklight.rake +17 -0
- data/package.json +3 -2
- data/spec/features/configurable_basemap_spec.rb +56 -0
- data/spec/lib/geoblacklight/deprecated_configuration_spec.rb +597 -0
- data/spec/lib/geoblacklight/geometry_spec.rb +15 -0
- data/spec/lib/geoblacklight/references_spec.rb +24 -0
- data/spec/lib/geoblacklight/view_helper_override_spec.rb +1 -0
- data/spec/models/concerns/geoblacklight/solr_document/citation_spec.rb +16 -0
- data/spec/models/concerns/geoblacklight/solr_document_spec.rb +48 -0
- metadata +12 -13
|
@@ -64,6 +64,54 @@ describe Geoblacklight::SolrDocument do
|
|
|
64
64
|
end
|
|
65
65
|
end
|
|
66
66
|
end
|
|
67
|
+
describe "deprecations for GeoBlacklight 5 behavior changes" do
|
|
68
|
+
describe "#restricted?" do
|
|
69
|
+
describe "with rights data that is present but blank" do
|
|
70
|
+
let(:document_attributes) { {rights_field => ""} }
|
|
71
|
+
it "warns that GeoBlacklight 5 stops treating the document as restricted" do
|
|
72
|
+
expect(Geoblacklight.deprecation).to receive(:warn).with(
|
|
73
|
+
/#restricted\? returns true for a document whose .* is present but blank/
|
|
74
|
+
)
|
|
75
|
+
expect(document.restricted?).to be true
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
describe "without rights data at all" do
|
|
80
|
+
let(:document_attributes) { {} }
|
|
81
|
+
it "does not warn" do
|
|
82
|
+
expect(Geoblacklight.deprecation).not_to receive(:warn)
|
|
83
|
+
expect(document.restricted?).to be true
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
describe "#geom_field and #wxs_identifier" do
|
|
89
|
+
describe "when the Solr field is missing" do
|
|
90
|
+
let(:document_attributes) { {} }
|
|
91
|
+
it "warns that GeoBlacklight 5 returns nil rather than an empty string" do
|
|
92
|
+
expect(Geoblacklight.deprecation).to receive(:warn).with(/#geom_field returns "" for a document/)
|
|
93
|
+
expect(document.geom_field).to eq ""
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
it "warns for wxs_identifier too" do
|
|
97
|
+
expect(Geoblacklight.deprecation).to receive(:warn).with(/#wxs_identifier returns "" for a document/)
|
|
98
|
+
expect(document.wxs_identifier).to eq ""
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
describe "when the Solr field is present" do
|
|
103
|
+
let(:document_attributes) do
|
|
104
|
+
{Settings.FIELDS.GEOMETRY => "ENVELOPE(-1,1,1,-1)", Settings.FIELDS.WXS_IDENTIFIER => "cite:foo"}
|
|
105
|
+
end
|
|
106
|
+
it "does not warn" do
|
|
107
|
+
expect(Geoblacklight.deprecation).not_to receive(:warn)
|
|
108
|
+
expect(document.geom_field).to eq "ENVELOPE(-1,1,1,-1)"
|
|
109
|
+
expect(document.wxs_identifier).to eq "cite:foo"
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
|
|
67
115
|
describe "#downloadable?" do
|
|
68
116
|
describe "available direct download" do
|
|
69
117
|
let(:document_attributes) do
|
metadata
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: geoblacklight
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.
|
|
4
|
+
version: 4.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mike Graves
|
|
8
8
|
- Darren Hardy
|
|
9
9
|
- Eliot Jordan
|
|
10
10
|
- Jack Reed
|
|
11
|
-
autorequire:
|
|
12
11
|
bindir: bin
|
|
13
12
|
cert_chain: []
|
|
14
|
-
date: 2026-
|
|
13
|
+
date: 2026-09-08 00:00:00.000000000 Z
|
|
15
14
|
dependencies:
|
|
16
15
|
- !ruby/object:Gem::Dependency
|
|
17
16
|
name: rails
|
|
@@ -269,14 +268,14 @@ dependencies:
|
|
|
269
268
|
requirements:
|
|
270
269
|
- - ">="
|
|
271
270
|
- !ruby/object:Gem::Version
|
|
272
|
-
version: '
|
|
271
|
+
version: '4.11'
|
|
273
272
|
type: :development
|
|
274
273
|
prerelease: false
|
|
275
274
|
version_requirements: !ruby/object:Gem::Requirement
|
|
276
275
|
requirements:
|
|
277
276
|
- - ">="
|
|
278
277
|
- !ruby/object:Gem::Version
|
|
279
|
-
version: '
|
|
278
|
+
version: '4.11'
|
|
280
279
|
- !ruby/object:Gem::Dependency
|
|
281
280
|
name: factory_bot_rails
|
|
282
281
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -334,19 +333,19 @@ dependencies:
|
|
|
334
333
|
- !ruby/object:Gem::Version
|
|
335
334
|
version: '0'
|
|
336
335
|
- !ruby/object:Gem::Dependency
|
|
337
|
-
name:
|
|
336
|
+
name: standard
|
|
338
337
|
requirement: !ruby/object:Gem::Requirement
|
|
339
338
|
requirements:
|
|
340
|
-
- -
|
|
339
|
+
- - "~>"
|
|
341
340
|
- !ruby/object:Gem::Version
|
|
342
|
-
version: 1.0
|
|
341
|
+
version: 1.56.0
|
|
343
342
|
type: :development
|
|
344
343
|
prerelease: false
|
|
345
344
|
version_requirements: !ruby/object:Gem::Requirement
|
|
346
345
|
requirements:
|
|
347
|
-
- -
|
|
346
|
+
- - "~>"
|
|
348
347
|
- !ruby/object:Gem::Version
|
|
349
|
-
version: 1.0
|
|
348
|
+
version: 1.56.0
|
|
350
349
|
- !ruby/object:Gem::Dependency
|
|
351
350
|
name: webmock
|
|
352
351
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -641,6 +640,7 @@ files:
|
|
|
641
640
|
- lib/geoblacklight.rb
|
|
642
641
|
- lib/geoblacklight/bounding_box.rb
|
|
643
642
|
- lib/geoblacklight/constants.rb
|
|
643
|
+
- lib/geoblacklight/deprecated_configuration.rb
|
|
644
644
|
- lib/geoblacklight/download.rb
|
|
645
645
|
- lib/geoblacklight/download/geojson_download.rb
|
|
646
646
|
- lib/geoblacklight/download/geotiff_download.rb
|
|
@@ -829,6 +829,7 @@ files:
|
|
|
829
829
|
- spec/javascripts/metadata_download_button_spec.js
|
|
830
830
|
- spec/javascripts/util_spec.js
|
|
831
831
|
- spec/lib/geoblacklight/bounding_box_spec.rb
|
|
832
|
+
- spec/lib/geoblacklight/deprecated_configuration_spec.rb
|
|
832
833
|
- spec/lib/geoblacklight/document_presenter_spec.rb
|
|
833
834
|
- spec/lib/geoblacklight/download/geojson_download_spec.rb
|
|
834
835
|
- spec/lib/geoblacklight/download/geotiff_download_spec.rb
|
|
@@ -899,7 +900,6 @@ homepage: http://github.com/geoblacklight/geoblacklight
|
|
|
899
900
|
licenses:
|
|
900
901
|
- Apache 2.0
|
|
901
902
|
metadata: {}
|
|
902
|
-
post_install_message:
|
|
903
903
|
rdoc_options: []
|
|
904
904
|
require_paths:
|
|
905
905
|
- lib
|
|
@@ -914,8 +914,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
914
914
|
- !ruby/object:Gem::Version
|
|
915
915
|
version: 2.5.2
|
|
916
916
|
requirements: []
|
|
917
|
-
rubygems_version: 3.
|
|
918
|
-
signing_key:
|
|
917
|
+
rubygems_version: 3.6.2
|
|
919
918
|
specification_version: 4
|
|
920
919
|
summary: A discovery platform for geospatial holdings
|
|
921
920
|
test_files: []
|