kaminari 0.13.0 → 0.14.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.

Files changed (87) hide show
  1. data/.gitignore +2 -0
  2. data/.travis.yml +8 -1
  3. data/CHANGELOG +46 -10
  4. data/README.rdoc +14 -3
  5. data/Rakefile +22 -2
  6. data/app/views/kaminari/_first_page.html.erb +1 -1
  7. data/app/views/kaminari/_first_page.html.haml +1 -1
  8. data/app/views/kaminari/_first_page.html.slim +1 -1
  9. data/app/views/kaminari/_gap.html.erb +1 -1
  10. data/app/views/kaminari/_gap.html.haml +1 -1
  11. data/app/views/kaminari/_gap.html.slim +1 -1
  12. data/app/views/kaminari/_last_page.html.erb +1 -1
  13. data/app/views/kaminari/_last_page.html.haml +1 -1
  14. data/app/views/kaminari/_last_page.html.slim +1 -1
  15. data/app/views/kaminari/_next_page.html.erb +1 -1
  16. data/app/views/kaminari/_next_page.html.haml +1 -1
  17. data/app/views/kaminari/_next_page.html.slim +1 -1
  18. data/app/views/kaminari/_page.html.erb +2 -2
  19. data/app/views/kaminari/_page.html.haml +1 -1
  20. data/app/views/kaminari/_page.html.slim +1 -1
  21. data/app/views/kaminari/_paginator.html.erb +1 -1
  22. data/app/views/kaminari/_paginator.html.haml +1 -1
  23. data/app/views/kaminari/_paginator.html.slim +1 -1
  24. data/app/views/kaminari/_prev_page.html.erb +1 -1
  25. data/app/views/kaminari/_prev_page.html.haml +1 -1
  26. data/app/views/kaminari/_prev_page.html.slim +1 -1
  27. data/config/locales/kaminari.yml +9 -0
  28. data/gemfiles/active_record_30.gemfile +7 -0
  29. data/gemfiles/active_record_31.gemfile +7 -0
  30. data/gemfiles/active_record_32.gemfile +7 -0
  31. data/gemfiles/data_mapper_12.gemfile +12 -0
  32. data/gemfiles/mongo_mapper.gemfile +7 -0
  33. data/gemfiles/mongoid_24.gemfile +7 -0
  34. data/gemfiles/mongoid_30.gemfile +7 -0
  35. data/gemfiles/sinatra.gemfile +10 -0
  36. data/kaminari.gemspec +6 -18
  37. data/lib/generators/kaminari/templates/kaminari_config.rb +1 -0
  38. data/lib/kaminari.rb +22 -57
  39. data/lib/kaminari/config.rb +7 -1
  40. data/lib/kaminari/grape.rb +4 -0
  41. data/lib/kaminari/helpers/action_view_extension.rb +84 -13
  42. data/lib/kaminari/helpers/paginator.rb +8 -5
  43. data/lib/kaminari/helpers/sinatra_helpers.rb +25 -6
  44. data/lib/kaminari/helpers/tags.rb +1 -1
  45. data/lib/kaminari/hooks.rb +12 -10
  46. data/lib/kaminari/models/active_record_relation_methods.rb +0 -3
  47. data/lib/kaminari/models/configuration_methods.rb +15 -1
  48. data/lib/kaminari/models/page_scope_methods.rb +6 -2
  49. data/lib/kaminari/models/plucky_criteria_methods.rb +3 -0
  50. data/lib/kaminari/railtie.rb +2 -2
  51. data/lib/kaminari/sinatra.rb +2 -10
  52. data/lib/kaminari/version.rb +1 -1
  53. data/spec/config/config_spec.rb +15 -0
  54. data/spec/fake_app/active_record/config.rb +3 -0
  55. data/spec/{fake_app.rb → fake_app/active_record/models.rb} +7 -34
  56. data/spec/fake_app/data_mapper/config.rb +1 -0
  57. data/spec/fake_app/data_mapper/models.rb +27 -0
  58. data/spec/fake_app/mongo_mapper/config.rb +2 -0
  59. data/spec/fake_app/mongo_mapper/models.rb +9 -0
  60. data/spec/fake_app/mongoid/config.rb +16 -0
  61. data/spec/fake_app/mongoid/models.rb +22 -0
  62. data/spec/fake_app/rails_app.rb +55 -0
  63. data/spec/fake_app/sinatra_app.rb +22 -0
  64. data/spec/fake_gem.rb +0 -2
  65. data/spec/helpers/action_view_extension_spec.rb +192 -45
  66. data/spec/helpers/helpers_spec.rb +8 -8
  67. data/spec/helpers/sinatra_helpers_spec.rb +129 -133
  68. data/spec/helpers/tags_spec.rb +8 -8
  69. data/spec/models/active_record/active_record_relation_methods_spec.rb +30 -0
  70. data/spec/models/active_record/default_per_page_spec.rb +32 -0
  71. data/spec/models/active_record/max_per_page_spec.rb +32 -0
  72. data/spec/models/active_record/scopes_spec.rb +166 -0
  73. data/spec/models/array_spec.rb +7 -7
  74. data/spec/models/data_mapper/data_mapper_spec.rb +155 -0
  75. data/spec/models/mongo_mapper/mongo_mapper_spec.rb +72 -0
  76. data/spec/models/mongoid/mongoid_spec.rb +110 -0
  77. data/spec/requests/users_spec.rb +0 -1
  78. data/spec/spec_helper.rb +20 -18
  79. data/spec/spec_helper_for_sinatra.rb +22 -0
  80. data/spec/support/database_cleaner.rb +4 -1
  81. metadata +93 -141
  82. data/spec/models/active_record_relation_methods_spec.rb +0 -28
  83. data/spec/models/data_mapper_spec.rb +0 -181
  84. data/spec/models/default_per_page_spec.rb +0 -29
  85. data/spec/models/mongo_mapper_spec.rb +0 -82
  86. data/spec/models/mongoid_spec.rb +0 -129
  87. data/spec/models/scopes_spec.rb +0 -163
@@ -0,0 +1,110 @@
1
+ require 'spec_helper'
2
+
3
+ if defined? Mongoid
4
+ describe Kaminari::MongoidExtension do
5
+ before(:each) do
6
+ 41.times do
7
+ User.create!({:salary => 1})
8
+ end
9
+ end
10
+
11
+ describe '#page' do
12
+
13
+ context 'page 1' do
14
+ subject { User.page 1 }
15
+ it { should be_a Mongoid::Criteria }
16
+ its(:current_page) { should == 1 }
17
+ its(:limit_value) { should == 25 }
18
+ its(:total_pages) { should == 2 }
19
+ it { should skip(0) }
20
+ end
21
+
22
+ context 'page 2' do
23
+ subject { User.page 2 }
24
+ it { should be_a Mongoid::Criteria }
25
+ its(:current_page) { should == 2 }
26
+ its(:limit_value) { should == 25 }
27
+ its(:total_pages) { should == 2 }
28
+ it { should skip 25 }
29
+ end
30
+
31
+ context 'page "foobar"' do
32
+ subject { User.page 'foobar' }
33
+ it { should be_a Mongoid::Criteria }
34
+ its(:current_page) { should == 1 }
35
+ its(:limit_value) { should == 25 }
36
+ its(:total_pages) { should == 2 }
37
+ it { should skip 0 }
38
+ end
39
+
40
+ shared_examples 'complete valid pagination' do
41
+ if Mongoid::VERSION =~ /^3/
42
+ its(:selector) { should == {'salary' => 1} }
43
+ else
44
+ its(:selector) { should == {:salary => 1} }
45
+ end
46
+ its(:current_page) { should == 2 }
47
+ its(:limit_value) { should == 25 }
48
+ its(:total_pages) { should == 2 }
49
+ it { should skip 25 }
50
+ end
51
+
52
+ context 'with criteria before' do
53
+ subject { User.where(:salary => 1).page 2 }
54
+ it_should_behave_like 'complete valid pagination'
55
+ end
56
+
57
+ context 'with criteria after' do
58
+ subject { User.page(2).where(:salary => 1) }
59
+ it_should_behave_like 'complete valid pagination'
60
+ end
61
+ end
62
+
63
+ describe '#per' do
64
+ subject { User.page(2).per(10) }
65
+ it { should be_a Mongoid::Criteria }
66
+ its(:current_page) { should == 2 }
67
+ its(:limit_value) { should == 10 }
68
+ its(:total_pages) { should == 5 }
69
+ it { should skip 10 }
70
+ end
71
+
72
+ describe '#page in embedded documents' do
73
+ before do
74
+ @mongo_developer = MongoMongoidExtensionDeveloper.new
75
+ @mongo_developer.frameworks.new(:name => "rails", :language => "ruby")
76
+ @mongo_developer.frameworks.new(:name => "merb", :language => "ruby")
77
+ @mongo_developer.frameworks.new(:name => "sinatra", :language => "ruby")
78
+ @mongo_developer.frameworks.new(:name => "cakephp", :language => "php")
79
+ @mongo_developer.frameworks.new(:name => "tornado", :language => "python")
80
+ end
81
+
82
+ context 'page 1' do
83
+ subject { @mongo_developer.frameworks.page(1).per(1) }
84
+ it { should be_a Mongoid::Criteria }
85
+ its(:total_count) { should == 5 }
86
+ its(:limit_value) { should == 1 }
87
+ its(:current_page) { should == 1 }
88
+ its(:total_pages) { should == 5 }
89
+ end
90
+
91
+ context 'with criteria after' do
92
+ subject { @mongo_developer.frameworks.page(1).per(2).where(:language => "ruby") }
93
+ it { should be_a Mongoid::Criteria }
94
+ its(:total_count) { should == 3 }
95
+ its(:limit_value) { should == 2 }
96
+ its(:current_page) { should == 1 }
97
+ its(:total_pages) { should == 2 }
98
+ end
99
+
100
+ context 'with criteria before' do
101
+ subject { @mongo_developer.frameworks.where(:language => "ruby").page(1).per(2) }
102
+ it { should be_a Mongoid::Criteria }
103
+ its(:total_count) { should == 3 }
104
+ its(:limit_value) { should == 2 }
105
+ its(:current_page) { should == 1 }
106
+ its(:total_pages) { should == 2 }
107
+ end
108
+ end
109
+ end
110
+ end
@@ -3,7 +3,6 @@ require 'spec_helper'
3
3
 
4
4
  feature 'Users' do
5
5
  background do
6
- User.delete_all
7
6
  1.upto(100) {|i| User.create! :name => "user#{'%03d' % i}" }
8
7
  end
9
8
  scenario 'navigating by pagination links' do
@@ -1,30 +1,32 @@
1
1
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
2
  $LOAD_PATH.unshift(File.dirname(__FILE__))
3
- require 'rails'
4
- require 'mongoid'
5
- require 'dm-core'
6
- require 'kaminari'
3
+
4
+ begin
5
+ require 'rails'
6
+ rescue LoadError
7
+ end
8
+
9
+ require 'bundler/setup'
10
+ Bundler.require
11
+
7
12
  require 'database_cleaner'
8
- # Ensure we use 'syck' instead of 'psych' in 1.9.2
9
- # RubyGems >= 1.5.0 uses 'psych' on 1.9.2, but
10
- # Psych does not yet support YAML 1.1 merge keys.
11
- # Merge keys is often used in mongoid.yml
12
- # See: http://redmine.ruby-lang.org/issues/show/4300
13
- if RUBY_VERSION >= '1.9.2'
14
- YAML::ENGINE.yamler = 'syck'
13
+
14
+ # Simulate a gem providing a subclass of ActiveRecord::Base before the Railtie is loaded.
15
+ require 'fake_gem' if defined? ActiveRecord
16
+
17
+ if defined? Rails
18
+ require 'fake_app/rails_app'
19
+
20
+ require 'rspec/rails'
21
+ end
22
+ if defined? Sinatra
23
+ require 'spec_helper_for_sinatra'
15
24
  end
16
- require 'fake_gem'
17
- require 'fake_app'
18
25
 
19
- require 'rspec/rails'
20
26
  # Requires supporting files with custom matchers and macros, etc,
21
27
  # in ./support/ and its subdirectories.
22
28
  Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
23
29
 
24
30
  RSpec.configure do |config|
25
31
  config.mock_with :rr
26
- config.before :all do
27
- # ActiveRecord::Base.connection.execute 'CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))' unless ActiveRecord::Base.connection.table_exists? 'users'
28
- CreateAllTables.up unless ActiveRecord::Base.connection.table_exists? 'users'
29
- end
30
32
  end
@@ -1,10 +1,32 @@
1
1
  require 'kaminari/sinatra'
2
2
  require 'rack/test'
3
3
  require 'sinatra/test_helpers'
4
+ require 'capybara/dsl'
5
+ require 'capybara/rspec'
6
+
7
+ require 'fake_app/sinatra_app'
8
+
9
+ Capybara.app = SinatraApp
10
+
11
+ module HelperMethodForHelperSpec
12
+ module FakeEnv
13
+ def env
14
+ {'PATH_INFO' => '/'}
15
+ end
16
+ end
17
+
18
+ def helper
19
+ # OMG terrible object...
20
+ Kaminari::Helpers::SinatraHelpers::ActionViewTemplateProxy.new(:current_params => {}, :current_path => '/', :param_name => Kaminari.config.param_name).extend(Padrino::Helpers, Kaminari::ActionViewExtension, Kaminari::Helpers::SinatraHelpers::HelperMethods, FakeEnv)
21
+ end
22
+ end
4
23
 
5
24
  RSpec.configure do |config|
6
25
  config.include Rack::Test::Methods
7
26
  config.include Sinatra::TestHelpers
27
+ config.include Capybara::DSL
28
+ config.include HelperMethodForHelperSpec
29
+ # config.include HelperMethodForHelperSpec, :type => :helper
8
30
  end
9
31
 
10
32
  require 'nokogiri'
@@ -1,4 +1,7 @@
1
- DatabaseCleaner.strategy = :transaction
1
+ DatabaseCleaner[:active_record].strategy = :transaction if defined? ActiveRecord
2
+ DatabaseCleaner[:data_mapper].strategy = :transaction if defined? DataMapper
3
+ DatabaseCleaner[:mongoid].strategy = :truncation if defined? Mongoid
4
+ DatabaseCleaner[:mongo_mapper].strategy = :truncation if defined? MongoMapper
2
5
 
3
6
  RSpec.configure do |config|
4
7
  config.before :suite do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kaminari
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.14.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-22 00:00:00.000000000 Z
12
+ date: 2012-09-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
- requirement: &70223286119560 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,21 +21,15 @@ dependencies:
21
21
  version: 3.0.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70223286119560
25
- - !ruby/object:Gem::Dependency
26
- name: actionpack
27
- requirement: &70223286119040 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
28
25
  none: false
29
26
  requirements:
30
27
  - - ! '>='
31
28
  - !ruby/object:Gem::Version
32
29
  version: 3.0.0
33
- type: :runtime
34
- prerelease: false
35
- version_requirements: *70223286119040
36
30
  - !ruby/object:Gem::Dependency
37
- name: railties
38
- requirement: &70223286118440 !ruby/object:Gem::Requirement
31
+ name: actionpack
32
+ requirement: !ruby/object:Gem::Requirement
39
33
  none: false
40
34
  requirements:
41
35
  - - ! '>='
@@ -43,131 +37,95 @@ dependencies:
43
37
  version: 3.0.0
44
38
  type: :runtime
45
39
  prerelease: false
46
- version_requirements: *70223286118440
47
- - !ruby/object:Gem::Dependency
48
- name: bundler
49
- requirement: &70223286117960 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
50
41
  none: false
51
42
  requirements:
52
43
  - - ! '>='
53
44
  - !ruby/object:Gem::Version
54
- version: 1.0.0
55
- type: :development
56
- prerelease: false
57
- version_requirements: *70223286117960
45
+ version: 3.0.0
58
46
  - !ruby/object:Gem::Dependency
59
- name: sqlite3
60
- requirement: &70223286117460 !ruby/object:Gem::Requirement
47
+ name: bundler
48
+ requirement: !ruby/object:Gem::Requirement
61
49
  none: false
62
50
  requirements:
63
51
  - - ! '>='
64
52
  - !ruby/object:Gem::Version
65
- version: '0'
53
+ version: 1.0.0
66
54
  type: :development
67
55
  prerelease: false
68
- version_requirements: *70223286117460
69
- - !ruby/object:Gem::Dependency
70
- name: activerecord
71
- requirement: &70223286116800 !ruby/object:Gem::Requirement
56
+ version_requirements: !ruby/object:Gem::Requirement
72
57
  none: false
73
58
  requirements:
74
59
  - - ! '>='
75
60
  - !ruby/object:Gem::Version
76
- version: 3.0.0
77
- type: :development
78
- prerelease: false
79
- version_requirements: *70223286116800
61
+ version: 1.0.0
80
62
  - !ruby/object:Gem::Dependency
81
- name: activemodel
82
- requirement: &70223286132700 !ruby/object:Gem::Requirement
63
+ name: rake
64
+ requirement: !ruby/object:Gem::Requirement
83
65
  none: false
84
66
  requirements:
85
67
  - - ! '>='
86
68
  - !ruby/object:Gem::Version
87
- version: 3.0.0
69
+ version: '0'
88
70
  type: :development
89
71
  prerelease: false
90
- version_requirements: *70223286132700
91
- - !ruby/object:Gem::Dependency
92
- name: sinatra
93
- requirement: &70223286132120 !ruby/object:Gem::Requirement
72
+ version_requirements: !ruby/object:Gem::Requirement
94
73
  none: false
95
74
  requirements:
96
75
  - - ! '>='
97
76
  - !ruby/object:Gem::Version
98
- version: '1.3'
99
- type: :development
100
- prerelease: false
101
- version_requirements: *70223286132120
77
+ version: '0'
102
78
  - !ruby/object:Gem::Dependency
103
- name: mongoid
104
- requirement: &70223286131640 !ruby/object:Gem::Requirement
79
+ name: sqlite3
80
+ requirement: !ruby/object:Gem::Requirement
105
81
  none: false
106
82
  requirements:
107
83
  - - ! '>='
108
84
  - !ruby/object:Gem::Version
109
- version: '2'
85
+ version: '0'
110
86
  type: :development
111
87
  prerelease: false
112
- version_requirements: *70223286131640
113
- - !ruby/object:Gem::Dependency
114
- name: mongo_mapper
115
- requirement: &70223286131080 !ruby/object:Gem::Requirement
88
+ version_requirements: !ruby/object:Gem::Requirement
116
89
  none: false
117
90
  requirements:
118
91
  - - ! '>='
119
92
  - !ruby/object:Gem::Version
120
- version: '0.9'
121
- type: :development
122
- prerelease: false
123
- version_requirements: *70223286131080
93
+ version: '0'
124
94
  - !ruby/object:Gem::Dependency
125
- name: dm-core
126
- requirement: &70223286130520 !ruby/object:Gem::Requirement
95
+ name: tzinfo
96
+ requirement: !ruby/object:Gem::Requirement
127
97
  none: false
128
98
  requirements:
129
99
  - - ! '>='
130
100
  - !ruby/object:Gem::Version
131
- version: 1.1.0
101
+ version: '0'
132
102
  type: :development
133
103
  prerelease: false
134
- version_requirements: *70223286130520
135
- - !ruby/object:Gem::Dependency
136
- name: dm-migrations
137
- requirement: &70223286130040 !ruby/object:Gem::Requirement
104
+ version_requirements: !ruby/object:Gem::Requirement
138
105
  none: false
139
106
  requirements:
140
107
  - - ! '>='
141
108
  - !ruby/object:Gem::Version
142
- version: 1.1.0
143
- type: :development
144
- prerelease: false
145
- version_requirements: *70223286130040
109
+ version: '0'
146
110
  - !ruby/object:Gem::Dependency
147
- name: dm-aggregates
148
- requirement: &70223286129460 !ruby/object:Gem::Requirement
111
+ name: rspec
112
+ requirement: !ruby/object:Gem::Requirement
149
113
  none: false
150
114
  requirements:
151
115
  - - ! '>='
152
116
  - !ruby/object:Gem::Version
153
- version: 1.1.0
117
+ version: '0'
154
118
  type: :development
155
119
  prerelease: false
156
- version_requirements: *70223286129460
157
- - !ruby/object:Gem::Dependency
158
- name: dm-sqlite-adapter
159
- requirement: &70223286128980 !ruby/object:Gem::Requirement
120
+ version_requirements: !ruby/object:Gem::Requirement
160
121
  none: false
161
122
  requirements:
162
123
  - - ! '>='
163
124
  - !ruby/object:Gem::Version
164
- version: 1.1.0
165
- type: :development
166
- prerelease: false
167
- version_requirements: *70223286128980
125
+ version: '0'
168
126
  - !ruby/object:Gem::Dependency
169
- name: rspec
170
- requirement: &70223286128420 !ruby/object:Gem::Requirement
127
+ name: rr
128
+ requirement: !ruby/object:Gem::Requirement
171
129
  none: false
172
130
  requirements:
173
131
  - - ! '>='
@@ -175,43 +133,31 @@ dependencies:
175
133
  version: '0'
176
134
  type: :development
177
135
  prerelease: false
178
- version_requirements: *70223286128420
179
- - !ruby/object:Gem::Dependency
180
- name: rspec-rails
181
- requirement: &70223286127860 !ruby/object:Gem::Requirement
136
+ version_requirements: !ruby/object:Gem::Requirement
182
137
  none: false
183
138
  requirements:
184
139
  - - ! '>='
185
140
  - !ruby/object:Gem::Version
186
141
  version: '0'
187
- type: :development
188
- prerelease: false
189
- version_requirements: *70223286127860
190
142
  - !ruby/object:Gem::Dependency
191
- name: rr
192
- requirement: &70223286127320 !ruby/object:Gem::Requirement
143
+ name: capybara
144
+ requirement: !ruby/object:Gem::Requirement
193
145
  none: false
194
146
  requirements:
195
147
  - - ! '>='
196
148
  - !ruby/object:Gem::Version
197
- version: '0'
149
+ version: '1.0'
198
150
  type: :development
199
151
  prerelease: false
200
- version_requirements: *70223286127320
201
- - !ruby/object:Gem::Dependency
202
- name: capybara
203
- requirement: &70223286126800 !ruby/object:Gem::Requirement
152
+ version_requirements: !ruby/object:Gem::Requirement
204
153
  none: false
205
154
  requirements:
206
155
  - - ! '>='
207
156
  - !ruby/object:Gem::Version
208
157
  version: '1.0'
209
- type: :development
210
- prerelease: false
211
- version_requirements: *70223286126800
212
158
  - !ruby/object:Gem::Dependency
213
159
  name: database_cleaner
214
- requirement: &70223286126260 !ruby/object:Gem::Requirement
160
+ requirement: !ruby/object:Gem::Requirement
215
161
  none: false
216
162
  requirements:
217
163
  - - ! '>='
@@ -219,51 +165,28 @@ dependencies:
219
165
  version: '0'
220
166
  type: :development
221
167
  prerelease: false
222
- version_requirements: *70223286126260
223
- - !ruby/object:Gem::Dependency
224
- name: padrino-helpers
225
- requirement: &70223286125740 !ruby/object:Gem::Requirement
226
- none: false
227
- requirements:
228
- - - ~>
229
- - !ruby/object:Gem::Version
230
- version: '0.10'
231
- type: :development
232
- prerelease: false
233
- version_requirements: *70223286125740
234
- - !ruby/object:Gem::Dependency
235
- name: rack-test
236
- requirement: &70223286125200 !ruby/object:Gem::Requirement
168
+ version_requirements: !ruby/object:Gem::Requirement
237
169
  none: false
238
170
  requirements:
239
171
  - - ! '>='
240
172
  - !ruby/object:Gem::Version
241
173
  version: '0'
242
- type: :development
243
- prerelease: false
244
- version_requirements: *70223286125200
245
174
  - !ruby/object:Gem::Dependency
246
- name: sinatra-contrib
247
- requirement: &70223286141060 !ruby/object:Gem::Requirement
175
+ name: rdoc
176
+ requirement: !ruby/object:Gem::Requirement
248
177
  none: false
249
178
  requirements:
250
- - - ~>
179
+ - - ! '>='
251
180
  - !ruby/object:Gem::Version
252
- version: '1.3'
181
+ version: '0'
253
182
  type: :development
254
183
  prerelease: false
255
- version_requirements: *70223286141060
256
- - !ruby/object:Gem::Dependency
257
- name: nokogiri
258
- requirement: &70223286140580 !ruby/object:Gem::Requirement
184
+ version_requirements: !ruby/object:Gem::Requirement
259
185
  none: false
260
186
  requirements:
261
187
  - - ! '>='
262
188
  - !ruby/object:Gem::Version
263
189
  version: '0'
264
- type: :development
265
- prerelease: false
266
- version_requirements: *70223286140580
267
190
  description: Kaminari is a Scope & Engine based, clean, powerful, agnostic, customizable
268
191
  and sophisticated paginator for Rails 3
269
192
  email:
@@ -305,6 +228,14 @@ files:
305
228
  - app/views/kaminari/_prev_page.html.haml
306
229
  - app/views/kaminari/_prev_page.html.slim
307
230
  - config/locales/kaminari.yml
231
+ - gemfiles/active_record_30.gemfile
232
+ - gemfiles/active_record_31.gemfile
233
+ - gemfiles/active_record_32.gemfile
234
+ - gemfiles/data_mapper_12.gemfile
235
+ - gemfiles/mongo_mapper.gemfile
236
+ - gemfiles/mongoid_24.gemfile
237
+ - gemfiles/mongoid_30.gemfile
238
+ - gemfiles/sinatra.gemfile
308
239
  - kaminari.gemspec
309
240
  - lib/generators/kaminari/config_generator.rb
310
241
  - lib/generators/kaminari/templates/kaminari_config.rb
@@ -312,6 +243,7 @@ files:
312
243
  - lib/kaminari.rb
313
244
  - lib/kaminari/config.rb
314
245
  - lib/kaminari/engine.rb
246
+ - lib/kaminari/grape.rb
315
247
  - lib/kaminari/helpers/action_view_extension.rb
316
248
  - lib/kaminari/helpers/paginator.rb
317
249
  - lib/kaminari/helpers/sinatra_helpers.rb
@@ -333,19 +265,29 @@ files:
333
265
  - lib/kaminari/sinatra.rb
334
266
  - lib/kaminari/version.rb
335
267
  - spec/config/config_spec.rb
336
- - spec/fake_app.rb
268
+ - spec/fake_app/active_record/config.rb
269
+ - spec/fake_app/active_record/models.rb
270
+ - spec/fake_app/data_mapper/config.rb
271
+ - spec/fake_app/data_mapper/models.rb
272
+ - spec/fake_app/mongo_mapper/config.rb
273
+ - spec/fake_app/mongo_mapper/models.rb
274
+ - spec/fake_app/mongoid/config.rb
275
+ - spec/fake_app/mongoid/models.rb
276
+ - spec/fake_app/rails_app.rb
277
+ - spec/fake_app/sinatra_app.rb
337
278
  - spec/fake_gem.rb
338
279
  - spec/helpers/action_view_extension_spec.rb
339
280
  - spec/helpers/helpers_spec.rb
340
281
  - spec/helpers/sinatra_helpers_spec.rb
341
282
  - spec/helpers/tags_spec.rb
342
- - spec/models/active_record_relation_methods_spec.rb
283
+ - spec/models/active_record/active_record_relation_methods_spec.rb
284
+ - spec/models/active_record/default_per_page_spec.rb
285
+ - spec/models/active_record/max_per_page_spec.rb
286
+ - spec/models/active_record/scopes_spec.rb
343
287
  - spec/models/array_spec.rb
344
- - spec/models/data_mapper_spec.rb
345
- - spec/models/default_per_page_spec.rb
346
- - spec/models/mongo_mapper_spec.rb
347
- - spec/models/mongoid_spec.rb
348
- - spec/models/scopes_spec.rb
288
+ - spec/models/data_mapper/data_mapper_spec.rb
289
+ - spec/models/mongo_mapper/mongo_mapper_spec.rb
290
+ - spec/models/mongoid/mongoid_spec.rb
349
291
  - spec/requests/users_spec.rb
350
292
  - spec/spec_helper.rb
351
293
  - spec/spec_helper_for_sinatra.rb
@@ -366,7 +308,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
366
308
  version: '0'
367
309
  segments:
368
310
  - 0
369
- hash: 1990752312542125094
311
+ hash: 3342355439431297487
370
312
  required_rubygems_version: !ruby/object:Gem::Requirement
371
313
  none: false
372
314
  requirements:
@@ -375,28 +317,38 @@ required_rubygems_version: !ruby/object:Gem::Requirement
375
317
  version: '0'
376
318
  segments:
377
319
  - 0
378
- hash: 1990752312542125094
320
+ hash: 3342355439431297487
379
321
  requirements: []
380
322
  rubyforge_project: kaminari
381
- rubygems_version: 1.8.10
323
+ rubygems_version: 1.8.24
382
324
  signing_key:
383
325
  specification_version: 3
384
326
  summary: A pagination engine plugin for Rails 3 or other modern frameworks
385
327
  test_files:
386
328
  - spec/config/config_spec.rb
387
- - spec/fake_app.rb
329
+ - spec/fake_app/active_record/config.rb
330
+ - spec/fake_app/active_record/models.rb
331
+ - spec/fake_app/data_mapper/config.rb
332
+ - spec/fake_app/data_mapper/models.rb
333
+ - spec/fake_app/mongo_mapper/config.rb
334
+ - spec/fake_app/mongo_mapper/models.rb
335
+ - spec/fake_app/mongoid/config.rb
336
+ - spec/fake_app/mongoid/models.rb
337
+ - spec/fake_app/rails_app.rb
338
+ - spec/fake_app/sinatra_app.rb
388
339
  - spec/fake_gem.rb
389
340
  - spec/helpers/action_view_extension_spec.rb
390
341
  - spec/helpers/helpers_spec.rb
391
342
  - spec/helpers/sinatra_helpers_spec.rb
392
343
  - spec/helpers/tags_spec.rb
393
- - spec/models/active_record_relation_methods_spec.rb
344
+ - spec/models/active_record/active_record_relation_methods_spec.rb
345
+ - spec/models/active_record/default_per_page_spec.rb
346
+ - spec/models/active_record/max_per_page_spec.rb
347
+ - spec/models/active_record/scopes_spec.rb
394
348
  - spec/models/array_spec.rb
395
- - spec/models/data_mapper_spec.rb
396
- - spec/models/default_per_page_spec.rb
397
- - spec/models/mongo_mapper_spec.rb
398
- - spec/models/mongoid_spec.rb
399
- - spec/models/scopes_spec.rb
349
+ - spec/models/data_mapper/data_mapper_spec.rb
350
+ - spec/models/mongo_mapper/mongo_mapper_spec.rb
351
+ - spec/models/mongoid/mongoid_spec.rb
400
352
  - spec/requests/users_spec.rb
401
353
  - spec/spec_helper.rb
402
354
  - spec/spec_helper_for_sinatra.rb