blacklight 5.5.0 → 5.5.1
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/VERSION +1 -1
- data/lib/blacklight/solr/facet_paginator.rb +2 -1
- data/spec/lib/blacklight/facet_paginator_spec.rb +5 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f505877f6844d0240c6ceb14695e1addd5a9348c
|
4
|
+
data.tar.gz: 38c117040379ce80b28cf0e09b5de46ac8ab9f74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3f530b8c8d637783ee9fb1b049cc0a0f86b0a29160dcb181bbac9bfadb511ce6738d3fae194e89e9ca41c9dc438a3447a1662fe6f242d8652da307f9004742b
|
7
|
+
data.tar.gz: b91b2be73a23c411503d3a8243a409c1a14b7544d93ff7ec69b4fe2ed3abc790821bda6acfaf3724d35f8fd1900723a27f1477022a7cd2e72303fbc6ade10eb6
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
5.5.
|
1
|
+
5.5.1
|
@@ -101,8 +101,9 @@ module Blacklight::Solr
|
|
101
101
|
|
102
102
|
private
|
103
103
|
# setting limit to 0 implies no limit
|
104
|
+
# @return an array of facets on the page
|
104
105
|
def items_for_limit(values)
|
105
|
-
limit
|
106
|
+
limit == 0 ? values : values.take(limit)
|
106
107
|
end
|
107
108
|
end
|
108
109
|
end
|
@@ -26,7 +26,7 @@ describe 'Blacklight::Solr::FacetPaginator' do
|
|
26
26
|
end
|
27
27
|
|
28
28
|
context 'on the last page of two pages' do
|
29
|
-
subject { Blacklight::Solr::FacetPaginator.new(
|
29
|
+
subject { Blacklight::Solr::FacetPaginator.new([f7], offset: 6, limit: limit) }
|
30
30
|
it { should_not be_first_page }
|
31
31
|
it { should be_last_page }
|
32
32
|
its(:current_page) { should eq 2 }
|
@@ -46,12 +46,12 @@ describe 'Blacklight::Solr::FacetPaginator' do
|
|
46
46
|
describe "params_for_resort_url" do
|
47
47
|
let(:sort_key) { Blacklight::Solr::FacetPaginator.request_keys[:sort] }
|
48
48
|
let(:page_key) { Blacklight::Solr::FacetPaginator.request_keys[:page] }
|
49
|
-
|
49
|
+
subject { Blacklight::Solr::FacetPaginator.new([], offset: 100, limit: limit, sort: 'index') }
|
50
50
|
|
51
51
|
it 'should know a manually set sort, and produce proper sort url' do
|
52
|
-
expect(
|
52
|
+
expect(subject.sort).to eq 'index'
|
53
53
|
|
54
|
-
click_params =
|
54
|
+
click_params = subject.params_for_resort_url('count', {})
|
55
55
|
|
56
56
|
expect(click_params[ sort_key ]).to eq 'count'
|
57
57
|
expect(click_params[ page_key ]).to be_nil
|
@@ -64,5 +64,5 @@ describe 'Blacklight::Solr::FacetPaginator' do
|
|
64
64
|
expect(subject.items).to eq seven_facet_values
|
65
65
|
end
|
66
66
|
end
|
67
|
-
|
67
|
+
|
68
68
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blacklight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.5.
|
4
|
+
version: 5.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Rochkind
|
@@ -17,7 +17,7 @@ authors:
|
|
17
17
|
autorequire:
|
18
18
|
bindir: bin
|
19
19
|
cert_chain: []
|
20
|
-
date: 2014-07-
|
20
|
+
date: 2014-07-08 00:00:00.000000000 Z
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
23
23
|
name: rails
|