geoblacklight 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.circleci/config.yml +73 -36
- data/.rubocop.yml +5 -0
- data/.solr_wrapper +0 -1
- data/app/assets/images/blacklight/esri-globe.svg +37 -0
- data/app/assets/javascripts/geoblacklight/modules/metadata.js +3 -3
- data/app/assets/javascripts/geoblacklight/modules/metadata_download_button.js +7 -12
- data/app/assets/javascripts/geoblacklight/modules/results.js +1 -0
- data/app/assets/stylesheets/geoblacklight/modules/sidebar.scss +1 -1
- data/app/helpers/arcgis_helper.rb +12 -0
- data/app/models/concerns/geoblacklight/solr_document.rb +1 -0
- data/app/models/concerns/geoblacklight/solr_document/arcgis.rb +10 -0
- data/app/views/catalog/_exports.html.erb +5 -0
- data/app/views/catalog/_results_pagination.html.erb +12 -0
- data/app/views/relation/_descendants.html.erb +1 -1
- data/config/locales/geoblacklight.en.yml +1 -0
- data/geoblacklight.gemspec +1 -1
- data/lib/generators/geoblacklight/templates/settings.yml +3 -0
- data/lib/geoblacklight/references.rb +8 -0
- data/lib/geoblacklight/relation/relation_response.rb +2 -1
- data/lib/geoblacklight/version.rb +1 -1
- data/solr/conf/schema.xml +0 -2
- data/spec/features/esri_viewer_spec.rb +2 -0
- data/spec/features/exports_spec.rb +8 -0
- data/spec/features/search_spec.rb +4 -3
- data/spec/fixtures/solr_documents/README.md +2 -0
- data/spec/fixtures/solr_documents/princeton-child3.json +30 -0
- data/spec/fixtures/solr_documents/princeton-child4.json +30 -0
- data/spec/helpers/arcgis_helper_spec.rb +14 -0
- data/spec/lib/geoblacklight/references_spec.rb +17 -0
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +8 -0
- data/spec/views/catalog/_results_pagination.html.erb_spec.rb +9 -0
- data/template.rb +8 -0
- metadata +16 -5
- data/lib/geoblacklight/controller_override.rb +0 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5dd207513392b135cd04dea8c0fdbbf40b40d1425c4bad53b540a8615fc02b8c
|
4
|
+
data.tar.gz: 6dcb428b01d0263e35d9430b413d6b942a96abbcc9175edc7fc8fea473b9441d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04f0c521ea0b81db223fb40194a98ec3f6b857e06b3075b62bb6b6e94cda2fb75ed54f2d0c7efc6129f5e813c86f543a43ce2405988a92de36f3458276e64ed0
|
7
|
+
data.tar.gz: 3603a9e415bf1748b91211672cba7aaec798db08694a00383f7f103980db8bc09af52c5385ee38b911affb19d3299da237882db0e4674e705d2005a1de5dd570
|
data/.circleci/config.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
version: 2
|
3
3
|
jobs:
|
4
|
-
|
4
|
+
rails_5_2_3:
|
5
5
|
working_directory: ~/geoblacklight
|
6
6
|
docker:
|
7
7
|
- image: circleci/ruby:2.5.1-node-browsers
|
@@ -13,36 +13,57 @@ jobs:
|
|
13
13
|
BUNDLE_PATH: /home/circleci/geoblacklight/vendor/bundle
|
14
14
|
CI: true
|
15
15
|
RAILS_ENV: test
|
16
|
-
RAILS_VERSION: 5.2.
|
16
|
+
RAILS_VERSION: 5.2.3
|
17
|
+
- image: solr:7-alpine
|
18
|
+
command: bin/solr -cloud -noprompt -f -p 8983
|
17
19
|
steps:
|
18
20
|
- checkout
|
21
|
+
# Update chrome
|
22
|
+
- run: wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
|
23
|
+
- run: sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
|
24
|
+
- run: sudo apt-get update
|
25
|
+
- run: sudo apt-get -y install google-chrome-stable
|
19
26
|
# Restore bundle cache
|
20
27
|
- type: cache-restore
|
21
28
|
name: Restore bundle cache
|
22
29
|
key: geoblacklight-bundle-5-2-0-{{ checksum "geoblacklight.gemspec" }}-{{ checksum "Gemfile" }}-3f5eff
|
23
30
|
# Install gems
|
24
31
|
- run: bundle check || bundle install
|
25
|
-
# Restore cached Solr
|
26
|
-
- type: cache-restore
|
27
|
-
name: Restore solr cache
|
28
|
-
key: geoblacklight-solr{{ checksum ".solr_wrapper" }}
|
29
|
-
# Run solr wrapper, which downloads correct solr version if not cached
|
30
|
-
- run: bundle exec rake solr:clean
|
31
|
-
# Cache Solr
|
32
|
-
- type: cache-save
|
33
|
-
name: Store solr cache
|
34
|
-
key: geoblacklight-solr{{ checksum ".solr_wrapper" }}
|
35
|
-
paths:
|
36
|
-
- tmp/solr
|
37
32
|
# Run the test suites
|
38
|
-
- run: bundle exec rake
|
33
|
+
- run: bundle exec rake engine_cart:generate
|
34
|
+
- run:
|
35
|
+
name: Wait for Solr
|
36
|
+
command: dockerize -wait tcp://localhost:8983 -timeout 1m
|
37
|
+
- run:
|
38
|
+
name: Load config into solr
|
39
|
+
command: |
|
40
|
+
cd .internal_test_app/solr/conf
|
41
|
+
zip -1 -r solr_config.zip ./*
|
42
|
+
curl -H "Content-type:application/octet-stream" --data-binary @solr_config.zip "http://localhost:8983/solr/admin/configs?action=UPLOAD&name=solrconfig"
|
43
|
+
curl -H 'Content-type: application/json' http://localhost:8983/api/collections/ -d '{create: {name: blacklight-core, config: solrconfig, numShards: 1}}'
|
44
|
+
- run:
|
45
|
+
name: Seed Solr
|
46
|
+
command: |
|
47
|
+
cd .internal_test_app
|
48
|
+
bundle exec rake geoblacklight:index:seed
|
49
|
+
bundle exec rake geoblacklight:downloads:mkdir
|
50
|
+
- run:
|
51
|
+
name: Compile the assets for Webpack
|
52
|
+
command: |
|
53
|
+
cd .internal_test_app
|
54
|
+
rm config/webpacker.yml
|
55
|
+
bundle exec rails webpacker:install
|
56
|
+
bundle exec rails webpacker:compile
|
57
|
+
- run:
|
58
|
+
name: Run the RSpec test suites
|
59
|
+
command: bundle exec rake geoblacklight:coverage
|
39
60
|
# Store bundle cache
|
40
61
|
- type: cache-save
|
41
62
|
name: Store bundle cache
|
42
63
|
key: geoblacklight-bundle-5-2-0-{{ checksum "geoblacklight.gemspec" }}-{{ checksum "Gemfile" }}-3f5eff
|
43
64
|
paths:
|
44
65
|
- /home/circleci/geoblacklight/vendor/bundle
|
45
|
-
|
66
|
+
rails_5_1_7:
|
46
67
|
working_directory: ~/geoblacklight
|
47
68
|
docker:
|
48
69
|
- image: circleci/ruby:2.4.4-node-browsers
|
@@ -52,33 +73,49 @@ jobs:
|
|
52
73
|
GEM_HOME: /home/circleci/geoblacklight/vendor/bundle
|
53
74
|
BUNDLE_PATH: /home/circleci/geoblacklight/vendor/bundle
|
54
75
|
RAILS_ENV: test
|
55
|
-
RAILS_VERSION: 5.1.
|
76
|
+
RAILS_VERSION: 5.1.7
|
77
|
+
- image: solr:7-alpine
|
78
|
+
command: bin/solr -cloud -noprompt -f -p 8983
|
56
79
|
steps:
|
57
80
|
- checkout
|
58
81
|
# Restore bundle cache
|
59
82
|
- type: cache-restore
|
60
83
|
name: Restore bundle cache
|
61
|
-
key: geoblacklight-bundle-5-1-
|
84
|
+
key: geoblacklight-bundle-5-1-7-{{ checksum "Gemfile" }}-{{ checksum "geoblacklight.gemspec" }}-3f5eff
|
62
85
|
# Install gems and run specs
|
63
86
|
- run: bundle check || bundle install
|
64
|
-
# Restore cached Solr
|
65
|
-
- type: cache-restore
|
66
|
-
name: Restore solr cache
|
67
|
-
key: geoblacklight-solr{{ checksum ".solr_wrapper" }}
|
68
|
-
# Run solr wrapper, which downloads correct solr version if not cached
|
69
|
-
- run: bundle exec rake solr:clean
|
70
|
-
# Cache Solr
|
71
|
-
- type: cache-save
|
72
|
-
name: Store solr cache
|
73
|
-
key: geoblacklight-solr{{ checksum ".solr_wrapper" }}
|
74
|
-
paths:
|
75
|
-
- tmp/solr
|
76
87
|
# Run the test suites
|
77
|
-
- run: bundle exec rake
|
88
|
+
- run: bundle exec rake engine_cart:generate
|
89
|
+
- run:
|
90
|
+
name: Wait for Solr
|
91
|
+
command: dockerize -wait tcp://localhost:8983 -timeout 1m
|
92
|
+
- run:
|
93
|
+
name: Load config into solr
|
94
|
+
command: |
|
95
|
+
cd .internal_test_app/solr/conf
|
96
|
+
zip -1 -r solr_config.zip ./*
|
97
|
+
curl -H "Content-type:application/octet-stream" --data-binary @solr_config.zip "http://localhost:8983/solr/admin/configs?action=UPLOAD&name=solrconfig"
|
98
|
+
curl -H 'Content-type: application/json' http://localhost:8983/api/collections/ -d '{create: {name: blacklight-core, config: solrconfig, numShards: 1}}'
|
99
|
+
- run:
|
100
|
+
name: Seed Solr
|
101
|
+
command: |
|
102
|
+
cd .internal_test_app
|
103
|
+
bundle exec rake geoblacklight:index:seed
|
104
|
+
bundle exec rake geoblacklight:downloads:mkdir
|
105
|
+
- run:
|
106
|
+
name: Compile the assets for Webpack
|
107
|
+
command: |
|
108
|
+
cd .internal_test_app
|
109
|
+
rm config/webpacker.yml
|
110
|
+
bundle exec rails webpacker:install
|
111
|
+
bundle exec rails webpacker:compile
|
112
|
+
- run:
|
113
|
+
name: Run the RSpec test suites
|
114
|
+
command: bundle exec rake geoblacklight:coverage
|
78
115
|
# Store bundle cache
|
79
116
|
- type: cache-save
|
80
117
|
name: Store bundle cache
|
81
|
-
key: geoblacklight-bundle-5-1-
|
118
|
+
key: geoblacklight-bundle-5-1-7-{{ checksum "Gemfile" }}-{{ checksum "geoblacklight.gemspec" }}-3f5eff
|
82
119
|
paths:
|
83
120
|
- /home/circleci/geoblacklight/vendor/bundle
|
84
121
|
rubocop:
|
@@ -94,7 +131,7 @@ jobs:
|
|
94
131
|
# Restore bundle cache
|
95
132
|
- type: cache-restore
|
96
133
|
name: Restore bundle cache
|
97
|
-
key: geoblacklight-bundle-5-2-
|
134
|
+
key: geoblacklight-bundle-5-2-3-{{ checksum "geoblacklight.gemspec" }}-{{ checksum "Gemfile" }}-3f5eff
|
98
135
|
# Install gems and run rubocop
|
99
136
|
- run: bundle check || bundle install
|
100
137
|
- run: bundle exec rake rubocop
|
@@ -102,8 +139,8 @@ workflows:
|
|
102
139
|
version: 2
|
103
140
|
build_accept_deploy:
|
104
141
|
jobs:
|
105
|
-
-
|
106
|
-
-
|
142
|
+
- rails_5_2_3
|
143
|
+
- rails_5_1_7
|
107
144
|
- rubocop:
|
108
145
|
requires:
|
109
|
-
-
|
146
|
+
- rails_5_2_3
|
data/.rubocop.yml
CHANGED
@@ -90,3 +90,8 @@ Style/StringLiterals:
|
|
90
90
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
|
91
91
|
Enabled: true
|
92
92
|
EnforcedStyle: single_quotes
|
93
|
+
|
94
|
+
Style/SafeNavigation:
|
95
|
+
Exclude:
|
96
|
+
- 'app/models/concerns/geoblacklight/solr_document/arcgis.rb'
|
97
|
+
- 'app/models/concerns/geoblacklight/solr_document.rb'
|
data/.solr_wrapper
CHANGED
@@ -0,0 +1,37 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<svg width="100px" height="100px" viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
+
<!-- Generator: Sketch 53 (72520) - https://sketchapp.com -->
|
4
|
+
<title>Artboard</title>
|
5
|
+
<desc>Created with Sketch.</desc>
|
6
|
+
<defs>
|
7
|
+
<radialGradient cx="33.9966831%" cy="40.7249699%" fx="33.9966831%" fy="40.7249699%" r="35.4574559%" gradientTransform="translate(0.339967,0.407250),scale(1.000000,0.987952),translate(-0.339967,-0.407250)" id="radialGradient-1">
|
8
|
+
<stop stop-color="#B9E0F7" offset="0%"></stop>
|
9
|
+
<stop stop-color="#007AC2" offset="100%"></stop>
|
10
|
+
</radialGradient>
|
11
|
+
<radialGradient cx="71.4669908%" cy="60.4904617%" fx="71.4669908%" fy="60.4904617%" r="97.2002592%" gradientTransform="translate(0.714670,0.604905),scale(1.000000,0.804348),translate(-0.714670,-0.604905)" id="radialGradient-2">
|
12
|
+
<stop stop-color="#B2D234" offset="0%"></stop>
|
13
|
+
<stop stop-color="#009E46" offset="96.067798%"></stop>
|
14
|
+
<stop stop-color="#009E46" offset="100%"></stop>
|
15
|
+
</radialGradient>
|
16
|
+
<radialGradient cx="95.6682687%" cy="-55.7120357%" fx="95.6682687%" fy="-55.7120357%" r="150.383451%" gradientTransform="translate(0.956683,-0.557120),scale(1.000000,0.909091),translate(-0.956683,0.557120)" id="radialGradient-3">
|
17
|
+
<stop stop-color="#B2D234" offset="0%"></stop>
|
18
|
+
<stop stop-color="#009E46" offset="96.067798%"></stop>
|
19
|
+
<stop stop-color="#009E46" offset="100%"></stop>
|
20
|
+
</radialGradient>
|
21
|
+
<radialGradient cx="-3.51581595%" cy="2.76117299%" fx="-3.51581595%" fy="2.76117299%" r="143.089934%" gradientTransform="translate(-0.035158,0.027612),scale(1.000000,0.636364),translate(0.035158,-0.027612)" id="radialGradient-4">
|
22
|
+
<stop stop-color="#B2D234" offset="0%"></stop>
|
23
|
+
<stop stop-color="#009E46" offset="96.067798%"></stop>
|
24
|
+
<stop stop-color="#009E46" offset="100%"></stop>
|
25
|
+
</radialGradient>
|
26
|
+
</defs>
|
27
|
+
<g id="Artboard" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
28
|
+
<g id="ESRI_Logo" transform="translate(2.000000, 1.000000)" fill-rule="nonzero">
|
29
|
+
<path d="M96,49.0014998 C96,75.5057635 74.511759,97 47.9985002,97 C21.4912407,97 0,75.5057635 0,49.0014998 C0,22.4882449 21.4912407,1 47.9985002,1 C74.511759,1 96,22.4882449 96,49.0014998" id="path252" fill="#FFFFFF"></path>
|
30
|
+
<path d="M7,49.4999981 C7,72.4202021 25.3612253,91 47.9985154,91 L47.9985154,91 C70.6417476,91 89,72.4202021 89,49.4999981 L89,49.4999981 C89,26.5828072 70.6417476,8 47.9985154,8 L47.9985154,8 C25.3612253,8 7,26.5828072 7,49.4999981" id="path300" fill="url(#radialGradient-1)"></path>
|
31
|
+
<path d="M30.854383,17.8626615 C27.6666083,17.9981284 24.6136533,18.4353159 21.5696907,18.9002096 L21.5696907,18.9002096 C12.9471185,26.4247396 7.37450381,37.5083343 7,49.949667 L7,49.949667 C9.43576961,52.5851007 12.6535072,58.5517684 16.3655849,62 L16.3655849,62 C16.8569353,61.7751224 17.3902268,61.5843623 17.9594761,61.4057958 L17.9594761,61.4057958 C16.1378867,59.2321796 13.5912655,56.350442 13.2077732,55.0234904 L13.2077732,55.0234904 C11.3322334,48.5241954 13.5043547,42.4405342 18.1961589,41.9602432 L18.1961589,41.9602432 C22.4025844,41.526136 26.0127757,35.0945746 28.9788704,30.8766486 L28.9788704,30.8766486 C35.0787855,22.2037374 44.4533589,23.6507627 43.9829597,19.3096868 L43.9829597,19.3096868 C43.4436965,16.7727771 41.9816353,16.0000024 40.1211022,16.0000024 L40.1211022,16.0000024 C37.3227876,15.9976147 33.6317037,17.7518245 30.854383,17.8626615" id="path328" fill="url(#radialGradient-2)"></path>
|
32
|
+
<path d="M20.1941374,58.041038 C19.5909024,58.2191522 19.0054105,58.3849809 18.446533,58.5569544 L18.446533,58.5569544 C17.9438353,58.698216 17.5535085,58.9039657 16.8733885,59.1496404 L16.8733885,59.1496404 C15.377133,59.843663 14.2919017,60.9061997 14.0375982,63.175603 L14.0375982,63.175603 C13.5822126,67.2936931 17.3524302,70.5242885 20.5282805,71.4701306 L20.5282805,71.4701306 C24.5587147,72.6677841 24.8958162,71.2674493 27.0100952,74.2339476 L27.0100952,74.2339476 C28.4856531,76.3068144 28.7724842,80.1546628 29.5265269,82.6850908 L29.5265269,82.6850908 C29.949385,84.1007835 30.5200924,85.5072591 31.2031632,86.8860992 L31.2031632,86.8860992 C34.0832881,88.2772209 37.1379265,89.3366852 40.3344782,90 L40.3344782,90 C41.1269616,85.1203228 40.7691624,78.5332204 41.8189077,75.686489 L41.8189077,75.686489 C43.9745857,69.8579013 45.1899233,67.2875484 42.2831381,61.2716373 L42.2831381,61.2716373 C35.8723183,59.3922387 33.9295257,58.7964843 27.47139,57.4207165 L27.47139,57.4207165 C26.1555113,57.1412616 25.3334589,57 24.5942007,57 L24.5942007,57 C23.4468728,57 22.5006194,57.3408706 20.1941374,58.041038" id="path356" fill="url(#radialGradient-3)"></path>
|
33
|
+
<path d="M59.4915286,26.3191468 C57.587274,29.0524585 50.9059983,29.8009009 48.7633416,32.8755021 L48.7633416,32.8755021 C47.0945115,35.276502 48.820082,39.994683 47.3656944,42.7160177 L47.3656944,42.7160177 C46.6951832,43.970408 47.0051098,47.6108299 47.8216206,48.799353 L47.8216206,48.799353 C50.393428,52.5595285 54.6697777,50.4698778 57.8852786,51.8230591 L57.8852786,51.8230591 C61.8099842,53.469634 62.2599937,58.0411162 65.5142113,61.3881485 L65.5142113,61.3881485 C68.7743879,64.738176 61.354058,69.8994327 67.4125068,82.078084 L67.4125068,82.078084 C68.0591778,83.3863606 68.8131047,84.344366 69.620725,85 L69.620725,85 C73.7182944,82.4403283 77.3241329,79.1771228 80.2893096,75.3780291 L80.2893096,75.3780291 C81.2071634,69.2258353 79.1390088,67.2589295 81.7256928,61.6276518 L81.7256928,61.6276518 C83.3200208,58.1548794 86.0527044,52.1433939 89,48.0658827 L89,48.0658827 C88.4993286,36.6596237 83.400482,26.4568599 75.5152661,19.2837927 L75.5152661,19.2837927 C74.7762119,19.4902443 73.8345178,19.5262873 72.5501164,19.2933897 L72.5501164,19.2933897 C71.4474961,19.0866981 70.4551362,19 69.5551635,19 L69.5551635,19 C63.4728784,19 61.66098,23.2062427 59.4915286,26.3197621" id="path384" fill="url(#radialGradient-4)"></path>
|
34
|
+
<path d="M43.559617,94.0645708 C42.1892779,93.272957 40.4711118,92.0462625 38.8668868,90.9766786 C38.2012055,91.5688775 37.6644419,92.4390466 37.1336976,93.1369948 C38.9718357,93.7714903 41.4486359,93.8258783 43.559617,94.0645708 M36.3241142,89.1124618 C33.3885343,86.9068262 26.1260433,79.9666257 23.1154717,75.7819594 C22.0090299,76.4376071 20.7766279,78.2232686 19.1754028,78.5314517 C18.5457057,78.6494096 17.1303902,78.8245283 16.7105909,78.6494096 C16.2937683,78.4741658 16.8065476,77.5828485 17.2593273,76.9876267 C18.0419496,75.9573242 19.184395,74.6188348 20.8575885,73.3135812 C17.2773194,68.026099 15.5771416,64.1647261 13.1423178,57.7895307 C11.7359945,58.6748062 10.7134901,59.4633972 9.48708412,60.4483802 C9.07328474,60.7746926 7.93683158,60.9831722 7.38509907,60.4846232 C6.38358294,59.5781994 6.3685908,57.985911 7.77491025,56.9767568 C8.35363095,56.5598016 11.2142463,54.5686873 11.8829237,54.0067013 C10.1227773,48.894459 8.65048542,42.1748256 8.26067424,38.6911265 C7.08824072,39.71841 5.43903927,40.8876975 4.97424025,41.2049491 C4.30858607,41.3954204 3.86180243,41.1807741 3.66989294,41.1474211 C3.00121552,48.3776753 3.7718457,56.3391174 5.90681114,63.5270711 C9.57404087,75.8877009 19.8590724,87.6742571 33.7393613,92.0583344 C34.0632078,91.5718847 35.6584367,89.7106908 36.3241142,89.1124501 M7.83188272,34.9353935 C7.65796535,32.2614375 7.44507152,28.5994796 7.44507152,28.5994796 C5.49601173,32.8717658 4.32957429,35.4460144 3.78683784,40.4343781 C5.15117698,37.9991146 7.83188272,34.9353935 7.83188272,34.9353935 M28.659816,4.35258999 C36.7229214,0.989750455 44.5701292,-0.856336954 53.6317275,0.391509702 C54.639263,0.53049477 54.5553024,1.39159918 53.4849185,1.40065994 L52.207509,1.43401292 C44.9090609,1.54882684 34.1742496,3.8843868 28.6209325,7.05385325 C28.5041078,10.7853057 29.2056493,16.716352 29.9492913,21.3904869 C34.9958523,19.2513229 42.7980798,17.0547519 48.7232198,16.3991042 C45.3588445,12.7975722 40.7830553,9.38940931 40.2373189,8.9936063 C39.6885592,8.59779938 39.4157162,7.92402233 39.4157162,7.05385325 C39.4936769,5.42832902 40.8790081,5.22589518 41.6226501,5.41926826 C44.0874582,4.93281857 46.5402741,4.39500373 50.717256,4.51888232 C68.3697235,3.74237887 84.4989305,13.8037035 90.6549565,25.2760348 C106.250396,50.127207 90.6597626,84.41125 70.2408187,93.5419796 C61.5090397,97.4486758 54.0186589,99.131607 40.2133075,97.1918539 C26.3810144,95.2460591 15.0734785,88.4327601 6.29072314,74.1112329 C-4.52804876,56.4631248 1.56200871,35.9023644 3.08227309,31.5908005 C9.59512599,16.1150923 20.2699687,7.91495766 28.6599129,4.35270715 M10.4107326,23.158023 C10.1739668,25.0192169 10.4203449,28.4545699 10.8845044,32.5576581 C14.6386638,29.1736703 21.8921858,24.7593761 27.9552551,22.0642679 C27.2535934,17.4082623 26.5069553,9.98161215 26.584916,8.00560435 C20.9776264,11.1055802 14.8216004,17.3387678 10.3117798,23.7290698 M11.2353353,36.301198 C11.7660757,39.99035 13.5232298,47.9457464 15.1064628,51.982363 C18.8636492,49.1331632 27.3675384,43.845681 32.1801902,41.706517 C30.4980238,35.5277135 29.3645745,31.6270592 28.423027,25.3908527 C21.6193157,28.4394634 14.4257932,33.1770471 11.2353353,36.301198 M16.5727547,55.5506592 C18.8036768,61.9621094 20.9596343,66.8537886 23.7752732,70.8904052 C27.0676839,68.0049468 33.8204188,63.4486486 38.9839247,60.9559782 C37.2837236,57.272868 34.827931,50.3870517 33.1187571,45.2294899 C26.4679711,48.519816 21.5023708,51.7255411 16.5727547,55.5506592 M25.8802582,73.6912588 C29.3795667,78.214325 34.8609153,83.9550211 38.6750742,87.1275104 C42.2853276,84.2027783 46.3753528,81.4714153 49.7787084,79.8066134 C46.8431285,75.2200984 42.5042253,68.5578681 40.6871025,64.4608256 C34.1742496,67.3704513 30.4770356,69.8087376 25.8802582,73.6912588 M40.9209885,89.1246704 C42.3093158,90.5386922 47.8116604,94.2097188 47.8116604,94.2097188 C51.4728902,94.369731 56.0966557,93.9347676 59.3980586,93.3546562 C57.5779398,91.2608116 53.0321349,84.7768479 51.6528036,82.5953834 C48.1325031,84.0819186 43.6766549,86.8193273 40.9209885,89.1246704 M63.2541978,92.4089508 C65.1103009,91.8076911 69.8360154,89.6473749 70.8195394,88.99475 C71.0534253,85.1545255 71.0145651,80.7946154 70.8586399,78.1841121 C65.8900434,78.1841121 58.8914227,79.649499 54.882362,81.3414949 C57.209237,85.1152478 60.417687,89.2727201 63.2543141,92.4089508 M73.4403928,87.5716596 C77.1705911,85.2270389 80.6758956,82.5319307 83.2186683,79.2899508 C81.0297265,78.7370295 76.1390907,78.0662753 73.713263,78.2233897 C73.713263,78.2233897 73.6352984,84.0819186 73.4403928,87.5716596 M84.3911018,77.7852823 C85.0957596,77.0752505 86.1512521,75.570582 86.5620515,74.6943711 C86.9728547,71.1321167 86.9848469,63.8293491 86.8349216,61.6992458 C82.5709829,59.9558887 75.9831655,58.5781216 71.1704904,58.2215923 C72.7357351,64.0076117 73.5183574,72.5189484 73.6352984,75.2926118 C75.9441851,75.5282815 81.7703685,76.7187212 84.3911018,77.7852823 M90.6490767,61.270207 C90.4540509,61.9439801 89.2787414,62.62078 88.730005,62.451582 C88.8108455,63.6480635 88.5349793,69.5942163 88.2232489,71.8874718 C89.0418555,70.192457 90.6070963,65.9836196 91.0778721,64.2040038 L91.7405495,61.5904776 C92.4002309,59.3667126 94.5381963,51.6892864 92.6011093,41.5886802 C90.4541711,30.3671289 86.4241183,26.3607253 85.0147989,24.5780905 C81.4345298,22.6171892 76.0191458,20.8375734 76.0191458,20.8375734 C80.9277737,27.5330395 82.6279554,30.6843767 85.5635353,38.6579024 C87.2667131,39.5492237 90.3552183,41.2744514 90.7390101,41.7488136 C91.0508839,42.1204494 91.05388,42.7912035 90.0853481,42.7760971 C89.2787414,42.7712542 87.7134968,41.9935518 86.5020829,41.6672355 C87.7914574,46.0120391 88.7899503,54.1245498 88.7149896,59.5600818 C88.7149896,59.5600818 90.8439822,60.5994489 90.6490767,61.270207 M82.4360459,20.8375734 C75.6293346,12.4380278 60.2227814,5.29237072 43.0710701,6.36799649 C46.9032172,8.91505105 50.0936752,12.7582985 52.8883258,15.924746 C57.1702566,15.528939 66.1659097,16.2419937 69.5482732,17.1846762 C68.9725525,16.4988156 68.2648948,15.8189967 68.0819813,15.4141251 C67.6022134,14.374758 68.7566587,14.151172 69.6832103,14.7463899 C70.8586399,15.501745 72.2109636,16.4051499 73.2844676,17.5079697 C75.2725077,17.9581607 80.1661435,19.6471337 82.4360459,20.8375734 M86.7959413,58.7110649 C86.5020829,53.2936584 85.6804802,46.0573585 83.686444,41.0206524 C78.4059932,38.8845113 71.1914786,37.5490408 64.855543,37.4886149 C66.8105989,42.0811717 69.0834975,49.758598 70.1929625,54.6986195 C74.7687516,55.2515369 81.9262937,56.5567905 86.7959413,58.7110649 M71.9531127,19.9643815 C67.182418,19.0942124 60.2227814,18.5382721 55.0592755,18.852501 C58.5795761,23.7653284 61.161329,28.0436565 63.5841567,34.1408818 C70.1150018,34.304038 78.99071,36.2679622 82.6309283,37.7091781 C80.4600018,31.8748164 76.333973,24.4662956 71.9531127,19.9643815 M42.0335697,59.5298688 C49.8178089,55.9253139 58.3636784,54.3028125 66.9665203,54.5384822 C64.6186571,46.3413743 63.2723062,42.5374046 61.2752739,37.5490408 C51.7158923,37.9659999 43.559834,40.3408336 36.1294256,43.8879815 C36.1294256,43.8879815 38.8671,52.7558475 42.0335697,59.5298688 M67.8480954,57.9859227 C58.1088042,57.868207 49.6079112,60.2157295 43.79672,63.0951422 C46.258528,68.4400313 51.1281756,75.5161979 52.9482944,78.4318653 C56.114768,77.2444485 59.5181198,76.3531311 62.1568452,75.9361759 C64.7985706,75.5222397 68.3158712,75.1324785 70.7027146,75.1747751 C70.270927,68.953675 69.5482732,64.7569212 67.8480954,57.9859227 M35.0259568,40.5160773 C42.066554,37.5037214 49.6978679,35.092629 59.9858955,34.2224599 C57.3651622,27.8865421 54.4715588,23.411822 51.0682031,19.3117566 C43.4848695,19.9251039 36.5612172,21.9857126 30.5761086,24.4783831 C31.4546837,29.1736703 33.1188773,34.8539365 35.0259568,40.5160773" id="path396" fill="#000000"></path>
|
35
|
+
</g>
|
36
|
+
</g>
|
37
|
+
</svg>
|
@@ -1,13 +1,13 @@
|
|
1
1
|
Blacklight.onLoad(function() {
|
2
|
-
$('#
|
2
|
+
$('#blacklight-modal').on('loaded.blacklight.blacklight-modal', function(e) {
|
3
3
|
$(e.target).find('.metadata-body').each(function(_i, el) {
|
4
4
|
$(el).parent().parent().addClass('metadata-modal');
|
5
5
|
});
|
6
6
|
$(this).find('.pill-metadata').each(function(i, element) {
|
7
|
-
GeoBlacklight.metadataDownloadButton(element);
|
7
|
+
GeoBlacklight.metadataDownloadButton(element, i);
|
8
8
|
});
|
9
9
|
});
|
10
|
-
$('#
|
10
|
+
$('#blacklight-modal').on('hidden.bs.modal', function(e) {
|
11
11
|
$(e.target).find('.metadata-body').each(function(_i, el) {
|
12
12
|
$(el).parent().parent().removeClass('metadata-modal');
|
13
13
|
});
|
@@ -11,13 +11,17 @@
|
|
11
11
|
/**
|
12
12
|
* Initialize with the DOM element
|
13
13
|
* @param {Element} el - <button>, <a>, or other jQuery selector
|
14
|
+
* @param {Number} i - index of metadata item
|
14
15
|
* @param {Object} options - Properties for the new instance
|
15
16
|
*/
|
16
|
-
initialize: function initialize(el, options) {
|
17
|
+
initialize: function initialize(el, i, options) {
|
17
18
|
L.Util.setOptions(this, options);
|
18
19
|
this.$el = $(el);
|
19
20
|
this.$download = $(this.target || this.$el.data('ref-download'));
|
20
|
-
this.
|
21
|
+
// On initialization only do this for the first one.
|
22
|
+
if (i === 0) {
|
23
|
+
this.setRefUrl();
|
24
|
+
}
|
21
25
|
this.configureHandler();
|
22
26
|
},
|
23
27
|
|
@@ -25,8 +29,7 @@
|
|
25
29
|
* Bind Elements to DOM element event listeners using jQuery
|
26
30
|
*/
|
27
31
|
configureHandler: function configureHandler() {
|
28
|
-
this.$el.on('click',this.
|
29
|
-
this.$el.on('click',L.Util.bind(this.setRefUrl, this));
|
32
|
+
this.$el.on('click', L.Util.bind(this.setRefUrl, this));
|
30
33
|
},
|
31
34
|
|
32
35
|
/**
|
@@ -41,14 +44,6 @@
|
|
41
44
|
this.$download.attr('href', refUrl);
|
42
45
|
}
|
43
46
|
},
|
44
|
-
|
45
|
-
/**
|
46
|
-
*
|
47
|
-
*/
|
48
|
-
onclick: function onclick(e) {
|
49
|
-
e.preventDefault();
|
50
|
-
$(this).tab('show');
|
51
|
-
}
|
52
47
|
});
|
53
48
|
|
54
49
|
global.GeoBlacklight.MetadataDownloadButton = MetadataDownloadButton;
|
@@ -69,6 +69,7 @@ Blacklight.onLoad(function() {
|
|
69
69
|
$('#sidebar').replaceWith($doc.find('#sidebar'));
|
70
70
|
$('#sortAndPerPage').replaceWith($doc.find('#sortAndPerPage'));
|
71
71
|
$('#appliedParams').replaceWith($doc.find('#appliedParams'));
|
72
|
+
$('#pagination').replaceWith($doc.find('#pagination'));
|
72
73
|
if ($('#map').next().length) {
|
73
74
|
$('#map').next().replaceWith($doc.find('#map').next());
|
74
75
|
} else {
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module ArcgisHelper
|
2
|
+
##
|
3
|
+
# Generates an ArcGIS.com viewer url with params that can open content
|
4
|
+
# directly
|
5
|
+
# See: https://doc.arcgis.com/en/arcgis-online/reference/use-url-parameters.htm
|
6
|
+
def arcgis_link(arcgis_urls)
|
7
|
+
params = URI.encode_www_form(
|
8
|
+
urls: arcgis_urls
|
9
|
+
)
|
10
|
+
Settings.ARCGIS_BASE_URL + '?' + params
|
11
|
+
end
|
12
|
+
end
|
@@ -6,6 +6,7 @@ module Geoblacklight
|
|
6
6
|
include Geoblacklight::SolrDocument::Finder
|
7
7
|
include Geoblacklight::SolrDocument::Carto
|
8
8
|
include Geoblacklight::SolrDocument::Inspection
|
9
|
+
include Geoblacklight::SolrDocument::Arcgis
|
9
10
|
|
10
11
|
delegate :download_types, to: :references
|
11
12
|
delegate :viewer_protocol, to: :item_viewer
|
@@ -4,3 +4,8 @@
|
|
4
4
|
<span class='geoblacklight geoblacklight-carto'></span><%= t('geoblacklight.tools.open_carto') %>
|
5
5
|
<% end %>
|
6
6
|
<% end %>
|
7
|
+
<% if document.arcgis_urls.present? %>
|
8
|
+
<%= link_to(arcgis_link(document.arcgis_urls)) do %>
|
9
|
+
<%= blacklight_icon('esri-globe') %> <%= t('geoblacklight.tools.open_arcgis') %>
|
10
|
+
<% end %>
|
11
|
+
<% end %>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<%# An override of a Blacklight template to provide a stable point to replace pagination https://github.com/projectblacklight/blacklight/blob/8b9041544553ce0dd0d979f9f39f78d94b30b46d/app/views/catalog/_results_pagination.html.erb %>
|
2
|
+
<div id="pagination">
|
3
|
+
<% if show_pagination? and @response.total_pages > 1 %>
|
4
|
+
<div class="row record-padding">
|
5
|
+
<div class="col-md-12">
|
6
|
+
<div class="pagination">
|
7
|
+
<%= paginate @response, :outer_window => 2, :theme => 'blacklight' %>
|
8
|
+
</div>
|
9
|
+
</div>
|
10
|
+
</div>
|
11
|
+
<% end %>
|
12
|
+
</div>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<% end %>
|
11
11
|
<% unless (@relations.descendants['numFound'].to_i <= 3) %>
|
12
12
|
<li class="list-group-item">
|
13
|
-
<%= link_to search_catalog_path({f: {"#{Settings.FIELDS.SOURCE}" => [@relations.
|
13
|
+
<%= link_to search_catalog_path({f: {"#{Settings.FIELDS.SOURCE}" => [@relations.link_id]}}) do %>
|
14
14
|
<%= t('geoblacklight.relations.browse_all', count: @relations.descendants['numFound']) %>
|
15
15
|
<% end %>
|
16
16
|
</li>
|
data/geoblacklight.gemspec
CHANGED
@@ -39,7 +39,7 @@ Gem::Specification.new do |spec|
|
|
39
39
|
spec.add_development_dependency 'engine_cart', '~> 2.0'
|
40
40
|
spec.add_development_dependency 'capybara', '>= 2.5.0'
|
41
41
|
spec.add_development_dependency 'selenium-webdriver'
|
42
|
-
spec.add_development_dependency '
|
42
|
+
spec.add_development_dependency 'webdrivers'
|
43
43
|
spec.add_development_dependency 'factory_bot_rails'
|
44
44
|
spec.add_development_dependency 'database_cleaner', '~> 1.3'
|
45
45
|
spec.add_development_dependency 'bixby'
|
@@ -4,6 +4,9 @@ APPLICATION_LOGO_URL: 'http://geoblacklight.org/images/geoblacklight-logo.png'
|
|
4
4
|
# Carto OneClick Service https://carto.com/engine/open-in-carto/
|
5
5
|
CARTO_ONECLICK_LINK: 'http://oneclick.carto.com/'
|
6
6
|
|
7
|
+
# ArcGIS Online Base URL
|
8
|
+
ARCGIS_BASE_URL: 'https://www.arcgis.com/home/webmap/viewer.html'
|
9
|
+
|
7
10
|
# Download path can be configured using this setting
|
8
11
|
#DOWNLOAD_PATH: "./tmp/cache/downloads"
|
9
12
|
|
@@ -67,6 +67,14 @@ module Geoblacklight
|
|
67
67
|
downloads_by_format
|
68
68
|
end
|
69
69
|
|
70
|
+
##
|
71
|
+
# Returns all of the Esri webservices for given set of references
|
72
|
+
def esri_webservices
|
73
|
+
%w[tiled_map_layer dynamic_map_layer feature_layer image_map_layer].map do |layer_type|
|
74
|
+
send(layer_type)
|
75
|
+
end.compact
|
76
|
+
end
|
77
|
+
|
70
78
|
private
|
71
79
|
|
72
80
|
##
|
data/solr/conf/schema.xml
CHANGED
@@ -125,7 +125,6 @@
|
|
125
125
|
<analyzer>
|
126
126
|
<tokenizer class="solr.StandardTokenizerFactory"/>
|
127
127
|
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_en.txt"/>
|
128
|
-
<filter class="solr.StandardFilterFactory"/>
|
129
128
|
<filter class="solr.LowerCaseFilterFactory"/>
|
130
129
|
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
|
131
130
|
</analyzer>
|
@@ -135,7 +134,6 @@
|
|
135
134
|
<fieldType class="solr.TextField" name="textSuggest" positionIncrementGap="100">
|
136
135
|
<analyzer>
|
137
136
|
<tokenizer class="solr.KeywordTokenizerFactory"/>
|
138
|
-
<filter class="solr.StandardFilterFactory"/>
|
139
137
|
<filter class="solr.LowerCaseFilterFactory"/>
|
140
138
|
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
|
141
139
|
</analyzer>
|
@@ -7,11 +7,13 @@ feature 'feature_layer reference', js: true do
|
|
7
7
|
expect(page).to have_css 'img.leaflet-image-layer', visible: true
|
8
8
|
end
|
9
9
|
scenario 'displays dynamic layer (all layers)' do
|
10
|
+
pending 'external service disabled cors access'
|
10
11
|
visit solr_document_path '90f14ff4-1359-4beb-b931-5cb41d20ab90'
|
11
12
|
expect(page).to have_css '.leaflet-control-zoom', visible: true
|
12
13
|
expect(page).to have_css 'img.leaflet-image-layer', visible: true
|
13
14
|
end
|
14
15
|
scenario 'displays dynamic layer (single layer)' do
|
16
|
+
pending 'external service disabled cors access'
|
15
17
|
visit solr_document_path '4669301e-b4b2-4c8b-bf40-01b968a2865b'
|
16
18
|
expect(page).to have_css '.leaflet-control-zoom', visible: true
|
17
19
|
expect(page).to have_css 'img.leaflet-image-layer', visible: true
|
@@ -10,6 +10,14 @@ feature 'Export features' do
|
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
13
|
+
feature 'when esri web services are available' do
|
14
|
+
feature 'Open in ArcGIS Online' do
|
15
|
+
scenario 'shows up in tools' do
|
16
|
+
visit solr_document_path '90f14ff4-1359-4beb-b931-5cb41d20ab90'
|
17
|
+
expect(page).to have_css 'li.exports a', text: 'Open in ArcGIS Online'
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
13
21
|
feature 'when restricted or no wfs' do
|
14
22
|
scenario 'is not in tools' do
|
15
23
|
visit solr_document_path 'princeton-02870w62c'
|
@@ -6,8 +6,9 @@ feature 'Search' do
|
|
6
6
|
expect(page).to have_css '.document', count: 1
|
7
7
|
end
|
8
8
|
|
9
|
-
scenario 'When searching child records from a parent record, supressed records are not hidden' do
|
10
|
-
visit '
|
11
|
-
|
9
|
+
scenario 'When searching child records from a parent record, supressed records are not hidden', js: true do
|
10
|
+
visit '/catalog/princeton-1r66j405w'
|
11
|
+
click_link 'Browse all 4 records...'
|
12
|
+
expect(page).to have_css '.document', count: 4
|
12
13
|
end
|
13
14
|
end
|
@@ -27,6 +27,8 @@ If you add a new document, please add it to the table below, and indicate its pu
|
|
27
27
|
| no_spatial |File without geometry type or solr_geometry (will cause error)|
|
28
28
|
| princeton-child1.json | Child record for testing the `suppressed_b` property |
|
29
29
|
| princeton-child2.json | Child record for testing the `suppressed_b` property |
|
30
|
+
| princeton-child3.json | Child record for testing the `suppressed_b` property |
|
31
|
+
| princeton-child4.json | Child record for testing the `suppressed_b` property |
|
30
32
|
| princeton-parent.json | Parent record for testing the `suppressed_b` property |
|
31
33
|
| public_direct_download | includes a tentative `dcat_distribution_sm` property |
|
32
34
|
| public_iiif_princeton |Scanned map with IIIF|
|
@@ -0,0 +1,30 @@
|
|
1
|
+
{
|
2
|
+
"call_number_s": "HMC04 (Princeton)",
|
3
|
+
"dc_creator_sm": [
|
4
|
+
"Sanborn Map Company"
|
5
|
+
],
|
6
|
+
"dc_description_s": "Title taken from sheet 1 of 1927 map. \"Feb. 1885.\" Includes location map and key. Oriented with the north to the upper left.",
|
7
|
+
"dc_format_s": "TIFF",
|
8
|
+
"dc_identifier_s": "ark:/88435/n009w382v",
|
9
|
+
"dc_language_s": "eng",
|
10
|
+
"dc_publisher_s": "New York : Sanborn Map & Publishing Co., Limited, 1885.",
|
11
|
+
"dc_rights_s": "Public",
|
12
|
+
"dc_subject_sm": [
|
13
|
+
"Real property-New Jersey-Princeton-Maps",
|
14
|
+
"Princeton (N.J.)-Maps"
|
15
|
+
],
|
16
|
+
"dc_title_s": "Princeton, Mercer County, New Jersey (Sheet 3)",
|
17
|
+
"dct_provenance_s": "Princeton",
|
18
|
+
"dct_references_s": "{\"http://schema.org/url\":\"https://catalog.princeton.edu/catalog/4266648\",\"http://schema.org/downloadUrl\":\"https://figgy.princeton.edu/downloads/b6ba3091-fcf4-4d2d-9d6a-df7df5c8c588/file/ff89fcc8-e61b-4b27-938f-a03e63d4f5f1\",\"http://schema.org/thumbnailUrl\":\"https://figgy.princeton.edu/downloads/b6ba3091-fcf4-4d2d-9d6a-df7df5c8c588/file/0cb6b6c7-bce2-46a8-8c79-2864c7ec5459\",\"http://iiif.io/api/image\":\"https://libimages1.princeton.edu/loris/figgy_prod/5a%2F20%2F58%2F5a20585db50d44959fe5ae44821fd174%2Fintermediate_file.jp2/info.json\",\"http://iiif.io/api/presentation#manifest\":\"https://figgy.princeton.edu/concern/scanned_maps/2806e4cf-effc-4827-b116-952dfe776d14/manifest\"}",
|
19
|
+
"dc_source_sm": [
|
20
|
+
"princeton-1r66j405w"
|
21
|
+
],
|
22
|
+
"geoblacklight_version": "1.0",
|
23
|
+
"layer_geom_type_s": "Image",
|
24
|
+
"layer_id_s": "public-figgy:p-b6ba3091-fcf4-4d2d-9d6a-df7df5c8c598",
|
25
|
+
"layer_modified_dt": "2018-06-20T22:23:54Z",
|
26
|
+
"layer_slug_s": "princeton-n009w382v-fake1",
|
27
|
+
"solr_geom": "ENVELOPE(-74.68, -74.63, 40.37, 40.33)",
|
28
|
+
"suppressed_b": true,
|
29
|
+
"uuid": "princeton-n009w382v-fake1"
|
30
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
{
|
2
|
+
"call_number_s": "HMC04 (Princeton)",
|
3
|
+
"dc_creator_sm": [
|
4
|
+
"Sanborn Map Company"
|
5
|
+
],
|
6
|
+
"dc_description_s": "Title taken from sheet 1 of 1927 map. \"Feb. 1885.\" Includes location map and key. Oriented with the north to the upper left.",
|
7
|
+
"dc_format_s": "TIFF",
|
8
|
+
"dc_identifier_s": "ark:/88435/n009w382v",
|
9
|
+
"dc_language_s": "eng",
|
10
|
+
"dc_publisher_s": "New York : Sanborn Map & Publishing Co., Limited, 1885.",
|
11
|
+
"dc_rights_s": "Public",
|
12
|
+
"dc_subject_sm": [
|
13
|
+
"Real property-New Jersey-Princeton-Maps",
|
14
|
+
"Princeton (N.J.)-Maps"
|
15
|
+
],
|
16
|
+
"dc_title_s": "Princeton, Mercer County, New Jersey (Sheet 4)",
|
17
|
+
"dct_provenance_s": "Princeton",
|
18
|
+
"dct_references_s": "{\"http://schema.org/url\":\"https://catalog.princeton.edu/catalog/4266648\",\"http://schema.org/downloadUrl\":\"https://figgy.princeton.edu/downloads/b6ba3091-fcf4-4d2d-9d6a-df7df5c8c588/file/ff89fcc8-e61b-4b27-938f-a03e63d4f5f1\",\"http://schema.org/thumbnailUrl\":\"https://figgy.princeton.edu/downloads/b6ba3091-fcf4-4d2d-9d6a-df7df5c8c588/file/0cb6b6c7-bce2-46a8-8c79-2864c7ec5459\",\"http://iiif.io/api/image\":\"https://libimages1.princeton.edu/loris/figgy_prod/5a%2F20%2F58%2F5a20585db50d44959fe5ae44821fd174%2Fintermediate_file.jp2/info.json\",\"http://iiif.io/api/presentation#manifest\":\"https://figgy.princeton.edu/concern/scanned_maps/2806e4cf-effc-4827-b116-952dfe776d14/manifest\"}",
|
19
|
+
"dc_source_sm": [
|
20
|
+
"princeton-1r66j405w"
|
21
|
+
],
|
22
|
+
"geoblacklight_version": "1.0",
|
23
|
+
"layer_geom_type_s": "Image",
|
24
|
+
"layer_id_s": "public-figgy:p-b6ba3091-fcf4-4d2d-9d6a-df7df5c8c589",
|
25
|
+
"layer_modified_dt": "2018-06-20T22:23:54Z",
|
26
|
+
"layer_slug_s": "princeton-n009w382v-fake2",
|
27
|
+
"solr_geom": "ENVELOPE(-74.68, -74.63, 40.37, 40.33)",
|
28
|
+
"suppressed_b": true,
|
29
|
+
"uuid": "princeton-n009w382v-fake2"
|
30
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe ArcgisHelper, type: :helper do
|
4
|
+
describe '#arcgis_link' do
|
5
|
+
let(:application_name) { 'My GeoBlacklight Deployment' }
|
6
|
+
|
7
|
+
it 'creates a valid ArcGIS online url with correct params' do
|
8
|
+
expect(arcgis_link('http://example.com/foo/MapServer')).to eq 'https://www.arcgis.com/home/webmap/viewer.html?urls=http%3A%2F%2Fexample.com%2Ffoo%2FMapServer'
|
9
|
+
end
|
10
|
+
it 'handles multiple urls' do
|
11
|
+
expect(arcgis_link(['http://example.com/foo/MapServer', 'http://example.com/foo/FeatureServer'])).to eq 'https://www.arcgis.com/home/webmap/viewer.html?urls=http%3A%2F%2Fexample.com%2Ffoo%2FMapServer&urls=http%3A%2F%2Fexample.com%2Ffoo%2FFeatureServer'
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -80,6 +80,18 @@ describe Geoblacklight::References do
|
|
80
80
|
)
|
81
81
|
)
|
82
82
|
end
|
83
|
+
let(:some_esri_services) do
|
84
|
+
described_class.new(
|
85
|
+
SolrDocument.new(
|
86
|
+
references_field => {
|
87
|
+
'urn:x-esri:serviceType:ArcGIS#NotValid' => 'foo',
|
88
|
+
'urn:x-esri:serviceType:ArcGIS#TiledMapLayer' => 'foo',
|
89
|
+
'urn:x-esri:serviceType:ArcGIS#DynamicMapLayer' => 'foo',
|
90
|
+
'urn:x-esri:serviceType:ArcGIS#ImageMapLayer' => 'foo'
|
91
|
+
}.to_json
|
92
|
+
)
|
93
|
+
)
|
94
|
+
end
|
83
95
|
let(:custom_fields) do
|
84
96
|
described_class.new(
|
85
97
|
SolrDocument.new, :new_ref_field
|
@@ -172,6 +184,11 @@ describe Geoblacklight::References do
|
|
172
184
|
expect(types.count).to eq 3
|
173
185
|
end
|
174
186
|
end
|
187
|
+
describe '#esri_webservices' do
|
188
|
+
it 'returns webservices that are esri specific' do
|
189
|
+
expect(some_esri_services.esri_webservices.length).to eq 3
|
190
|
+
end
|
191
|
+
end
|
175
192
|
describe '#method_missing' do
|
176
193
|
it 'defaults to the base behavior if the method signature is not a URI key' do
|
177
194
|
expect { typical_ogp_shapefile.invalid }.to raise_error(NoMethodError)
|
@@ -3,6 +3,14 @@ require 'rails/generators'
|
|
3
3
|
class TestAppGenerator < Rails::Generators::Base
|
4
4
|
source_root File.expand_path('../../../../spec/test_app_templates', __FILE__)
|
5
5
|
|
6
|
+
def fix_sqlite3_version_requirement
|
7
|
+
return unless Gem.loaded_specs['rails'].version.to_s <= '5.2.2'
|
8
|
+
|
9
|
+
# Hack for https://github.com/rails/rails/issues/35153
|
10
|
+
# Adapted from https://github.com/projectblacklight/blacklight/pull/2065
|
11
|
+
gsub_file('Gemfile', /^gem 'sqlite3'$/, 'gem "sqlite3", "~> 1.3.6"')
|
12
|
+
end
|
13
|
+
|
6
14
|
def add_gems
|
7
15
|
gem 'blacklight'
|
8
16
|
gem 'teaspoon'
|
data/template.rb
CHANGED
@@ -2,6 +2,14 @@ gem 'blacklight', '~> 7.0'
|
|
2
2
|
gem 'geoblacklight', '~> 2.0'
|
3
3
|
gem 'webpacker', '~> 3.5'
|
4
4
|
|
5
|
+
# Hack for https://github.com/rails/rails/issues/35153
|
6
|
+
# Adapted from https://github.com/projectblacklight/blacklight/pull/2065
|
7
|
+
gemfile = File.expand_path('Gemfile')
|
8
|
+
IO.write(gemfile, File.open(gemfile) do |f|
|
9
|
+
text = f.read
|
10
|
+
text.gsub(/^gem 'sqlite3'$/, 'gem "sqlite3", "~> 1.3.6"')
|
11
|
+
end)
|
12
|
+
|
5
13
|
run 'bundle install'
|
6
14
|
|
7
15
|
generate 'blacklight:install', '--devise'
|
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: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Graves
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2019-
|
14
|
+
date: 2019-05-21 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
@@ -280,7 +280,7 @@ dependencies:
|
|
280
280
|
- !ruby/object:Gem::Version
|
281
281
|
version: '0'
|
282
282
|
- !ruby/object:Gem::Dependency
|
283
|
-
name:
|
283
|
+
name: webdrivers
|
284
284
|
requirement: !ruby/object:Gem::Requirement
|
285
285
|
requirements:
|
286
286
|
- - ">="
|
@@ -406,6 +406,7 @@ files:
|
|
406
406
|
- LICENSE.txt
|
407
407
|
- README.md
|
408
408
|
- Rakefile
|
409
|
+
- app/assets/images/blacklight/esri-globe.svg
|
409
410
|
- app/assets/images/blacklight/logo.png
|
410
411
|
- app/assets/javascripts/geoblacklight/basemaps.js
|
411
412
|
- app/assets/javascripts/geoblacklight/controls.js
|
@@ -466,10 +467,12 @@ files:
|
|
466
467
|
- app/controllers/download_controller.rb
|
467
468
|
- app/controllers/relation_controller.rb
|
468
469
|
- app/controllers/wms_controller.rb
|
470
|
+
- app/helpers/arcgis_helper.rb
|
469
471
|
- app/helpers/blacklight_helper.rb
|
470
472
|
- app/helpers/carto_helper.rb
|
471
473
|
- app/helpers/geoblacklight_helper.rb
|
472
474
|
- app/models/concerns/geoblacklight/solr_document.rb
|
475
|
+
- app/models/concerns/geoblacklight/solr_document/arcgis.rb
|
473
476
|
- app/models/concerns/geoblacklight/solr_document/carto.rb
|
474
477
|
- app/models/concerns/geoblacklight/solr_document/finder.rb
|
475
478
|
- app/models/concerns/geoblacklight/solr_document/inspection.rb
|
@@ -492,6 +495,7 @@ files:
|
|
492
495
|
- app/views/catalog/_index_split_default.html.erb
|
493
496
|
- app/views/catalog/_metadata.html.erb
|
494
497
|
- app/views/catalog/_relations_container.html.erb
|
498
|
+
- app/views/catalog/_results_pagination.html.erb
|
495
499
|
- app/views/catalog/_show_default_attribute_table.html.erb
|
496
500
|
- app/views/catalog/_show_default_viewer_container.html.erb
|
497
501
|
- app/views/catalog/_show_default_viewer_information.html.erb
|
@@ -531,7 +535,6 @@ files:
|
|
531
535
|
- lib/geoblacklight/bounding_box.rb
|
532
536
|
- lib/geoblacklight/catalog_helper_override.rb
|
533
537
|
- lib/geoblacklight/constants.rb
|
534
|
-
- lib/geoblacklight/controller_override.rb
|
535
538
|
- lib/geoblacklight/download.rb
|
536
539
|
- lib/geoblacklight/download/geojson_download.rb
|
537
540
|
- lib/geoblacklight/download/geotiff_download.rb
|
@@ -648,6 +651,8 @@ files:
|
|
648
651
|
- spec/fixtures/solr_documents/no_spatial.json
|
649
652
|
- spec/fixtures/solr_documents/princeton-child1.json
|
650
653
|
- spec/fixtures/solr_documents/princeton-child2.json
|
654
|
+
- spec/fixtures/solr_documents/princeton-child3.json
|
655
|
+
- spec/fixtures/solr_documents/princeton-child4.json
|
651
656
|
- spec/fixtures/solr_documents/princeton-parent.json
|
652
657
|
- spec/fixtures/solr_documents/public_direct_download.json
|
653
658
|
- spec/fixtures/solr_documents/public_iiif_princeton.json
|
@@ -657,6 +662,7 @@ files:
|
|
657
662
|
- spec/fixtures/solr_documents/umn_state_result1.json
|
658
663
|
- spec/fixtures/solr_documents/umn_state_result2.json
|
659
664
|
- spec/fixtures/solr_documents/uva_slug_colon.json
|
665
|
+
- spec/helpers/arcgis_helper_spec.rb
|
660
666
|
- spec/helpers/carto_helper_spec.rb
|
661
667
|
- spec/helpers/geoblacklight_helper_spec.rb
|
662
668
|
- spec/javascripts/geoblacklight_spec.js
|
@@ -708,6 +714,7 @@ files:
|
|
708
714
|
- spec/test_app_templates/solr_documents
|
709
715
|
- spec/views/catalog/_document_split.html.erb_spec.rb
|
710
716
|
- spec/views/catalog/_index_split.html.erb_spec.rb
|
717
|
+
- spec/views/catalog/_results_pagination.html.erb_spec.rb
|
711
718
|
- spec/views/catalog/_show_downloads.html.erb_spec.rb
|
712
719
|
- spec/views/catalog/_show_tools.html.erb_spec.rb
|
713
720
|
- template.rb
|
@@ -745,7 +752,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
745
752
|
version: 2.5.2
|
746
753
|
requirements: []
|
747
754
|
rubyforge_project:
|
748
|
-
rubygems_version: 2.6
|
755
|
+
rubygems_version: 2.7.6
|
749
756
|
signing_key:
|
750
757
|
specification_version: 4
|
751
758
|
summary: A discovery platform for geospatial holdings
|
@@ -807,6 +814,8 @@ test_files:
|
|
807
814
|
- spec/fixtures/solr_documents/no_spatial.json
|
808
815
|
- spec/fixtures/solr_documents/princeton-child1.json
|
809
816
|
- spec/fixtures/solr_documents/princeton-child2.json
|
817
|
+
- spec/fixtures/solr_documents/princeton-child3.json
|
818
|
+
- spec/fixtures/solr_documents/princeton-child4.json
|
810
819
|
- spec/fixtures/solr_documents/princeton-parent.json
|
811
820
|
- spec/fixtures/solr_documents/public_direct_download.json
|
812
821
|
- spec/fixtures/solr_documents/public_iiif_princeton.json
|
@@ -816,6 +825,7 @@ test_files:
|
|
816
825
|
- spec/fixtures/solr_documents/umn_state_result1.json
|
817
826
|
- spec/fixtures/solr_documents/umn_state_result2.json
|
818
827
|
- spec/fixtures/solr_documents/uva_slug_colon.json
|
828
|
+
- spec/helpers/arcgis_helper_spec.rb
|
819
829
|
- spec/helpers/carto_helper_spec.rb
|
820
830
|
- spec/helpers/geoblacklight_helper_spec.rb
|
821
831
|
- spec/javascripts/geoblacklight_spec.js
|
@@ -867,5 +877,6 @@ test_files:
|
|
867
877
|
- spec/test_app_templates/solr_documents
|
868
878
|
- spec/views/catalog/_document_split.html.erb_spec.rb
|
869
879
|
- spec/views/catalog/_index_split.html.erb_spec.rb
|
880
|
+
- spec/views/catalog/_results_pagination.html.erb_spec.rb
|
870
881
|
- spec/views/catalog/_show_downloads.html.erb_spec.rb
|
871
882
|
- spec/views/catalog/_show_tools.html.erb_spec.rb
|
@@ -1,27 +0,0 @@
|
|
1
|
-
# @TODO: Remove
|
2
|
-
#
|
3
|
-
# Blacklight 7.0 introduces ActionBuilder, which adds controller methods from
|
4
|
-
# CatalogController config.add_show_tools_partial statements
|
5
|
-
#
|
6
|
-
# module Geoblacklight
|
7
|
-
# module ControllerOverride
|
8
|
-
# extend ActiveSupport::Concern
|
9
|
-
# def web_services
|
10
|
-
# @response, @document = search_service.fetch(params[:id])
|
11
|
-
# respond_to do |format|
|
12
|
-
# format.html do
|
13
|
-
# return render layout: false if request.xhr?
|
14
|
-
# end
|
15
|
-
# end
|
16
|
-
# end
|
17
|
-
#
|
18
|
-
# def metadata
|
19
|
-
# @response, @document = search_service.fetch(params[:id])
|
20
|
-
# respond_to do |format|
|
21
|
-
# format.html do
|
22
|
-
# return render layout: false if request.xhr?
|
23
|
-
# end
|
24
|
-
# end
|
25
|
-
# end
|
26
|
-
# end
|
27
|
-
# end
|