kaminari 0.10.4 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of kaminari might be problematic. Click here for more details.
- data/CHANGELOG +31 -0
- data/Gemfile +1 -30
- data/Gemfile.lock +66 -82
- data/README.rdoc +16 -0
- data/Rakefile +12 -2
- data/VERSION +1 -1
- data/app/views/kaminari/_first_page.html.erb +11 -0
- data/app/views/kaminari/_first_page.html.haml +9 -0
- data/app/views/kaminari/{_truncated_span.html.erb → _gap.html.erb} +2 -2
- data/app/views/kaminari/{_truncated_span.html.haml → _gap.html.haml} +2 -2
- data/app/views/kaminari/_last_page.html.erb +11 -0
- data/app/views/kaminari/_last_page.html.haml +9 -0
- data/app/views/kaminari/{_next_link.html.erb → _next_page.html.erb} +3 -3
- data/app/views/kaminari/{_next_link.html.haml → _next_page.html.haml} +3 -3
- data/app/views/kaminari/_page.html.erb +12 -0
- data/app/views/kaminari/_page.html.haml +10 -0
- data/app/views/kaminari/_paginator.html.erb +8 -14
- data/app/views/kaminari/_paginator.html.haml +8 -13
- data/app/views/kaminari/{_prev_link.html.erb → _prev_page.html.erb} +3 -3
- data/app/views/kaminari/_prev_page.html.haml +9 -0
- data/config/locales/kaminari.yml +4 -2
- data/kaminari.gemspec +88 -59
- data/lib/generators/kaminari/views_generator.rb +13 -9
- data/lib/kaminari.rb +1 -0
- data/lib/kaminari/helpers/action_view_extension.rb +5 -5
- data/lib/kaminari/helpers/paginator.rb +153 -0
- data/lib/kaminari/helpers/tags.rb +32 -200
- data/lib/kaminari/models/active_record_extension.rb +1 -8
- data/lib/kaminari/models/active_record_relation_methods.rb +8 -1
- data/lib/kaminari/models/mongoid_extension.rb +1 -0
- data/lib/kaminari/railtie.rb +1 -1
- data/lib/kaminari/version.rb +3 -0
- data/spec/acceptance/users_spec.rb +13 -4
- data/spec/fake_app.rb +34 -2
- data/spec/helpers/helpers_spec.rb +13 -4
- data/spec/helpers/tags_spec.rb +32 -50
- data/spec/models/active_record_relation_methods_spec.rb +18 -0
- data/spec/models/scopes_spec.rb +12 -1
- data/spec/spec_helper.rb +1 -0
- data/spec/support/database_cleaner.rb +13 -0
- metadata +248 -127
- data/app/views/kaminari/_current_page.html.erb +0 -9
- data/app/views/kaminari/_current_page.html.haml +0 -9
- data/app/views/kaminari/_first_page_link.html.erb +0 -12
- data/app/views/kaminari/_first_page_link.html.haml +0 -10
- data/app/views/kaminari/_last_page_link.html.erb +0 -12
- data/app/views/kaminari/_last_page_link.html.haml +0 -10
- data/app/views/kaminari/_next_span.html.erb +0 -8
- data/app/views/kaminari/_next_span.html.haml +0 -7
- data/app/views/kaminari/_page_link.html.erb +0 -12
- data/app/views/kaminari/_page_link.html.haml +0 -10
- data/app/views/kaminari/_prev_link.html.haml +0 -9
- data/app/views/kaminari/_prev_span.html.erb +0 -8
- data/app/views/kaminari/_prev_span.html.haml +0 -7
- data/lib/kaminari/helpers/helpers.rb +0 -75
data/spec/helpers/tags_spec.rb
CHANGED
@@ -2,49 +2,6 @@ require File.expand_path('../spec_helper', File.dirname(__FILE__))
|
|
2
2
|
include Kaminari::Helpers
|
3
3
|
|
4
4
|
describe 'Kaminari::Helpers' do
|
5
|
-
describe 'template lookup rule' do
|
6
|
-
describe 'Paginator' do
|
7
|
-
subject { Paginator }
|
8
|
-
its(:ancestor_renderables) { should == [Paginator] }
|
9
|
-
end
|
10
|
-
describe 'PrevLink' do
|
11
|
-
subject { PrevLink }
|
12
|
-
its(:ancestor_renderables) { should == [PrevLink, Prev, Link, Page] }
|
13
|
-
end
|
14
|
-
describe 'PrevSpan' do
|
15
|
-
subject { PrevSpan }
|
16
|
-
its(:ancestor_renderables) { should == [PrevSpan, Prev, NonLink] }
|
17
|
-
end
|
18
|
-
describe 'FirstPageLink' do
|
19
|
-
subject { FirstPageLink }
|
20
|
-
its(:ancestor_renderables) { should == [FirstPageLink, PageLink, Link, Page] }
|
21
|
-
end
|
22
|
-
describe 'PageLink' do
|
23
|
-
subject { PageLink }
|
24
|
-
its(:ancestor_renderables) { should == [PageLink, Link, Page] }
|
25
|
-
end
|
26
|
-
describe 'CurrentPage' do
|
27
|
-
subject { CurrentPage }
|
28
|
-
its(:ancestor_renderables) { should == [CurrentPage, NonLink, Page] }
|
29
|
-
end
|
30
|
-
describe 'TruncatedSpan' do
|
31
|
-
subject { TruncatedSpan }
|
32
|
-
its(:ancestor_renderables) { should == [TruncatedSpan, NonLink] }
|
33
|
-
end
|
34
|
-
describe 'LastPageLink' do
|
35
|
-
subject { LastPageLink }
|
36
|
-
its(:ancestor_renderables) { should == [LastPageLink, PageLink, Link, Page] }
|
37
|
-
end
|
38
|
-
describe 'NextLink' do
|
39
|
-
subject { NextLink }
|
40
|
-
its(:ancestor_renderables) { should == [NextLink, Next, Link, Page] }
|
41
|
-
end
|
42
|
-
describe 'NextSpan' do
|
43
|
-
subject { NextSpan }
|
44
|
-
its(:ancestor_renderables) { should == [NextSpan, Next, NonLink] }
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
5
|
describe 'Paginator' do
|
49
6
|
describe 'Paginator::PageProxy' do
|
50
7
|
describe '#current?' do
|
@@ -80,6 +37,28 @@ describe 'Kaminari::Helpers' do
|
|
80
37
|
end
|
81
38
|
end
|
82
39
|
|
40
|
+
describe '#next?' do
|
41
|
+
context 'page == current_page + 1' do
|
42
|
+
subject { Paginator::PageProxy.new({:current_page => 52}, 53, nil) }
|
43
|
+
its(:next?) { should be_true }
|
44
|
+
end
|
45
|
+
context 'page != current_page + 1' do
|
46
|
+
subject { Paginator::PageProxy.new({:current_page => 52}, 77, nil) }
|
47
|
+
its(:next?) { should_not be_true }
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
describe '#prev?' do
|
52
|
+
context 'page == current_page - 1' do
|
53
|
+
subject { Paginator::PageProxy.new({:current_page => 77}, 76, nil) }
|
54
|
+
its(:prev?) { should be_true }
|
55
|
+
end
|
56
|
+
context 'page != current_page + 1' do
|
57
|
+
subject { Paginator::PageProxy.new({:current_page => 77}, 80, nil) }
|
58
|
+
its(:prev?) { should_not be_true }
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
83
62
|
describe '#left_outer?' do
|
84
63
|
context 'current_page == left' do
|
85
64
|
subject { Paginator::PageProxy.new({:left => 3}, 3, nil) }
|
@@ -87,7 +66,7 @@ describe 'Kaminari::Helpers' do
|
|
87
66
|
end
|
88
67
|
context 'current_page == left + 1' do
|
89
68
|
subject { Paginator::PageProxy.new({:left => 3}, 4, nil) }
|
90
|
-
its(:left_outer?) {
|
69
|
+
its(:left_outer?) { should_not be_true }
|
91
70
|
end
|
92
71
|
context 'current_page == left + 2' do
|
93
72
|
subject { Paginator::PageProxy.new({:left => 3}, 5, nil) }
|
@@ -102,7 +81,7 @@ describe 'Kaminari::Helpers' do
|
|
102
81
|
end
|
103
82
|
context 'num_pages - page == right' do
|
104
83
|
subject { Paginator::PageProxy.new({:num_pages => 10, :right => 3}, 7, nil) }
|
105
|
-
its(:right_outer?) {
|
84
|
+
its(:right_outer?) { should_not be_true }
|
106
85
|
end
|
107
86
|
context 'num_pages - page < right' do
|
108
87
|
subject { Paginator::PageProxy.new({:num_pages => 10, :right => 3}, 8, nil) }
|
@@ -142,14 +121,17 @@ describe 'Kaminari::Helpers' do
|
|
142
121
|
end
|
143
122
|
describe '#was_truncated?' do
|
144
123
|
before do
|
145
|
-
stub(@template = Object.new)
|
124
|
+
stub(@template = Object.new) do
|
125
|
+
options { {} }
|
126
|
+
params { {} }
|
127
|
+
end
|
146
128
|
end
|
147
|
-
context 'last.is_a?
|
148
|
-
subject { Paginator::PageProxy.new({}, 10,
|
129
|
+
context 'last.is_a? Gap' do
|
130
|
+
subject { Paginator::PageProxy.new({}, 10, Gap.new(@template)) }
|
149
131
|
its(:was_truncated?) { should be_true }
|
150
132
|
end
|
151
|
-
context 'last.is not a
|
152
|
-
subject { Paginator::PageProxy.new({}, 10,
|
133
|
+
context 'last.is not a Gap' do
|
134
|
+
subject { Paginator::PageProxy.new({}, 10, Page.new(@template)) }
|
153
135
|
its(:was_truncated?) { should_not be_true }
|
154
136
|
end
|
155
137
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require File.expand_path('../spec_helper', File.dirname(__FILE__))
|
2
|
+
|
3
|
+
describe Kaminari::ActiveRecordRelationMethods do
|
4
|
+
describe '#total_count' do
|
5
|
+
before do
|
6
|
+
@author = User.create! :name => 'author'
|
7
|
+
@books = 2.times.map { @author.books_authored.create! }
|
8
|
+
@readers = 4.times.map { User.create! :name => 'reader' }
|
9
|
+
@books.each {|book| book.readers << @readers }
|
10
|
+
end
|
11
|
+
|
12
|
+
context "when the scope includes an order which references a generated column" do
|
13
|
+
it "should successfully count the results" do
|
14
|
+
@author.readers.by_read_count.page(1).total_count.should == @readers.size
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/spec/models/scopes_spec.rb
CHANGED
@@ -2,7 +2,6 @@ require File.expand_path('../spec_helper', File.dirname(__FILE__))
|
|
2
2
|
|
3
3
|
describe Kaminari::ActiveRecordExtension do
|
4
4
|
before :all do
|
5
|
-
User.delete_all
|
6
5
|
1.upto(100) {|i| User.create! :name => "user#{'%03d' % i}", :age => (i / 10)}
|
7
6
|
end
|
8
7
|
|
@@ -95,6 +94,18 @@ describe Kaminari::ActiveRecordExtension do
|
|
95
94
|
end
|
96
95
|
end
|
97
96
|
|
97
|
+
describe '#count' do
|
98
|
+
context 'page 1' do
|
99
|
+
subject { User.page }
|
100
|
+
its(:count) { should == 25 }
|
101
|
+
end
|
102
|
+
|
103
|
+
context 'page 2' do
|
104
|
+
subject { User.page 2 }
|
105
|
+
its(:count) { should == 25 }
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
98
109
|
context 'chained with .group' do
|
99
110
|
subject { User.group('age').page(2).per 5 }
|
100
111
|
# 0..10
|
data/spec/spec_helper.rb
CHANGED
@@ -3,6 +3,7 @@ $LOAD_PATH.unshift(File.dirname(__FILE__))
|
|
3
3
|
require 'rails'
|
4
4
|
require 'mongoid'
|
5
5
|
require 'kaminari'
|
6
|
+
require 'database_cleaner'
|
6
7
|
# Ensure we use 'syck' instead of 'psych' in 1.9.2
|
7
8
|
# RubyGems >= 1.5.0 uses 'psych' on 1.9.2, but
|
8
9
|
# Psych does not yet support YAML 1.1 merge keys.
|
@@ -0,0 +1,13 @@
|
|
1
|
+
DatabaseCleaner.strategy = :transaction
|
2
|
+
|
3
|
+
RSpec.configure do |config|
|
4
|
+
config.before :suite do
|
5
|
+
DatabaseCleaner.clean_with :truncation
|
6
|
+
end
|
7
|
+
config.before :each do
|
8
|
+
DatabaseCleaner.start
|
9
|
+
end
|
10
|
+
config.after :each do
|
11
|
+
DatabaseCleaner.clean
|
12
|
+
end
|
13
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kaminari
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 51
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 11
|
9
|
+
- 0
|
10
|
+
version: 0.11.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Akira Matsuda
|
@@ -15,109 +15,113 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
19
|
-
default_executable:
|
18
|
+
date: 2011-04-19 00:00:00 Z
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
|
-
|
23
|
-
|
21
|
+
type: :runtime
|
22
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
23
|
none: false
|
25
24
|
requirements:
|
26
25
|
- - ">="
|
27
26
|
- !ruby/object:Gem::Version
|
28
|
-
hash:
|
27
|
+
hash: 3
|
29
28
|
segments:
|
30
|
-
- 2
|
31
|
-
- 5
|
32
29
|
- 0
|
33
|
-
version:
|
30
|
+
version: "0"
|
31
|
+
version_requirements: *id001
|
32
|
+
name: kaminari
|
34
33
|
prerelease: false
|
35
|
-
type: :development
|
36
|
-
requirement: *id001
|
37
34
|
- !ruby/object:Gem::Dependency
|
38
|
-
|
39
|
-
|
35
|
+
type: :development
|
36
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
40
37
|
none: false
|
41
38
|
requirements:
|
42
39
|
- - ">="
|
43
40
|
- !ruby/object:Gem::Version
|
44
|
-
hash:
|
41
|
+
hash: 7
|
45
42
|
segments:
|
46
|
-
-
|
43
|
+
- 3
|
47
44
|
- 0
|
48
|
-
-
|
49
|
-
version:
|
45
|
+
- 0
|
46
|
+
version: 3.0.0
|
47
|
+
version_requirements: *id002
|
48
|
+
name: rails
|
50
49
|
prerelease: false
|
51
|
-
type: :development
|
52
|
-
requirement: *id002
|
53
50
|
- !ruby/object:Gem::Dependency
|
54
|
-
|
55
|
-
|
51
|
+
type: :development
|
52
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
56
53
|
none: false
|
57
54
|
requirements:
|
58
55
|
- - ">="
|
59
56
|
- !ruby/object:Gem::Version
|
60
|
-
hash:
|
57
|
+
hash: 23
|
61
58
|
segments:
|
62
59
|
- 1
|
63
|
-
- 1
|
64
60
|
- 0
|
65
|
-
|
61
|
+
- 0
|
62
|
+
version: 1.0.0
|
63
|
+
version_requirements: *id003
|
64
|
+
name: bundler
|
66
65
|
prerelease: false
|
67
|
-
type: :development
|
68
|
-
requirement: *id003
|
69
66
|
- !ruby/object:Gem::Dependency
|
70
|
-
|
71
|
-
|
67
|
+
type: :development
|
68
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
72
69
|
none: false
|
73
70
|
requirements:
|
74
71
|
- - ">="
|
75
72
|
- !ruby/object:Gem::Version
|
76
|
-
hash:
|
73
|
+
hash: 3
|
77
74
|
segments:
|
78
75
|
- 0
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
version: 0.4.1.1
|
76
|
+
version: "0"
|
77
|
+
version_requirements: *id004
|
78
|
+
name: sqlite3
|
83
79
|
prerelease: false
|
80
|
+
- !ruby/object:Gem::Dependency
|
84
81
|
type: :development
|
85
|
-
requirement:
|
82
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
84
|
+
requirements:
|
85
|
+
- - ">="
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
hash: 7
|
88
|
+
segments:
|
89
|
+
- 2
|
90
|
+
version: "2"
|
91
|
+
version_requirements: *id005
|
92
|
+
name: mongoid
|
93
|
+
prerelease: false
|
86
94
|
- !ruby/object:Gem::Dependency
|
87
|
-
|
88
|
-
|
95
|
+
type: :development
|
96
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
89
97
|
none: false
|
90
98
|
requirements:
|
91
99
|
- - ">="
|
92
100
|
- !ruby/object:Gem::Version
|
93
|
-
hash:
|
101
|
+
hash: 3
|
94
102
|
segments:
|
95
|
-
- 1
|
96
103
|
- 0
|
97
|
-
|
98
|
-
|
104
|
+
version: "0"
|
105
|
+
version_requirements: *id006
|
106
|
+
name: rspec
|
99
107
|
prerelease: false
|
100
|
-
type: :development
|
101
|
-
requirement: *id005
|
102
108
|
- !ruby/object:Gem::Dependency
|
103
|
-
|
104
|
-
|
109
|
+
type: :development
|
110
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
105
111
|
none: false
|
106
112
|
requirements:
|
107
113
|
- - ">="
|
108
114
|
- !ruby/object:Gem::Version
|
109
|
-
hash:
|
115
|
+
hash: 3
|
110
116
|
segments:
|
111
|
-
-
|
112
|
-
|
113
|
-
|
114
|
-
|
117
|
+
- 0
|
118
|
+
version: "0"
|
119
|
+
version_requirements: *id007
|
120
|
+
name: rspec-rails
|
115
121
|
prerelease: false
|
116
|
-
type: :development
|
117
|
-
requirement: *id006
|
118
122
|
- !ruby/object:Gem::Dependency
|
119
|
-
|
120
|
-
|
123
|
+
type: :development
|
124
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
121
125
|
none: false
|
122
126
|
requirements:
|
123
127
|
- - ">="
|
@@ -126,12 +130,12 @@ dependencies:
|
|
126
130
|
segments:
|
127
131
|
- 0
|
128
132
|
version: "0"
|
133
|
+
version_requirements: *id008
|
134
|
+
name: rr
|
129
135
|
prerelease: false
|
130
|
-
type: :development
|
131
|
-
requirement: *id007
|
132
136
|
- !ruby/object:Gem::Dependency
|
133
|
-
|
134
|
-
|
137
|
+
type: :development
|
138
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
135
139
|
none: false
|
136
140
|
requirements:
|
137
141
|
- - ">="
|
@@ -140,12 +144,12 @@ dependencies:
|
|
140
144
|
segments:
|
141
145
|
- 0
|
142
146
|
version: "0"
|
147
|
+
version_requirements: *id009
|
148
|
+
name: steak
|
143
149
|
prerelease: false
|
144
|
-
type: :development
|
145
|
-
requirement: *id008
|
146
150
|
- !ruby/object:Gem::Dependency
|
147
|
-
|
148
|
-
|
151
|
+
type: :development
|
152
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
149
153
|
none: false
|
150
154
|
requirements:
|
151
155
|
- - ">="
|
@@ -154,12 +158,12 @@ dependencies:
|
|
154
158
|
segments:
|
155
159
|
- 0
|
156
160
|
version: "0"
|
161
|
+
version_requirements: *id010
|
162
|
+
name: capybara
|
157
163
|
prerelease: false
|
158
|
-
type: :development
|
159
|
-
requirement: *id009
|
160
164
|
- !ruby/object:Gem::Dependency
|
161
|
-
|
162
|
-
|
165
|
+
type: :development
|
166
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
163
167
|
none: false
|
164
168
|
requirements:
|
165
169
|
- - ">="
|
@@ -168,90 +172,209 @@ dependencies:
|
|
168
172
|
segments:
|
169
173
|
- 0
|
170
174
|
version: "0"
|
175
|
+
version_requirements: *id011
|
176
|
+
name: database_cleaner
|
171
177
|
prerelease: false
|
178
|
+
- !ruby/object:Gem::Dependency
|
172
179
|
type: :development
|
173
|
-
requirement:
|
180
|
+
requirement: &id012 !ruby/object:Gem::Requirement
|
181
|
+
none: false
|
182
|
+
requirements:
|
183
|
+
- - ">="
|
184
|
+
- !ruby/object:Gem::Version
|
185
|
+
hash: 3
|
186
|
+
segments:
|
187
|
+
- 0
|
188
|
+
version: "0"
|
189
|
+
version_requirements: *id012
|
190
|
+
name: rcov
|
191
|
+
prerelease: false
|
174
192
|
- !ruby/object:Gem::Dependency
|
175
|
-
|
176
|
-
|
193
|
+
type: :development
|
194
|
+
requirement: &id013 !ruby/object:Gem::Requirement
|
177
195
|
none: false
|
178
196
|
requirements:
|
179
197
|
- - ">="
|
180
198
|
- !ruby/object:Gem::Version
|
181
|
-
hash:
|
199
|
+
hash: 3
|
182
200
|
segments:
|
183
|
-
- 2
|
184
|
-
- 5
|
185
201
|
- 0
|
186
|
-
version:
|
202
|
+
version: "0"
|
203
|
+
version_requirements: *id013
|
204
|
+
name: jeweler
|
187
205
|
prerelease: false
|
206
|
+
- !ruby/object:Gem::Dependency
|
188
207
|
type: :development
|
189
|
-
requirement:
|
208
|
+
requirement: &id014 !ruby/object:Gem::Requirement
|
209
|
+
none: false
|
210
|
+
requirements:
|
211
|
+
- - ">="
|
212
|
+
- !ruby/object:Gem::Version
|
213
|
+
hash: 7
|
214
|
+
segments:
|
215
|
+
- 3
|
216
|
+
- 0
|
217
|
+
- 0
|
218
|
+
version: 3.0.0
|
219
|
+
version_requirements: *id014
|
220
|
+
name: rails
|
221
|
+
prerelease: false
|
190
222
|
- !ruby/object:Gem::Dependency
|
191
|
-
|
192
|
-
|
223
|
+
type: :development
|
224
|
+
requirement: &id015 !ruby/object:Gem::Requirement
|
193
225
|
none: false
|
194
226
|
requirements:
|
195
227
|
- - ">="
|
196
228
|
- !ruby/object:Gem::Version
|
197
|
-
hash:
|
229
|
+
hash: 23
|
198
230
|
segments:
|
199
231
|
- 1
|
200
|
-
-
|
201
|
-
-
|
202
|
-
version: 1.
|
232
|
+
- 0
|
233
|
+
- 0
|
234
|
+
version: 1.0.0
|
235
|
+
version_requirements: *id015
|
236
|
+
name: bundler
|
203
237
|
prerelease: false
|
238
|
+
- !ruby/object:Gem::Dependency
|
204
239
|
type: :development
|
205
|
-
requirement:
|
240
|
+
requirement: &id016 !ruby/object:Gem::Requirement
|
241
|
+
none: false
|
242
|
+
requirements:
|
243
|
+
- - ">="
|
244
|
+
- !ruby/object:Gem::Version
|
245
|
+
hash: 3
|
246
|
+
segments:
|
247
|
+
- 0
|
248
|
+
version: "0"
|
249
|
+
version_requirements: *id016
|
250
|
+
name: sqlite3
|
251
|
+
prerelease: false
|
206
252
|
- !ruby/object:Gem::Dependency
|
207
|
-
|
208
|
-
|
253
|
+
type: :development
|
254
|
+
requirement: &id017 !ruby/object:Gem::Requirement
|
209
255
|
none: false
|
210
256
|
requirements:
|
211
|
-
- - "
|
257
|
+
- - ">="
|
212
258
|
- !ruby/object:Gem::Version
|
213
|
-
hash:
|
259
|
+
hash: 7
|
214
260
|
segments:
|
215
261
|
- 2
|
262
|
+
version: "2"
|
263
|
+
version_requirements: *id017
|
264
|
+
name: mongoid
|
265
|
+
prerelease: false
|
266
|
+
- !ruby/object:Gem::Dependency
|
267
|
+
type: :development
|
268
|
+
requirement: &id018 !ruby/object:Gem::Requirement
|
269
|
+
none: false
|
270
|
+
requirements:
|
271
|
+
- - ">="
|
272
|
+
- !ruby/object:Gem::Version
|
273
|
+
hash: 3
|
274
|
+
segments:
|
275
|
+
- 0
|
276
|
+
version: "0"
|
277
|
+
version_requirements: *id018
|
278
|
+
name: rspec
|
279
|
+
prerelease: false
|
280
|
+
- !ruby/object:Gem::Dependency
|
281
|
+
type: :development
|
282
|
+
requirement: &id019 !ruby/object:Gem::Requirement
|
283
|
+
none: false
|
284
|
+
requirements:
|
285
|
+
- - ">="
|
286
|
+
- !ruby/object:Gem::Version
|
287
|
+
hash: 3
|
288
|
+
segments:
|
216
289
|
- 0
|
290
|
+
version: "0"
|
291
|
+
version_requirements: *id019
|
292
|
+
name: rspec-rails
|
293
|
+
prerelease: false
|
294
|
+
- !ruby/object:Gem::Dependency
|
295
|
+
type: :development
|
296
|
+
requirement: &id020 !ruby/object:Gem::Requirement
|
297
|
+
none: false
|
298
|
+
requirements:
|
299
|
+
- - ">="
|
300
|
+
- !ruby/object:Gem::Version
|
301
|
+
hash: 3
|
302
|
+
segments:
|
217
303
|
- 0
|
218
|
-
|
219
|
-
|
220
|
-
|
304
|
+
version: "0"
|
305
|
+
version_requirements: *id020
|
306
|
+
name: rr
|
221
307
|
prerelease: false
|
308
|
+
- !ruby/object:Gem::Dependency
|
222
309
|
type: :development
|
223
|
-
requirement:
|
310
|
+
requirement: &id021 !ruby/object:Gem::Requirement
|
311
|
+
none: false
|
312
|
+
requirements:
|
313
|
+
- - ">="
|
314
|
+
- !ruby/object:Gem::Version
|
315
|
+
hash: 3
|
316
|
+
segments:
|
317
|
+
- 0
|
318
|
+
version: "0"
|
319
|
+
version_requirements: *id021
|
320
|
+
name: steak
|
321
|
+
prerelease: false
|
224
322
|
- !ruby/object:Gem::Dependency
|
225
|
-
|
226
|
-
|
323
|
+
type: :development
|
324
|
+
requirement: &id022 !ruby/object:Gem::Requirement
|
227
325
|
none: false
|
228
326
|
requirements:
|
229
|
-
- -
|
327
|
+
- - ">="
|
230
328
|
- !ruby/object:Gem::Version
|
231
|
-
hash:
|
329
|
+
hash: 3
|
232
330
|
segments:
|
233
|
-
-
|
234
|
-
|
235
|
-
|
331
|
+
- 0
|
332
|
+
version: "0"
|
333
|
+
version_requirements: *id022
|
334
|
+
name: capybara
|
236
335
|
prerelease: false
|
336
|
+
- !ruby/object:Gem::Dependency
|
237
337
|
type: :development
|
238
|
-
requirement:
|
338
|
+
requirement: &id023 !ruby/object:Gem::Requirement
|
339
|
+
none: false
|
340
|
+
requirements:
|
341
|
+
- - ">="
|
342
|
+
- !ruby/object:Gem::Version
|
343
|
+
hash: 3
|
344
|
+
segments:
|
345
|
+
- 0
|
346
|
+
version: "0"
|
347
|
+
version_requirements: *id023
|
348
|
+
name: database_cleaner
|
349
|
+
prerelease: false
|
239
350
|
- !ruby/object:Gem::Dependency
|
240
|
-
|
241
|
-
|
351
|
+
type: :development
|
352
|
+
requirement: &id024 !ruby/object:Gem::Requirement
|
242
353
|
none: false
|
243
354
|
requirements:
|
244
355
|
- - ">="
|
245
356
|
- !ruby/object:Gem::Version
|
246
|
-
hash:
|
357
|
+
hash: 3
|
247
358
|
segments:
|
248
|
-
- 3
|
249
359
|
- 0
|
360
|
+
version: "0"
|
361
|
+
version_requirements: *id024
|
362
|
+
name: rcov
|
363
|
+
prerelease: false
|
364
|
+
- !ruby/object:Gem::Dependency
|
365
|
+
type: :development
|
366
|
+
requirement: &id025 !ruby/object:Gem::Requirement
|
367
|
+
none: false
|
368
|
+
requirements:
|
369
|
+
- - ">="
|
370
|
+
- !ruby/object:Gem::Version
|
371
|
+
hash: 3
|
372
|
+
segments:
|
250
373
|
- 0
|
251
|
-
version:
|
374
|
+
version: "0"
|
375
|
+
version_requirements: *id025
|
376
|
+
name: jeweler
|
252
377
|
prerelease: false
|
253
|
-
type: :runtime
|
254
|
-
requirement: *id015
|
255
378
|
description: Kaminari is a Scope & Engine based, clean, powerful, customizable and sophisticated paginator for Rails 3
|
256
379
|
email: ronnie@dio.jp
|
257
380
|
executables: []
|
@@ -272,33 +395,27 @@ files:
|
|
272
395
|
- README.rdoc
|
273
396
|
- Rakefile
|
274
397
|
- VERSION
|
275
|
-
- app/views/kaminari/
|
276
|
-
- app/views/kaminari/
|
277
|
-
- app/views/kaminari/
|
278
|
-
- app/views/kaminari/
|
279
|
-
- app/views/kaminari/
|
280
|
-
- app/views/kaminari/
|
281
|
-
- app/views/kaminari/
|
282
|
-
- app/views/kaminari/
|
283
|
-
- app/views/kaminari/
|
284
|
-
- app/views/kaminari/
|
285
|
-
- app/views/kaminari/_page_link.html.erb
|
286
|
-
- app/views/kaminari/_page_link.html.haml
|
398
|
+
- app/views/kaminari/_first_page.html.erb
|
399
|
+
- app/views/kaminari/_first_page.html.haml
|
400
|
+
- app/views/kaminari/_gap.html.erb
|
401
|
+
- app/views/kaminari/_gap.html.haml
|
402
|
+
- app/views/kaminari/_last_page.html.erb
|
403
|
+
- app/views/kaminari/_last_page.html.haml
|
404
|
+
- app/views/kaminari/_next_page.html.erb
|
405
|
+
- app/views/kaminari/_next_page.html.haml
|
406
|
+
- app/views/kaminari/_page.html.erb
|
407
|
+
- app/views/kaminari/_page.html.haml
|
287
408
|
- app/views/kaminari/_paginator.html.erb
|
288
409
|
- app/views/kaminari/_paginator.html.haml
|
289
|
-
- app/views/kaminari/
|
290
|
-
- app/views/kaminari/
|
291
|
-
- app/views/kaminari/_prev_span.html.erb
|
292
|
-
- app/views/kaminari/_prev_span.html.haml
|
293
|
-
- app/views/kaminari/_truncated_span.html.erb
|
294
|
-
- app/views/kaminari/_truncated_span.html.haml
|
410
|
+
- app/views/kaminari/_prev_page.html.erb
|
411
|
+
- app/views/kaminari/_prev_page.html.haml
|
295
412
|
- config/locales/kaminari.yml
|
296
413
|
- kaminari.gemspec
|
297
414
|
- lib/generators/kaminari/views_generator.rb
|
298
415
|
- lib/kaminari.rb
|
299
416
|
- lib/kaminari/engine.rb
|
300
417
|
- lib/kaminari/helpers/action_view_extension.rb
|
301
|
-
- lib/kaminari/helpers/
|
418
|
+
- lib/kaminari/helpers/paginator.rb
|
302
419
|
- lib/kaminari/helpers/tags.rb
|
303
420
|
- lib/kaminari/models/active_record_extension.rb
|
304
421
|
- lib/kaminari/models/active_record_relation_methods.rb
|
@@ -307,6 +424,7 @@ files:
|
|
307
424
|
- lib/kaminari/models/mongoid_extension.rb
|
308
425
|
- lib/kaminari/models/page_scope_methods.rb
|
309
426
|
- lib/kaminari/railtie.rb
|
427
|
+
- lib/kaminari/version.rb
|
310
428
|
- spec/acceptance/acceptance_helper.rb
|
311
429
|
- spec/acceptance/support/helpers.rb
|
312
430
|
- spec/acceptance/support/paths.rb
|
@@ -314,12 +432,13 @@ files:
|
|
314
432
|
- spec/fake_app.rb
|
315
433
|
- spec/helpers/helpers_spec.rb
|
316
434
|
- spec/helpers/tags_spec.rb
|
435
|
+
- spec/models/active_record_relation_methods_spec.rb
|
317
436
|
- spec/models/default_per_page_spec.rb
|
318
437
|
- spec/models/mongoid_spec.rb
|
319
438
|
- spec/models/scopes_spec.rb
|
320
439
|
- spec/spec_helper.rb
|
440
|
+
- spec/support/database_cleaner.rb
|
321
441
|
- spec/support/matchers.rb
|
322
|
-
has_rdoc: true
|
323
442
|
homepage: http://github.com/amatsuda/kaminari
|
324
443
|
licenses:
|
325
444
|
- MIT
|
@@ -349,7 +468,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
349
468
|
requirements: []
|
350
469
|
|
351
470
|
rubyforge_project:
|
352
|
-
rubygems_version: 1.
|
471
|
+
rubygems_version: 1.7.2
|
353
472
|
signing_key:
|
354
473
|
specification_version: 3
|
355
474
|
summary: A pagination engine plugin for Rails 3
|
@@ -361,8 +480,10 @@ test_files:
|
|
361
480
|
- spec/fake_app.rb
|
362
481
|
- spec/helpers/helpers_spec.rb
|
363
482
|
- spec/helpers/tags_spec.rb
|
483
|
+
- spec/models/active_record_relation_methods_spec.rb
|
364
484
|
- spec/models/default_per_page_spec.rb
|
365
485
|
- spec/models/mongoid_spec.rb
|
366
486
|
- spec/models/scopes_spec.rb
|
367
487
|
- spec/spec_helper.rb
|
488
|
+
- spec/support/database_cleaner.rb
|
368
489
|
- spec/support/matchers.rb
|