blacklight-maps 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +20 -0
  3. data/.travis.yml +18 -0
  4. data/Gemfile +16 -0
  5. data/LICENSE.txt +13 -0
  6. data/README.md +81 -0
  7. data/Rakefile +43 -0
  8. data/app/assets/javascripts/blacklight-maps.js +8 -0
  9. data/app/assets/javascripts/blacklight-maps/blacklight-maps-browse.js +141 -0
  10. data/app/assets/stylesheets/blacklight_maps/blacklight-maps.css.scss +4 -0
  11. data/app/assets/stylesheets/blacklight_maps/default.css.scss +24 -0
  12. data/app/helpers/blacklight_maps_helper.rb +36 -0
  13. data/app/views/catalog/_document_maps.html.erb +6 -0
  14. data/app/views/catalog/_index_maps.html.erb +9 -0
  15. data/blacklight-maps.gemspec +34 -0
  16. data/config/jetty.yml +7 -0
  17. data/config/locales/blacklight-maps.en.yml +5 -0
  18. data/config/routes.rb +4 -0
  19. data/docs/map-sidebar.png +0 -0
  20. data/docs/map-view.png +0 -0
  21. data/lib/blacklight/maps.rb +7 -0
  22. data/lib/blacklight/maps/engine.rb +32 -0
  23. data/lib/blacklight/maps/version.rb +5 -0
  24. data/lib/generators/blacklight_maps/install_generator.rb +25 -0
  25. data/lib/generators/blacklight_maps/templates/blacklight_maps.css.scss +3 -0
  26. data/lib/railties/blacklight_maps.rake +13 -0
  27. data/solr_conf/conf/schema.xml +673 -0
  28. data/solr_conf/conf/solrconfig.xml +523 -0
  29. data/spec/features/maps_spec.rb +79 -0
  30. data/spec/fixtures/sample_solr_documents.yml +2742 -0
  31. data/spec/helpers/blacklight_maps_helper_spec.rb +28 -0
  32. data/spec/spec_helper.rb +38 -0
  33. data/spec/test_app_templates/Gemfile.extra +7 -0
  34. data/spec/test_app_templates/lib/generators/test_app_generator.rb +23 -0
  35. metadata +268 -0
@@ -0,0 +1,28 @@
1
+ require 'spec_helper'
2
+
3
+ describe BlacklightMapsHelper do
4
+ include ERB::Util
5
+ include BlacklightMapsHelper
6
+
7
+ let(:blacklight_config) { Blacklight::Configuration.new }
8
+
9
+ describe "show_map_div" do
10
+ before :each do
11
+ helper.stub(blacklight_config: blacklight_config)
12
+ end
13
+
14
+ it "should have #map div" do
15
+ expect(helper.show_map_div).to have_selector("div#blacklight-map")
16
+ end
17
+
18
+ it "should contain data-attributes" do
19
+ expect(helper.show_map_div).to have_selector("div[data-maxzoom='8']")
20
+ end
21
+
22
+ end
23
+
24
+ # TODO Test geoJSON serialization
25
+
26
+
27
+
28
+ end
@@ -0,0 +1,38 @@
1
+ ENV["RAILS_ENV"] ||= 'test'
2
+
3
+ require 'engine_cart'
4
+ EngineCart.load_application!
5
+
6
+ require 'capybara/poltergeist'
7
+ Capybara.javascript_driver = :poltergeist
8
+
9
+ Capybara.register_driver :poltergeist do |app|
10
+ options = {}
11
+
12
+ options[:timeout] = 120 if RUBY_PLATFORM == "java"
13
+
14
+ Capybara::Poltergeist::Driver.new(app, options)
15
+ end
16
+
17
+ if ENV["COVERAGE"] or ENV["CI"]
18
+ require 'simplecov'
19
+ require 'coveralls'
20
+
21
+ SimpleCov.formatter = Coveralls::SimpleCov::Formatter
22
+ SimpleCov.start do
23
+ add_filter "/spec/"
24
+ end
25
+ end
26
+
27
+
28
+ require 'blacklight'
29
+ require 'blacklight/maps'
30
+
31
+ require 'rspec/rails'
32
+ require 'rspec/autorun'
33
+ require 'capybara/rspec'
34
+
35
+
36
+ RSpec.configure do |config|
37
+
38
+ end
@@ -0,0 +1,7 @@
1
+ # extra gems to load into the test app go here
2
+
3
+ gem 'leaflet-rails'
4
+
5
+ gem 'leaflet-markercluster-rails'
6
+
7
+ gem 'leaflet-sidebar-rails', '0.0.1', git: 'https://github.com/mejackreed/leaflet-sidebar-rails'
@@ -0,0 +1,23 @@
1
+ require 'rails/generators'
2
+
3
+ class TestAppGenerator < Rails::Generators::Base
4
+
5
+ def remove_index
6
+ remove_file "public/index.html"
7
+ end
8
+
9
+ def run_blacklight_generator
10
+ say_status("warning", "GENERATING BL", :yellow)
11
+
12
+ Bundler.with_clean_env do
13
+ run "bundle install"
14
+ end
15
+
16
+ generate 'blacklight:install'
17
+ end
18
+
19
+ def run_gallery_install
20
+ generate 'blacklight_maps:install'
21
+ end
22
+
23
+ end
metadata ADDED
@@ -0,0 +1,268 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: blacklight-maps
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Chris Beer
8
+ - Jack Reed
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2014-03-12 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: '0'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: '0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: blacklight
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: 5.1.0
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: 5.1.0
42
+ - !ruby/object:Gem::Dependency
43
+ name: bootstrap-sass
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '3.0'
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: '3.0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: leaflet-rails
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: leaflet-markercluster-rails
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :runtime
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: leaflet-sidebar-rails
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - "~>"
89
+ - !ruby/object:Gem::Version
90
+ version: 0.0.2
91
+ type: :runtime
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: 0.0.2
98
+ - !ruby/object:Gem::Dependency
99
+ name: bundler
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - "~>"
103
+ - !ruby/object:Gem::Version
104
+ version: '1.5'
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - "~>"
110
+ - !ruby/object:Gem::Version
111
+ version: '1.5'
112
+ - !ruby/object:Gem::Dependency
113
+ name: rake
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ - !ruby/object:Gem::Dependency
127
+ name: rspec-rails
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
140
+ - !ruby/object:Gem::Dependency
141
+ name: jettywrapper
142
+ requirement: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - ">="
145
+ - !ruby/object:Gem::Version
146
+ version: '0'
147
+ type: :development
148
+ prerelease: false
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - ">="
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
154
+ - !ruby/object:Gem::Dependency
155
+ name: engine_cart
156
+ requirement: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - "~>"
159
+ - !ruby/object:Gem::Version
160
+ version: 0.3.2
161
+ type: :development
162
+ prerelease: false
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - "~>"
166
+ - !ruby/object:Gem::Version
167
+ version: 0.3.2
168
+ - !ruby/object:Gem::Dependency
169
+ name: capybara
170
+ requirement: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - ">="
173
+ - !ruby/object:Gem::Version
174
+ version: '0'
175
+ type: :development
176
+ prerelease: false
177
+ version_requirements: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - ">="
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ - !ruby/object:Gem::Dependency
183
+ name: poltergeist
184
+ requirement: !ruby/object:Gem::Requirement
185
+ requirements:
186
+ - - ">="
187
+ - !ruby/object:Gem::Version
188
+ version: 1.5.0
189
+ type: :development
190
+ prerelease: false
191
+ version_requirements: !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - ">="
194
+ - !ruby/object:Gem::Version
195
+ version: 1.5.0
196
+ description:
197
+ email:
198
+ - cabeer@stanford.edu
199
+ - pjreed@stanford.edu
200
+ executables: []
201
+ extensions: []
202
+ extra_rdoc_files: []
203
+ files:
204
+ - ".gitignore"
205
+ - ".travis.yml"
206
+ - Gemfile
207
+ - LICENSE.txt
208
+ - README.md
209
+ - Rakefile
210
+ - app/assets/javascripts/blacklight-maps.js
211
+ - app/assets/javascripts/blacklight-maps/blacklight-maps-browse.js
212
+ - app/assets/stylesheets/blacklight_maps/blacklight-maps.css.scss
213
+ - app/assets/stylesheets/blacklight_maps/default.css.scss
214
+ - app/helpers/blacklight_maps_helper.rb
215
+ - app/views/catalog/_document_maps.html.erb
216
+ - app/views/catalog/_index_maps.html.erb
217
+ - blacklight-maps.gemspec
218
+ - config/jetty.yml
219
+ - config/locales/blacklight-maps.en.yml
220
+ - config/routes.rb
221
+ - docs/map-sidebar.png
222
+ - docs/map-view.png
223
+ - lib/blacklight/maps.rb
224
+ - lib/blacklight/maps/engine.rb
225
+ - lib/blacklight/maps/version.rb
226
+ - lib/generators/blacklight_maps/install_generator.rb
227
+ - lib/generators/blacklight_maps/templates/blacklight_maps.css.scss
228
+ - lib/railties/blacklight_maps.rake
229
+ - solr_conf/conf/schema.xml
230
+ - solr_conf/conf/solrconfig.xml
231
+ - spec/features/maps_spec.rb
232
+ - spec/fixtures/sample_solr_documents.yml
233
+ - spec/helpers/blacklight_maps_helper_spec.rb
234
+ - spec/spec_helper.rb
235
+ - spec/test_app_templates/Gemfile.extra
236
+ - spec/test_app_templates/lib/generators/test_app_generator.rb
237
+ homepage: ''
238
+ licenses:
239
+ - Apache 2.0
240
+ metadata: {}
241
+ post_install_message:
242
+ rdoc_options: []
243
+ require_paths:
244
+ - lib
245
+ required_ruby_version: !ruby/object:Gem::Requirement
246
+ requirements:
247
+ - - ">="
248
+ - !ruby/object:Gem::Version
249
+ version: '0'
250
+ required_rubygems_version: !ruby/object:Gem::Requirement
251
+ requirements:
252
+ - - ">="
253
+ - !ruby/object:Gem::Version
254
+ version: '0'
255
+ requirements: []
256
+ rubyforge_project:
257
+ rubygems_version: 2.2.0
258
+ signing_key:
259
+ specification_version: 4
260
+ summary: Maps for Blacklight
261
+ test_files:
262
+ - spec/features/maps_spec.rb
263
+ - spec/fixtures/sample_solr_documents.yml
264
+ - spec/helpers/blacklight_maps_helper_spec.rb
265
+ - spec/spec_helper.rb
266
+ - spec/test_app_templates/Gemfile.extra
267
+ - spec/test_app_templates/lib/generators/test_app_generator.rb
268
+ has_rdoc: