blacklight-maps 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +8 -6
- data/README.md +4 -0
- data/app/assets/javascripts/blacklight-maps/blacklight-maps-browse.js +3 -0
- data/app/assets/stylesheets/blacklight_maps/default.css.scss +5 -0
- data/blacklight-maps.gemspec +2 -2
- data/lib/blacklight/maps/geometry.rb +4 -0
- data/lib/blacklight/maps/version.rb +1 -1
- data/spec/features/maps_spec.rb +4 -0
- data/spec/lib/blacklight/maps/export_spec.rb +1 -1
- data/spec/lib/blacklight/maps/geometry_spec.rb +5 -0
- metadata +9 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c65861d83b3dd09bf952bdb38a75daba0df6c3a2
|
4
|
+
data.tar.gz: 6590ed2323e163921cd0c31a4529c44e9290bf74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 450803322d3af9937d7dd1806cec17d8fa3894b63a0878221e46ece78036eef3d8731d0a14fb7e35694ead8b4451eff229b2fb60672c71f90a05e8fc7c94c843
|
7
|
+
data.tar.gz: 366c568585f5b81baad7f35a6e142aa160a3054c78382993e002db9922b1e41cef75d8bef9724db980d0f872dce28952a2e55eed56b5d1c54ee3fdaf2f51a251
|
data/Gemfile
CHANGED
@@ -3,19 +3,21 @@ source 'https://rubygems.org'
|
|
3
3
|
# Specify your gem's dependencies in blacklight-maps.gemspec
|
4
4
|
gemspec
|
5
5
|
|
6
|
-
gem 'simplecov', require: false
|
7
|
-
gem 'coveralls', require: false
|
8
|
-
|
9
6
|
# If we don't specify 2.11.0 we'll end up with sprockets 2.12.0 in the main
|
10
7
|
# Gemfile.lock but since sass-rails gets generated (rails new) into the test app
|
11
8
|
# it'll want sprockets 2.11.0 and we'll have a conflict
|
12
9
|
gem 'sprockets', '2.11.0'
|
13
10
|
|
14
|
-
#
|
15
|
-
#
|
16
|
-
#
|
11
|
+
# If we don't specify 3.2.15 we'll end up with sass 3.3.2 in the main
|
12
|
+
# Gemfile.lock but since sass-rails gets generated (rails new) into the test app
|
13
|
+
# it'll want sass 3.2.0 and we'll have a conflict
|
17
14
|
gem 'sass', '~> 3.2.0'
|
15
|
+
gem 'bootstrap-sass', ">= 3.1.1.1"
|
18
16
|
|
17
|
+
group :test do
|
18
|
+
gem 'simplecov', require: false
|
19
|
+
gem 'coveralls', require: false
|
20
|
+
end
|
19
21
|
|
20
22
|
file = File.expand_path("Gemfile", ENV['ENGINE_CART_DESTINATION'] || ENV['RAILS_ROOT'] || File.expand_path("../spec/internal", __FILE__))
|
21
23
|
if File.exists?(file)
|
data/README.md
CHANGED
@@ -3,6 +3,9 @@
|
|
3
3
|
$.fn.blacklight_leaflet_map = function(geojson_docs, arg_opts) {
|
4
4
|
var map, sidebar, markers, geoJsonLayer, currentLayer;
|
5
5
|
|
6
|
+
// Update page links with number of mapped items
|
7
|
+
$('.page_links').append('<span class="badge mapped-count">' + geojson_docs.features.length + '</span> mapped');
|
8
|
+
|
6
9
|
// Configure default options and those passed via the constructor options
|
7
10
|
var options = $.extend({
|
8
11
|
tileurl : 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
data/blacklight-maps.gemspec
CHANGED
@@ -26,9 +26,9 @@ Gem::Specification.new do |spec|
|
|
26
26
|
|
27
27
|
spec.add_development_dependency "bundler", "~> 1.5"
|
28
28
|
spec.add_development_dependency "rake"
|
29
|
-
spec.add_development_dependency "rspec-rails"
|
29
|
+
spec.add_development_dependency "rspec-rails", "~> 2.9"
|
30
30
|
spec.add_development_dependency "jettywrapper"
|
31
|
-
spec.add_development_dependency "engine_cart", "~> 0.
|
31
|
+
spec.add_development_dependency "engine_cart", "~> 0.4.0"
|
32
32
|
spec.add_development_dependency "capybara"
|
33
33
|
spec.add_development_dependency "poltergeist", ">= 1.5.0"
|
34
34
|
end
|
data/spec/features/maps_spec.rb
CHANGED
@@ -97,6 +97,10 @@ describe "Map View", js: true do
|
|
97
97
|
expect(find("div.marker-cluster")).to have_content(4)
|
98
98
|
end
|
99
99
|
|
100
|
+
it "should display number mapped" do
|
101
|
+
expect(page).to have_content('4 mapped')
|
102
|
+
end
|
103
|
+
|
100
104
|
describe "click marker cluster" do
|
101
105
|
before { find("div.marker-cluster").click }
|
102
106
|
|
@@ -58,7 +58,7 @@ describe "BlacklightMaps::GeojsonExport" do
|
|
58
58
|
end
|
59
59
|
|
60
60
|
it "should render correct sidebar div" do
|
61
|
-
expect(subject.send(:render_leaflet_sidebar_partial, @response.docs[0])).to include('href="/catalog/2008308478
|
61
|
+
expect(subject.send(:render_leaflet_sidebar_partial, @response.docs[0])).to include('href="/catalog/2008308478')
|
62
62
|
end
|
63
63
|
|
64
64
|
it "should render feature collection as json" do
|
@@ -4,6 +4,7 @@ describe "BlacklightMaps::Geometry::BoundingBox" do
|
|
4
4
|
|
5
5
|
let(:bbox) { BlacklightMaps::Geometry::BoundingBox.from_lon_lat_string('-100 -50 100 50') }
|
6
6
|
let(:bbox_california) { BlacklightMaps::Geometry::BoundingBox.from_lon_lat_string('-124.4096196 32.5342321 -114.131211 42.0095169') }
|
7
|
+
let(:bbox_dateline) {BlacklightMaps::Geometry::BoundingBox.from_lon_lat_string('165 30 -172 -20') }
|
7
8
|
|
8
9
|
it "should instantiate Geometry::BoundingBox" do
|
9
10
|
expect(bbox.class).to eq(::BlacklightMaps::Geometry::BoundingBox)
|
@@ -16,4 +17,8 @@ describe "BlacklightMaps::Geometry::BoundingBox" do
|
|
16
17
|
it "should return center of California bounding box" do
|
17
18
|
expect(bbox_california.find_center).to eq([-119.2704153, 37.271874499999996])
|
18
19
|
end
|
20
|
+
|
21
|
+
it "should return correct dateline bounding box" do
|
22
|
+
expect(bbox_dateline.find_center).to eq([-183.5, 5])
|
23
|
+
end
|
19
24
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blacklight-maps
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Beer
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-10-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -127,16 +127,16 @@ dependencies:
|
|
127
127
|
name: rspec-rails
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
|
-
- - "
|
130
|
+
- - "~>"
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version: '
|
132
|
+
version: '2.9'
|
133
133
|
type: :development
|
134
134
|
prerelease: false
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
|
-
- - "
|
137
|
+
- - "~>"
|
138
138
|
- !ruby/object:Gem::Version
|
139
|
-
version: '
|
139
|
+
version: '2.9'
|
140
140
|
- !ruby/object:Gem::Dependency
|
141
141
|
name: jettywrapper
|
142
142
|
requirement: !ruby/object:Gem::Requirement
|
@@ -157,14 +157,14 @@ dependencies:
|
|
157
157
|
requirements:
|
158
158
|
- - "~>"
|
159
159
|
- !ruby/object:Gem::Version
|
160
|
-
version: 0.
|
160
|
+
version: 0.4.0
|
161
161
|
type: :development
|
162
162
|
prerelease: false
|
163
163
|
version_requirements: !ruby/object:Gem::Requirement
|
164
164
|
requirements:
|
165
165
|
- - "~>"
|
166
166
|
- !ruby/object:Gem::Version
|
167
|
-
version: 0.
|
167
|
+
version: 0.4.0
|
168
168
|
- !ruby/object:Gem::Dependency
|
169
169
|
name: capybara
|
170
170
|
requirement: !ruby/object:Gem::Requirement
|
@@ -258,7 +258,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
258
258
|
version: '0'
|
259
259
|
requirements: []
|
260
260
|
rubyforge_project:
|
261
|
-
rubygems_version: 2.2.
|
261
|
+
rubygems_version: 2.2.2
|
262
262
|
signing_key:
|
263
263
|
specification_version: 4
|
264
264
|
summary: Maps for Blacklight
|
@@ -271,4 +271,3 @@ test_files:
|
|
271
271
|
- spec/spec_helper.rb
|
272
272
|
- spec/test_app_templates/Gemfile.extra
|
273
273
|
- spec/test_app_templates/lib/generators/test_app_generator.rb
|
274
|
-
has_rdoc:
|