blacklight_heatmaps 0.5.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/Rakefile +1 -1
- data/app/assets/images/blacklight/heatmaps.svg +1 -0
- data/app/assets/javascripts/blacklight_heatmaps/viewers/index.js +5 -4
- data/app/helpers/blacklight/maps_helper.rb +4 -11
- data/app/views/catalog/index.heatmaps.jbuilder +11 -0
- data/config/locales/blacklight-heatmaps.en.yml +8 -0
- data/config/locales/blacklight-heatmaps.es.yml +7 -0
- data/config/locales/blacklight-heatmaps.pt-BR.yml +7 -0
- data/lib/blacklight_heatmaps/engine.rb +1 -0
- data/lib/blacklight_heatmaps/version.rb +1 -1
- data/lib/generators/blacklight_heatmaps/install_generator.rb +15 -2
- data/spec/examples.txt +28 -28
- data/spec/features/index_page_map_spec.rb +4 -3
- data/spec/helpers/blacklight/maps_helper_spec.rb +2 -1
- data/spec/spec_helper.rb +3 -2
- data/spec/test_app_templates/Gemfile.extra +1 -0
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +1 -1
- data/vendor/assets/javascripts/leaflet_solr_heatmap.js +1 -14
- metadata +27 -28
- data/app/views/catalog/index.json.jbuilder +0 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: b9906ea4eeb7e7c695a0a6e06f1c332fe89812dbc993756a2a6ef0db24b2d54a
|
|
4
|
+
data.tar.gz: 59c89dec0004d7c3e78d5a1ccb927cbd83899695fff3bcebf12fa2f999312bb8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 39059c88a51e4d2ab28bbab8f5c8b6217bf4c10691bdfa65e24550d3700fd79c3195827273199e792bd86bfbc15fdac7d6846ac7e69359beb93ebd711bb19143
|
|
7
|
+
data.tar.gz: 730e04553f003a482c564c7cb842c5f4cd50d714588a63b8cb841cb1b7ce248b5bb7684cb90655c0d4533a7fe5ca2597bb4f5e4b1fdffebf8551e30c93caa6bb
|
data/Rakefile
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M16 10h-2v2h2v-2zm0 4h-2v2h2v-2zm-8-4H6v2h2v-2zm4 0h-2v2h2v-2zm8-6H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H4V6h16v12z"/></svg>
|
|
@@ -15,14 +15,14 @@ Blacklight.onLoad(function () {
|
|
|
15
15
|
initialize: function (el, options) {
|
|
16
16
|
var _this = this;
|
|
17
17
|
var $el = $(el);
|
|
18
|
-
var requestUrl = $el.data().searchUrl + '&format=
|
|
18
|
+
var requestUrl = $el.data().searchUrl + '&format=heatmaps';
|
|
19
19
|
var geometryField = $el.data().geometryField;
|
|
20
20
|
var template = $el.data().sidebarTemplate;
|
|
21
21
|
var colorRamp = $el.data().colorRamp;
|
|
22
22
|
|
|
23
23
|
// Blank out page link content first and disable pagination
|
|
24
|
-
$('#sortAndPerPage .
|
|
25
|
-
$('ul.pagination
|
|
24
|
+
$('#sortAndPerPage .page-links').html('');
|
|
25
|
+
$('ul.pagination').hide();
|
|
26
26
|
|
|
27
27
|
var map = L.map($el[0].id).setView([0, 0], 1);
|
|
28
28
|
var basemap = BlacklightHeatmaps.selectBasemap(
|
|
@@ -64,7 +64,8 @@ Blacklight.onLoad(function () {
|
|
|
64
64
|
sidebar.setContent(html);
|
|
65
65
|
|
|
66
66
|
var docCount = e.response.pages.total_count;
|
|
67
|
-
|
|
67
|
+
|
|
68
|
+
$('#sortAndPerPage .page-links').html(
|
|
68
69
|
parseInt(docCount).toLocaleString() + ' ' +
|
|
69
70
|
_this.pluralize(docCount, 'item') + ' found'
|
|
70
71
|
);
|
|
@@ -9,7 +9,8 @@ module Blacklight
|
|
|
9
9
|
nil,
|
|
10
10
|
class: 'blacklight-heatmaps-index-map',
|
|
11
11
|
id: 'index-map',
|
|
12
|
-
data: index_map_data_attributes
|
|
12
|
+
data: index_map_data_attributes,
|
|
13
|
+
'aria-label': t('blacklight.heatmaps.aria-label')
|
|
13
14
|
)
|
|
14
15
|
end
|
|
15
16
|
|
|
@@ -23,8 +24,8 @@ module Blacklight
|
|
|
23
24
|
<div class='media'>
|
|
24
25
|
<div class='media-body'>
|
|
25
26
|
<h3 class='media-heading'>
|
|
26
|
-
<a href=\"
|
|
27
|
-
{
|
|
27
|
+
<a href=\"{url}\"}>
|
|
28
|
+
{title}
|
|
28
29
|
</a>
|
|
29
30
|
</h3>
|
|
30
31
|
</div>
|
|
@@ -34,14 +35,6 @@ module Blacklight
|
|
|
34
35
|
|
|
35
36
|
private
|
|
36
37
|
|
|
37
|
-
##
|
|
38
|
-
# Document path used for creating client side links to documents from a
|
|
39
|
-
# template
|
|
40
|
-
# @return String
|
|
41
|
-
def document_path
|
|
42
|
-
"#{search_catalog_path}/{#{blacklight_config.document_unique_id_param}}"
|
|
43
|
-
end
|
|
44
|
-
|
|
45
38
|
##
|
|
46
39
|
# Data attributes used in displaying the index map
|
|
47
40
|
# @return Hash
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
presenter = Blacklight::JsonPresenter.new(@response, blacklight_config)
|
|
2
|
+
|
|
3
|
+
json.response do
|
|
4
|
+
json.docs(presenter.documents) do |document|
|
|
5
|
+
json.url polymorphic_url(url_for_document(document))
|
|
6
|
+
json.title index_presenter(document).heading
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
json.facet_heatmaps @response['facet_counts']['facet_heatmaps']
|
|
10
|
+
json.pages presenter.pagination_info
|
|
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
|
|
@@ -17,6 +29,7 @@ module BlacklightHeatmaps
|
|
|
17
29
|
"\n # Basemaps configured include: 'positron', 'darkMatter', 'OpenStreetMap.HOT'" \
|
|
18
30
|
"\n config.basemap_provider = 'positron'" \
|
|
19
31
|
"\n config.show.partials.insert(1, :show_leaflet_map)" \
|
|
32
|
+
"\n config.index.respond_to.heatmaps = true" \
|
|
20
33
|
"\n config.view.heatmaps.partials = []" \
|
|
21
34
|
"\n #Heatmap color ramp. For best results, use http://colorbrewer2.org or http://tristen.ca/hcl-picker/#/hlc/5/1" \
|
|
22
35
|
"\n config.view.heatmaps.color_ramp = ['#ffffcc', '#a1dab4', '#41b6c4', '#2c7fb8', '#253494']" \
|
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 |
|
|
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.
|
|
3
|
+
./spec/features/configurable_basemap_spec.rb[1:1] | passed | 0.34927 seconds |
|
|
4
|
+
./spec/features/configurable_basemap_spec.rb[1:2:1] | passed | 0.30942 seconds |
|
|
5
|
+
./spec/features/configurable_basemap_spec.rb[1:3:1] | passed | 0.33092 seconds |
|
|
6
|
+
./spec/features/index_page_map_spec.rb[1:1] | passed | 1.2 seconds |
|
|
7
|
+
./spec/features/show_page_map_spec.rb[1:1] | passed | 0.53406 seconds |
|
|
8
|
+
./spec/features/show_page_map_spec.rb[1:2] | passed | 15.44 seconds |
|
|
9
|
+
./spec/helpers/blacklight/maps_helper_spec.rb[1:1:1] | passed | 0.06046 seconds |
|
|
10
|
+
./spec/helpers/blacklight/maps_helper_spec.rb[1:2:1] | passed | 0.00202 seconds |
|
|
11
11
|
./spec/models/concerns/blacklight_heatmaps/bounding_box_spec.rb[1:1:1] | passed | 0.00016 seconds |
|
|
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.
|
|
12
|
+
./spec/models/concerns/blacklight_heatmaps/bounding_box_spec.rb[1:2:1] | passed | 0.00019 seconds |
|
|
13
|
+
./spec/models/concerns/blacklight_heatmaps/bounding_box_spec.rb[1:3:1] | passed | 0.0005 seconds |
|
|
14
|
+
./spec/models/concerns/blacklight_heatmaps/bounding_box_spec.rb[1:4:1] | passed | 0.00029 seconds |
|
|
15
|
+
./spec/models/concerns/blacklight_heatmaps/geometry_parser_spec.rb[1:1:1:1] | passed | 0.00019 seconds |
|
|
16
|
+
./spec/models/concerns/blacklight_heatmaps/geometry_parser_spec.rb[1:1:2:1] | passed | 0.00023 seconds |
|
|
17
|
+
./spec/models/concerns/blacklight_heatmaps/geometry_parser_spec.rb[1:1:3:1] | passed | 0.00285 seconds |
|
|
18
|
+
./spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb[1:1:1] | passed | 0.00071 seconds |
|
|
19
|
+
./spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb[1:2:1] | passed | 0.0002 seconds |
|
|
20
|
+
./spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb[1:3:1] | passed | 0.00047 seconds |
|
|
21
|
+
./spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb[1:4:1] | passed | 0.02509 seconds |
|
|
22
|
+
./spec/models/concerns/blacklight_heatmaps/point_spec.rb[1:1:1] | passed | 0.00022 seconds |
|
|
23
|
+
./spec/models/concerns/blacklight_heatmaps/point_spec.rb[1:2:1] | passed | 0.00105 seconds |
|
|
24
|
+
./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:1:1:1] | passed | 0.00179 seconds |
|
|
25
|
+
./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:1:2:1] | passed | 0.00522 seconds |
|
|
26
|
+
./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:2:1] | passed | 0.00277 seconds |
|
|
27
|
+
./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:3:1] | passed | 0.18828 seconds |
|
|
28
|
+
./spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb[1:4:1] | passed | 0.00252 seconds |
|
|
29
|
+
./spec/views/catalog/_document_heatmaps.html.erb_spec.rb[1:1] | passed | 0.01202 seconds |
|
|
30
|
+
./spec/views/catalog/_show_leaflet_map_default.html.erb_spec.rb[1:1:1] | passed | 0.01292 seconds |
|
|
31
|
+
./spec/views/catalog/_show_leaflet_map_default.html.erb_spec.rb[1:2:1] | passed | 0.00211 seconds |
|
|
@@ -8,11 +8,12 @@ feature 'Index page map', js: true do
|
|
|
8
8
|
# Zoomed to world
|
|
9
9
|
expect(page).to have_css 'img[src*="/light_all/1/0/0.png"]'
|
|
10
10
|
|
|
11
|
-
#
|
|
12
|
-
expect(page).to have_css 'ul.pagination
|
|
11
|
+
# Hides pagination
|
|
12
|
+
expect(page).to have_css 'ul.pagination', visible: false
|
|
13
|
+
expect(page).not_to have_css '.page-links a'
|
|
13
14
|
|
|
14
15
|
# Document counts
|
|
15
|
-
expect(page).to have_css '.
|
|
16
|
+
expect(page).to have_css '.page-links', text: '18 items found'
|
|
16
17
|
|
|
17
18
|
expect(page).to have_css '#index-map-sidebar', visible: false
|
|
18
19
|
page.first('svg g path').click
|
|
@@ -26,12 +26,13 @@ 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
|
|
32
33
|
it 'renders html template used in sidebar' do
|
|
33
34
|
expect(helper.sidebar_template)
|
|
34
|
-
.to have_css '.media .media-body h3.media-heading a', text: '{
|
|
35
|
+
.to have_css '.media .media-body h3.media-heading a', text: '{title}'
|
|
35
36
|
end
|
|
36
37
|
end
|
|
37
38
|
end
|
data/spec/spec_helper.rb
CHANGED
|
@@ -17,8 +17,9 @@ require 'rspec/rails'
|
|
|
17
17
|
|
|
18
18
|
Dir[Pathname.new(File.expand_path("../support/**/*.rb", __FILE__))].each { |f| require f }
|
|
19
19
|
|
|
20
|
-
require '
|
|
21
|
-
|
|
20
|
+
require 'webdrivers/chromedriver'
|
|
21
|
+
|
|
22
|
+
Capybara.javascript_driver = :selenium_chrome_headless
|
|
22
23
|
|
|
23
24
|
require 'blacklight'
|
|
24
25
|
require 'blacklight_heatmaps'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
gem 'sprockets', '< 4'
|
|
@@ -28,20 +28,7 @@ L.SolrHeatmap = L.GeoJSON.extend({
|
|
|
28
28
|
|
|
29
29
|
_computeHeatmapObject: function (data) {
|
|
30
30
|
var _this = this;
|
|
31
|
-
_this.facetHeatmap =
|
|
32
|
-
facetHeatmapArray = data.response.facet_heatmaps[this.options.field];
|
|
33
|
-
|
|
34
|
-
// Convert array to an object
|
|
35
|
-
$.each(facetHeatmapArray, function (index, value) {
|
|
36
|
-
if ((index + 1) % 2 !== 0) {
|
|
37
|
-
// Set object keys for even items
|
|
38
|
-
_this.facetHeatmap[value] = '';
|
|
39
|
-
}else {
|
|
40
|
-
// Set object values for odd items
|
|
41
|
-
_this.facetHeatmap[facetHeatmapArray[index - 1]] = value;
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
|
|
31
|
+
_this.facetHeatmap = data.response.facet_heatmaps[this.options.field];
|
|
45
32
|
this._computeIntArrays();
|
|
46
33
|
},
|
|
47
34
|
|
metadata
CHANGED
|
@@ -1,49 +1,43 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: blacklight_heatmaps
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jack Reed
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-02-25 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
|
-
- - ">="
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: 4.2.6
|
|
20
17
|
- - "<"
|
|
21
18
|
- !ruby/object:Gem::Version
|
|
22
|
-
version: '
|
|
19
|
+
version: '7'
|
|
23
20
|
type: :runtime
|
|
24
21
|
prerelease: false
|
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
26
23
|
requirements:
|
|
27
|
-
- - ">="
|
|
28
|
-
- !ruby/object:Gem::Version
|
|
29
|
-
version: 4.2.6
|
|
30
24
|
- - "<"
|
|
31
25
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: '
|
|
26
|
+
version: '7'
|
|
33
27
|
- !ruby/object:Gem::Dependency
|
|
34
28
|
name: blacklight
|
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
|
36
30
|
requirements:
|
|
37
31
|
- - "~>"
|
|
38
32
|
- !ruby/object:Gem::Version
|
|
39
|
-
version: '
|
|
33
|
+
version: '7.0'
|
|
40
34
|
type: :runtime
|
|
41
35
|
prerelease: false
|
|
42
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
43
37
|
requirements:
|
|
44
38
|
- - "~>"
|
|
45
39
|
- !ruby/object:Gem::Version
|
|
46
|
-
version: '
|
|
40
|
+
version: '7.0'
|
|
47
41
|
- !ruby/object:Gem::Dependency
|
|
48
42
|
name: leaflet-rails
|
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -90,30 +84,30 @@ dependencies:
|
|
|
90
84
|
name: rspec-rails
|
|
91
85
|
requirement: !ruby/object:Gem::Requirement
|
|
92
86
|
requirements:
|
|
93
|
-
- - "
|
|
87
|
+
- - ">="
|
|
94
88
|
- !ruby/object:Gem::Version
|
|
95
|
-
version: '
|
|
89
|
+
version: '0'
|
|
96
90
|
type: :development
|
|
97
91
|
prerelease: false
|
|
98
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
99
93
|
requirements:
|
|
100
|
-
- - "
|
|
94
|
+
- - ">="
|
|
101
95
|
- !ruby/object:Gem::Version
|
|
102
|
-
version: '
|
|
96
|
+
version: '0'
|
|
103
97
|
- !ruby/object:Gem::Dependency
|
|
104
98
|
name: engine_cart
|
|
105
99
|
requirement: !ruby/object:Gem::Requirement
|
|
106
100
|
requirements:
|
|
107
101
|
- - "~>"
|
|
108
102
|
- !ruby/object:Gem::Version
|
|
109
|
-
version: '
|
|
103
|
+
version: '2.0'
|
|
110
104
|
type: :development
|
|
111
105
|
prerelease: false
|
|
112
106
|
version_requirements: !ruby/object:Gem::Requirement
|
|
113
107
|
requirements:
|
|
114
108
|
- - "~>"
|
|
115
109
|
- !ruby/object:Gem::Version
|
|
116
|
-
version: '
|
|
110
|
+
version: '2.0'
|
|
117
111
|
- !ruby/object:Gem::Dependency
|
|
118
112
|
name: solr_wrapper
|
|
119
113
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -143,7 +137,7 @@ dependencies:
|
|
|
143
137
|
- !ruby/object:Gem::Version
|
|
144
138
|
version: '0'
|
|
145
139
|
- !ruby/object:Gem::Dependency
|
|
146
|
-
name:
|
|
140
|
+
name: webdrivers
|
|
147
141
|
requirement: !ruby/object:Gem::Requirement
|
|
148
142
|
requirements:
|
|
149
143
|
- - ">="
|
|
@@ -166,6 +160,7 @@ files:
|
|
|
166
160
|
- LICENSE.txt
|
|
167
161
|
- README.md
|
|
168
162
|
- Rakefile
|
|
163
|
+
- app/assets/images/blacklight/heatmaps.svg
|
|
169
164
|
- app/assets/javascripts/blacklight_heatmaps/basemaps.js
|
|
170
165
|
- app/assets/javascripts/blacklight_heatmaps/blacklight_heatmaps.js
|
|
171
166
|
- app/assets/javascripts/blacklight_heatmaps/default.js
|
|
@@ -183,8 +178,11 @@ files:
|
|
|
183
178
|
- app/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior.rb
|
|
184
179
|
- app/views/catalog/_document_heatmaps.html.erb
|
|
185
180
|
- app/views/catalog/_show_leaflet_map_default.html.erb
|
|
186
|
-
- app/views/catalog/index.
|
|
181
|
+
- app/views/catalog/index.heatmaps.jbuilder
|
|
187
182
|
- app/views/layouts/blacklight_heatmaps/application.html.erb
|
|
183
|
+
- config/locales/blacklight-heatmaps.en.yml
|
|
184
|
+
- config/locales/blacklight-heatmaps.es.yml
|
|
185
|
+
- config/locales/blacklight-heatmaps.pt-BR.yml
|
|
188
186
|
- config/routes.rb
|
|
189
187
|
- lib/blacklight_heatmaps.rb
|
|
190
188
|
- lib/blacklight_heatmaps/engine.rb
|
|
@@ -206,6 +204,7 @@ files:
|
|
|
206
204
|
- spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb
|
|
207
205
|
- spec/spec_helper.rb
|
|
208
206
|
- spec/support/fixture_data.rb
|
|
207
|
+
- spec/test_app_templates/Gemfile.extra
|
|
209
208
|
- spec/test_app_templates/lib/generators/test_app_generator.rb
|
|
210
209
|
- spec/views/catalog/_document_heatmaps.html.erb_spec.rb
|
|
211
210
|
- spec/views/catalog/_show_leaflet_map_default.html.erb_spec.rb
|
|
@@ -230,25 +229,25 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
230
229
|
- !ruby/object:Gem::Version
|
|
231
230
|
version: '0'
|
|
232
231
|
requirements: []
|
|
233
|
-
|
|
234
|
-
rubygems_version: 2.6.14
|
|
232
|
+
rubygems_version: 3.1.2
|
|
235
233
|
signing_key:
|
|
236
234
|
specification_version: 4
|
|
237
235
|
summary: Search and view Blacklight resources on a map.
|
|
238
236
|
test_files:
|
|
237
|
+
- spec/spec_helper.rb
|
|
239
238
|
- spec/examples.txt
|
|
239
|
+
- spec/features/show_page_map_spec.rb
|
|
240
240
|
- spec/features/configurable_basemap_spec.rb
|
|
241
241
|
- spec/features/index_page_map_spec.rb
|
|
242
|
-
- spec/features/show_page_map_spec.rb
|
|
243
|
-
- spec/fixtures/null_island.geojson
|
|
244
|
-
- spec/helpers/blacklight/maps_helper_spec.rb
|
|
245
242
|
- spec/models/concerns/blacklight_heatmaps/bounding_box_spec.rb
|
|
246
|
-
- spec/models/concerns/blacklight_heatmaps/
|
|
243
|
+
- spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb
|
|
247
244
|
- spec/models/concerns/blacklight_heatmaps/geometry_solr_document_spec.rb
|
|
245
|
+
- spec/models/concerns/blacklight_heatmaps/geometry_parser_spec.rb
|
|
248
246
|
- spec/models/concerns/blacklight_heatmaps/point_spec.rb
|
|
249
|
-
- spec/models/concerns/blacklight_heatmaps/solr_facet_heatmap_behavior_spec.rb
|
|
250
|
-
- spec/spec_helper.rb
|
|
251
247
|
- spec/support/fixture_data.rb
|
|
252
248
|
- spec/test_app_templates/lib/generators/test_app_generator.rb
|
|
249
|
+
- spec/test_app_templates/Gemfile.extra
|
|
250
|
+
- spec/fixtures/null_island.geojson
|
|
253
251
|
- spec/views/catalog/_document_heatmaps.html.erb_spec.rb
|
|
254
252
|
- spec/views/catalog/_show_leaflet_map_default.html.erb_spec.rb
|
|
253
|
+
- spec/helpers/blacklight/maps_helper_spec.rb
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
##
|
|
2
|
-
# Overrides default index.json.jbuilder from Blacklight by adding the
|
|
3
|
-
# `facet_heatmaps` key/value
|
|
4
|
-
|
|
5
|
-
json.response do
|
|
6
|
-
json.docs @presenter.documents
|
|
7
|
-
json.facets @presenter.search_facets_as_json
|
|
8
|
-
json.facet_heatmaps @response['facet_counts']['facet_heatmaps']
|
|
9
|
-
json.pages @presenter.pagination_info
|
|
10
|
-
end
|