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.
@@ -1,46 +1,46 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- paginate (0.1.3)
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.3)
11
- activemodel (= 3.0.3)
12
- activesupport (= 3.0.3)
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.4)
15
+ i18n (~> 0.5.0)
16
16
  rack (~> 1.2.1)
17
- rack-mount (~> 0.6.13)
18
- rack-test (~> 0.5.6)
17
+ rack-mount (~> 0.6.14)
18
+ rack-test (~> 0.5.7)
19
19
  tzinfo (~> 0.3.23)
20
- activemodel (3.0.3)
21
- activesupport (= 3.0.3)
20
+ activemodel (3.0.6)
21
+ activesupport (= 3.0.6)
22
22
  builder (~> 2.1.2)
23
- i18n (~> 0.4)
24
- activerecord (3.0.3)
25
- activemodel (= 3.0.3)
26
- activesupport (= 3.0.3)
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.3)
29
+ activesupport (3.0.6)
30
30
  archive-tar-minitar (0.5.2)
31
- arel (2.0.6)
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.11)
38
+ linecache19 (0.5.12)
39
39
  ruby_core_source (>= 0.1.4)
40
40
  nokogiri (1.4.4)
41
- notifier (0.1.2)
42
- rack (1.2.1)
43
- rack-mount (0.6.13)
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.24)
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.4)
63
+ ruby_core_source (0.1.5)
64
64
  archive-tar-minitar (>= 0.5.2)
65
- sqlite3-ruby (1.3.2)
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.23)
70
+ tzinfo (0.3.26)
69
71
 
70
72
  PLATFORMS
71
73
  ruby
@@ -23,7 +23,7 @@ The url used on page links is taken from the current requested uri.
23
23
 
24
24
  You can set default values globally:
25
25
 
26
- Paginate.setup do |config|
26
+ Paginate.configure do |config|
27
27
  config.size = 20
28
28
  config.param_name = :p
29
29
  end
@@ -8,12 +8,17 @@ require "paginate/active_record"
8
8
  require "paginate/action_controller"
9
9
 
10
10
  module Paginate
11
- def self.setup(&block)
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.setup do |config|
21
+ Paginate.configure do |config|
17
22
  config.param_name = :page
18
23
  config.size = 10
19
24
  end
@@ -2,7 +2,7 @@ module Paginate
2
2
  module Version
3
3
  MAJOR = 1
4
4
  MINOR = 0
5
- PATCH = 0
5
+ PATCH = 1
6
6
  STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
7
7
  end
8
8
  end
@@ -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/kitabu"
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
 
@@ -17,7 +17,7 @@ describe "ActionView support" do
17
17
  @helper = Object.new
18
18
  @helper.extend(Paginate::Helper)
19
19
 
20
- Paginate.setup do |config|
20
+ Paginate.configure do |config|
21
21
  config.param_name = :page
22
22
  config.size = 10
23
23
  end
@@ -1,8 +1,8 @@
1
1
  require "spec_helper"
2
2
 
3
3
  describe Paginate::Config do
4
- it "should yield configuration class" do
5
- Paginate.setup do |config|
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 "should return configuration as hash" do
15
- Paginate.setup do |config|
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
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe Paginate::Renderer do
4
4
  before do
5
- Paginate.setup do |config|
5
+ Paginate.configure do |config|
6
6
  config.param_name = :page
7
7
  config.size = 10
8
8
  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: false
5
- segments:
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-01-13 00:00:00 -02:00
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
- has_rdoc: true
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.3.7
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.