will_paginate-bootstrap 1.0.0 → 1.0.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: 0ad035b3ba21f74d3c721c07103d7ed4e5005b04
4
- data.tar.gz: c786be6bd7bb79da5bda6ca9a0bcd91fd8044aed
3
+ metadata.gz: 5e9399da225d7a96f5a677137192f66b6d7b4214
4
+ data.tar.gz: 33c04e3d6f8a32e6342c0d150f4aa4df39d3bf05
5
5
  SHA512:
6
- metadata.gz: 27855d1a81142bce77f7fd342173fdf1de0d5c7865fbcac1bbe1bdb82b0e12c23e4ce9c379e9551f39647262232c63eb1ea68bad042760fa9806e31c4b6b4d56
7
- data.tar.gz: a4b25320a88f6072bf9db75252a48908965a989b79e4a262b974bb7239eebc848c75d630228bf1778e14a4a3bf5a99b3ca8378374f34b23fdcc5c3326d2517a1
6
+ metadata.gz: 9c9d8af213585fc0122bb8f5bbbac992e1efd015575a2ad2a1e0303169e9b64d97ef62be917041cf7f37751bd1ea165056da9b7084570e384ae015e22ad7c944
7
+ data.tar.gz: 1f9cba0d7e53099bccc985c46035edb9f23dfab1850043ce421e2014df7a8fb39905d52c9a3447876e94c70a88ef374cda27a7e91c1574fb706782d1ec13866f
@@ -1,8 +1,8 @@
1
1
  # will_paginate-bootstrap
2
2
 
3
- [![Code Climate](https://codeclimate.com/github/nickpad/will_paginate-bootstrap.png)](https://codeclimate.com/github/nickpad/will_paginate-bootstrap)
3
+ [![Code Climate](https://codeclimate.com/github/bootstrap-ruby/will_paginate-bootstrap.png)](https://codeclimate.com/github/bootstrap-ruby/will_paginate-bootstrap)
4
4
 
5
- ![Bootstrap Pagination Component](https://raw.github.com/nickpad/will_paginate-bootstrap/master/pagination.png)
5
+ ![Bootstrap Pagination Component](https://raw.github.com/bootstrap-ruby/will_paginate-bootstrap/master/pagination.png)
6
6
 
7
7
  This gem integrates the [Twitter Bootstrap](http://twitter.github.com/bootstrap/) [pagination component](http://twitter.github.com/bootstrap/components.html#pagination) with the [will_paginate](https://github.com/mislav/will_paginate) pagination gem.
8
8
 
@@ -52,3 +52,5 @@ Starting at version 1.0, this gem no longer supports Bootstrap 2.
52
52
  <td>>= 3.0.0</td>
53
53
  </tr>
54
54
  </table>
55
+
56
+ Bootstrap 2 users can use version `0.2.5` of the gem which was the last version to offer Bootstrap 2 support.
@@ -45,7 +45,7 @@ module BootstrapPagination
45
45
  end
46
46
 
47
47
  def gap
48
- tag("li", link(ELLIPSIS, "#"), class: "disabled")
48
+ tag("li", tag("span", ELLIPSIS), class: "disabled")
49
49
  end
50
50
 
51
51
  def previous_page
@@ -1,3 +1,3 @@
1
1
  module BootstrapPagination
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -65,14 +65,35 @@ describe "Bootstrap Renderer" do
65
65
  html.css('[rel~=next]').size.must_equal 2
66
66
  end
67
67
 
68
- it "has an anchor within each non-active list item" do
69
- html.css('ul li:not(.active)').each { |li| li.at_css('a').wont_be_nil }
68
+ it "has an anchor within each non-active/non-disabled list item" do
69
+ html.css('ul li:not(.active):not(.disabled)').each { |li| li.at_css('a').wont_be_nil }
70
70
  end
71
71
 
72
72
  it "uses a span element for the active page" do
73
73
  html.at_css('ul li.active span').wont_be_nil
74
74
  end
75
75
 
76
+ it 'uses a span to wrap the ellipsis' do
77
+ ellipsis = BootstrapPagination::BootstrapRenderer::ELLIPSIS
78
+ html.at_css('li.disabled span', text: ellipsis).wont_be_nil
79
+ end
80
+
81
+ describe 'when on the first page' do
82
+ let(:page) { 1 }
83
+
84
+ it 'uses a span element for the (disabled) previous button' do
85
+ html.at_css('li.disabled span', text: 'Previous Label').wont_be_nil
86
+ end
87
+ end
88
+
89
+ describe 'when on the last page' do
90
+ let(:page) { collection_size }
91
+
92
+ it 'uses a span element for the (disabled) next button' do
93
+ html.at_css('li.disabled span', text: 'Next Label').wont_be_nil
94
+ end
95
+ end
96
+
76
97
  it "has no outer pagination div" do
77
98
  html.at_css('div.pagination').must_be_nil
78
99
  end
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
7
7
  s.version = BootstrapPagination::VERSION
8
8
  s.authors = ["Nick Dainty"]
9
9
  s.email = ["nick@npad.co.uk"]
10
- s.homepage = "https://github.com/nickpad/will_paginate-bootstrap"
10
+ s.homepage = "https://github.com/bootstrap-ruby/will_paginate-bootstrap"
11
11
  s.summary = %q{Integrates the Twitter Bootstrap pagination component with will_paginate}
12
12
  s.description = %q{This gem integrates the Twitter Bootstrap pagination component with the will_paginate pagination gem. Supports Rails and Sinatra.}
13
13
  s.license = "MIT"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: will_paginate-bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Dainty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-13 00:00:00.000000000 Z
11
+ date: 2014-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: will_paginate
@@ -47,7 +47,7 @@ files:
47
47
  - pagination.png
48
48
  - spec/pagination_spec.rb
49
49
  - will_paginate-bootstrap.gemspec
50
- homepage: https://github.com/nickpad/will_paginate-bootstrap
50
+ homepage: https://github.com/bootstrap-ruby/will_paginate-bootstrap
51
51
  licenses:
52
52
  - MIT
53
53
  metadata: {}
@@ -67,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
67
  version: '0'
68
68
  requirements: []
69
69
  rubyforge_project: will_paginate-bootstrap
70
- rubygems_version: 2.0.3
70
+ rubygems_version: 2.2.2
71
71
  signing_key:
72
72
  specification_version: 4
73
73
  summary: Integrates the Twitter Bootstrap pagination component with will_paginate