rails_pagination 2.0.6 → 2.0.7
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.
- data/README.rdoc +8 -24
- data/Rakefile +2 -0
- data/app/views/rails_pagination/_pager.html.erb +23 -0
- data/config/locales/en.yml +6 -0
- data/config/locales/es.yml +6 -0
- data/lib/rails_pagination/action_view/base.rb +5 -1
- data/lib/rails_pagination/engine.rb +7 -0
- data/lib/rails_pagination/{pager.rb → pagination.rb} +4 -4
- data/lib/rails_pagination/version.rb +1 -1
- data/lib/rails_pagination.rb +2 -1
- data/test/collection_empty_test.rb +3 -7
- data/test/collection_first_test.rb +4 -8
- data/test/collection_last_test.rb +4 -8
- data/test/collection_middle_test.rb +4 -8
- data/test/collection_padding_test.rb +6 -6
- data/test/dummy/app/views/layouts/application.html.erb +3 -5
- data/test/dummy/app/views/test/index.html.erb +1 -30
- data/test/dummy/log/development.log +906 -0
- data/test/dummy/log/test.log +17021 -0
- data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/D9B/E00/sprockets%2Fb66a75bd10bef6da5f16f4fa9113926c +0 -0
- data/test/dummy/tmp/cache/assets/DAC/650/sprockets%2Ff8ec2e25f819797cb9a491d0af22ae9b +0 -0
- data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/DEF/100/sprockets%2F8b9d88bfa8f8eed7910469ef2ab8a8c7 +0 -0
- data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/E29/AA0/sprockets%2F6eaab4ab4dbae1b8b5a6f9286aa966d4 +0 -0
- data/test/helpers_empty_test.rb +3 -7
- data/test/helpers_first_test.rb +4 -8
- data/test/helpers_last_test.rb +4 -8
- data/test/helpers_middle_test.rb +4 -8
- metadata +15 -5
- data/test/rails_pagination_test.rb +0 -9
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/test/helpers_empty_test.rb
CHANGED
@@ -3,7 +3,9 @@ require 'test_helper'
|
|
3
3
|
class HelpersEmptyTest < ActionView::TestCase
|
4
4
|
include RailsPagination::ActionView::Base
|
5
5
|
|
6
|
-
setup
|
6
|
+
setup do
|
7
|
+
@pager = paginate(Model.page(1).per(2), navigation: 3, parameter: :page)
|
8
|
+
end
|
7
9
|
|
8
10
|
test "should not have multiple pages" do
|
9
11
|
assert !@pager.has_multiple_pages?
|
@@ -37,10 +39,4 @@ class HelpersEmptyTest < ActionView::TestCase
|
|
37
39
|
assert !@pager.navigation.has_more_pages?
|
38
40
|
end
|
39
41
|
|
40
|
-
protected
|
41
|
-
|
42
|
-
def create_pager
|
43
|
-
@pager = paginate(Model.page(1).per(2), :navigation => 3, :parameter => :page)
|
44
|
-
end
|
45
|
-
|
46
42
|
end
|
data/test/helpers_first_test.rb
CHANGED
@@ -3,7 +3,10 @@ require 'test_helper'
|
|
3
3
|
class HelpersFirstTest < ActionView::TestCase
|
4
4
|
include RailsPagination::ActionView::Base
|
5
5
|
|
6
|
-
setup
|
6
|
+
setup do
|
7
|
+
10.times.each { |id| Model.create title: "Record #{id}" }
|
8
|
+
@pager = paginate(Model.page(1).per(2), navigation: 3, parameter: :page)
|
9
|
+
end
|
7
10
|
|
8
11
|
test "should have multiple pages" do
|
9
12
|
assert @pager.has_multiple_pages?
|
@@ -37,11 +40,4 @@ class HelpersFirstTest < ActionView::TestCase
|
|
37
40
|
assert @pager.navigation.has_more_pages?
|
38
41
|
end
|
39
42
|
|
40
|
-
protected
|
41
|
-
|
42
|
-
def create_pager
|
43
|
-
10.times.each { |id| Model.create :title => "Record #{id}" }
|
44
|
-
@pager = paginate(Model.page(1).per(2), :navigation => 3, :parameter => :page)
|
45
|
-
end
|
46
|
-
|
47
43
|
end
|
data/test/helpers_last_test.rb
CHANGED
@@ -3,7 +3,10 @@ require 'test_helper'
|
|
3
3
|
class HelpersLastTest < ActionView::TestCase
|
4
4
|
include RailsPagination::ActionView::Base
|
5
5
|
|
6
|
-
setup
|
6
|
+
setup do
|
7
|
+
10.times.each { |id| Model.create title: "Record #{id}" }
|
8
|
+
@pager = paginate(Model.page(5).per(2), navigation: 3, parameter: :page)
|
9
|
+
end
|
7
10
|
|
8
11
|
test "should have multiple pages" do
|
9
12
|
assert @pager.has_multiple_pages?
|
@@ -37,11 +40,4 @@ class HelpersLastTest < ActionView::TestCase
|
|
37
40
|
assert !@pager.navigation.has_more_pages?
|
38
41
|
end
|
39
42
|
|
40
|
-
protected
|
41
|
-
|
42
|
-
def create_pager
|
43
|
-
10.times.each { |id| Model.create :title => "Record #{id}" }
|
44
|
-
@pager = paginate(Model.page(5).per(2), :navigation => 3, :parameter => :page)
|
45
|
-
end
|
46
|
-
|
47
43
|
end
|
data/test/helpers_middle_test.rb
CHANGED
@@ -3,7 +3,10 @@ require 'test_helper'
|
|
3
3
|
class HelpersMiddleTest < ActionView::TestCase
|
4
4
|
include RailsPagination::ActionView::Base
|
5
5
|
|
6
|
-
setup
|
6
|
+
setup do
|
7
|
+
10.times.each { |id| Model.create title: "Record #{id}" }
|
8
|
+
@pager = paginate(Model.page(3).per(2), navigation: 3, parameter: :page)
|
9
|
+
end
|
7
10
|
|
8
11
|
test "should have multiple pages" do
|
9
12
|
assert @pager.has_multiple_pages?
|
@@ -37,11 +40,4 @@ class HelpersMiddleTest < ActionView::TestCase
|
|
37
40
|
assert @pager.navigation.has_more_pages?
|
38
41
|
end
|
39
42
|
|
40
|
-
protected
|
41
|
-
|
42
|
-
def create_pager
|
43
|
-
10.times.each { |id| Model.create :title => "Record #{id}" }
|
44
|
-
@pager = paginate(Model.page(3).per(2), :navigation => 3, :parameter => :page)
|
45
|
-
end
|
46
|
-
|
47
43
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_pagination
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-05-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -50,11 +50,15 @@ executables: []
|
|
50
50
|
extensions: []
|
51
51
|
extra_rdoc_files: []
|
52
52
|
files:
|
53
|
+
- app/views/rails_pagination/_pager.html.erb
|
54
|
+
- config/locales/en.yml
|
55
|
+
- config/locales/es.yml
|
53
56
|
- lib/rails_pagination/action_view/base.rb
|
54
57
|
- lib/rails_pagination/active_record/base.rb
|
55
58
|
- lib/rails_pagination/active_record/relation.rb
|
59
|
+
- lib/rails_pagination/engine.rb
|
56
60
|
- lib/rails_pagination/navigation.rb
|
57
|
-
- lib/rails_pagination/
|
61
|
+
- lib/rails_pagination/pagination.rb
|
58
62
|
- lib/rails_pagination/railtie.rb
|
59
63
|
- lib/rails_pagination/version.rb
|
60
64
|
- lib/rails_pagination.rb
|
@@ -109,15 +113,18 @@ files:
|
|
109
113
|
- test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655
|
110
114
|
- test/dummy/tmp/cache/assets/D50/930/sprockets%2F277654ad498bbc928b88364ffcbad129
|
111
115
|
- test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6
|
116
|
+
- test/dummy/tmp/cache/assets/D9B/E00/sprockets%2Fb66a75bd10bef6da5f16f4fa9113926c
|
117
|
+
- test/dummy/tmp/cache/assets/DAC/650/sprockets%2Ff8ec2e25f819797cb9a491d0af22ae9b
|
112
118
|
- test/dummy/tmp/cache/assets/DB2/700/sprockets%2Fa4f4b12a5cbea015faede527e4a04307
|
113
119
|
- test/dummy/tmp/cache/assets/DD5/C50/sprockets%2Fcdcdad84697d0b186a1de99f1950e5ab
|
114
120
|
- test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994
|
121
|
+
- test/dummy/tmp/cache/assets/DEF/100/sprockets%2F8b9d88bfa8f8eed7910469ef2ab8a8c7
|
115
122
|
- test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af
|
123
|
+
- test/dummy/tmp/cache/assets/E29/AA0/sprockets%2F6eaab4ab4dbae1b8b5a6f9286aa966d4
|
116
124
|
- test/helpers_empty_test.rb
|
117
125
|
- test/helpers_first_test.rb
|
118
126
|
- test/helpers_last_test.rb
|
119
127
|
- test/helpers_middle_test.rb
|
120
|
-
- test/rails_pagination_test.rb
|
121
128
|
- test/test_helper.rb
|
122
129
|
homepage: https://github.com/mattways/rails_pagination
|
123
130
|
licenses: []
|
@@ -192,13 +199,16 @@ test_files:
|
|
192
199
|
- test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655
|
193
200
|
- test/dummy/tmp/cache/assets/D50/930/sprockets%2F277654ad498bbc928b88364ffcbad129
|
194
201
|
- test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6
|
202
|
+
- test/dummy/tmp/cache/assets/D9B/E00/sprockets%2Fb66a75bd10bef6da5f16f4fa9113926c
|
203
|
+
- test/dummy/tmp/cache/assets/DAC/650/sprockets%2Ff8ec2e25f819797cb9a491d0af22ae9b
|
195
204
|
- test/dummy/tmp/cache/assets/DB2/700/sprockets%2Fa4f4b12a5cbea015faede527e4a04307
|
196
205
|
- test/dummy/tmp/cache/assets/DD5/C50/sprockets%2Fcdcdad84697d0b186a1de99f1950e5ab
|
197
206
|
- test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994
|
207
|
+
- test/dummy/tmp/cache/assets/DEF/100/sprockets%2F8b9d88bfa8f8eed7910469ef2ab8a8c7
|
198
208
|
- test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af
|
209
|
+
- test/dummy/tmp/cache/assets/E29/AA0/sprockets%2F6eaab4ab4dbae1b8b5a6f9286aa966d4
|
199
210
|
- test/helpers_empty_test.rb
|
200
211
|
- test/helpers_first_test.rb
|
201
212
|
- test/helpers_last_test.rb
|
202
213
|
- test/helpers_middle_test.rb
|
203
|
-
- test/rails_pagination_test.rb
|
204
214
|
- test/test_helper.rb
|