blacklight_range_limit 5.0.3 → 5.0.4
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 +4 -4
- data/.gitignore +2 -1
- data/Gemfile +13 -22
- data/Rakefile +4 -6
- data/VERSION +1 -1
- data/blacklight_range_limit.gemspec +2 -1
- data/lib/blacklight_range_limit/view_helper_override.rb +5 -5
- data/spec/features/blacklight_range_limit_spec.rb +10 -10
- data/spec/spec_helper.rb +11 -0
- metadata +21 -9
- data/spec/test_app_templates/Gemfile.extra +0 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 634026b870d878f4ab9ffc0f8d0f101ff2136317
|
4
|
+
data.tar.gz: 4a89fdf27b5acf0d237fa77848edec77a0d30f8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed2522f9cb021084721312501b7b7044c7fa7e8526f90a65f7eded30dad4426fa2c727686aa7a80e102968de5e6239e7286a952470a6c3615da5a091344c7c69
|
7
|
+
data.tar.gz: d23895c6afeb3b24dc22e30f2fa0b69b5a49f9f24e9ef28da418e5b3b1586755bb967c0fe7f92d70825418c0e55db7fe8f40025f08bb29c1c41e485d1bfc5fab
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
@@ -1,27 +1,18 @@
|
|
1
|
-
source '
|
1
|
+
source 'https://rubygems.org'
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
|
-
|
5
|
+
file = File.expand_path("Gemfile", ENV['ENGINE_CART_DESTINATION'] || ENV['RAILS_ROOT'] || File.expand_path("../spec/internal", __FILE__))
|
6
|
+
if File.exists?(file)
|
7
|
+
puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
|
8
|
+
instance_eval File.read(file)
|
9
|
+
else
|
10
|
+
gem 'rails', ENV['RAILS_VERSION'] if ENV['RAILS_VERSION']
|
6
11
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
end
|
13
|
-
|
14
|
-
gem 'sass-rails'
|
15
|
-
# If we don't specify 2.11.0 we'll end up with sprockets 2.12.0 in the main
|
16
|
-
# Gemfile.lock but since sass-rails gets generated (rails new) into the test app
|
17
|
-
# it'll want sprockets 2.11.0 and we'll have a conflict
|
18
|
-
gem 'sprockets', '2.11.0'
|
19
|
-
|
20
|
-
# If we don't specify 3.2.15 we'll end up with sass 3.3.2 in the main
|
21
|
-
# Gemfile.lock but since sass-rails gets generated (rails new) into the test app
|
22
|
-
# it'll want sass 3.2.0 and we'll have a conflict
|
23
|
-
gem 'sass', '~> 3.2.0'
|
24
|
-
|
25
|
-
if File.exists?('spec/test_app_templates/Gemfile.extra')
|
26
|
-
eval File.read('spec/test_app_templates/Gemfile.extra'), nil, 'spec/test_app_templates/Gemfile.extra'
|
12
|
+
if ENV['RAILS_VERSION'] and ENV['RAILS_VERSION'] =~ /^4.2/
|
13
|
+
gem 'responders', "~> 2.0"
|
14
|
+
gem 'sass-rails', ">= 5.0"
|
15
|
+
else
|
16
|
+
gem 'sass-rails', "< 5.0"
|
17
|
+
end
|
27
18
|
end
|
data/Rakefile
CHANGED
@@ -6,13 +6,11 @@ Bundler::GemHelper.install_tasks
|
|
6
6
|
|
7
7
|
require 'rspec/core/rake_task'
|
8
8
|
|
9
|
-
|
10
|
-
TEST_APP_TEMPLATES = 'spec/test_app_templates'
|
11
|
-
TEST_APP = 'spec/internal'
|
12
9
|
require 'engine_cart/rake_task'
|
13
10
|
|
14
|
-
|
15
|
-
|
11
|
+
EngineCart.fingerprint_proc = EngineCart.rails_fingerprint_proc
|
12
|
+
|
13
|
+
ZIP_URL = "https://github.com/projectblacklight/blacklight-jetty/archive/v4.10.3.zip"
|
16
14
|
|
17
15
|
require 'jettywrapper'
|
18
16
|
|
@@ -23,7 +21,7 @@ RSpec::Core::RakeTask.new do |t|
|
|
23
21
|
|
24
22
|
end
|
25
23
|
|
26
|
-
task :ci => ['jetty:clean', 'engine_cart:
|
24
|
+
task :ci => ['jetty:clean', 'engine_cart:generate'] do
|
27
25
|
jetty_params = Jettywrapper.load_config('test')
|
28
26
|
jetty_params[:startup_wait]= 60
|
29
27
|
error = Jettywrapper.wrap(jetty_params) do
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
5.0.
|
1
|
+
5.0.4
|
@@ -23,10 +23,11 @@ Gem::Specification.new do |s|
|
|
23
23
|
# but not 6. can't seem to make it do so other than this:
|
24
24
|
s.add_dependency "blacklight", ">= 5.0.0.pre4", "< 6"
|
25
25
|
|
26
|
-
s.add_development_dependency "rspec", "
|
26
|
+
s.add_development_dependency "rspec", "~> 3.0"
|
27
27
|
s.add_development_dependency "rspec-rails"
|
28
28
|
s.add_development_dependency "capybara"
|
29
29
|
s.add_development_dependency "sqlite3"
|
30
30
|
s.add_development_dependency 'launchy'
|
31
31
|
s.add_development_dependency "jettywrapper", "~> 1.5", ">= 1.5.2"
|
32
|
+
s.add_development_dependency "engine_cart", "~> 0.6"
|
32
33
|
end
|
@@ -10,9 +10,9 @@
|
|
10
10
|
super
|
11
11
|
end
|
12
12
|
|
13
|
-
def has_range_limit_parameters?(
|
14
|
-
|
15
|
-
|
13
|
+
def has_range_limit_parameters?(my_params = params)
|
14
|
+
my_params[:range] &&
|
15
|
+
my_params[:range].any? do |key, v|
|
16
16
|
v.present? && v.respond_to?(:'[]') &&
|
17
17
|
(v["begin"].present? || v["end"].present? || v["missing"].present?)
|
18
18
|
end
|
@@ -23,8 +23,8 @@
|
|
23
23
|
super || has_range_limit_parameters?
|
24
24
|
end
|
25
25
|
|
26
|
-
def query_has_constraints?(
|
27
|
-
super || has_range_limit_parameters?(
|
26
|
+
def query_has_constraints?(my_params = params)
|
27
|
+
super || has_range_limit_parameters?(my_params)
|
28
28
|
end
|
29
29
|
|
30
30
|
# Over-ride to recognize our custom params for range facets
|
@@ -4,19 +4,19 @@ describe "Blacklight Range Limit" do
|
|
4
4
|
|
5
5
|
it "should show the range limit facet" do
|
6
6
|
visit catalog_index_path
|
7
|
-
page.
|
8
|
-
page.
|
9
|
-
page.
|
10
|
-
page.
|
11
|
-
expect(page).to
|
7
|
+
expect(page).to have_selector 'input.range_begin'
|
8
|
+
expect(page).to have_selector 'input.range_end'
|
9
|
+
expect(page).to have_selector 'label.sr-only[for="range_pub_date_sort_begin"]', :text => 'Publication Date Sort range begin'
|
10
|
+
expect(page).to have_selector 'label.sr-only[for="range_pub_date_sort_end"]', :text => 'Publication Date Sort range end'
|
11
|
+
expect(page).to have_button 'Limit'
|
12
12
|
end
|
13
13
|
|
14
14
|
it "should provide distribution information" do
|
15
15
|
visit catalog_index_path
|
16
16
|
click_link 'View distribution'
|
17
17
|
|
18
|
-
page.
|
19
|
-
page.
|
18
|
+
expect(page).to have_content("1500 to 1599 0")
|
19
|
+
expect(page).to have_content("2000 to 2008 12")
|
20
20
|
end
|
21
21
|
|
22
22
|
it "should limit appropriately" do
|
@@ -24,7 +24,7 @@ describe "Blacklight Range Limit" do
|
|
24
24
|
click_link 'View distribution'
|
25
25
|
click_link '2000 to 2008'
|
26
26
|
|
27
|
-
page.
|
27
|
+
expect(page).to have_content "2000 to 2008 [remove] 12"
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
@@ -42,8 +42,8 @@ describe "Blacklight Range Limit with configured input labels" do
|
|
42
42
|
|
43
43
|
it "should show the range limit facet" do
|
44
44
|
visit '/catalog'
|
45
|
-
page.
|
46
|
-
page.
|
45
|
+
expect(page).to have_selector 'label.sr-only[for="range_pub_date_sort_begin"]', :text => 'from publication date'
|
46
|
+
expect(page).to have_selector 'label.sr-only[for="range_pub_date_sort_end"]', :text => 'to publication date'
|
47
47
|
end
|
48
48
|
|
49
49
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -14,5 +14,16 @@ require 'capybara/rspec'
|
|
14
14
|
|
15
15
|
RSpec.configure do |config|
|
16
16
|
|
17
|
+
|
18
|
+
# rspec-rails 3 will no longer automatically infer an example group's spec type
|
19
|
+
# from the file location. You can explicitly opt-in to the feature using this
|
20
|
+
# config option.
|
21
|
+
# To explicitly tag specs without using automatic inference, set the `:type`
|
22
|
+
# metadata manually:
|
23
|
+
#
|
24
|
+
# describe ThingsController, :type => :controller do
|
25
|
+
# # Equivalent to being in spec/controllers
|
26
|
+
# end
|
27
|
+
config.infer_spec_type_from_file_location!
|
17
28
|
end
|
18
29
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blacklight_range_limit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Rochkind
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-03-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -69,16 +69,16 @@ dependencies:
|
|
69
69
|
name: rspec
|
70
70
|
requirement: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
|
-
- - "
|
72
|
+
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
74
|
+
version: '3.0'
|
75
75
|
type: :development
|
76
76
|
prerelease: false
|
77
77
|
version_requirements: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
|
-
- - "
|
79
|
+
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: '
|
81
|
+
version: '3.0'
|
82
82
|
- !ruby/object:Gem::Dependency
|
83
83
|
name: rspec-rails
|
84
84
|
requirement: !ruby/object:Gem::Requirement
|
@@ -155,6 +155,20 @@ dependencies:
|
|
155
155
|
- - ">="
|
156
156
|
- !ruby/object:Gem::Version
|
157
157
|
version: 1.5.2
|
158
|
+
- !ruby/object:Gem::Dependency
|
159
|
+
name: engine_cart
|
160
|
+
requirement: !ruby/object:Gem::Requirement
|
161
|
+
requirements:
|
162
|
+
- - "~>"
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
version: '0.6'
|
165
|
+
type: :development
|
166
|
+
prerelease: false
|
167
|
+
version_requirements: !ruby/object:Gem::Requirement
|
168
|
+
requirements:
|
169
|
+
- - "~>"
|
170
|
+
- !ruby/object:Gem::Version
|
171
|
+
version: '0.6'
|
158
172
|
description:
|
159
173
|
email:
|
160
174
|
- blacklight-development@googlegroups.com
|
@@ -198,7 +212,6 @@ files:
|
|
198
212
|
- spec/fixtures/solr_documents/zero_year.yml
|
199
213
|
- spec/helpers/blacklight_range_limit_helper_spec.rb
|
200
214
|
- spec/spec_helper.rb
|
201
|
-
- spec/test_app_templates/Gemfile.extra
|
202
215
|
- spec/test_app_templates/lib/generators/test_app_generator.rb
|
203
216
|
- vendor/assets/javascripts/bootstrap-slider.js
|
204
217
|
- vendor/assets/javascripts/flot/excanvas.min.js
|
@@ -225,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
225
238
|
version: '0'
|
226
239
|
requirements: []
|
227
240
|
rubyforge_project:
|
228
|
-
rubygems_version: 2.
|
241
|
+
rubygems_version: 2.4.5
|
229
242
|
signing_key:
|
230
243
|
specification_version: 4
|
231
244
|
summary: Blacklight Range Limit plugin
|
@@ -234,5 +247,4 @@ test_files:
|
|
234
247
|
- spec/fixtures/solr_documents/zero_year.yml
|
235
248
|
- spec/helpers/blacklight_range_limit_helper_spec.rb
|
236
249
|
- spec/spec_helper.rb
|
237
|
-
- spec/test_app_templates/Gemfile.extra
|
238
250
|
- spec/test_app_templates/lib/generators/test_app_generator.rb
|
@@ -1,25 +0,0 @@
|
|
1
|
-
platforms :jruby do
|
2
|
-
gem 'jdbc-sqlite3'
|
3
|
-
gem 'mediashelf-loggable', '>= 0.4.8'
|
4
|
-
gem 'therubyrhino'
|
5
|
-
end
|
6
|
-
|
7
|
-
platforms :ruby do
|
8
|
-
gem 'sqlite3'
|
9
|
-
end
|
10
|
-
|
11
|
-
gem 'jquery-rails'
|
12
|
-
|
13
|
-
group :test do
|
14
|
-
gem 'rspec-rails', '~> 2.13'
|
15
|
-
gem 'generator_spec'
|
16
|
-
if defined? :JRUBY_VERSION
|
17
|
-
gem 'capybara', '~> 1.0'
|
18
|
-
else
|
19
|
-
gem 'capybara'
|
20
|
-
end
|
21
|
-
gem 'simplecov', :platform => :mri_19
|
22
|
-
end
|
23
|
-
|
24
|
-
gem 'jettywrapper', '>= 1.2.0'
|
25
|
-
gem 'blacklight'
|