paginate 1.0.0 → 1.0.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.
- data/Gemfile.lock +25 -23
- data/README.rdoc +1 -1
- data/lib/paginate.rb +7 -2
- data/lib/paginate/version.rb +1 -1
- data/paginate.gemspec +1 -1
- data/spec/paginate/action_view_spec.rb +1 -1
- data/spec/paginate/config_spec.rb +9 -4
- data/spec/paginate/renderer_spec.rb +1 -1
- metadata +5 -39
data/Gemfile.lock
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
paginate (0.1
|
|
4
|
+
paginate (1.0.1)
|
|
5
5
|
|
|
6
6
|
GEM
|
|
7
7
|
remote: http://rubygems.org/
|
|
8
8
|
specs:
|
|
9
9
|
abstract (1.0.0)
|
|
10
|
-
actionpack (3.0.
|
|
11
|
-
activemodel (= 3.0.
|
|
12
|
-
activesupport (= 3.0.
|
|
10
|
+
actionpack (3.0.6)
|
|
11
|
+
activemodel (= 3.0.6)
|
|
12
|
+
activesupport (= 3.0.6)
|
|
13
13
|
builder (~> 2.1.2)
|
|
14
14
|
erubis (~> 2.6.6)
|
|
15
|
-
i18n (~> 0.
|
|
15
|
+
i18n (~> 0.5.0)
|
|
16
16
|
rack (~> 1.2.1)
|
|
17
|
-
rack-mount (~> 0.6.
|
|
18
|
-
rack-test (~> 0.5.
|
|
17
|
+
rack-mount (~> 0.6.14)
|
|
18
|
+
rack-test (~> 0.5.7)
|
|
19
19
|
tzinfo (~> 0.3.23)
|
|
20
|
-
activemodel (3.0.
|
|
21
|
-
activesupport (= 3.0.
|
|
20
|
+
activemodel (3.0.6)
|
|
21
|
+
activesupport (= 3.0.6)
|
|
22
22
|
builder (~> 2.1.2)
|
|
23
|
-
i18n (~> 0.
|
|
24
|
-
activerecord (3.0.
|
|
25
|
-
activemodel (= 3.0.
|
|
26
|
-
activesupport (= 3.0.
|
|
23
|
+
i18n (~> 0.5.0)
|
|
24
|
+
activerecord (3.0.6)
|
|
25
|
+
activemodel (= 3.0.6)
|
|
26
|
+
activesupport (= 3.0.6)
|
|
27
27
|
arel (~> 2.0.2)
|
|
28
28
|
tzinfo (~> 0.3.23)
|
|
29
|
-
activesupport (3.0.
|
|
29
|
+
activesupport (3.0.6)
|
|
30
30
|
archive-tar-minitar (0.5.2)
|
|
31
|
-
arel (2.0.
|
|
31
|
+
arel (2.0.9)
|
|
32
32
|
builder (2.1.2)
|
|
33
33
|
columnize (0.3.2)
|
|
34
34
|
diff-lcs (1.1.2)
|
|
35
35
|
erubis (2.6.6)
|
|
36
36
|
abstract (>= 1.0.0)
|
|
37
37
|
i18n (0.5.0)
|
|
38
|
-
linecache19 (0.5.
|
|
38
|
+
linecache19 (0.5.12)
|
|
39
39
|
ruby_core_source (>= 0.1.4)
|
|
40
40
|
nokogiri (1.4.4)
|
|
41
|
-
notifier (0.1.
|
|
42
|
-
rack (1.2.
|
|
43
|
-
rack-mount (0.6.
|
|
41
|
+
notifier (0.1.3)
|
|
42
|
+
rack (1.2.2)
|
|
43
|
+
rack-mount (0.6.14)
|
|
44
44
|
rack (>= 1.0.0)
|
|
45
45
|
rack-test (0.5.7)
|
|
46
46
|
rack (>= 1.0)
|
|
@@ -52,7 +52,7 @@ GEM
|
|
|
52
52
|
rspec-expectations (2.4.0)
|
|
53
53
|
diff-lcs (~> 1.1.2)
|
|
54
54
|
rspec-mocks (2.4.0)
|
|
55
|
-
ruby-debug-base19 (0.11.
|
|
55
|
+
ruby-debug-base19 (0.11.25)
|
|
56
56
|
columnize (>= 0.3.1)
|
|
57
57
|
linecache19 (>= 0.5.11)
|
|
58
58
|
ruby_core_source (>= 0.1.4)
|
|
@@ -60,12 +60,14 @@ GEM
|
|
|
60
60
|
columnize (>= 0.3.1)
|
|
61
61
|
linecache19 (>= 0.5.11)
|
|
62
62
|
ruby-debug-base19 (>= 0.11.19)
|
|
63
|
-
ruby_core_source (0.1.
|
|
63
|
+
ruby_core_source (0.1.5)
|
|
64
64
|
archive-tar-minitar (>= 0.5.2)
|
|
65
|
-
sqlite3
|
|
65
|
+
sqlite3 (1.3.3)
|
|
66
|
+
sqlite3-ruby (1.3.3)
|
|
67
|
+
sqlite3 (>= 1.3.3)
|
|
66
68
|
test_notifier (0.3.6)
|
|
67
69
|
notifier
|
|
68
|
-
tzinfo (0.3.
|
|
70
|
+
tzinfo (0.3.26)
|
|
69
71
|
|
|
70
72
|
PLATFORMS
|
|
71
73
|
ruby
|
data/README.rdoc
CHANGED
data/lib/paginate.rb
CHANGED
|
@@ -8,12 +8,17 @@ require "paginate/active_record"
|
|
|
8
8
|
require "paginate/action_controller"
|
|
9
9
|
|
|
10
10
|
module Paginate
|
|
11
|
-
def self.
|
|
11
|
+
def self.configure(&block)
|
|
12
12
|
yield Config
|
|
13
13
|
end
|
|
14
|
+
|
|
15
|
+
def self.setup(&block)
|
|
16
|
+
warn "Paginate.setup is deprecated; use Paginate.configure instead."
|
|
17
|
+
configure(&block)
|
|
18
|
+
end
|
|
14
19
|
end
|
|
15
20
|
|
|
16
|
-
Paginate.
|
|
21
|
+
Paginate.configure do |config|
|
|
17
22
|
config.param_name = :page
|
|
18
23
|
config.size = 10
|
|
19
24
|
end
|
data/lib/paginate/version.rb
CHANGED
data/paginate.gemspec
CHANGED
|
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
|
|
|
8
8
|
s.platform = Gem::Platform::RUBY
|
|
9
9
|
s.authors = ["Nando Vieira"]
|
|
10
10
|
s.email = ["fnando.vieira@gmail.com"]
|
|
11
|
-
s.homepage = "http://rubygems.org/gems/
|
|
11
|
+
s.homepage = "http://rubygems.org/gems/paginate"
|
|
12
12
|
s.summary = "Paginate collections using SIZE+1 to determine if there is a next page. Includes ActiveRecord and ActionView support."
|
|
13
13
|
s.description = s.summary
|
|
14
14
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
require "spec_helper"
|
|
2
2
|
|
|
3
3
|
describe Paginate::Config do
|
|
4
|
-
it "
|
|
5
|
-
Paginate.
|
|
4
|
+
it "yields configuration class" do
|
|
5
|
+
Paginate.configure do |config|
|
|
6
6
|
config.param_name = :p
|
|
7
7
|
config.size = 50
|
|
8
8
|
end
|
|
@@ -11,8 +11,13 @@ describe Paginate::Config do
|
|
|
11
11
|
Paginate::Config.size.should == 50
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
it "
|
|
15
|
-
Paginate.
|
|
14
|
+
it "deprecates Paginate.setup method" do
|
|
15
|
+
Paginate.should_receive(:warn).once
|
|
16
|
+
Paginate.setup {}
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
it "returns configuration as hash" do
|
|
20
|
+
Paginate.configure do |config|
|
|
16
21
|
config.param_name = :p
|
|
17
22
|
config.size = 25
|
|
18
23
|
end
|
metadata
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: paginate
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
prerelease:
|
|
5
|
-
|
|
6
|
-
- 1
|
|
7
|
-
- 0
|
|
8
|
-
- 0
|
|
9
|
-
version: 1.0.0
|
|
4
|
+
prerelease:
|
|
5
|
+
version: 1.0.1
|
|
10
6
|
platform: ruby
|
|
11
7
|
authors:
|
|
12
8
|
- Nando Vieira
|
|
@@ -14,8 +10,7 @@ autorequire:
|
|
|
14
10
|
bindir: bin
|
|
15
11
|
cert_chain: []
|
|
16
12
|
|
|
17
|
-
date: 2011-
|
|
18
|
-
default_executable:
|
|
13
|
+
date: 2011-04-17 00:00:00 Z
|
|
19
14
|
dependencies:
|
|
20
15
|
- !ruby/object:Gem::Dependency
|
|
21
16
|
name: nokogiri
|
|
@@ -25,8 +20,6 @@ dependencies:
|
|
|
25
20
|
requirements:
|
|
26
21
|
- - ">="
|
|
27
22
|
- !ruby/object:Gem::Version
|
|
28
|
-
segments:
|
|
29
|
-
- 0
|
|
30
23
|
version: "0"
|
|
31
24
|
type: :development
|
|
32
25
|
version_requirements: *id001
|
|
@@ -38,8 +31,6 @@ dependencies:
|
|
|
38
31
|
requirements:
|
|
39
32
|
- - ">="
|
|
40
33
|
- !ruby/object:Gem::Version
|
|
41
|
-
segments:
|
|
42
|
-
- 0
|
|
43
34
|
version: "0"
|
|
44
35
|
type: :development
|
|
45
36
|
version_requirements: *id002
|
|
@@ -51,8 +42,6 @@ dependencies:
|
|
|
51
42
|
requirements:
|
|
52
43
|
- - ">="
|
|
53
44
|
- !ruby/object:Gem::Version
|
|
54
|
-
segments:
|
|
55
|
-
- 0
|
|
56
45
|
version: "0"
|
|
57
46
|
type: :development
|
|
58
47
|
version_requirements: *id003
|
|
@@ -64,10 +53,6 @@ dependencies:
|
|
|
64
53
|
requirements:
|
|
65
54
|
- - ~>
|
|
66
55
|
- !ruby/object:Gem::Version
|
|
67
|
-
segments:
|
|
68
|
-
- 3
|
|
69
|
-
- 0
|
|
70
|
-
- 0
|
|
71
56
|
version: 3.0.0
|
|
72
57
|
type: :development
|
|
73
58
|
version_requirements: *id004
|
|
@@ -79,10 +64,6 @@ dependencies:
|
|
|
79
64
|
requirements:
|
|
80
65
|
- - ~>
|
|
81
66
|
- !ruby/object:Gem::Version
|
|
82
|
-
segments:
|
|
83
|
-
- 3
|
|
84
|
-
- 0
|
|
85
|
-
- 0
|
|
86
67
|
version: 3.0.0
|
|
87
68
|
type: :development
|
|
88
69
|
version_requirements: *id005
|
|
@@ -94,10 +75,6 @@ dependencies:
|
|
|
94
75
|
requirements:
|
|
95
76
|
- - ~>
|
|
96
77
|
- !ruby/object:Gem::Version
|
|
97
|
-
segments:
|
|
98
|
-
- 3
|
|
99
|
-
- 0
|
|
100
|
-
- 0
|
|
101
78
|
version: 3.0.0
|
|
102
79
|
type: :development
|
|
103
80
|
version_requirements: *id006
|
|
@@ -109,10 +86,6 @@ dependencies:
|
|
|
109
86
|
requirements:
|
|
110
87
|
- - ~>
|
|
111
88
|
- !ruby/object:Gem::Version
|
|
112
|
-
segments:
|
|
113
|
-
- 2
|
|
114
|
-
- 4
|
|
115
|
-
- 0
|
|
116
89
|
version: 2.4.0
|
|
117
90
|
type: :development
|
|
118
91
|
version_requirements: *id007
|
|
@@ -124,8 +97,6 @@ dependencies:
|
|
|
124
97
|
requirements:
|
|
125
98
|
- - ">="
|
|
126
99
|
- !ruby/object:Gem::Version
|
|
127
|
-
segments:
|
|
128
|
-
- 0
|
|
129
100
|
version: "0"
|
|
130
101
|
type: :development
|
|
131
102
|
version_requirements: *id008
|
|
@@ -166,8 +137,7 @@ files:
|
|
|
166
137
|
- spec/support/translations.yml
|
|
167
138
|
- spec/support/views/block_as_url.erb
|
|
168
139
|
- spec/support/views/default.erb
|
|
169
|
-
|
|
170
|
-
homepage: http://rubygems.org/gems/kitabu
|
|
140
|
+
homepage: http://rubygems.org/gems/paginate
|
|
171
141
|
licenses: []
|
|
172
142
|
|
|
173
143
|
post_install_message:
|
|
@@ -180,21 +150,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
180
150
|
requirements:
|
|
181
151
|
- - ">="
|
|
182
152
|
- !ruby/object:Gem::Version
|
|
183
|
-
segments:
|
|
184
|
-
- 0
|
|
185
153
|
version: "0"
|
|
186
154
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
187
155
|
none: false
|
|
188
156
|
requirements:
|
|
189
157
|
- - ">="
|
|
190
158
|
- !ruby/object:Gem::Version
|
|
191
|
-
segments:
|
|
192
|
-
- 0
|
|
193
159
|
version: "0"
|
|
194
160
|
requirements: []
|
|
195
161
|
|
|
196
162
|
rubyforge_project:
|
|
197
|
-
rubygems_version: 1.
|
|
163
|
+
rubygems_version: 1.7.2
|
|
198
164
|
signing_key:
|
|
199
165
|
specification_version: 3
|
|
200
166
|
summary: Paginate collections using SIZE+1 to determine if there is a next page. Includes ActiveRecord and ActionView support.
|