kaminari-rails4 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.document +5 -0
- data/.gemtest +0 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.travis.yml +16 -0
- data/CHANGELOG +351 -0
- data/Gemfile +4 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +300 -0
- data/Rakefile +42 -0
- data/app/helpers/kaminari_helper.rb +5 -0
- data/app/views/kaminari/_first_page.html.erb +11 -0
- data/app/views/kaminari/_first_page.html.haml +9 -0
- data/app/views/kaminari/_first_page.html.slim +10 -0
- data/app/views/kaminari/_gap.html.erb +8 -0
- data/app/views/kaminari/_gap.html.haml +8 -0
- data/app/views/kaminari/_gap.html.slim +9 -0
- data/app/views/kaminari/_last_page.html.erb +11 -0
- data/app/views/kaminari/_last_page.html.haml +9 -0
- data/app/views/kaminari/_last_page.html.slim +10 -0
- data/app/views/kaminari/_next_page.html.erb +11 -0
- data/app/views/kaminari/_next_page.html.haml +9 -0
- data/app/views/kaminari/_next_page.html.slim +10 -0
- data/app/views/kaminari/_page.html.erb +12 -0
- data/app/views/kaminari/_page.html.haml +10 -0
- data/app/views/kaminari/_page.html.slim +11 -0
- data/app/views/kaminari/_paginator.html.erb +23 -0
- data/app/views/kaminari/_paginator.html.haml +18 -0
- data/app/views/kaminari/_paginator.html.slim +19 -0
- data/app/views/kaminari/_prev_page.html.erb +11 -0
- data/app/views/kaminari/_prev_page.html.haml +9 -0
- data/app/views/kaminari/_prev_page.html.slim +10 -0
- data/config/locales/kaminari.yml +19 -0
- data/gemfiles/active_record_30.gemfile +7 -0
- data/gemfiles/active_record_31.gemfile +7 -0
- data/gemfiles/active_record_32.gemfile +10 -0
- data/gemfiles/active_record_40.gemfile +8 -0
- data/gemfiles/data_mapper_12.gemfile +15 -0
- data/gemfiles/mongo_mapper.gemfile +10 -0
- data/gemfiles/mongoid_24.gemfile +7 -0
- data/gemfiles/mongoid_30.gemfile +12 -0
- data/gemfiles/sinatra.gemfile +13 -0
- data/kaminari.gemspec +36 -0
- data/lib/generators/kaminari/config_generator.rb +16 -0
- data/lib/generators/kaminari/templates/kaminari_config.rb +10 -0
- data/lib/generators/kaminari/views_generator.rb +118 -0
- data/lib/kaminari.rb +38 -0
- data/lib/kaminari/config.rb +51 -0
- data/lib/kaminari/engine.rb +4 -0
- data/lib/kaminari/grape.rb +4 -0
- data/lib/kaminari/helpers/action_view_extension.rb +151 -0
- data/lib/kaminari/helpers/paginator.rb +186 -0
- data/lib/kaminari/helpers/sinatra_helpers.rb +144 -0
- data/lib/kaminari/helpers/tags.rb +95 -0
- data/lib/kaminari/hooks.rb +33 -0
- data/lib/kaminari/models/active_record_extension.rb +22 -0
- data/lib/kaminari/models/active_record_model_extension.rb +20 -0
- data/lib/kaminari/models/active_record_relation_methods.rb +29 -0
- data/lib/kaminari/models/array_extension.rb +58 -0
- data/lib/kaminari/models/configuration_methods.rb +48 -0
- data/lib/kaminari/models/data_mapper_collection_methods.rb +15 -0
- data/lib/kaminari/models/data_mapper_extension.rb +48 -0
- data/lib/kaminari/models/mongo_mapper_extension.rb +18 -0
- data/lib/kaminari/models/mongoid_criteria_methods.rb +23 -0
- data/lib/kaminari/models/mongoid_extension.rb +33 -0
- data/lib/kaminari/models/page_scope_methods.rb +70 -0
- data/lib/kaminari/models/plucky_criteria_methods.rb +18 -0
- data/lib/kaminari/railtie.rb +7 -0
- data/lib/kaminari/sinatra.rb +5 -0
- data/lib/kaminari/version.rb +3 -0
- data/spec/config/config_spec.rb +91 -0
- data/spec/fake_app/active_record/config.rb +3 -0
- data/spec/fake_app/active_record/models.rb +57 -0
- data/spec/fake_app/data_mapper/config.rb +1 -0
- data/spec/fake_app/data_mapper/models.rb +27 -0
- data/spec/fake_app/mongo_mapper/config.rb +2 -0
- data/spec/fake_app/mongo_mapper/models.rb +9 -0
- data/spec/fake_app/mongoid/config.rb +16 -0
- data/spec/fake_app/mongoid/models.rb +22 -0
- data/spec/fake_app/rails_app.rb +56 -0
- data/spec/fake_app/sinatra_app.rb +22 -0
- data/spec/fake_gem.rb +4 -0
- data/spec/helpers/action_view_extension_spec.rb +262 -0
- data/spec/helpers/helpers_spec.rb +135 -0
- data/spec/helpers/sinatra_helpers_spec.rb +170 -0
- data/spec/helpers/tags_spec.rb +140 -0
- data/spec/models/active_record/active_record_relation_methods_spec.rb +47 -0
- data/spec/models/active_record/default_per_page_spec.rb +32 -0
- data/spec/models/active_record/max_pages_spec.rb +23 -0
- data/spec/models/active_record/max_per_page_spec.rb +32 -0
- data/spec/models/active_record/scopes_spec.rb +242 -0
- data/spec/models/array_spec.rb +150 -0
- data/spec/models/data_mapper/data_mapper_spec.rb +179 -0
- data/spec/models/mongo_mapper/mongo_mapper_spec.rb +84 -0
- data/spec/models/mongoid/mongoid_spec.rb +126 -0
- data/spec/requests/users_spec.rb +53 -0
- data/spec/spec_helper.rb +33 -0
- data/spec/spec_helper_for_sinatra.rb +33 -0
- data/spec/support/database_cleaner.rb +16 -0
- data/spec/support/matchers.rb +52 -0
- metadata +300 -0
@@ -0,0 +1,84 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
if defined? MongoMapper
|
4
|
+
describe Kaminari::MongoMapperExtension do
|
5
|
+
before(:each) do
|
6
|
+
User.destroy_all
|
7
|
+
41.times { User.create!({:salary => 1}) }
|
8
|
+
end
|
9
|
+
|
10
|
+
describe '#page' do
|
11
|
+
context 'page 1' do
|
12
|
+
subject { User.page(1) }
|
13
|
+
it { should be_a Plucky::Query }
|
14
|
+
its(:current_page) { should == 1 }
|
15
|
+
its(:prev_page) { should be_nil }
|
16
|
+
its(:next_page) { should == 2 }
|
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 Plucky::Query }
|
25
|
+
its(:current_page) { should == 2 }
|
26
|
+
its(:prev_page) { should == 1 }
|
27
|
+
its(:next_page) { should be_nil }
|
28
|
+
its(:limit_value) { should == 25 }
|
29
|
+
its(:total_pages) { should == 2 }
|
30
|
+
it { should skip 25 }
|
31
|
+
end
|
32
|
+
|
33
|
+
context 'page "foobar"' do
|
34
|
+
subject { User.page 'foobar' }
|
35
|
+
it { should be_a Plucky::Query }
|
36
|
+
its(:current_page) { should == 1 }
|
37
|
+
its(:prev_page) { should be_nil }
|
38
|
+
its(:next_page) { should == 2 }
|
39
|
+
its(:limit_value) { should == 25 }
|
40
|
+
its(:total_pages) { should == 2 }
|
41
|
+
it { should skip 0 }
|
42
|
+
end
|
43
|
+
|
44
|
+
context 'with criteria before' do
|
45
|
+
it "should have the proper criteria source" do
|
46
|
+
User.where(:salary => 1).page(2).criteria.source.should == {:salary => 1}
|
47
|
+
end
|
48
|
+
|
49
|
+
subject { User.where(:salary => 1).page 2 }
|
50
|
+
its(:current_page) { should == 2 }
|
51
|
+
its(:prev_page) { should == 1 }
|
52
|
+
its(:next_page) { should be_nil }
|
53
|
+
its(:limit_value) { should == 25 }
|
54
|
+
its(:total_pages) { should == 2 }
|
55
|
+
it { should skip 25 }
|
56
|
+
end
|
57
|
+
|
58
|
+
context 'with criteria after' do
|
59
|
+
it "should have the proper criteria source" do
|
60
|
+
User.where(:salary => 1).page(2).criteria.source.should == {:salary => 1}
|
61
|
+
end
|
62
|
+
|
63
|
+
subject { User.page(2).where(:salary => 1) }
|
64
|
+
its(:current_page) { should == 2 }
|
65
|
+
its(:prev_page) { should == 1 }
|
66
|
+
its(:next_page) { should be_nil }
|
67
|
+
its(:limit_value) { should == 25 }
|
68
|
+
its(:total_pages) { should == 2 }
|
69
|
+
it { should skip 25 }
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
describe '#per' do
|
74
|
+
subject { User.page(2).per(10) }
|
75
|
+
it { should be_a Plucky::Query }
|
76
|
+
its(:current_page) { should == 2 }
|
77
|
+
its(:prev_page) { should == 1 }
|
78
|
+
its(:next_page) { should == 3 }
|
79
|
+
its(:limit_value) { should == 10 }
|
80
|
+
its(:total_pages) { should == 5 }
|
81
|
+
it { should skip 10 }
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -0,0 +1,126 @@
|
|
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(:prev_page) { should be_nil }
|
18
|
+
its(:next_page) { should == 2 }
|
19
|
+
its(:limit_value) { should == 25 }
|
20
|
+
its(:total_pages) { should == 2 }
|
21
|
+
it { should skip(0) }
|
22
|
+
end
|
23
|
+
|
24
|
+
context 'page 2' do
|
25
|
+
subject { User.page 2 }
|
26
|
+
it { should be_a Mongoid::Criteria }
|
27
|
+
its(:current_page) { should == 2 }
|
28
|
+
its(:prev_page) { should == 1 }
|
29
|
+
its(:next_page) { should be_nil }
|
30
|
+
its(:limit_value) { should == 25 }
|
31
|
+
its(:total_pages) { should == 2 }
|
32
|
+
it { should skip 25 }
|
33
|
+
end
|
34
|
+
|
35
|
+
context 'page "foobar"' do
|
36
|
+
subject { User.page 'foobar' }
|
37
|
+
it { should be_a Mongoid::Criteria }
|
38
|
+
its(:current_page) { should == 1 }
|
39
|
+
its(:prev_page) { should be_nil }
|
40
|
+
its(:next_page) { should == 2 }
|
41
|
+
its(:limit_value) { should == 25 }
|
42
|
+
its(:total_pages) { should == 2 }
|
43
|
+
it { should skip 0 }
|
44
|
+
end
|
45
|
+
|
46
|
+
shared_examples 'complete valid pagination' do
|
47
|
+
if Mongoid::VERSION =~ /^3/
|
48
|
+
its(:selector) { should == {'salary' => 1} }
|
49
|
+
else
|
50
|
+
its(:selector) { should == {:salary => 1} }
|
51
|
+
end
|
52
|
+
its(:current_page) { should == 2 }
|
53
|
+
its(:prev_page) { should == 1 }
|
54
|
+
its(:next_page) { should be_nil }
|
55
|
+
its(:limit_value) { should == 25 }
|
56
|
+
its(:total_pages) { should == 2 }
|
57
|
+
it { should skip 25 }
|
58
|
+
end
|
59
|
+
|
60
|
+
context 'with criteria before' do
|
61
|
+
subject { User.where(:salary => 1).page 2 }
|
62
|
+
it_should_behave_like 'complete valid pagination'
|
63
|
+
end
|
64
|
+
|
65
|
+
context 'with criteria after' do
|
66
|
+
subject { User.page(2).where(:salary => 1) }
|
67
|
+
it_should_behave_like 'complete valid pagination'
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
describe '#per' do
|
72
|
+
subject { User.page(2).per(10) }
|
73
|
+
it { should be_a Mongoid::Criteria }
|
74
|
+
its(:current_page) { should == 2 }
|
75
|
+
its(:prev_page) { should == 1 }
|
76
|
+
its(:next_page) { should == 3 }
|
77
|
+
its(:limit_value) { should == 10 }
|
78
|
+
its(:total_pages) { should == 5 }
|
79
|
+
it { should skip 10 }
|
80
|
+
end
|
81
|
+
|
82
|
+
describe '#page in embedded documents' do
|
83
|
+
before do
|
84
|
+
@mongo_developer = MongoMongoidExtensionDeveloper.new
|
85
|
+
@mongo_developer.frameworks.new(:name => "rails", :language => "ruby")
|
86
|
+
@mongo_developer.frameworks.new(:name => "merb", :language => "ruby")
|
87
|
+
@mongo_developer.frameworks.new(:name => "sinatra", :language => "ruby")
|
88
|
+
@mongo_developer.frameworks.new(:name => "cakephp", :language => "php")
|
89
|
+
@mongo_developer.frameworks.new(:name => "tornado", :language => "python")
|
90
|
+
end
|
91
|
+
|
92
|
+
context 'page 1' do
|
93
|
+
subject { @mongo_developer.frameworks.page(1).per(1) }
|
94
|
+
it { should be_a Mongoid::Criteria }
|
95
|
+
its(:total_count) { should == 5 }
|
96
|
+
its(:limit_value) { should == 1 }
|
97
|
+
its(:current_page) { should == 1 }
|
98
|
+
its(:prev_page) { should be_nil }
|
99
|
+
its(:next_page) { should == 2 }
|
100
|
+
its(:total_pages) { should == 5 }
|
101
|
+
end
|
102
|
+
|
103
|
+
context 'with criteria after' do
|
104
|
+
subject { @mongo_developer.frameworks.page(1).per(2).where(:language => "ruby") }
|
105
|
+
it { should be_a Mongoid::Criteria }
|
106
|
+
its(:total_count) { should == 3 }
|
107
|
+
its(:limit_value) { should == 2 }
|
108
|
+
its(:current_page) { should == 1 }
|
109
|
+
its(:prev_page) { should be_nil }
|
110
|
+
its(:next_page) { should == 2 }
|
111
|
+
its(:total_pages) { should == 2 }
|
112
|
+
end
|
113
|
+
|
114
|
+
context 'with criteria before' do
|
115
|
+
subject { @mongo_developer.frameworks.where(:language => "ruby").page(1).per(2) }
|
116
|
+
it { should be_a Mongoid::Criteria }
|
117
|
+
its(:total_count) { should == 3 }
|
118
|
+
its(:limit_value) { should == 2 }
|
119
|
+
its(:current_page) { should == 1 }
|
120
|
+
its(:prev_page) { should be_nil }
|
121
|
+
its(:next_page) { should == 2 }
|
122
|
+
its(:total_pages) { should == 2 }
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
feature 'Users' do
|
5
|
+
background do
|
6
|
+
1.upto(100) {|i| User.create! :name => "user#{'%03d' % i}" }
|
7
|
+
end
|
8
|
+
scenario 'navigating by pagination links' do
|
9
|
+
visit '/users'
|
10
|
+
|
11
|
+
within 'nav.pagination' do
|
12
|
+
within 'span.page.current' do
|
13
|
+
page.should have_content '1'
|
14
|
+
end
|
15
|
+
within 'span.next' do
|
16
|
+
click_link 'Next ›'
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
within 'nav.pagination' do
|
21
|
+
within 'span.page.current' do
|
22
|
+
page.should have_content '2'
|
23
|
+
end
|
24
|
+
within 'span.last' do
|
25
|
+
click_link 'Last »'
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
within 'nav.pagination' do
|
30
|
+
within 'span.page.current' do
|
31
|
+
page.should have_content '4'
|
32
|
+
end
|
33
|
+
within 'span.prev' do
|
34
|
+
click_link '‹ Prev'
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
within 'nav.pagination' do
|
39
|
+
within 'span.page.current' do
|
40
|
+
page.should have_content '3'
|
41
|
+
end
|
42
|
+
within 'span.first' do
|
43
|
+
click_link '« First'
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
within 'nav.pagination' do
|
48
|
+
within 'span.page.current' do
|
49
|
+
page.should have_content '1'
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'rails'
|
6
|
+
rescue LoadError
|
7
|
+
end
|
8
|
+
|
9
|
+
require 'bundler/setup'
|
10
|
+
Bundler.require
|
11
|
+
|
12
|
+
require 'capybara/rspec'
|
13
|
+
require 'database_cleaner'
|
14
|
+
|
15
|
+
# Simulate a gem providing a subclass of ActiveRecord::Base before the Railtie is loaded.
|
16
|
+
require 'fake_gem' if defined? ActiveRecord
|
17
|
+
|
18
|
+
if defined? Rails
|
19
|
+
require 'fake_app/rails_app'
|
20
|
+
|
21
|
+
require 'rspec/rails'
|
22
|
+
end
|
23
|
+
if defined? Sinatra
|
24
|
+
require 'spec_helper_for_sinatra'
|
25
|
+
end
|
26
|
+
|
27
|
+
# Requires supporting files with custom matchers and macros, etc,
|
28
|
+
# in ./support/ and its subdirectories.
|
29
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
30
|
+
|
31
|
+
RSpec.configure do |config|
|
32
|
+
config.mock_with :rr
|
33
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'kaminari/sinatra'
|
2
|
+
require 'rack/test'
|
3
|
+
require 'sinatra/test_helpers'
|
4
|
+
require 'capybara/rspec'
|
5
|
+
|
6
|
+
require 'fake_app/sinatra_app'
|
7
|
+
|
8
|
+
Capybara.app = SinatraApp
|
9
|
+
|
10
|
+
module HelperMethodForHelperSpec
|
11
|
+
module FakeEnv
|
12
|
+
def env
|
13
|
+
{'PATH_INFO' => '/'}
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def helper
|
18
|
+
# OMG terrible object...
|
19
|
+
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)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
RSpec.configure do |config|
|
24
|
+
config.include Rack::Test::Methods
|
25
|
+
config.include Sinatra::TestHelpers
|
26
|
+
config.include HelperMethodForHelperSpec
|
27
|
+
# config.include HelperMethodForHelperSpec, :type => :helper
|
28
|
+
end
|
29
|
+
|
30
|
+
require 'nokogiri'
|
31
|
+
def last_document
|
32
|
+
Nokogiri::HTML(last_response.body)
|
33
|
+
end
|
@@ -0,0 +1,16 @@
|
|
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
|
5
|
+
|
6
|
+
RSpec.configure do |config|
|
7
|
+
config.before :suite do
|
8
|
+
DatabaseCleaner.clean_with :truncation
|
9
|
+
end
|
10
|
+
config.before :each do
|
11
|
+
DatabaseCleaner.start
|
12
|
+
end
|
13
|
+
config.after :each do
|
14
|
+
DatabaseCleaner.clean
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
RSpec::Matchers.define :contain_tag do |klass|
|
2
|
+
match do |collection|
|
3
|
+
if @num.blank?
|
4
|
+
collection.any? {|tag| tag.is_a? klass}
|
5
|
+
else
|
6
|
+
(@count = collection.count {|tag| tag.is_a? klass}) == @num
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
def count(num)
|
11
|
+
@num = num
|
12
|
+
self
|
13
|
+
end
|
14
|
+
|
15
|
+
description do
|
16
|
+
"contain #{@num || 'any'} instance(s) of #{klass.name}"
|
17
|
+
end
|
18
|
+
failure_message_for_should do |collection|
|
19
|
+
"expected #{@num || 'any'} instance(s) of #{klass.name} but was #{@count}"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
RSpec::Matchers.define :contain_tag_old do |count|
|
24
|
+
match do |collection|
|
25
|
+
(@count = collection.count {|tag| tag.is_a? @klass}) == count
|
26
|
+
end
|
27
|
+
|
28
|
+
def instance_of(klass)
|
29
|
+
@klass = klass
|
30
|
+
self
|
31
|
+
end
|
32
|
+
alias :instances_of :instance_of
|
33
|
+
|
34
|
+
description do
|
35
|
+
"contain #{count || 'any'} instance(s) of #{@klass.name}"
|
36
|
+
end
|
37
|
+
failure_message_for_should do |collection|
|
38
|
+
"expected #{count || 'any'} instance(s) of #{@klass.name} but was #{@count}"
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
RSpec::Matchers.define :skip do |num|
|
43
|
+
match do |criteria|
|
44
|
+
criteria.instance_variable_get('@options')[:skip] == num
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
RSpec::Matchers.define :offset do |num|
|
49
|
+
match do |collection|
|
50
|
+
collection.offset_value == num
|
51
|
+
end
|
52
|
+
end
|
metadata
ADDED
@@ -0,0 +1,300 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: kaminari-rails4
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.15.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Akira Matsuda
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-08-01 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.0.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.0.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: actionpack
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 3.0.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 3.0.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.0.0
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.0.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: sqlite3
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: tzinfo
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rspec
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rr
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: capybara
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - '>='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '1.0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - '>='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '1.0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: database_cleaner
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - '>='
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - '>='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rdoc
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - '>='
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - '>='
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
description: Kaminari is a Scope & Engine based, clean, powerful, agnostic, customizable
|
168
|
+
and sophisticated paginator for Rails 3+
|
169
|
+
email:
|
170
|
+
- ronnie@dio.jp
|
171
|
+
executables: []
|
172
|
+
extensions: []
|
173
|
+
extra_rdoc_files:
|
174
|
+
- README.rdoc
|
175
|
+
files:
|
176
|
+
- .document
|
177
|
+
- .gemtest
|
178
|
+
- .gitignore
|
179
|
+
- .rspec
|
180
|
+
- .travis.yml
|
181
|
+
- CHANGELOG
|
182
|
+
- Gemfile
|
183
|
+
- MIT-LICENSE
|
184
|
+
- README.rdoc
|
185
|
+
- Rakefile
|
186
|
+
- app/helpers/kaminari_helper.rb
|
187
|
+
- app/views/kaminari/_first_page.html.erb
|
188
|
+
- app/views/kaminari/_first_page.html.haml
|
189
|
+
- app/views/kaminari/_first_page.html.slim
|
190
|
+
- app/views/kaminari/_gap.html.erb
|
191
|
+
- app/views/kaminari/_gap.html.haml
|
192
|
+
- app/views/kaminari/_gap.html.slim
|
193
|
+
- app/views/kaminari/_last_page.html.erb
|
194
|
+
- app/views/kaminari/_last_page.html.haml
|
195
|
+
- app/views/kaminari/_last_page.html.slim
|
196
|
+
- app/views/kaminari/_next_page.html.erb
|
197
|
+
- app/views/kaminari/_next_page.html.haml
|
198
|
+
- app/views/kaminari/_next_page.html.slim
|
199
|
+
- app/views/kaminari/_page.html.erb
|
200
|
+
- app/views/kaminari/_page.html.haml
|
201
|
+
- app/views/kaminari/_page.html.slim
|
202
|
+
- app/views/kaminari/_paginator.html.erb
|
203
|
+
- app/views/kaminari/_paginator.html.haml
|
204
|
+
- app/views/kaminari/_paginator.html.slim
|
205
|
+
- app/views/kaminari/_prev_page.html.erb
|
206
|
+
- app/views/kaminari/_prev_page.html.haml
|
207
|
+
- app/views/kaminari/_prev_page.html.slim
|
208
|
+
- config/locales/kaminari.yml
|
209
|
+
- gemfiles/active_record_30.gemfile
|
210
|
+
- gemfiles/active_record_31.gemfile
|
211
|
+
- gemfiles/active_record_32.gemfile
|
212
|
+
- gemfiles/active_record_40.gemfile
|
213
|
+
- gemfiles/data_mapper_12.gemfile
|
214
|
+
- gemfiles/mongo_mapper.gemfile
|
215
|
+
- gemfiles/mongoid_24.gemfile
|
216
|
+
- gemfiles/mongoid_30.gemfile
|
217
|
+
- gemfiles/sinatra.gemfile
|
218
|
+
- kaminari.gemspec
|
219
|
+
- lib/generators/kaminari/config_generator.rb
|
220
|
+
- lib/generators/kaminari/templates/kaminari_config.rb
|
221
|
+
- lib/generators/kaminari/views_generator.rb
|
222
|
+
- lib/kaminari.rb
|
223
|
+
- lib/kaminari/config.rb
|
224
|
+
- lib/kaminari/engine.rb
|
225
|
+
- lib/kaminari/grape.rb
|
226
|
+
- lib/kaminari/helpers/action_view_extension.rb
|
227
|
+
- lib/kaminari/helpers/paginator.rb
|
228
|
+
- lib/kaminari/helpers/sinatra_helpers.rb
|
229
|
+
- lib/kaminari/helpers/tags.rb
|
230
|
+
- lib/kaminari/hooks.rb
|
231
|
+
- lib/kaminari/models/active_record_extension.rb
|
232
|
+
- lib/kaminari/models/active_record_model_extension.rb
|
233
|
+
- lib/kaminari/models/active_record_relation_methods.rb
|
234
|
+
- lib/kaminari/models/array_extension.rb
|
235
|
+
- lib/kaminari/models/configuration_methods.rb
|
236
|
+
- lib/kaminari/models/data_mapper_collection_methods.rb
|
237
|
+
- lib/kaminari/models/data_mapper_extension.rb
|
238
|
+
- lib/kaminari/models/mongo_mapper_extension.rb
|
239
|
+
- lib/kaminari/models/mongoid_criteria_methods.rb
|
240
|
+
- lib/kaminari/models/mongoid_extension.rb
|
241
|
+
- lib/kaminari/models/page_scope_methods.rb
|
242
|
+
- lib/kaminari/models/plucky_criteria_methods.rb
|
243
|
+
- lib/kaminari/railtie.rb
|
244
|
+
- lib/kaminari/sinatra.rb
|
245
|
+
- lib/kaminari/version.rb
|
246
|
+
- spec/config/config_spec.rb
|
247
|
+
- spec/fake_app/active_record/config.rb
|
248
|
+
- spec/fake_app/active_record/models.rb
|
249
|
+
- spec/fake_app/data_mapper/config.rb
|
250
|
+
- spec/fake_app/data_mapper/models.rb
|
251
|
+
- spec/fake_app/mongo_mapper/config.rb
|
252
|
+
- spec/fake_app/mongo_mapper/models.rb
|
253
|
+
- spec/fake_app/mongoid/config.rb
|
254
|
+
- spec/fake_app/mongoid/models.rb
|
255
|
+
- spec/fake_app/rails_app.rb
|
256
|
+
- spec/fake_app/sinatra_app.rb
|
257
|
+
- spec/fake_gem.rb
|
258
|
+
- spec/helpers/action_view_extension_spec.rb
|
259
|
+
- spec/helpers/helpers_spec.rb
|
260
|
+
- spec/helpers/sinatra_helpers_spec.rb
|
261
|
+
- spec/helpers/tags_spec.rb
|
262
|
+
- spec/models/active_record/active_record_relation_methods_spec.rb
|
263
|
+
- spec/models/active_record/default_per_page_spec.rb
|
264
|
+
- spec/models/active_record/max_pages_spec.rb
|
265
|
+
- spec/models/active_record/max_per_page_spec.rb
|
266
|
+
- spec/models/active_record/scopes_spec.rb
|
267
|
+
- spec/models/array_spec.rb
|
268
|
+
- spec/models/data_mapper/data_mapper_spec.rb
|
269
|
+
- spec/models/mongo_mapper/mongo_mapper_spec.rb
|
270
|
+
- spec/models/mongoid/mongoid_spec.rb
|
271
|
+
- spec/requests/users_spec.rb
|
272
|
+
- spec/spec_helper.rb
|
273
|
+
- spec/spec_helper_for_sinatra.rb
|
274
|
+
- spec/support/database_cleaner.rb
|
275
|
+
- spec/support/matchers.rb
|
276
|
+
homepage: https://github.com/amatsuda/kaminari
|
277
|
+
licenses:
|
278
|
+
- MIT
|
279
|
+
metadata: {}
|
280
|
+
post_install_message:
|
281
|
+
rdoc_options: []
|
282
|
+
require_paths:
|
283
|
+
- lib
|
284
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
285
|
+
requirements:
|
286
|
+
- - '>='
|
287
|
+
- !ruby/object:Gem::Version
|
288
|
+
version: '0'
|
289
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
290
|
+
requirements:
|
291
|
+
- - '>='
|
292
|
+
- !ruby/object:Gem::Version
|
293
|
+
version: '0'
|
294
|
+
requirements: []
|
295
|
+
rubyforge_project: kaminari-rails4
|
296
|
+
rubygems_version: 2.0.3
|
297
|
+
signing_key:
|
298
|
+
specification_version: 4
|
299
|
+
summary: A pagination engine plugin for Rails 3+ or other modern frameworks
|
300
|
+
test_files: []
|