blacklight_range_limit 2.2.0 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -2
- data/.rspec +1 -0
- data/.travis.yml +13 -7
- data/Gemfile +34 -8
- data/VERSION +1 -1
- data/blacklight_range_limit.gemspec +6 -2
- data/lib/blacklight_range_limit/view_helper_override.rb +7 -7
- data/spec/features/blacklight_range_limit_spec.rb +5 -5
- data/spec/spec_helper.rb +1 -7
- data/spec/test_app_templates/Gemfile.extra +1 -14
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +14 -3
- metadata +78 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89595f56ef1dc7e43d42cd5bc1be1c5a9539c539
|
4
|
+
data.tar.gz: 9effaf5e93dcc4f4e713b922de751c01e3ae582c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 279878417fcd97af663de16ea2d12ab5a81889879ce70b75d6201ccc40c1369b351fe2098215de4a2b1c8340f713c254cf6b2b8dcde2ba07736ba79e1035101a
|
7
|
+
data.tar.gz: c91d84eca6dd6cfc46c3c4a97a1ac8f780f21d62b3cd8e8cfc3a1d59c8044ea6dc617df6359d1c4f3e7048f2bce06c5ec553528b8957ca7cd88f1804d05ca92a
|
data/.gitignore
CHANGED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/.travis.yml
CHANGED
@@ -1,11 +1,17 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
sudo: false
|
2
|
+
language: ruby
|
4
3
|
rvm:
|
5
|
-
-
|
6
|
-
|
4
|
+
- 2.3.7
|
5
|
+
|
6
|
+
matrix:
|
7
|
+
include:
|
8
|
+
- rvm: 2.3.7
|
9
|
+
env: "RAILS_VERSION=4.0.13"
|
10
|
+
- rvm: 2.3.7
|
11
|
+
env: "RAILS_VERSION=4.1.16"
|
12
|
+
- rvm: 2.3.7
|
13
|
+
env: "RAILS_VERSION=4.2.10"
|
7
14
|
|
8
15
|
notifications:
|
9
16
|
irc: "irc.freenode.org#blacklight"
|
10
|
-
email:
|
11
|
-
- blacklight-commits@googlegroups.com
|
17
|
+
email: false
|
data/Gemfile
CHANGED
@@ -1,16 +1,42 @@
|
|
1
|
-
source '
|
1
|
+
source 'https://rubygems.org'
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
5
|
+
# BEGIN ENGINE_CART BLOCK
|
6
|
+
# engine_cart: 1.0.1
|
7
|
+
# engine_cart stanza: 0.10.0
|
8
|
+
# the below comes from engine_cart, a gem used to test this Rails engine gem in the context of a Rails app.
|
9
|
+
file = File.expand_path('Gemfile', ENV['ENGINE_CART_DESTINATION'] || ENV['RAILS_ROOT'] || File.expand_path('.internal_test_app', File.dirname(__FILE__)))
|
10
|
+
if File.exist?(file)
|
11
|
+
begin
|
12
|
+
eval_gemfile file
|
13
|
+
rescue Bundler::GemfileError => e
|
14
|
+
Bundler.ui.warn '[EngineCart] Skipping Rails application dependencies:'
|
15
|
+
Bundler.ui.warn e.message
|
16
|
+
end
|
17
|
+
else
|
18
|
+
Bundler.ui.warn "[EngineCart] Unable to find test application dependencies in #{file}, using placeholder dependencies"
|
19
|
+
if ENV['RAILS_VERSION']
|
20
|
+
if ENV['RAILS_VERSION'] == 'edge'
|
21
|
+
gem 'rails', github: 'rails/rails'
|
22
|
+
ENV['ENGINE_CART_RAILS_OPTIONS'] = '--edge --skip-turbolinks'
|
23
|
+
else
|
24
|
+
gem 'rails', ENV['RAILS_VERSION']
|
25
|
+
end
|
26
|
+
end
|
27
|
+
case ENV['RAILS_VERSION']
|
28
|
+
when /^4.2/
|
29
|
+
gem 'responders', '~> 2.0'
|
30
|
+
gem 'sass-rails', '>= 5.0'
|
31
|
+
gem 'coffee-rails', '~> 4.1.0'
|
32
|
+
when /^4.[01]/
|
33
|
+
gem 'sass-rails', '< 5.0'
|
34
|
+
end
|
12
35
|
end
|
36
|
+
# END ENGINE_CART BLOCK
|
13
37
|
|
14
38
|
if File.exists?('spec/test_app_templates/Gemfile.extra')
|
15
39
|
eval File.read('spec/test_app_templates/Gemfile.extra'), nil, 'spec/test_app_templates/Gemfile.extra'
|
16
40
|
end
|
41
|
+
|
42
|
+
gem 'json', '~> 1.8'
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.3.0
|
@@ -17,15 +17,19 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
18
18
|
s.require_paths = ["lib"]
|
19
19
|
|
20
|
-
|
21
20
|
s.add_dependency "rails", ">= 3.0", "< 5.0"
|
22
21
|
s.add_dependency "jquery-rails" # our JS needs jquery_rails
|
23
22
|
s.add_dependency "blacklight", "~> 4.0"
|
24
23
|
|
25
|
-
s.add_development_dependency "rspec", "
|
24
|
+
s.add_development_dependency "rspec", "~> 3.0"
|
26
25
|
s.add_development_dependency "rspec-rails"
|
27
26
|
s.add_development_dependency "capybara"
|
28
27
|
s.add_development_dependency "sqlite3"
|
29
28
|
s.add_development_dependency 'launchy'
|
30
29
|
s.add_development_dependency "jettywrapper"
|
30
|
+
s.add_development_dependency 'engine_cart', '~> 2.0'
|
31
|
+
s.add_development_dependency 'devise'
|
32
|
+
s.add_development_dependency 'devise-guests'
|
33
|
+
s.add_development_dependency 'bootstrap-sass'
|
34
|
+
s.add_development_dependency 'turbolinks'
|
31
35
|
end
|
@@ -3,10 +3,10 @@
|
|
3
3
|
# display.
|
4
4
|
module BlacklightRangeLimit::ViewHelperOverride
|
5
5
|
|
6
|
-
def has_range_limit_parameters?(
|
7
|
-
|
8
|
-
|
9
|
-
v.present? && v.respond_to?(:'[]') &&
|
6
|
+
def has_range_limit_parameters?(my_params = params)
|
7
|
+
my_params[:range] &&
|
8
|
+
my_params[:range].any? do |key, v|
|
9
|
+
v.present? && v.respond_to?(:'[]') &&
|
10
10
|
(v["begin"].present? || v["end"].present? || v["missing"].present?)
|
11
11
|
end
|
12
12
|
end
|
@@ -16,10 +16,10 @@
|
|
16
16
|
super || has_range_limit_parameters?
|
17
17
|
end
|
18
18
|
|
19
|
-
def query_has_constraints?(
|
20
|
-
super || has_range_limit_parameters?(
|
19
|
+
def query_has_constraints?(my_params = params)
|
20
|
+
super(my_params) || has_range_limit_parameters?(my_params)
|
21
21
|
end
|
22
|
-
|
22
|
+
|
23
23
|
def facet_partial_name(display_facet)
|
24
24
|
return "blacklight_range_limit/range_limit_panel" if range_config(display_facet.name) and should_show_limit(display_facet.name)
|
25
25
|
super
|
@@ -12,16 +12,16 @@ describe "Blacklight Range Limit" do
|
|
12
12
|
|
13
13
|
it "should show the range limit facet" do
|
14
14
|
visit '/catalog'
|
15
|
-
page.
|
16
|
-
page.
|
15
|
+
expect(page).to have_selector 'input.range_begin'
|
16
|
+
expect(page).to have_selector 'input.range_end'
|
17
17
|
end
|
18
18
|
|
19
19
|
it "should provide distribution information" do
|
20
20
|
visit '/catalog'
|
21
21
|
click_link 'View distribution'
|
22
22
|
|
23
|
-
page.
|
24
|
-
page.
|
23
|
+
expect(page).to have_content("1941 to 1944 (1)")
|
24
|
+
expect(page).to have_content("2005 to 2008 (7)")
|
25
25
|
end
|
26
26
|
|
27
27
|
it "should limit appropriately" do
|
@@ -29,6 +29,6 @@ describe "Blacklight Range Limit" do
|
|
29
29
|
click_link 'View distribution'
|
30
30
|
click_link '1941 to 1944'
|
31
31
|
|
32
|
-
page.
|
32
|
+
expect(page).to have_content "1941 to 1944 (1) [remove]"
|
33
33
|
end
|
34
34
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,18 +1,12 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'bundler/setup'
|
3
|
-
|
4
1
|
ENV["RAILS_ENV"] ||= 'test'
|
5
2
|
|
6
3
|
require 'rsolr'
|
7
|
-
|
8
4
|
require 'engine_cart'
|
9
5
|
EngineCart.load_application!
|
10
6
|
|
11
7
|
require 'rspec/rails'
|
12
8
|
require 'capybara/rspec'
|
13
9
|
|
14
|
-
|
15
10
|
RSpec.configure do |config|
|
16
|
-
|
11
|
+
config.infer_spec_type_from_file_location!
|
17
12
|
end
|
18
|
-
|
@@ -1,9 +1,3 @@
|
|
1
|
-
platforms :jruby do
|
2
|
-
gem 'jdbc-sqlite3'
|
3
|
-
gem 'mediashelf-loggable', '>= 0.4.8'
|
4
|
-
gem 'therubyrhino'
|
5
|
-
end
|
6
|
-
|
7
1
|
platforms :ruby do
|
8
2
|
gem 'sqlite3'
|
9
3
|
end
|
@@ -11,15 +5,8 @@ end
|
|
11
5
|
gem 'jquery-rails'
|
12
6
|
|
13
7
|
group :test do
|
14
|
-
gem 'rspec-rails', '~> 2.13'
|
15
8
|
gem 'generator_spec'
|
16
|
-
|
17
|
-
gem 'capybara', '~> 1.0'
|
18
|
-
else
|
19
|
-
gem 'capybara'
|
20
|
-
end
|
21
|
-
gem 'simplecov', :platform => :mri_19
|
22
|
-
gem 'simplecov-rcov', :platform => :mri_19
|
9
|
+
gem 'capybara'
|
23
10
|
end
|
24
11
|
|
25
12
|
gem 'jettywrapper', '>= 1.2.0'
|
@@ -1,21 +1,32 @@
|
|
1
1
|
require 'rails/generators'
|
2
2
|
|
3
3
|
class TestAppGenerator < Rails::Generators::Base
|
4
|
-
source_root
|
4
|
+
source_root '../spec/test_app_templates'
|
5
5
|
|
6
6
|
def copy_blacklight_test_app_rake_task
|
7
7
|
copy_file "lib/tasks/blacklight_test_app.rake"
|
8
8
|
end
|
9
9
|
|
10
10
|
def run_blacklight_generator
|
11
|
-
say_status("warning", "GENERATING BL", :yellow)
|
11
|
+
say_status("warning", "GENERATING BL", :yellow)
|
12
12
|
|
13
13
|
generate 'blacklight', '--devise'
|
14
14
|
end
|
15
15
|
|
16
16
|
def run_blacklight_range_limit_generator
|
17
|
-
say_status("warning", "GENERATING BL", :yellow)
|
17
|
+
say_status("warning", "GENERATING BL", :yellow)
|
18
18
|
|
19
19
|
generate 'blacklight_range_limit'
|
20
20
|
end
|
21
|
+
|
22
|
+
# Add favicon.ico to asset path
|
23
|
+
# ADD THIS LINE Rails.application.config.assets.precompile += %w( favicon.ico )
|
24
|
+
# TO config/assets.rb
|
25
|
+
def add_favicon_to_asset_path
|
26
|
+
say_status("warning", "ADDING FAVICON TO ASSET PATH", :yellow)
|
27
|
+
|
28
|
+
append_to_file 'config/initializers/assets.rb' do
|
29
|
+
'Rails.application.config.assets.precompile += %w( favicon.ico )'
|
30
|
+
end
|
31
|
+
end
|
21
32
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blacklight_range_limit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Rochkind
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -62,16 +62,16 @@ dependencies:
|
|
62
62
|
name: rspec
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
|
-
- - "
|
65
|
+
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '
|
67
|
+
version: '3.0'
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
|
-
- - "
|
72
|
+
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
74
|
+
version: '3.0'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: rspec-rails
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,6 +142,76 @@ dependencies:
|
|
142
142
|
- - ">="
|
143
143
|
- !ruby/object:Gem::Version
|
144
144
|
version: '0'
|
145
|
+
- !ruby/object:Gem::Dependency
|
146
|
+
name: engine_cart
|
147
|
+
requirement: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - "~>"
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '2.0'
|
152
|
+
type: :development
|
153
|
+
prerelease: false
|
154
|
+
version_requirements: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - "~>"
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '2.0'
|
159
|
+
- !ruby/object:Gem::Dependency
|
160
|
+
name: devise
|
161
|
+
requirement: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
163
|
+
- - ">="
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '0'
|
166
|
+
type: :development
|
167
|
+
prerelease: false
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
requirements:
|
170
|
+
- - ">="
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: '0'
|
173
|
+
- !ruby/object:Gem::Dependency
|
174
|
+
name: devise-guests
|
175
|
+
requirement: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - ">="
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: '0'
|
180
|
+
type: :development
|
181
|
+
prerelease: false
|
182
|
+
version_requirements: !ruby/object:Gem::Requirement
|
183
|
+
requirements:
|
184
|
+
- - ">="
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: '0'
|
187
|
+
- !ruby/object:Gem::Dependency
|
188
|
+
name: bootstrap-sass
|
189
|
+
requirement: !ruby/object:Gem::Requirement
|
190
|
+
requirements:
|
191
|
+
- - ">="
|
192
|
+
- !ruby/object:Gem::Version
|
193
|
+
version: '0'
|
194
|
+
type: :development
|
195
|
+
prerelease: false
|
196
|
+
version_requirements: !ruby/object:Gem::Requirement
|
197
|
+
requirements:
|
198
|
+
- - ">="
|
199
|
+
- !ruby/object:Gem::Version
|
200
|
+
version: '0'
|
201
|
+
- !ruby/object:Gem::Dependency
|
202
|
+
name: turbolinks
|
203
|
+
requirement: !ruby/object:Gem::Requirement
|
204
|
+
requirements:
|
205
|
+
- - ">="
|
206
|
+
- !ruby/object:Gem::Version
|
207
|
+
version: '0'
|
208
|
+
type: :development
|
209
|
+
prerelease: false
|
210
|
+
version_requirements: !ruby/object:Gem::Requirement
|
211
|
+
requirements:
|
212
|
+
- - ">="
|
213
|
+
- !ruby/object:Gem::Version
|
214
|
+
version: '0'
|
145
215
|
description:
|
146
216
|
email:
|
147
217
|
- blacklight-development@googlegroups.com
|
@@ -150,6 +220,7 @@ extensions: []
|
|
150
220
|
extra_rdoc_files: []
|
151
221
|
files:
|
152
222
|
- ".gitignore"
|
223
|
+
- ".rspec"
|
153
224
|
- ".travis.yml"
|
154
225
|
- Gemfile
|
155
226
|
- MIT-LICENSE
|
@@ -207,7 +278,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
207
278
|
version: '0'
|
208
279
|
requirements: []
|
209
280
|
rubyforge_project: blacklight
|
210
|
-
rubygems_version: 2.
|
281
|
+
rubygems_version: 2.6.11
|
211
282
|
signing_key:
|
212
283
|
specification_version: 4
|
213
284
|
summary: Blacklight Range Limit plugin
|