geoblacklight 3.7.0 → 4.0.0.pre.alpha
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +75 -28
- data/.gitignore +0 -1
- data/.rubocop.yml +5 -1
- data/.solr_wrapper +0 -1
- data/app/assets/images/blacklight/michigan-state-university.svg +1 -0
- data/app/assets/images/blacklight/pennsylvania-state-university.svg +1 -0
- data/app/assets/images/blacklight/purdue-university.svg +1 -0
- data/app/assets/images/blacklight/the-ohio-state-university.svg +1 -0
- data/app/assets/images/blacklight/university-of-chicago.svg +1 -0
- data/app/assets/images/blacklight/university-of-illinois-urbana-champaign.svg +1 -0
- data/app/assets/images/blacklight/university-of-iowa.svg +1 -0
- data/app/assets/images/blacklight/university-of-maryland.svg +1 -0
- data/app/assets/images/blacklight/university-of-michigan.svg +1 -0
- data/app/assets/images/blacklight/university-of-minnesota.svg +1 -0
- data/app/assets/images/blacklight/university-of-nebraska-lincoln.svg +1 -0
- data/app/assets/images/blacklight/university-of-wisconsin-madison.svg +1 -0
- data/app/assets/javascripts/geoblacklight/viewers/tms.js +2 -2
- data/app/assets/javascripts/geoblacklight/viewers/wms.js +2 -2
- data/app/models/concerns/geoblacklight/solr_document/citation.rb +2 -2
- data/app/models/concerns/geoblacklight/solr_document.rb +4 -4
- data/app/models/concerns/geoblacklight/spatial_search_behavior.rb +3 -3
- data/app/views/catalog/_header_icons.html.erb +1 -1
- data/app/views/catalog/_home_text.html.erb +2 -2
- data/app/views/relation/_relations.html.erb +15 -0
- data/app/views/relation/index.html.erb +4 -16
- data/app/views/relation/index.json.jbuilder +6 -2
- data/config/initializers/rails_config.rb +0 -8
- data/config/locales/geoblacklight.en.yml +8 -3
- data/geoblacklight.gemspec +1 -2
- data/lib/generators/geoblacklight/assets_generator.rb +1 -1
- data/lib/generators/geoblacklight/templates/catalog_controller.rb +78 -36
- data/lib/generators/geoblacklight/templates/settings.gbl_v1.yml +195 -0
- data/lib/generators/geoblacklight/templates/settings.yml +81 -25
- data/lib/geoblacklight/constants.rb +0 -3
- data/lib/geoblacklight/download/geojson_download.rb +1 -1
- data/lib/geoblacklight/download/geotiff_download.rb +1 -1
- data/lib/geoblacklight/download/hgl_download.rb +1 -1
- data/lib/geoblacklight/download/kmz_download.rb +1 -1
- data/lib/geoblacklight/download/shapefile_download.rb +1 -1
- data/lib/geoblacklight/engine.rb +2 -4
- data/lib/geoblacklight/item_viewer.rb +1 -13
- data/lib/geoblacklight/references.rb +1 -1
- data/lib/geoblacklight/relation/ancestors.rb +4 -3
- data/lib/geoblacklight/relation/descendants.rb +4 -3
- data/lib/geoblacklight/relation/relation_response.rb +21 -6
- data/lib/geoblacklight/version.rb +1 -1
- data/schema/{geoblacklight-schema.json → geoblacklight-schema-1.0.json} +1 -1
- data/schema/geoblacklight-schema-aardvark.json +211 -0
- data/solr/conf/schema.xml +38 -30
- data/solr/conf/solrconfig.xml +18 -18
- data/spec/components/geoblacklight/homepage_feature_facet_component_spec.rb +1 -1
- data/spec/config/initializers/rails_config_spec.rb +5 -8
- data/spec/controllers/catalog_controller_spec.rb +6 -6
- data/spec/features/download_layer_spec.rb +1 -1
- data/spec/features/esri_viewer_spec.rb +0 -1
- data/spec/features/home_page_spec.rb +4 -4
- data/spec/features/missing_metadata_spec.rb +2 -2
- data/spec/features/relations_spec.rb +2 -2
- data/spec/features/search_results_map_spec.rb +2 -1
- data/spec/features/search_results_overlap_ratio_spec.rb +2 -2
- data/spec/features/split_view.html.erb_spec.rb +16 -12
- data/spec/features/tms_spec.rb +1 -1
- data/spec/features/web_services_modal_spec.rb +0 -33
- data/spec/fixtures/solr_documents/README.md +48 -36
- data/spec/fixtures/solr_documents/actual-papermap1.json +41 -18
- data/spec/fixtures/solr_documents/actual-point1.json +47 -27
- data/spec/fixtures/solr_documents/actual-polygon1.json +43 -18
- data/spec/fixtures/solr_documents/actual-raster1.json +52 -23
- data/spec/fixtures/solr_documents/all-relationships.json +48 -0
- data/spec/fixtures/solr_documents/baruch_ancestor1.json +62 -37
- data/spec/fixtures/solr_documents/baruch_ancestor2.json +62 -37
- data/spec/fixtures/solr_documents/baruch_documentation_download.json +60 -34
- data/spec/fixtures/solr_documents/bbox-spans-180.json +34 -16
- data/spec/fixtures/solr_documents/cornell_html_metadata.json +46 -26
- data/spec/fixtures/solr_documents/esri-dynamic-layer-all-layers.json +43 -25
- data/spec/fixtures/solr_documents/esri-dynamic-layer-single-layer.json +45 -28
- data/spec/fixtures/solr_documents/esri-feature-layer.json +44 -34
- data/spec/fixtures/solr_documents/esri-image-map-layer.json +45 -31
- data/spec/fixtures/solr_documents/esri-tiled_map_layer.json +42 -17
- data/spec/fixtures/solr_documents/esri-wms-layer.json +46 -21
- data/spec/fixtures/solr_documents/harvard_raster.json +55 -36
- data/spec/fixtures/solr_documents/iiif-eastern-hemisphere.json +35 -22
- data/spec/fixtures/solr_documents/index-map-polygon-no-downloadurl.json +48 -27
- data/spec/fixtures/solr_documents/index-map-polygon.json +48 -27
- data/spec/fixtures/solr_documents/index-map-stanford.json +54 -25
- data/spec/fixtures/solr_documents/index_map_point.json +54 -26
- data/spec/fixtures/solr_documents/metadata_no_geom.json +27 -0
- data/spec/fixtures/solr_documents/metadata_no_provider.json +39 -0
- data/spec/fixtures/solr_documents/multiple-downloads.json +33 -20
- data/spec/fixtures/solr_documents/no_locn_geometry.json +25 -0
- data/spec/fixtures/solr_documents/no_spatial.json +37 -19
- data/spec/fixtures/solr_documents/oembed.json +34 -17
- data/spec/fixtures/solr_documents/princeton-child1.json +45 -28
- data/spec/fixtures/solr_documents/princeton-child2.json +45 -28
- data/spec/fixtures/solr_documents/princeton-child3.json +45 -28
- data/spec/fixtures/solr_documents/princeton-child4.json +45 -28
- data/spec/fixtures/solr_documents/princeton-parent.json +46 -23
- data/spec/fixtures/solr_documents/public_direct_download.json +48 -21
- data/spec/fixtures/solr_documents/public_iiif_princeton.json +49 -24
- data/spec/fixtures/solr_documents/public_polygon_mit.json +31 -15
- data/spec/fixtures/solr_documents/restricted-line.json +52 -21
- data/spec/fixtures/solr_documents/the-related-record.json +27 -0
- data/spec/fixtures/solr_documents/tms.json +33 -17
- data/spec/fixtures/solr_documents/umn_metro_result1.json +44 -28
- data/spec/fixtures/solr_documents/umn_state_result1.json +44 -26
- data/spec/fixtures/solr_documents/umn_state_result2.json +45 -24
- data/spec/fixtures/solr_documents/uva_slug_colon.json +43 -20
- data/spec/lib/geoblacklight/download/geojson_download_spec.rb +1 -1
- data/spec/lib/geoblacklight/download/geotiff_download_spec.rb +1 -1
- data/spec/lib/geoblacklight/download/hgl_download_spec.rb +1 -1
- data/spec/lib/geoblacklight/download/kmz_download_spec.rb +1 -1
- data/spec/lib/geoblacklight/download/shapefile_download_spec.rb +1 -1
- data/spec/lib/geoblacklight/download_spec.rb +1 -1
- data/spec/lib/geoblacklight/references_spec.rb +2 -2
- data/spec/lib/geoblacklight/relation/ancestors_spec.rb +3 -3
- data/spec/lib/geoblacklight/relation/descendants_spec.rb +3 -3
- data/spec/lib/geoblacklight/relation/relation_response_spec.rb +32 -17
- data/spec/models/concerns/geoblacklight/solr_document_spec.rb +4 -4
- data/spec/spec_helper.rb +0 -4
- data/spec/views/catalog/_results_pagination.html.erb_spec.rb +1 -1
- data/spec/views/catalog/_show_downloads.html.erb_spec.rb +1 -1
- metadata +22 -63
- data/app/assets/javascripts/geoblacklight/viewers/tilejson.js +0 -33
- data/app/assets/javascripts/geoblacklight/viewers/wmts.js +0 -85
- data/app/assets/javascripts/geoblacklight/viewers/xyz.js +0 -10
- data/app/views/relation/_ancestors.html.erb +0 -8
- data/app/views/relation/_descendants.html.erb +0 -15
- data/config/initializers/new_gbl_settings_defaults_3_3.yml +0 -10
- data/schema/format-values.md +0 -50
- data/schema/geoblacklight-schema-deprecated.md +0 -39
- data/schema/geoblacklight-schema.md +0 -323
- data/schema/geometry-type-values.md +0 -11
- data/schema/references.md +0 -23
- data/schema/schema-commentary.md +0 -198
- data/schema/subjects.md +0 -41
- data/schema/type-values.md +0 -10
- data/spec/features/tilejson_spec.rb +0 -22
- data/spec/features/wmts_spec.rb +0 -34
- data/spec/features/xyz_spec.rb +0 -10
- data/spec/fixtures/manifests/tilejson.json +0 -21
- data/spec/fixtures/manifests/wmts-multiple.xml +0 -813
- data/spec/fixtures/manifests/wmts-single.xml +0 -126
- data/spec/fixtures/solr_documents/metadata_no_dct_provenance_s.json +0 -30
- data/spec/fixtures/solr_documents/metadata_no_layer_geom_type_s.json +0 -17
- data/spec/fixtures/solr_documents/metadata_no_solr_geom.json +0 -23
- data/spec/fixtures/solr_documents/tilejson.json +0 -38
- data/spec/fixtures/solr_documents/wmts-multiple.json +0 -32
- data/spec/fixtures/solr_documents/wmts-single-layer.json +0 -38
- data/spec/fixtures/solr_documents/xyz.json +0 -29
@@ -2,7 +2,7 @@
|
|
2
2
|
require 'spec_helper'
|
3
3
|
|
4
4
|
describe Geoblacklight::KmzDownload do
|
5
|
-
let(:document) { SolrDocument.new(Settings.FIELDS.
|
5
|
+
let(:document) { SolrDocument.new(Settings.FIELDS.ID => 'test', solr_wfs_url: 'http://www.example.com/wfs', Settings.FIELDS.WXS_IDENTIFIER => 'stanford-test', Settings.FIELDS.SPATIAL_EXTENT => 'ENVELOPE(-180, 180, 90, -90)') }
|
6
6
|
let(:download) { described_class.new(document) }
|
7
7
|
describe '#initialize' do
|
8
8
|
it 'initializes as a KmzDownload object with specific options' do
|
@@ -2,7 +2,7 @@
|
|
2
2
|
require 'spec_helper'
|
3
3
|
|
4
4
|
describe Geoblacklight::ShapefileDownload do
|
5
|
-
let(:document) { SolrDocument.new(
|
5
|
+
let(:document) { SolrDocument.new(Settings.FIELDS.ID => 'test', solr_wfs_url: 'http://www.example.com/wfs', Settings.FIELDS.WXS_IDENTIFIER => 'stanford-test', Settings.FIELDS.SPATIAL_EXTENT => 'ENVELOPE(-180, 180, 90, -90)') }
|
6
6
|
let(:download) { described_class.new(document) }
|
7
7
|
describe '#initialize' do
|
8
8
|
it 'initializes as a ShapefileDownload object with specific options' do
|
@@ -7,7 +7,7 @@ describe Geoblacklight::Download do
|
|
7
7
|
let(:faraday_connection) { instance_double(Faraday::Connection) }
|
8
8
|
let(:faraday_response) { instance_double(Faraday::Response) }
|
9
9
|
let(:references_field) { Settings.FIELDS.REFERENCES }
|
10
|
-
let(:document) { SolrDocument.new("#{Settings.FIELDS.
|
10
|
+
let(:document) { SolrDocument.new("#{Settings.FIELDS.ID}": 'test', references_field => { 'http://www.opengis.net/def/serviceType/ogc/wms' => 'http://www.example.com/wms' }.to_json) }
|
11
11
|
let(:options) { { type: 'shapefile', extension: 'zip', service_type: 'wms', content_type: 'application/zip' } }
|
12
12
|
|
13
13
|
describe '#initialize' do
|
@@ -3,7 +3,7 @@ require 'spec_helper'
|
|
3
3
|
|
4
4
|
describe Geoblacklight::References do
|
5
5
|
let(:references_field) { Settings.FIELDS.REFERENCES }
|
6
|
-
let(:file_format_field) { Settings.FIELDS.
|
6
|
+
let(:file_format_field) { Settings.FIELDS.FORMAT }
|
7
7
|
let(:typical_ogp_shapefile) do
|
8
8
|
described_class.new(
|
9
9
|
SolrDocument.new(
|
@@ -135,7 +135,7 @@ describe Geoblacklight::References do
|
|
135
135
|
let(:settings_klass) { class_double('Settings').as_stubbed_const }
|
136
136
|
before do
|
137
137
|
allow(settings_klass).to receive(:METADATA_SHOWN).and_return %w[iso19139 mods]
|
138
|
-
allow(settings_klass).to receive(:FIELDS).and_return OpenStruct.new(
|
138
|
+
allow(settings_klass).to receive(:FIELDS).and_return OpenStruct.new(FORMAT: 'dc_format_s')
|
139
139
|
end
|
140
140
|
it 'is ordered by the configuration' do
|
141
141
|
expect(complex_shapefile.shown_metadata_refs.first.type.to_s).to eq 'iso19139'
|
@@ -3,12 +3,12 @@ require 'spec_helper'
|
|
3
3
|
|
4
4
|
describe Geoblacklight::Relation::Ancestors do
|
5
5
|
let(:repository) { Blacklight::Solr::Repository.new(CatalogController.blacklight_config) }
|
6
|
-
let(:ancestors) { described_class.new('nyu_2451_34502', repository) }
|
7
|
-
let(:empty_ancestors) { described_class.new('harvard-g7064-s2-1834-k3', repository) }
|
6
|
+
let(:ancestors) { described_class.new('nyu_2451_34502', Settings.FIELDS.SOURCE, repository) }
|
7
|
+
let(:empty_ancestors) { described_class.new('harvard-g7064-s2-1834-k3', Settings.FIELDS.SOURCE, repository) }
|
8
8
|
|
9
9
|
describe '#create_search_params' do
|
10
10
|
it 'assembles the correct search params for finding ancestor documents' do
|
11
|
-
expect(ancestors.create_search_params).to eq(fq: ["{!join from=#{Settings.FIELDS.SOURCE} to=#{Settings.FIELDS.
|
11
|
+
expect(ancestors.create_search_params).to eq(fq: ["{!join from=#{Settings.FIELDS.SOURCE} to=#{Settings.FIELDS.ID}}#{Settings.FIELDS.ID}:nyu_2451_34502"], fl: [Settings.FIELDS.TITLE.to_s, Settings.FIELDS.ID, Settings.FIELDS.RESOURCE_TYPE])
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
@@ -3,12 +3,12 @@ require 'spec_helper'
|
|
3
3
|
|
4
4
|
describe Geoblacklight::Relation::Descendants do
|
5
5
|
let(:repository) { Blacklight::Solr::Repository.new(CatalogController.blacklight_config) }
|
6
|
-
let(:descendants) { described_class.new('nyu_2451_34636', repository) }
|
7
|
-
let(:empty_descendants) { described_class.new('harvard-g7064-s2-1834-k3', repository) }
|
6
|
+
let(:descendants) { described_class.new('nyu_2451_34636', Settings.FIELDS.SOURCE, repository) }
|
7
|
+
let(:empty_descendants) { described_class.new('harvard-g7064-s2-1834-k3', Settings.FIELDS.SOURCE, repository) }
|
8
8
|
|
9
9
|
describe '#create_search_params' do
|
10
10
|
it 'assembles the correct search params for finding descendant documents' do
|
11
|
-
expect(descendants.create_search_params).to eq(fq: "#{Settings.FIELDS.SOURCE}:nyu_2451_34636", fl: [Settings.FIELDS.TITLE.to_s, Settings.FIELDS.
|
11
|
+
expect(descendants.create_search_params).to eq(fq: "#{Settings.FIELDS.SOURCE}:nyu_2451_34636", fl: [Settings.FIELDS.TITLE.to_s, Settings.FIELDS.ID, Settings.FIELDS.RESOURCE_TYPE])
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
@@ -11,34 +11,49 @@ describe Geoblacklight::Relation::RelationResponse do
|
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
|
-
describe '#
|
14
|
+
describe '#method_missing' do
|
15
15
|
it 'returns a hash of ancestor documents' do
|
16
|
-
expect(relation_resp.
|
17
|
-
expect(relation_resp.
|
16
|
+
expect(relation_resp.SOURCE_ANCESTORS).to include('numFound')
|
17
|
+
expect(relation_resp.SOURCE_ANCESTORS).to include('docs')
|
18
18
|
end
|
19
|
-
end
|
20
19
|
|
21
|
-
describe '#descendants' do
|
22
20
|
it 'returns a hash of descendant documents' do
|
23
|
-
expect(relation_resp.
|
24
|
-
expect(relation_resp.
|
21
|
+
expect(relation_resp.SOURCE_DESCENDANTS).to include('numFound')
|
22
|
+
expect(relation_resp.SOURCE_DESCENDANTS).to include('docs')
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'raises no method error' do
|
26
|
+
expect { relation_resp.FAIL }.to raise_error NoMethodError
|
25
27
|
end
|
26
28
|
end
|
27
29
|
|
28
|
-
describe '#
|
29
|
-
it 'returns
|
30
|
-
|
30
|
+
describe '#respond_to_missing?' do
|
31
|
+
it 'returns true for configured relationships' do
|
32
|
+
Settings.RELATIONSHIPS_SHOWN.each_key do |key|
|
33
|
+
expect(relation_resp).to respond_to(key)
|
34
|
+
end
|
31
35
|
end
|
32
|
-
|
33
|
-
|
36
|
+
|
37
|
+
it 'returns false for non-configured options' do
|
38
|
+
expect(relation_resp).not_to respond_to('fail')
|
34
39
|
end
|
40
|
+
end
|
35
41
|
|
36
|
-
|
37
|
-
|
42
|
+
describe '#query_type' do
|
43
|
+
it 'fails for a bad query type request' do
|
44
|
+
Settings.add_source!({
|
45
|
+
RELATIONSHIPS_SHOWN: {
|
46
|
+
BAD: {
|
47
|
+
field: 'dct_source_sm',
|
48
|
+
query_type: 'bad_query_type',
|
49
|
+
icon: 'pagelines-brands',
|
50
|
+
label: 'geoblacklight.relations.ancestor'
|
51
|
+
}
|
52
|
+
}
|
53
|
+
})
|
54
|
+
Settings.reload!
|
38
55
|
|
39
|
-
|
40
|
-
expect(empty_relation_resp.empty?).to be true
|
41
|
-
end
|
56
|
+
expect { relation_resp.BAD }.to raise_error(ArgumentError)
|
42
57
|
end
|
43
58
|
end
|
44
59
|
end
|
@@ -3,8 +3,8 @@ require 'spec_helper'
|
|
3
3
|
|
4
4
|
describe Geoblacklight::SolrDocument do
|
5
5
|
let(:document) { SolrDocument.new(document_attributes) }
|
6
|
-
let(:rights_field) { Settings.FIELDS.
|
7
|
-
let(:
|
6
|
+
let(:rights_field) { Settings.FIELDS.ACCESS_RIGHTS }
|
7
|
+
let(:provider_field) { Settings.FIELDS.PROVIDER }
|
8
8
|
let(:references_field) { Settings.FIELDS.REFERENCES }
|
9
9
|
describe '#available?' do
|
10
10
|
let(:document_attributes) { {} }
|
@@ -80,7 +80,7 @@ describe Geoblacklight::SolrDocument do
|
|
80
80
|
end
|
81
81
|
describe '#same_institution?' do
|
82
82
|
describe 'within the same institution' do
|
83
|
-
let(:document_attributes) { {
|
83
|
+
let(:document_attributes) { { provider_field => 'STANFORD' } }
|
84
84
|
it 'is true' do
|
85
85
|
allow(Settings).to receive('Institution').and_return('Stanford')
|
86
86
|
expect(document.same_institution?).to be_truthy
|
@@ -91,7 +91,7 @@ describe Geoblacklight::SolrDocument do
|
|
91
91
|
end
|
92
92
|
end
|
93
93
|
describe 'within a different institution' do
|
94
|
-
let(:document_attributes) { {
|
94
|
+
let(:document_attributes) { { provider_field => 'MIT' } }
|
95
95
|
it 'is false' do
|
96
96
|
allow(Settings).to receive('Institution').and_return('Stanford')
|
97
97
|
expect(document.same_institution?).to be_falsey
|
data/spec/spec_helper.rb
CHANGED
@@ -30,10 +30,6 @@ require 'capybara/rspec'
|
|
30
30
|
require 'selenium-webdriver'
|
31
31
|
require 'webdrivers'
|
32
32
|
|
33
|
-
# Setup webmock for specific tests
|
34
|
-
require 'webmock/rspec'
|
35
|
-
WebMock.allow_net_connect!
|
36
|
-
|
37
33
|
Capybara.register_driver(:headless_chrome) do |app|
|
38
34
|
Capybara::Selenium::Driver.load_selenium
|
39
35
|
browser_options = ::Selenium::WebDriver::Chrome::Options.new.tap do |opts|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
require 'spec_helper'
|
3
3
|
|
4
|
-
describe 'catalog/_results_pagination', type: :view do
|
4
|
+
describe 'catalog/_results_pagination.html.erb', type: :view do
|
5
5
|
it 'will have a #pagination wrapping div' do
|
6
6
|
allow(view).to receive_messages(show_pagination?: false)
|
7
7
|
render
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
require 'spec_helper'
|
3
3
|
|
4
|
-
describe 'catalog/_show_downloads', type: :view do
|
4
|
+
describe 'catalog/_show_downloads.html.erb', type: :view do
|
5
5
|
context 'document is downloadable' do
|
6
6
|
let(:document) { instance_double(SolrDocument) }
|
7
7
|
before do
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geoblacklight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0.pre.alpha
|
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:
|
11
|
+
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2021-09-03 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
@@ -22,7 +22,7 @@ dependencies:
|
|
22
22
|
version: 5.2.4
|
23
23
|
- - "<"
|
24
24
|
- !ruby/object:Gem::Version
|
25
|
-
version: '
|
25
|
+
version: '6.2'
|
26
26
|
type: :runtime
|
27
27
|
prerelease: false
|
28
28
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: 5.2.4
|
33
33
|
- - "<"
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: '
|
35
|
+
version: '6.2'
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: blacklight
|
38
38
|
requirement: !ruby/object:Gem::Requirement
|
@@ -355,20 +355,6 @@ dependencies:
|
|
355
355
|
- - "~>"
|
356
356
|
- !ruby/object:Gem::Version
|
357
357
|
version: '2.2'
|
358
|
-
- !ruby/object:Gem::Dependency
|
359
|
-
name: webmock
|
360
|
-
requirement: !ruby/object:Gem::Requirement
|
361
|
-
requirements:
|
362
|
-
- - "~>"
|
363
|
-
- !ruby/object:Gem::Version
|
364
|
-
version: '3.14'
|
365
|
-
type: :development
|
366
|
-
prerelease: false
|
367
|
-
version_requirements: !ruby/object:Gem::Requirement
|
368
|
-
requirements:
|
369
|
-
- - "~>"
|
370
|
-
- !ruby/object:Gem::Version
|
371
|
-
version: '3.14'
|
372
358
|
description: GeoBlacklight provides a world-class discovery platform for geospatial
|
373
359
|
(GIS) holdings. It is an open collaborative project aiming to build off of the successes
|
374
360
|
of the Blacklight Solr-powered discovery interface and the multi-institutional OpenGeoportal
|
@@ -507,12 +493,9 @@ files:
|
|
507
493
|
- app/assets/javascripts/geoblacklight/viewers/index_map.js
|
508
494
|
- app/assets/javascripts/geoblacklight/viewers/map.js
|
509
495
|
- app/assets/javascripts/geoblacklight/viewers/oembed.js
|
510
|
-
- app/assets/javascripts/geoblacklight/viewers/tilejson.js
|
511
496
|
- app/assets/javascripts/geoblacklight/viewers/tms.js
|
512
497
|
- app/assets/javascripts/geoblacklight/viewers/viewer.js
|
513
498
|
- app/assets/javascripts/geoblacklight/viewers/wms.js
|
514
|
-
- app/assets/javascripts/geoblacklight/viewers/wmts.js
|
515
|
-
- app/assets/javascripts/geoblacklight/viewers/xyz.js
|
516
499
|
- app/assets/stylesheets/geoblacklight/geoblacklight.scss
|
517
500
|
- app/assets/stylesheets/geoblacklight/modules/_base.scss
|
518
501
|
- app/assets/stylesheets/geoblacklight/modules/_blacklight_overrides.scss
|
@@ -588,14 +571,12 @@ files:
|
|
588
571
|
- app/views/catalog/metadata/_missing.html.erb
|
589
572
|
- app/views/catalog/web_services.html.erb
|
590
573
|
- app/views/download/hgl.html.erb
|
591
|
-
- app/views/relation/
|
592
|
-
- app/views/relation/_descendants.html.erb
|
574
|
+
- app/views/relation/_relations.html.erb
|
593
575
|
- app/views/relation/index.html.erb
|
594
576
|
- app/views/relation/index.json.jbuilder
|
595
577
|
- app/views/shared/_header_navbar.html.erb
|
596
578
|
- babel.config.json
|
597
579
|
- bin/coverage.rb
|
598
|
-
- config/initializers/new_gbl_settings_defaults_3_3.yml
|
599
580
|
- config/initializers/new_gbl_settings_defaults_3_4.yml
|
600
581
|
- config/initializers/rails_config.rb
|
601
582
|
- config/locales/geoblacklight.en.yml
|
@@ -611,6 +592,7 @@ files:
|
|
611
592
|
- lib/generators/geoblacklight/templates/assets/geoblacklight.js
|
612
593
|
- lib/generators/geoblacklight/templates/catalog_controller.rb
|
613
594
|
- lib/generators/geoblacklight/templates/package.json
|
595
|
+
- lib/generators/geoblacklight/templates/settings.gbl_v1.yml
|
614
596
|
- lib/generators/geoblacklight/templates/settings.yml
|
615
597
|
- lib/generators/geoblacklight/templates/webpacker.yml
|
616
598
|
- lib/generators/geoblacklight/webpacker_generator.rb
|
@@ -652,15 +634,8 @@ files:
|
|
652
634
|
- lib/geoblacklight/wms_layer/feature_info_response.rb
|
653
635
|
- lib/tasks/geoblacklight.rake
|
654
636
|
- package.json
|
655
|
-
- schema/
|
656
|
-
- schema/geoblacklight-schema-
|
657
|
-
- schema/geoblacklight-schema.json
|
658
|
-
- schema/geoblacklight-schema.md
|
659
|
-
- schema/geometry-type-values.md
|
660
|
-
- schema/references.md
|
661
|
-
- schema/schema-commentary.md
|
662
|
-
- schema/subjects.md
|
663
|
-
- schema/type-values.md
|
637
|
+
- schema/geoblacklight-schema-1.0.json
|
638
|
+
- schema/geoblacklight-schema-aardvark.json
|
664
639
|
- setupJest.js
|
665
640
|
- solr/conf/_rest_managed.json
|
666
641
|
- solr/conf/admin-extra.html
|
@@ -716,16 +691,10 @@ files:
|
|
716
691
|
- spec/features/sms_spec.rb
|
717
692
|
- spec/features/split_view.html.erb_spec.rb
|
718
693
|
- spec/features/suppressed_records_spec.rb
|
719
|
-
- spec/features/tilejson_spec.rb
|
720
694
|
- spec/features/tms_spec.rb
|
721
695
|
- spec/features/web_services_modal_spec.rb
|
722
|
-
- spec/features/wmts_spec.rb
|
723
|
-
- spec/features/xyz_spec.rb
|
724
696
|
- spec/fixtures/fgdc/harvard-g7064-s2-1834-k3.xml
|
725
697
|
- spec/fixtures/iso19139/stanford-cg357zz0321.xml
|
726
|
-
- spec/fixtures/manifests/tilejson.json
|
727
|
-
- spec/fixtures/manifests/wmts-multiple.xml
|
728
|
-
- spec/fixtures/manifests/wmts-single.xml
|
729
698
|
- spec/fixtures/mods/fb897vt9938.mods
|
730
699
|
- spec/fixtures/mods/stanford-cg357zz0321.mods
|
731
700
|
- spec/fixtures/solr_documents/README.md
|
@@ -733,6 +702,7 @@ files:
|
|
733
702
|
- spec/fixtures/solr_documents/actual-point1.json
|
734
703
|
- spec/fixtures/solr_documents/actual-polygon1.json
|
735
704
|
- spec/fixtures/solr_documents/actual-raster1.json
|
705
|
+
- spec/fixtures/solr_documents/all-relationships.json
|
736
706
|
- spec/fixtures/solr_documents/baruch_ancestor1.json
|
737
707
|
- spec/fixtures/solr_documents/baruch_ancestor2.json
|
738
708
|
- spec/fixtures/solr_documents/baruch_documentation_download.json
|
@@ -750,10 +720,10 @@ files:
|
|
750
720
|
- spec/fixtures/solr_documents/index-map-polygon.json
|
751
721
|
- spec/fixtures/solr_documents/index-map-stanford.json
|
752
722
|
- spec/fixtures/solr_documents/index_map_point.json
|
753
|
-
- spec/fixtures/solr_documents/
|
754
|
-
- spec/fixtures/solr_documents/
|
755
|
-
- spec/fixtures/solr_documents/metadata_no_solr_geom.json
|
723
|
+
- spec/fixtures/solr_documents/metadata_no_geom.json
|
724
|
+
- spec/fixtures/solr_documents/metadata_no_provider.json
|
756
725
|
- spec/fixtures/solr_documents/multiple-downloads.json
|
726
|
+
- spec/fixtures/solr_documents/no_locn_geometry.json
|
757
727
|
- spec/fixtures/solr_documents/no_spatial.json
|
758
728
|
- spec/fixtures/solr_documents/oembed.json
|
759
729
|
- spec/fixtures/solr_documents/princeton-child1.json
|
@@ -765,15 +735,12 @@ files:
|
|
765
735
|
- spec/fixtures/solr_documents/public_iiif_princeton.json
|
766
736
|
- spec/fixtures/solr_documents/public_polygon_mit.json
|
767
737
|
- spec/fixtures/solr_documents/restricted-line.json
|
768
|
-
- spec/fixtures/solr_documents/
|
738
|
+
- spec/fixtures/solr_documents/the-related-record.json
|
769
739
|
- spec/fixtures/solr_documents/tms.json
|
770
740
|
- spec/fixtures/solr_documents/umn_metro_result1.json
|
771
741
|
- spec/fixtures/solr_documents/umn_state_result1.json
|
772
742
|
- spec/fixtures/solr_documents/umn_state_result2.json
|
773
743
|
- spec/fixtures/solr_documents/uva_slug_colon.json
|
774
|
-
- spec/fixtures/solr_documents/wmts-multiple.json
|
775
|
-
- spec/fixtures/solr_documents/wmts-single-layer.json
|
776
|
-
- spec/fixtures/solr_documents/xyz.json
|
777
744
|
- spec/helpers/arcgis_helper_spec.rb
|
778
745
|
- spec/helpers/carto_helper_spec.rb
|
779
746
|
- spec/helpers/geoblacklight/geoblacklight_helper_behavior_spec.rb
|
@@ -850,7 +817,7 @@ homepage: http://github.com/geoblacklight/geoblacklight
|
|
850
817
|
licenses:
|
851
818
|
- Apache 2.0
|
852
819
|
metadata: {}
|
853
|
-
post_install_message:
|
820
|
+
post_install_message:
|
854
821
|
rdoc_options: []
|
855
822
|
require_paths:
|
856
823
|
- lib
|
@@ -865,8 +832,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
865
832
|
- !ruby/object:Gem::Version
|
866
833
|
version: 2.5.2
|
867
834
|
requirements: []
|
868
|
-
rubygems_version: 3.2.
|
869
|
-
signing_key:
|
835
|
+
rubygems_version: 3.2.15
|
836
|
+
signing_key:
|
870
837
|
specification_version: 4
|
871
838
|
summary: A discovery platform for geospatial holdings
|
872
839
|
test_files:
|
@@ -907,16 +874,10 @@ test_files:
|
|
907
874
|
- spec/features/sms_spec.rb
|
908
875
|
- spec/features/split_view.html.erb_spec.rb
|
909
876
|
- spec/features/suppressed_records_spec.rb
|
910
|
-
- spec/features/tilejson_spec.rb
|
911
877
|
- spec/features/tms_spec.rb
|
912
878
|
- spec/features/web_services_modal_spec.rb
|
913
|
-
- spec/features/wmts_spec.rb
|
914
|
-
- spec/features/xyz_spec.rb
|
915
879
|
- spec/fixtures/fgdc/harvard-g7064-s2-1834-k3.xml
|
916
880
|
- spec/fixtures/iso19139/stanford-cg357zz0321.xml
|
917
|
-
- spec/fixtures/manifests/tilejson.json
|
918
|
-
- spec/fixtures/manifests/wmts-multiple.xml
|
919
|
-
- spec/fixtures/manifests/wmts-single.xml
|
920
881
|
- spec/fixtures/mods/fb897vt9938.mods
|
921
882
|
- spec/fixtures/mods/stanford-cg357zz0321.mods
|
922
883
|
- spec/fixtures/solr_documents/README.md
|
@@ -924,6 +885,7 @@ test_files:
|
|
924
885
|
- spec/fixtures/solr_documents/actual-point1.json
|
925
886
|
- spec/fixtures/solr_documents/actual-polygon1.json
|
926
887
|
- spec/fixtures/solr_documents/actual-raster1.json
|
888
|
+
- spec/fixtures/solr_documents/all-relationships.json
|
927
889
|
- spec/fixtures/solr_documents/baruch_ancestor1.json
|
928
890
|
- spec/fixtures/solr_documents/baruch_ancestor2.json
|
929
891
|
- spec/fixtures/solr_documents/baruch_documentation_download.json
|
@@ -941,10 +903,10 @@ test_files:
|
|
941
903
|
- spec/fixtures/solr_documents/index-map-polygon.json
|
942
904
|
- spec/fixtures/solr_documents/index-map-stanford.json
|
943
905
|
- spec/fixtures/solr_documents/index_map_point.json
|
944
|
-
- spec/fixtures/solr_documents/
|
945
|
-
- spec/fixtures/solr_documents/
|
946
|
-
- spec/fixtures/solr_documents/metadata_no_solr_geom.json
|
906
|
+
- spec/fixtures/solr_documents/metadata_no_geom.json
|
907
|
+
- spec/fixtures/solr_documents/metadata_no_provider.json
|
947
908
|
- spec/fixtures/solr_documents/multiple-downloads.json
|
909
|
+
- spec/fixtures/solr_documents/no_locn_geometry.json
|
948
910
|
- spec/fixtures/solr_documents/no_spatial.json
|
949
911
|
- spec/fixtures/solr_documents/oembed.json
|
950
912
|
- spec/fixtures/solr_documents/princeton-child1.json
|
@@ -956,15 +918,12 @@ test_files:
|
|
956
918
|
- spec/fixtures/solr_documents/public_iiif_princeton.json
|
957
919
|
- spec/fixtures/solr_documents/public_polygon_mit.json
|
958
920
|
- spec/fixtures/solr_documents/restricted-line.json
|
959
|
-
- spec/fixtures/solr_documents/
|
921
|
+
- spec/fixtures/solr_documents/the-related-record.json
|
960
922
|
- spec/fixtures/solr_documents/tms.json
|
961
923
|
- spec/fixtures/solr_documents/umn_metro_result1.json
|
962
924
|
- spec/fixtures/solr_documents/umn_state_result1.json
|
963
925
|
- spec/fixtures/solr_documents/umn_state_result2.json
|
964
926
|
- spec/fixtures/solr_documents/uva_slug_colon.json
|
965
|
-
- spec/fixtures/solr_documents/wmts-multiple.json
|
966
|
-
- spec/fixtures/solr_documents/wmts-single-layer.json
|
967
|
-
- spec/fixtures/solr_documents/xyz.json
|
968
927
|
- spec/helpers/arcgis_helper_spec.rb
|
969
928
|
- spec/helpers/carto_helper_spec.rb
|
970
929
|
- spec/helpers/geoblacklight/geoblacklight_helper_behavior_spec.rb
|
@@ -1,33 +0,0 @@
|
|
1
|
-
//= require geoblacklight/viewers/wms
|
2
|
-
|
3
|
-
GeoBlacklight.Viewer.Tilejson = GeoBlacklight.Viewer.Wms.extend({
|
4
|
-
|
5
|
-
addPreviewLayer: function() {
|
6
|
-
var _this = this;
|
7
|
-
fetch(this.data.url).then(function(response) {
|
8
|
-
if (!response.ok) {
|
9
|
-
throw new Error("Unable to fetch tile.json document");
|
10
|
-
}
|
11
|
-
return response.json();
|
12
|
-
}).then(function(tilejson) {
|
13
|
-
var bounds = _this.getBounds(tilejson),
|
14
|
-
options = bounds ? { bounds: bounds } : {},
|
15
|
-
url = tilejson.tiles[0],
|
16
|
-
tileJsonLayer = L.tileLayer(url, options);
|
17
|
-
_this.overlay.addLayer(tileJsonLayer);
|
18
|
-
}).catch(function(error) {
|
19
|
-
console.debug(error);
|
20
|
-
});
|
21
|
-
},
|
22
|
-
|
23
|
-
getBounds: function(doc) {
|
24
|
-
// Get the bounds from the document, if they exist, and
|
25
|
-
// convert to a Leaflet latlngBounds object
|
26
|
-
var bounds = doc.bounds;
|
27
|
-
if(bounds) {
|
28
|
-
var corner1 = L.latLng(bounds[1], bounds[0]),
|
29
|
-
corner2 = L.latLng(bounds[3], bounds[2]);
|
30
|
-
return L.latLngBounds(corner1, corner2);
|
31
|
-
}
|
32
|
-
}
|
33
|
-
});
|
@@ -1,85 +0,0 @@
|
|
1
|
-
//= require geoblacklight/viewers/wms
|
2
|
-
|
3
|
-
GeoBlacklight.Viewer.Wmts = GeoBlacklight.Viewer.Wms.extend({
|
4
|
-
|
5
|
-
addPreviewLayer: function() {
|
6
|
-
var _this = this;
|
7
|
-
fetch(this.data.url).then(function(response) {
|
8
|
-
if (!response.ok) {
|
9
|
-
throw new Error("Unable to fetch WMTSCapabilities document");
|
10
|
-
}
|
11
|
-
return response.text();
|
12
|
-
}).then(function(wmtsCapabilities) {
|
13
|
-
var tileInfo = _this.parseCapabilities(wmtsCapabilities),
|
14
|
-
options = tileInfo.bounds ? { bounds: tileInfo.bounds } : {},
|
15
|
-
tileLayer = L.tileLayer(tileInfo.url, options);
|
16
|
-
_this.overlay.addLayer(tileLayer);
|
17
|
-
}).catch(function(error) {
|
18
|
-
console.debug(error);
|
19
|
-
});
|
20
|
-
},
|
21
|
-
|
22
|
-
parseCapabilities: function(wmtsCapabilities) {
|
23
|
-
var parser = new DOMParser(),
|
24
|
-
doc = parser.parseFromString(wmtsCapabilities, "application/xml"),
|
25
|
-
layers = doc.getElementsByTagName("Layer"),
|
26
|
-
selectedLayer = this.findLayer(layers),
|
27
|
-
resourceElement = selectedLayer.getElementsByTagName("ResourceURL")[0];
|
28
|
-
|
29
|
-
// Generate URL with Leaflet.TileLayer URL template formatting
|
30
|
-
var tileURL = resourceElement.getAttribute("template")
|
31
|
-
.replace("{Style}", this.getStyle(selectedLayer))
|
32
|
-
.replace("{TileMatrixSet}", this.getTileMatrixSet(selectedLayer))
|
33
|
-
.replace("TileMatrix", "z")
|
34
|
-
.replace("TileCol","x")
|
35
|
-
.replace("TileRow","y");
|
36
|
-
|
37
|
-
return { url: tileURL, bounds: this.getBounds(selectedLayer) };
|
38
|
-
},
|
39
|
-
|
40
|
-
findLayer: function(layers) {
|
41
|
-
if (layers.length === 1) {
|
42
|
-
// If there is only one layer in the document, return it
|
43
|
-
return layers[0];
|
44
|
-
} else {
|
45
|
-
// Search each layer for an identifier that matches the
|
46
|
-
// layerId and return it
|
47
|
-
for (i = 0; i < layers.length; i++) {
|
48
|
-
var ids = layers[i].getElementsByTagName("ows:Identifier");
|
49
|
-
for(x = 0; x < ids.length; x++) {
|
50
|
-
if (ids[x].textContent === this.data.layerId) {
|
51
|
-
return layers[i];
|
52
|
-
}
|
53
|
-
}
|
54
|
-
}
|
55
|
-
}
|
56
|
-
},
|
57
|
-
|
58
|
-
getStyle: function(layer) {
|
59
|
-
var styleElement = layer.getElementsByTagName("Style")[0];
|
60
|
-
if(styleElement) {
|
61
|
-
return styleElement.getElementsByTagName("ows:Identifier")[0].textContent;
|
62
|
-
}
|
63
|
-
},
|
64
|
-
|
65
|
-
getTileMatrixSet: function(layer) {
|
66
|
-
var tileMatrixElement = layer.getElementsByTagName("TileMatrixSet")[0];
|
67
|
-
if(tileMatrixElement) {
|
68
|
-
return tileMatrixElement.textContent;
|
69
|
-
}
|
70
|
-
},
|
71
|
-
|
72
|
-
getBounds: function(layer) {
|
73
|
-
// Get the layer's lower corner and upper corner values,
|
74
|
-
// if they exist, and convert to a Leaflet latlngBounds object
|
75
|
-
var lcElement = layer.getElementsByTagName("ows:LowerCorner")[0],
|
76
|
-
ucElement = layer.getElementsByTagName("ows:UpperCorner")[0];
|
77
|
-
if(lcElement && ucElement) {
|
78
|
-
var lc = lcElement.textContent.split(" "),
|
79
|
-
uc = ucElement.textContent.split(" "),
|
80
|
-
corner1 = L.latLng(lc[1], lc[0]),
|
81
|
-
corner2 = L.latLng(uc[1], uc[0]);
|
82
|
-
return L.latLngBounds(corner1, corner2);
|
83
|
-
}
|
84
|
-
}
|
85
|
-
});
|
@@ -1,8 +0,0 @@
|
|
1
|
-
<% @relations.ancestors['docs'].each do |ancestor| %>
|
2
|
-
<li class="list-group-item border-bottom-0">
|
3
|
-
<%= link_to solr_document_path(ancestor[Settings.FIELDS.UNIQUE_KEY]) do %>
|
4
|
-
<%= relations_icon(ancestor, 'pagelines-brands') %>
|
5
|
-
<%= ancestor[Settings.FIELDS.TITLE] %>
|
6
|
-
<% end %>
|
7
|
-
</li>
|
8
|
-
<% end %>
|
@@ -1,15 +0,0 @@
|
|
1
|
-
<% @relations.descendants['docs'][0..2].each do |descendant| %>
|
2
|
-
<li class="list-group-item border-bottom-0">
|
3
|
-
<%= link_to solr_document_path(descendant[Settings.FIELDS.UNIQUE_KEY]) do %>
|
4
|
-
<%= relations_icon(descendant, 'leaf') %>
|
5
|
-
<%= descendant[Settings.FIELDS.TITLE] %>
|
6
|
-
<% end %>
|
7
|
-
</li>
|
8
|
-
<% end %>
|
9
|
-
<% unless (@relations.descendants['numFound'].to_i <= 3) %>
|
10
|
-
<li class="list-group-item border-bottom-0">
|
11
|
-
<%= link_to search_catalog_path({f: {"#{Settings.FIELDS.SOURCE}" => [@relations.link_id]}}) do %>
|
12
|
-
<%= t('geoblacklight.relations.browse_all', count: @relations.descendants['numFound']) %>
|
13
|
-
<% end %>
|
14
|
-
</li>
|
15
|
-
<% end %>
|
@@ -1,10 +0,0 @@
|
|
1
|
-
# New GeoBlacklight v3.3 Solr field mappings
|
2
|
-
FIELDS:
|
3
|
-
:IDENTIFIER: 'dc_identifier_s'
|
4
|
-
:LANGUAGE: 'dc_language_s'
|
5
|
-
:LAYER_MODIFIED: 'layer_modified_dt'
|
6
|
-
:OVERLAP_FIELD: 'solr_bboxtype'
|
7
|
-
:SOURCE: 'dc_source_sm'
|
8
|
-
:SUPPRESSED: 'suppressed_b'
|
9
|
-
:TYPE: 'dc_type_s'
|
10
|
-
:UNIQUE_KEY: 'layer_slug_s'
|