geoblacklight 3.4.0 → 3.5.0
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 +18 -41
- data/app/assets/javascripts/geoblacklight/viewers/tms.js +2 -2
- data/app/assets/javascripts/geoblacklight/viewers/xyz.js +10 -0
- data/config/locales/geoblacklight.en.yml +1 -0
- data/lib/generators/geoblacklight/templates/settings.yml +1 -0
- data/lib/geoblacklight/constants.rb +2 -0
- data/lib/geoblacklight/item_viewer.rb +5 -1
- data/lib/geoblacklight/version.rb +1 -1
- data/solr/conf/solrconfig.xml +3 -3
- data/spec/features/split_view.html.erb_spec.rb +1 -1
- data/spec/features/tms_spec.rb +1 -1
- data/spec/features/web_services_modal_spec.rb +11 -0
- data/spec/features/xyz_spec.rb +10 -0
- data/spec/fixtures/solr_documents/tms.json +2 -2
- data/spec/fixtures/solr_documents/xyz.json +29 -0
- metadata +11 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a28549818bf0d50f6b33cbd98d38114aaf16ec00312f918fa5fefa1f34bd9738
|
4
|
+
data.tar.gz: e10e36e4b8ff2b46b2fb7970427399f5785eb55c7d96ecc94c44422c2dac45f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbfdb636de0b0e68a33e53f3b72d60ac761fb7ecaafda00c75cde0893d6da2b8fbd803fa9831a7bd35fd21e5e9512d14adf318bad02420268237b7d08d0c9ea0
|
7
|
+
data.tar.gz: 4078a2f0c54fbe377f36271932c939185741f7655252168b6a403f9073ed8388a202061d32e8a1db839d3445a5680949710d3a9670c2e888a68b51d581c84f01
|
data/.github/workflows/ruby.yml
CHANGED
@@ -27,8 +27,11 @@ jobs:
|
|
27
27
|
with:
|
28
28
|
ruby-version: 2.7
|
29
29
|
|
30
|
+
- name: Install bundler
|
31
|
+
run: gem install bundler -v 2.1.1
|
32
|
+
|
30
33
|
- name: Install dependencies
|
31
|
-
run: bundle install
|
34
|
+
run: bundle _2.1.1_ install
|
32
35
|
|
33
36
|
- name: Download coverage artifacts
|
34
37
|
uses: actions/download-artifact@v2
|
@@ -43,7 +46,7 @@ jobs:
|
|
43
46
|
runs-on: ubuntu-latest
|
44
47
|
strategy:
|
45
48
|
matrix:
|
46
|
-
ruby: [2.7, 3.0]
|
49
|
+
ruby: [2.7, '3.0']
|
47
50
|
steps:
|
48
51
|
- uses: actions/checkout@v2
|
49
52
|
|
@@ -55,8 +58,13 @@ jobs:
|
|
55
58
|
- name: Create Solr container
|
56
59
|
run: docker run -d -p 8983:8983 geoblacklight/solr:8.9-v1.0.0 server/scripts/ci-start.sh
|
57
60
|
|
61
|
+
- name: Install bundler
|
62
|
+
run: gem install bundler -v 2.1.1
|
63
|
+
|
58
64
|
- name: Install dependencies
|
59
|
-
run: bundle install
|
65
|
+
run: bundle _2.1.1_ install
|
66
|
+
env:
|
67
|
+
rails_version: 7.0.1
|
60
68
|
|
61
69
|
- name: Load config into solr
|
62
70
|
run: |
|
@@ -68,6 +76,7 @@ jobs:
|
|
68
76
|
- name: Run tests
|
69
77
|
run: bundle exec rake ci
|
70
78
|
env:
|
79
|
+
rails_version: 7.0.1
|
71
80
|
ENGINE_CART_RAILS_OPTIONS: '--skip-git --skip-listen --skip-spring --skip-keeps --skip-action-cable --skip-coffee --skip-test'
|
72
81
|
SOLR_URL: http://solr:SolrRocks@localhost:8983/solr/blacklight-core
|
73
82
|
|
@@ -77,7 +86,7 @@ jobs:
|
|
77
86
|
name: coverage
|
78
87
|
path: coverage/
|
79
88
|
|
80
|
-
|
89
|
+
test_rails6_1:
|
81
90
|
runs-on: ubuntu-latest
|
82
91
|
strategy:
|
83
92
|
matrix:
|
@@ -93,45 +102,13 @@ jobs:
|
|
93
102
|
- name: Create Solr container
|
94
103
|
run: docker run -d -p 8983:8983 geoblacklight/solr:8.9-v1.0.0 server/scripts/ci-start.sh
|
95
104
|
|
96
|
-
- name: Install
|
97
|
-
run:
|
98
|
-
env:
|
99
|
-
RAILS_VERSION: 6.0.3.4
|
100
|
-
|
101
|
-
- name: Load config into solr
|
102
|
-
run: |
|
103
|
-
cd solr/conf
|
104
|
-
zip -1 -r solr_config.zip ./*
|
105
|
-
curl -H "Content-type:application/octet-stream" --data-binary @solr_config.zip "http://solr:SolrRocks@127.0.0.1:8983/solr/admin/configs?action=UPLOAD&name=blacklight"
|
106
|
-
curl -H 'Content-type: application/json' http://solr:SolrRocks@127.0.0.1:8983/api/collections/ -d '{create: {name: blacklight-core, config: blacklight, numShards: 1}}'
|
107
|
-
|
108
|
-
- name: Run tests
|
109
|
-
run: bundle exec rake ci
|
110
|
-
env:
|
111
|
-
RAILS_VERSION: 6.0.3.4
|
112
|
-
ENGINE_CART_RAILS_OPTIONS: '--skip-git --skip-listen --skip-spring --skip-keeps --skip-action-cable --skip-coffee --skip-test'
|
113
|
-
SOLR_URL: http://solr:SolrRocks@localhost:8983/solr/blacklight-core
|
114
|
-
|
115
|
-
test_rails5_2:
|
116
|
-
runs-on: ubuntu-latest
|
117
|
-
strategy:
|
118
|
-
matrix:
|
119
|
-
ruby: [2.6]
|
120
|
-
steps:
|
121
|
-
- uses: actions/checkout@v2
|
122
|
-
|
123
|
-
- name: Set up Ruby
|
124
|
-
uses: ruby/setup-ruby@v1
|
125
|
-
with:
|
126
|
-
ruby-version: ${{ matrix.ruby }}
|
127
|
-
|
128
|
-
- name: Create Solr container
|
129
|
-
run: docker run -d -p 8983:8983 geoblacklight/solr:8.9-v1.0.0 server/scripts/ci-start.sh
|
105
|
+
- name: Install bundler
|
106
|
+
run: gem install bundler -v 2.1.1
|
130
107
|
|
131
108
|
- name: Install dependencies
|
132
|
-
run: bundle install
|
109
|
+
run: bundle _2.1.1_ install
|
133
110
|
env:
|
134
|
-
RAILS_VERSION:
|
111
|
+
RAILS_VERSION: 6.1.4.4
|
135
112
|
|
136
113
|
- name: Load config into solr
|
137
114
|
run: |
|
@@ -143,6 +120,6 @@ jobs:
|
|
143
120
|
- name: Run tests
|
144
121
|
run: bundle exec rake ci
|
145
122
|
env:
|
146
|
-
RAILS_VERSION:
|
123
|
+
RAILS_VERSION: 6.1.4.4
|
147
124
|
ENGINE_CART_RAILS_OPTIONS: '--skip-git --skip-listen --skip-spring --skip-keeps --skip-action-cable --skip-coffee --skip-test'
|
148
125
|
SOLR_URL: http://solr:SolrRocks@localhost:8983/solr/blacklight-core
|
@@ -4,7 +4,7 @@ GeoBlacklight.Viewer.Tms = GeoBlacklight.Viewer.Wms.extend({
|
|
4
4
|
|
5
5
|
addPreviewLayer: function() {
|
6
6
|
var _this = this;
|
7
|
-
var
|
8
|
-
this.overlay.addLayer(
|
7
|
+
var tmsLayer = L.tileLayer(this.data.url, { tms: true });
|
8
|
+
this.overlay.addLayer(tmsLayer);
|
9
9
|
}
|
10
10
|
});
|
@@ -16,7 +16,9 @@ module Geoblacklight
|
|
16
16
|
wcs: 'http://www.opengis.net/def/serviceType/ogc/wcs',
|
17
17
|
wfs: 'http://www.opengis.net/def/serviceType/ogc/wfs',
|
18
18
|
wms: 'http://www.opengis.net/def/serviceType/ogc/wms',
|
19
|
+
wmts: 'http://www.opengis.net/def/serviceType/ogc/wmts',
|
19
20
|
tms: 'https://wiki.osgeo.org/wiki/Tile_Map_Service_Specification',
|
21
|
+
xyz: 'https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames',
|
20
22
|
hgl: 'http://schema.org/DownloadAction',
|
21
23
|
feature_layer: 'urn:x-esri:serviceType:ArcGIS#FeatureLayer',
|
22
24
|
tiled_map_layer: 'urn:x-esri:serviceType:ArcGIS#TiledMapLayer',
|
@@ -51,8 +51,12 @@ module Geoblacklight
|
|
51
51
|
@references.tms
|
52
52
|
end
|
53
53
|
|
54
|
+
def xyz
|
55
|
+
@references.xyz
|
56
|
+
end
|
57
|
+
|
54
58
|
def viewer_preference
|
55
|
-
[oembed, index_map, tms, wms, iiif, tiled_map_layer, dynamic_map_layer,
|
59
|
+
[oembed, index_map, xyz, tms, wms, iiif, tiled_map_layer, dynamic_map_layer,
|
56
60
|
image_map_layer, feature_layer].compact.map(&:to_hash).first
|
57
61
|
end
|
58
62
|
end
|
data/solr/conf/solrconfig.xml
CHANGED
@@ -70,9 +70,9 @@
|
|
70
70
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
|
71
71
|
<query>
|
72
72
|
<maxBooleanClauses>1024</maxBooleanClauses>
|
73
|
-
<filterCache class="solr.
|
74
|
-
<queryResultCache class="solr.
|
75
|
-
<documentCache class="solr.
|
73
|
+
<filterCache class="solr.CaffeineCache" size="512" initialSize="512" autowarmCount="0" async="true"/>
|
74
|
+
<queryResultCache class="solr.CaffeineCache" size="512" initialSize="512" autowarmCount="0" async="true"/>
|
75
|
+
<documentCache class="solr.CaffeineCache" size="512" initialSize="512" autowarmCount="0" async="true"/>
|
76
76
|
<enableLazyFieldLoading>true</enableLazyFieldLoading>
|
77
77
|
<queryResultWindowSize>20</queryResultWindowSize>
|
78
78
|
<queryResultMaxDocsCached>200</queryResultMaxDocsCached>
|
@@ -10,7 +10,7 @@ feature 'Index view', js: true do
|
|
10
10
|
scenario 'should have documents and map on page' do
|
11
11
|
visit search_catalog_path(f: { Settings.FIELDS.PROVENANCE => ['Stanford'] })
|
12
12
|
expect(page).to have_css('#documents')
|
13
|
-
expect(page).to have_css('.document', count:
|
13
|
+
expect(page).to have_css('.document', count: 7)
|
14
14
|
expect(page).to have_css('#map')
|
15
15
|
end
|
16
16
|
|
data/spec/features/tms_spec.rb
CHANGED
@@ -3,7 +3,7 @@ require 'spec_helper'
|
|
3
3
|
|
4
4
|
feature 'tms layer' do
|
5
5
|
scenario 'displays tms layer', js: true do
|
6
|
-
visit solr_document_path('6f47b103-9955-4bbe-a364-387039623106')
|
6
|
+
visit solr_document_path('6f47b103-9955-4bbe-a364-387039623106-tms')
|
7
7
|
expect(page).to have_css '.leaflet-control-zoom', visible: true
|
8
8
|
expect(page).to have_css "img[src*='earthquake.usgs.gov']"
|
9
9
|
end
|
@@ -23,4 +23,15 @@ feature 'web services tools' do
|
|
23
23
|
expect(page).not_to have_css 'li.web_services a', text: 'Web services'
|
24
24
|
end
|
25
25
|
end
|
26
|
+
feature 'when xyz tile reference is provided', js: true do
|
27
|
+
scenario 'shows up in tools' do
|
28
|
+
visit solr_document_path '6f47b103-9955-4bbe-a364-387039623106-xyz'
|
29
|
+
expect(page).to have_css 'li.web_services a', text: 'Web services'
|
30
|
+
click_link 'Web services'
|
31
|
+
within '.modal-body' do
|
32
|
+
expect(page).to have_css 'label', text: 'XYZ Tiles'
|
33
|
+
expect(page).to have_css 'input[value="https://earthquake.usgs.gov/basemap/tiles/faults/{z}/{x}/{y}.png"]'
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
26
37
|
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
feature 'xyz layer' do
|
5
|
+
scenario 'displays tms layer', js: true do
|
6
|
+
visit solr_document_path('6f47b103-9955-4bbe-a364-387039623106-xyz')
|
7
|
+
expect(page).to have_css '.leaflet-control-zoom', visible: :visible
|
8
|
+
expect(page).to have_css "img[src*='earthquake.usgs.gov']"
|
9
|
+
end
|
10
|
+
end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"dc_identifier_s": "6f47b103-9955-4bbe-a364-387039623106",
|
3
|
-
"dc_title_s": "Quaternary Fault and Fold Database of the United States",
|
3
|
+
"dc_title_s": "Quaternary Fault and Fold Database of the United States (TMS)",
|
4
4
|
"dc_description_s": "Quaternary Fault and Fold Database of the United States",
|
5
5
|
"dc_rights_s": "Public",
|
6
6
|
"dct_provenance_s": "Stanford",
|
7
7
|
"dct_references_s": "{\"http://schema.org/url\":\"https://www.usgs.gov/natural-hazards/earthquake-hazards/faults\",\"https://wiki.osgeo.org/wiki/Tile_Map_Service_Specification\":\"https://earthquake.usgs.gov/basemap/tiles/faults/{z}/{x}/{y}.png\",\"http://schema.org/downloadUrl\":\"https://earthquake.usgs.gov/static/lfs/nshm/qfaults/Qfaults_GIS.zip\"}",
|
8
|
-
"layer_slug_s": "6f47b103-9955-4bbe-a364-387039623106",
|
8
|
+
"layer_slug_s": "6f47b103-9955-4bbe-a364-387039623106-tms",
|
9
9
|
"layer_geom_type_s": "Polyline",
|
10
10
|
"dc_format_s": "Shapefile",
|
11
11
|
"dc_language_s": "English",
|
@@ -0,0 +1,29 @@
|
|
1
|
+
{
|
2
|
+
"dc_identifier_s": "6f47b103-9955-4bbe-a364-387039623106",
|
3
|
+
"dc_title_s": "Quaternary Fault and Fold Database of the United States (XYZ)",
|
4
|
+
"dc_description_s": "Quaternary Fault and Fold Database of the United States",
|
5
|
+
"dc_rights_s": "Public",
|
6
|
+
"dct_provenance_s": "Stanford",
|
7
|
+
"dct_references_s": "{\"http://schema.org/url\":\"https://www.usgs.gov/natural-hazards/earthquake-hazards/faults\",\"https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames\":\"https://earthquake.usgs.gov/basemap/tiles/faults/{z}/{x}/{y}.png\",\"http://schema.org/downloadUrl\":\"https://earthquake.usgs.gov/static/lfs/nshm/qfaults/Qfaults_GIS.zip\"}",
|
8
|
+
"layer_slug_s": "6f47b103-9955-4bbe-a364-387039623106-xyz",
|
9
|
+
"layer_geom_type_s": "Polyline",
|
10
|
+
"dc_format_s": "Shapefile",
|
11
|
+
"dc_language_s": "English",
|
12
|
+
"dc_type_s": "Dataset",
|
13
|
+
"dc_publisher_s": "Geological Survey (U.S.)",
|
14
|
+
"dc_subject_sm": [
|
15
|
+
"Earthquakes",
|
16
|
+
"Faults"
|
17
|
+
],
|
18
|
+
"dct_issued_s": "2020",
|
19
|
+
"dct_temporal_sm": [
|
20
|
+
"2020"
|
21
|
+
],
|
22
|
+
"dct_spatial_sm": [
|
23
|
+
"Earth (Planet)",
|
24
|
+
"North America"
|
25
|
+
],
|
26
|
+
"solr_geom": "ENVELOPE(-156.02, -70.80, 65.59, 18.93)",
|
27
|
+
"solr_year_i": 2020,
|
28
|
+
"geoblacklight_version": "1.0"
|
29
|
+
}
|
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: 3.
|
4
|
+
version: 3.5.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:
|
11
|
+
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2022-01-24 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
@@ -496,6 +496,7 @@ files:
|
|
496
496
|
- app/assets/javascripts/geoblacklight/viewers/tms.js
|
497
497
|
- app/assets/javascripts/geoblacklight/viewers/viewer.js
|
498
498
|
- app/assets/javascripts/geoblacklight/viewers/wms.js
|
499
|
+
- app/assets/javascripts/geoblacklight/viewers/xyz.js
|
499
500
|
- app/assets/stylesheets/geoblacklight/geoblacklight.scss
|
500
501
|
- app/assets/stylesheets/geoblacklight/modules/_base.scss
|
501
502
|
- app/assets/stylesheets/geoblacklight/modules/_blacklight_overrides.scss
|
@@ -701,6 +702,7 @@ files:
|
|
701
702
|
- spec/features/suppressed_records_spec.rb
|
702
703
|
- spec/features/tms_spec.rb
|
703
704
|
- spec/features/web_services_modal_spec.rb
|
705
|
+
- spec/features/xyz_spec.rb
|
704
706
|
- spec/fixtures/fgdc/harvard-g7064-s2-1834-k3.xml
|
705
707
|
- spec/fixtures/iso19139/stanford-cg357zz0321.xml
|
706
708
|
- spec/fixtures/mods/fb897vt9938.mods
|
@@ -747,6 +749,7 @@ files:
|
|
747
749
|
- spec/fixtures/solr_documents/umn_state_result1.json
|
748
750
|
- spec/fixtures/solr_documents/umn_state_result2.json
|
749
751
|
- spec/fixtures/solr_documents/uva_slug_colon.json
|
752
|
+
- spec/fixtures/solr_documents/xyz.json
|
750
753
|
- spec/helpers/arcgis_helper_spec.rb
|
751
754
|
- spec/helpers/carto_helper_spec.rb
|
752
755
|
- spec/helpers/geoblacklight/geoblacklight_helper_behavior_spec.rb
|
@@ -823,7 +826,7 @@ homepage: http://github.com/geoblacklight/geoblacklight
|
|
823
826
|
licenses:
|
824
827
|
- Apache 2.0
|
825
828
|
metadata: {}
|
826
|
-
post_install_message:
|
829
|
+
post_install_message:
|
827
830
|
rdoc_options: []
|
828
831
|
require_paths:
|
829
832
|
- lib
|
@@ -838,8 +841,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
838
841
|
- !ruby/object:Gem::Version
|
839
842
|
version: 2.5.2
|
840
843
|
requirements: []
|
841
|
-
rubygems_version: 3.
|
842
|
-
signing_key:
|
844
|
+
rubygems_version: 3.0.3
|
845
|
+
signing_key:
|
843
846
|
specification_version: 4
|
844
847
|
summary: A discovery platform for geospatial holdings
|
845
848
|
test_files:
|
@@ -882,6 +885,7 @@ test_files:
|
|
882
885
|
- spec/features/suppressed_records_spec.rb
|
883
886
|
- spec/features/tms_spec.rb
|
884
887
|
- spec/features/web_services_modal_spec.rb
|
888
|
+
- spec/features/xyz_spec.rb
|
885
889
|
- spec/fixtures/fgdc/harvard-g7064-s2-1834-k3.xml
|
886
890
|
- spec/fixtures/iso19139/stanford-cg357zz0321.xml
|
887
891
|
- spec/fixtures/mods/fb897vt9938.mods
|
@@ -928,6 +932,7 @@ test_files:
|
|
928
932
|
- spec/fixtures/solr_documents/umn_state_result1.json
|
929
933
|
- spec/fixtures/solr_documents/umn_state_result2.json
|
930
934
|
- spec/fixtures/solr_documents/uva_slug_colon.json
|
935
|
+
- spec/fixtures/solr_documents/xyz.json
|
931
936
|
- spec/helpers/arcgis_helper_spec.rb
|
932
937
|
- spec/helpers/carto_helper_spec.rb
|
933
938
|
- spec/helpers/geoblacklight/geoblacklight_helper_behavior_spec.rb
|