blacklight_heatmaps 0.8.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/blacklight_heatmaps/viewers/index.js +2 -5
- data/app/helpers/blacklight/maps_helper.rb +2 -1
- data/config/locales/blacklight-heatmaps.en.yml +8 -0
- data/lib/blacklight_heatmaps/engine.rb +4 -1
- data/lib/blacklight_heatmaps/version.rb +1 -1
- data/lib/generators/blacklight_heatmaps/install_generator.rb +14 -2
- data/spec/examples.txt +29 -29
- data/spec/features/index_page_map_spec.rb +1 -1
- data/spec/helpers/blacklight/maps_helper_spec.rb +1 -0
- metadata +30 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a03189451c6ce94aa819be2e1e37b6b13682ae7b2e23346591602e78b414fae0
|
4
|
+
data.tar.gz: 9db2a647a7decc345acdaa2f627482b2878dfd505e25a65c9c1e57809e99f37e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05e65c68c3990bea54b4ac89092564815ef02a31bcb554e28c332d9ebfd1b49d221ddb9b6ee09bfb7352036b0e3043bde0eec91f8c3ce78c7bcaba63d90eff6b
|
7
|
+
data.tar.gz: ac76ff4fbb11bfb29881f6c9a966f2341123610f416aa21c2f5b64a618ea134bba46a5575f47427306f4ac5645667dee5c65f2df09a811d127c14bbe7f8c4f00
|
@@ -22,11 +22,7 @@ Blacklight.onLoad(function () {
|
|
22
22
|
|
23
23
|
// Blank out page link content first and disable pagination
|
24
24
|
$('#sortAndPerPage .page-links').html('');
|
25
|
-
|
26
|
-
$('nav.pagination').hide();
|
27
|
-
} else {
|
28
|
-
$('ul.pagination').hide();
|
29
|
-
}
|
25
|
+
$('ul.pagination').hide();
|
30
26
|
|
31
27
|
var map = L.map($el[0].id).setView([0, 0], 1);
|
32
28
|
var basemap = BlacklightHeatmaps.selectBasemap(
|
@@ -68,6 +64,7 @@ Blacklight.onLoad(function () {
|
|
68
64
|
sidebar.setContent(html);
|
69
65
|
|
70
66
|
var docCount = e.response.pages.total_count;
|
67
|
+
|
71
68
|
$('#sortAndPerPage .page-links').html(
|
72
69
|
parseInt(docCount).toLocaleString() + ' ' +
|
73
70
|
_this.pluralize(docCount, 'item') + ' found'
|
@@ -2,7 +2,10 @@ module BlacklightHeatmaps
|
|
2
2
|
class Engine < ::Rails::Engine
|
3
3
|
isolate_namespace BlacklightHeatmaps
|
4
4
|
initializer 'blacklight-maps.helpers' do |app|
|
5
|
-
|
5
|
+
config.after_initialize do
|
6
|
+
ActionView::Base.send :include, Blacklight::MapsHelper
|
7
|
+
end
|
8
|
+
|
6
9
|
Mime::Type.register 'application/vnd.heatmaps+json', :heatmaps
|
7
10
|
end
|
8
11
|
end
|
@@ -4,9 +4,21 @@ module BlacklightHeatmaps
|
|
4
4
|
class Install < Rails::Generators::Base
|
5
5
|
source_root File.expand_path('../templates', __FILE__)
|
6
6
|
|
7
|
-
def
|
7
|
+
def copy_styles
|
8
8
|
copy_file 'blacklight_heatmaps.scss', 'app/assets/stylesheets/blacklight_heatmaps.scss'
|
9
|
-
|
9
|
+
end
|
10
|
+
|
11
|
+
def inject_js
|
12
|
+
inject_into_file 'app/assets/javascripts/application.js', after: '//= require blacklight/blacklight' do
|
13
|
+
"\n// Required by BlacklightHeatmaps" \
|
14
|
+
"\n//= require blacklight_heatmaps/default"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def install_webpacker
|
19
|
+
return unless Rails.version.to_i == 6
|
20
|
+
|
21
|
+
rake 'webpacker:install'
|
10
22
|
end
|
11
23
|
|
12
24
|
def configuration
|
data/spec/examples.txt
CHANGED
@@ -1,31 +1,31 @@
|
|
1
1
|
example_id | status | run_time |
|
2
2
|
--------------------------------------------------------------------------------------- | ------ | --------------- |
|
3
|
-
./spec/features/configurable_basemap_spec.rb[1:1] | passed | 0.
|
4
|
-
./spec/features/configurable_basemap_spec.rb[1:2:1] | passed | 0.
|
5
|
-
./spec/features/configurable_basemap_spec.rb[1:3:1] | passed | 0.
|
6
|
-
./spec/features/index_page_map_spec.rb[1:1] | passed |
|
7
|
-
./spec/features/show_page_map_spec.rb[1:1] | passed | 0.
|
8
|
-
./spec/features/show_page_map_spec.rb[1:2] | passed | 0.
|
9
|
-
./spec/helpers/blacklight/maps_helper_spec.rb[1:1:1] | passed | 0.
|
10
|
-
./spec/helpers/blacklight/maps_helper_spec.rb[1:2:1] | passed | 0.
|
11
|
-
./spec/models/concerns/blacklight_heatmaps/bounding_box_spec.rb[1:1:1] | passed | 0.
|
12
|
-
./spec/models/concerns/blacklight_heatmaps/bounding_box_spec.rb[1:2:1] | passed | 0.
|
13
|
-
./spec/models/concerns/blacklight_heatmaps/bounding_box_spec.rb[1:3:1] | passed | 0.
|
14
|
-
./spec/models/concerns/blacklight_heatmaps/bounding_box_spec.rb[1:4:1] | passed | 0.
|
15
|
-
./spec/models/concerns/blacklight_heatmaps/geometry_parser_spec.rb[1:1:1:1] | passed | 0.
|
16
|
-
./spec/models/concerns/blacklight_heatmaps/geometry_parser_spec.rb[1:1:2:1] | passed | 0.
|
17
|
-
./spec/models/concerns/blacklight_heatmaps/geometry_parser_spec.rb[1:1:3:1] | passed | 0.
|
18
|
-
./spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb[1:1:1] | passed | 0.
|
19
|
-
./spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb[1:2:1] | passed | 0.
|
20
|
-
./spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb[1:3:1] | passed | 0.
|
21
|
-
./spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb[1:4:1] | passed | 0.
|
22
|
-
./spec/models/concerns/blacklight_heatmaps/point_spec.rb[1:1:1] | passed | 0.
|
23
|
-
./spec/models/concerns/blacklight_heatmaps/point_spec.rb[1:2:1] | passed | 0.
|
24
|
-
./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:1:1:1] | passed | 0.
|
25
|
-
./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:1:2:1] | passed | 0.
|
26
|
-
./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:2:1] | passed | 0.
|
27
|
-
./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:3:1] | passed | 0.
|
28
|
-
./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:4:1] | passed | 0.
|
29
|
-
./spec/views/catalog/_document_heatmaps.html.erb_spec.rb[1:1] | passed | 0.
|
30
|
-
./spec/views/catalog/_show_leaflet_map_default.html.erb_spec.rb[1:1:1] | passed | 0.
|
31
|
-
./spec/views/catalog/_show_leaflet_map_default.html.erb_spec.rb[1:2:1] | passed | 0.
|
3
|
+
./spec/features/configurable_basemap_spec.rb[1:1] | passed | 0.41776 seconds |
|
4
|
+
./spec/features/configurable_basemap_spec.rb[1:2:1] | passed | 0.36464 seconds |
|
5
|
+
./spec/features/configurable_basemap_spec.rb[1:3:1] | passed | 0.71567 seconds |
|
6
|
+
./spec/features/index_page_map_spec.rb[1:1] | passed | 8.86 seconds |
|
7
|
+
./spec/features/show_page_map_spec.rb[1:1] | passed | 0.62926 seconds |
|
8
|
+
./spec/features/show_page_map_spec.rb[1:2] | passed | 0.4947 seconds |
|
9
|
+
./spec/helpers/blacklight/maps_helper_spec.rb[1:1:1] | passed | 0.00938 seconds |
|
10
|
+
./spec/helpers/blacklight/maps_helper_spec.rb[1:2:1] | passed | 0.00674 seconds |
|
11
|
+
./spec/models/concerns/blacklight_heatmaps/bounding_box_spec.rb[1:1:1] | passed | 0.00041 seconds |
|
12
|
+
./spec/models/concerns/blacklight_heatmaps/bounding_box_spec.rb[1:2:1] | passed | 0.00028 seconds |
|
13
|
+
./spec/models/concerns/blacklight_heatmaps/bounding_box_spec.rb[1:3:1] | passed | 0.00055 seconds |
|
14
|
+
./spec/models/concerns/blacklight_heatmaps/bounding_box_spec.rb[1:4:1] | passed | 0.00028 seconds |
|
15
|
+
./spec/models/concerns/blacklight_heatmaps/geometry_parser_spec.rb[1:1:1:1] | passed | 0.0003 seconds |
|
16
|
+
./spec/models/concerns/blacklight_heatmaps/geometry_parser_spec.rb[1:1:2:1] | passed | 0.00053 seconds |
|
17
|
+
./spec/models/concerns/blacklight_heatmaps/geometry_parser_spec.rb[1:1:3:1] | passed | 0.00438 seconds |
|
18
|
+
./spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb[1:1:1] | passed | 0.00081 seconds |
|
19
|
+
./spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb[1:2:1] | passed | 0.03251 seconds |
|
20
|
+
./spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb[1:3:1] | passed | 0.00094 seconds |
|
21
|
+
./spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb[1:4:1] | passed | 0.00061 seconds |
|
22
|
+
./spec/models/concerns/blacklight_heatmaps/point_spec.rb[1:1:1] | passed | 0.05593 seconds |
|
23
|
+
./spec/models/concerns/blacklight_heatmaps/point_spec.rb[1:2:1] | passed | 0.00169 seconds |
|
24
|
+
./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:1:1:1] | passed | 0.00432 seconds |
|
25
|
+
./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:1:2:1] | passed | 0.01045 seconds |
|
26
|
+
./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:2:1] | passed | 0.00528 seconds |
|
27
|
+
./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:3:1] | passed | 0.00558 seconds |
|
28
|
+
./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:4:1] | passed | 0.00459 seconds |
|
29
|
+
./spec/views/catalog/_document_heatmaps.html.erb_spec.rb[1:1] | passed | 0.00637 seconds |
|
30
|
+
./spec/views/catalog/_show_leaflet_map_default.html.erb_spec.rb[1:1:1] | passed | 0.01314 seconds |
|
31
|
+
./spec/views/catalog/_show_leaflet_map_default.html.erb_spec.rb[1:2:1] | passed | 0.08646 seconds |
|
@@ -9,8 +9,8 @@ feature 'Index page map', js: true do
|
|
9
9
|
expect(page).to have_css 'img[src*="/light_all/1/0/0.png"]'
|
10
10
|
|
11
11
|
# Hides pagination
|
12
|
-
expect(page).to have_css 'nav.pagination', visible: false
|
13
12
|
expect(page).to have_css 'ul.pagination', visible: false
|
13
|
+
expect(page).not_to have_css '.page-links a'
|
14
14
|
|
15
15
|
# Document counts
|
16
16
|
expect(page).to have_css '.page-links', text: '18 items found'
|
@@ -26,6 +26,7 @@ describe Blacklight::MapsHelper do
|
|
26
26
|
.to have_css '[data-basemap-provider="positron"]'
|
27
27
|
expect(helper.index_map_div).to have_css '[data-sidebar-template]'
|
28
28
|
expect(helper.index_map_div).to have_css '[data-color-ramp]'
|
29
|
+
expect(helper.index_map_div).to have_css '[aria-label="heatmap"]'
|
29
30
|
end
|
30
31
|
end
|
31
32
|
describe '#sidebar_template' do
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blacklight_heatmaps
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jack Reed
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '6'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '8'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '6'
|
30
|
+
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
32
|
+
version: '8'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: blacklight
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,14 +50,14 @@ dependencies:
|
|
44
50
|
requirements:
|
45
51
|
- - "~>"
|
46
52
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.2
|
53
|
+
version: '1.2'
|
48
54
|
type: :runtime
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
51
57
|
requirements:
|
52
58
|
- - "~>"
|
53
59
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.2
|
60
|
+
version: '1.2'
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
62
|
name: leaflet-sidebar-rails
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -84,16 +90,16 @@ dependencies:
|
|
84
90
|
name: rspec-rails
|
85
91
|
requirement: !ruby/object:Gem::Requirement
|
86
92
|
requirements:
|
87
|
-
- - "
|
93
|
+
- - ">="
|
88
94
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
95
|
+
version: '0'
|
90
96
|
type: :development
|
91
97
|
prerelease: false
|
92
98
|
version_requirements: !ruby/object:Gem::Requirement
|
93
99
|
requirements:
|
94
|
-
- - "
|
100
|
+
- - ">="
|
95
101
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
102
|
+
version: '0'
|
97
103
|
- !ruby/object:Gem::Dependency
|
98
104
|
name: engine_cart
|
99
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -180,6 +186,7 @@ files:
|
|
180
186
|
- app/views/catalog/_show_leaflet_map_default.html.erb
|
181
187
|
- app/views/catalog/index.heatmaps.jbuilder
|
182
188
|
- app/views/layouts/blacklight_heatmaps/application.html.erb
|
189
|
+
- config/locales/blacklight-heatmaps.en.yml
|
183
190
|
- config/locales/blacklight-heatmaps.es.yml
|
184
191
|
- config/locales/blacklight-heatmaps.pt-BR.yml
|
185
192
|
- config/routes.rb
|
@@ -213,7 +220,7 @@ homepage: https://github.com/sul-dlss/blacklight_heatmaps
|
|
213
220
|
licenses:
|
214
221
|
- Apache
|
215
222
|
metadata: {}
|
216
|
-
post_install_message:
|
223
|
+
post_install_message:
|
217
224
|
rdoc_options: []
|
218
225
|
require_paths:
|
219
226
|
- lib
|
@@ -228,25 +235,25 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
228
235
|
- !ruby/object:Gem::Version
|
229
236
|
version: '0'
|
230
237
|
requirements: []
|
231
|
-
rubygems_version: 3.
|
232
|
-
signing_key:
|
238
|
+
rubygems_version: 3.2.32
|
239
|
+
signing_key:
|
233
240
|
specification_version: 4
|
234
241
|
summary: Search and view Blacklight resources on a map.
|
235
242
|
test_files:
|
236
|
-
- spec/spec_helper.rb
|
237
243
|
- spec/examples.txt
|
238
|
-
- spec/features/show_page_map_spec.rb
|
239
244
|
- spec/features/configurable_basemap_spec.rb
|
240
245
|
- spec/features/index_page_map_spec.rb
|
246
|
+
- spec/features/show_page_map_spec.rb
|
247
|
+
- spec/fixtures/null_island.geojson
|
248
|
+
- spec/helpers/blacklight/maps_helper_spec.rb
|
241
249
|
- spec/models/concerns/blacklight_heatmaps/bounding_box_spec.rb
|
242
|
-
- spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb
|
243
|
-
- spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb
|
244
250
|
- spec/models/concerns/blacklight_heatmaps/geometry_parser_spec.rb
|
251
|
+
- spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb
|
245
252
|
- spec/models/concerns/blacklight_heatmaps/point_spec.rb
|
253
|
+
- spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb
|
254
|
+
- spec/spec_helper.rb
|
246
255
|
- spec/support/fixture_data.rb
|
247
|
-
- spec/test_app_templates/lib/generators/test_app_generator.rb
|
248
256
|
- spec/test_app_templates/Gemfile.extra
|
249
|
-
- spec/
|
257
|
+
- spec/test_app_templates/lib/generators/test_app_generator.rb
|
250
258
|
- spec/views/catalog/_document_heatmaps.html.erb_spec.rb
|
251
259
|
- spec/views/catalog/_show_leaflet_map_default.html.erb_spec.rb
|
252
|
-
- spec/helpers/blacklight/maps_helper_spec.rb
|