blacklight 5.5.0 → 5.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fac08d13bf67f849e356efeeea75395d3dd66b44
4
- data.tar.gz: 1ed742c6ae84f16f1361950eb4fdcdc7dbfb38f1
3
+ metadata.gz: f505877f6844d0240c6ceb14695e1addd5a9348c
4
+ data.tar.gz: 38c117040379ce80b28cf0e09b5de46ac8ab9f74
5
5
  SHA512:
6
- metadata.gz: b8106b0abf9286780e5446572ac0d47e375d75f628981086cd9101f6b994688ba9cc4f3329319be812edece3723c974be889f2a488cda8ae60929383bf1ff775
7
- data.tar.gz: 5addaec1c1bfaf038aa6b1c010ec4942c40059345d344a805c4f062e47cce95eff2e15969ec6ddc3c7288ce0790453f06da79bab42ceca5b64964b7c4ff3e014
6
+ metadata.gz: a3f530b8c8d637783ee9fb1b049cc0a0f86b0a29160dcb181bbac9bfadb511ce6738d3fae194e89e9ca41c9dc438a3447a1662fe6f242d8652da307f9004742b
7
+ data.tar.gz: b91b2be73a23c411503d3a8243a409c1a14b7544d93ff7ec69b4fe2ed3abc790821bda6acfaf3724d35f8fd1900723a27f1477022a7cd2e72303fbc6ade10eb6
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.5.0
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 != 0 ? values.slice(offset, limit) : values
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(seven_facet_values, offset: 6, limit: limit) }
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
- let(:paginator) { Blacklight::Solr::FacetPaginator.new(seven_facet_values, offset: 100, limit: limit, sort: 'index') }
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(paginator.sort).to eq 'index'
52
+ expect(subject.sort).to eq 'index'
53
53
 
54
- click_params = paginator.params_for_resort_url('count', {})
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.0
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-07 00:00:00.000000000 Z
20
+ date: 2014-07-08 00:00:00.000000000 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: rails