simple_paginate 0.0.2 → 0.1.0
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.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/.travis.yml +4 -0
- data/CHANGELOG.md +5 -0
- data/README.md +4 -8
- data/Rakefile +2 -1
- data/gemfiles/active_record_50.gemfile +24 -0
- data/lib/generators/simple_paginate/views_generator.rb +1 -1
- data/lib/simple_paginate/helpers/action_view_extension.rb +5 -5
- data/lib/simple_paginate/models/active_record_model_extension.rb +5 -15
- data/lib/simple_paginate/version.rb +1 -1
- data/simple_paginate.gemspec +2 -2
- data/spec/fake_app/active_record/config.rb +1 -1
- data/spec/fake_app/log/development.log +18 -0
- data/spec/fake_app/rails_app.rb +2 -2
- data/spec/simple_paginate/helpers/tags_spec.rb +12 -2
- data/spec/simple_paginate/models/active_record_extension_spec.rb +0 -35
- metadata +5 -6
- data/gemfiles/active_record_42.gemfile.lock +0 -319
- data/spec/simple_paginate/version_spec.rb +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3f02be42940105af3c23326397216cc21911eda
|
4
|
+
data.tar.gz: b8a83039ae197bc065e00aeaccb4ca3f7b13b5e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb3c1ff76a0df73a11196d9161921d7beb31e4f523b9c2859f8964b76d8caebe3c72f705d9411e7ea44076106ddde06d042b48ca80fdc65637712e4d1f6a22ec
|
7
|
+
data.tar.gz: 2e0f7f19eac500362d8550ea8ad60426c72808c24acab568cca8350bd88f9bffc3c58d26389f3c90fe4233fdff8098c7daa5d88df818b93028aa5e98a5d52c1a
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -40,13 +40,9 @@ it fetches one more record (11 = 10 + 1) to calculate if there is a next page re
|
|
40
40
|
|
41
41
|
```
|
42
42
|
## perform a paginate query:
|
43
|
-
@users = User.paginate(:page => params[:page])
|
43
|
+
@users = User.paginate(:page => params[:page], :per_page => params[:per_page])
|
44
44
|
|
45
|
-
|
46
|
-
@users = User.page(params[:page]).per(25)
|
47
|
-
```
|
48
|
-
|
49
|
-
### Helpers
|
45
|
+
### Helpers
|
50
46
|
|
51
47
|
```
|
52
48
|
## render previous page link:
|
@@ -56,7 +52,7 @@ it fetches one more record (11 = 10 + 1) to calculate if there is a next page re
|
|
56
52
|
<%= link_to_next_page @users, 'Next' %>
|
57
53
|
|
58
54
|
## render previous page link and next page link
|
59
|
-
<%= simple_paginate @users
|
55
|
+
<%= simple_paginate @users %>
|
60
56
|
```
|
61
57
|
|
62
58
|
### General configuration options
|
@@ -78,7 +74,7 @@ There's a handy generator that generates the default configuration file into con
|
|
78
74
|
SimplePaginate includes a handy template generator, To edit your paginator, run the generator first:
|
79
75
|
|
80
76
|
```
|
81
|
-
% rails g simple_paginate:views
|
77
|
+
% rails g simple_paginate:views
|
82
78
|
```
|
83
79
|
|
84
80
|
### Contribute
|
data/Rakefile
CHANGED
@@ -10,11 +10,12 @@ RSpec::Core::RakeTask.new(:spec) do |spec|
|
|
10
10
|
spec.pattern = FileList['spec/**/*_spec.rb']
|
11
11
|
end
|
12
12
|
|
13
|
-
task :
|
13
|
+
task default: "spec:all"
|
14
14
|
|
15
15
|
namespace :spec do
|
16
16
|
mappers = %w(
|
17
17
|
active_record_42
|
18
|
+
active_record_50
|
18
19
|
)
|
19
20
|
|
20
21
|
mappers.each do |gemfile|
|
@@ -0,0 +1,24 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gem 'railties', '~> 5.0.0'
|
4
|
+
gem 'activerecord', '~> 5.0.0', :require => 'active_record'
|
5
|
+
gem 'rspec-rails', '~> 3.6.0'
|
6
|
+
|
7
|
+
platforms :ruby do
|
8
|
+
if RUBY_VERSION > "2.1.0"
|
9
|
+
gem 'sqlite3'
|
10
|
+
else
|
11
|
+
gem 'sqlite3', '1.3.8'
|
12
|
+
end
|
13
|
+
end
|
14
|
+
platforms :jruby do
|
15
|
+
gem 'activerecord-jdbcsqlite3-adapter', '>= 1.3.0'
|
16
|
+
end
|
17
|
+
platforms :rbx do
|
18
|
+
gem 'rubysl', '~> 2.0'
|
19
|
+
gem 'racc'
|
20
|
+
gem 'minitest'
|
21
|
+
gem 'rubinius-developer_tools'
|
22
|
+
end
|
23
|
+
|
24
|
+
gemspec :path => '../'
|
@@ -4,7 +4,7 @@ module SimplePaginate
|
|
4
4
|
class ViewsGenerator < Rails::Generators::Base
|
5
5
|
source_root File.expand_path('../../../../app/views/simple_paginate', __FILE__)
|
6
6
|
|
7
|
-
class_option :template_engine, :
|
7
|
+
class_option :template_engine, type: :string, aliases: '-e', desc: 'Template engine for the views. Available options are "erb", "haml", and "slim".'
|
8
8
|
|
9
9
|
def self.banner #:nodoc:
|
10
10
|
<<-BANNER.chomp
|
@@ -2,18 +2,18 @@ module SimplePaginate
|
|
2
2
|
module ActionViewExtension
|
3
3
|
# A helper that renders the pagination links
|
4
4
|
def simple_paginate(scope, options = {})
|
5
|
-
paginator = SimplePaginate::Helpers::Paginator.new self, options.reverse_merge(current_page: scope.current_page, per_page: scope.limit_value, length: scope.
|
5
|
+
paginator = SimplePaginate::Helpers::Paginator.new self, options.reverse_merge(current_page: scope.current_page, per_page: scope.limit_value, length: scope.actual_records_length)
|
6
6
|
paginator.to_s
|
7
7
|
end
|
8
8
|
|
9
9
|
def link_to_previous_page(scope, name = nil, options = {})
|
10
|
-
prev_page = SimplePaginate::Helpers::PrevPage.new self, options.reverse_merge(:
|
11
|
-
link_to_unless scope.first_page?, name, prev_page.url, options.except(:params, :param_name).reverse_merge(:
|
10
|
+
prev_page = SimplePaginate::Helpers::PrevPage.new self, options.reverse_merge(current_page: scope.current_page)
|
11
|
+
link_to_unless scope.first_page?, name, prev_page.url, options.except(:params, :param_name).reverse_merge(rel: 'prev')
|
12
12
|
end
|
13
13
|
|
14
14
|
def link_to_next_page(scope, name = nil, options = {})
|
15
|
-
next_page = SimplePaginate::Helpers::NextPage.new self, options.reverse_merge(:
|
16
|
-
link_to_unless scope.last_page?, name, next_page.url, options.except(:params, :param_name).reverse_merge(:
|
15
|
+
next_page = SimplePaginate::Helpers::NextPage.new self, options.reverse_merge(current_page: scope.current_page)
|
16
|
+
link_to_unless scope.last_page?, name, next_page.url, options.except(:params, :param_name).reverse_merge(rel: 'next')
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
@@ -5,8 +5,8 @@ module SimplePaginate
|
|
5
5
|
included do
|
6
6
|
def self.paginate(options = {})
|
7
7
|
options = options.dup
|
8
|
-
page = options.delete(:page) || 1
|
9
|
-
per_page = options.delete(:per_page) || SimplePaginate.config.default_per_page
|
8
|
+
page = (options.delete(:page) || 1).to_i
|
9
|
+
per_page = (options.delete(:per_page) || SimplePaginate.config.default_per_page).to_i
|
10
10
|
|
11
11
|
offset(per_page * (page - 1)).limit(per_page + 1).extending do
|
12
12
|
def current_page
|
@@ -18,17 +18,11 @@ module SimplePaginate
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def last_page?
|
21
|
-
|
21
|
+
actual_records_length < limit_value
|
22
22
|
end
|
23
23
|
|
24
|
-
def
|
25
|
-
|
26
|
-
self
|
27
|
-
elsif n.zero?
|
28
|
-
limit(n + 1)
|
29
|
-
else
|
30
|
-
limit(n + 1).offset(offset_value / (limit_value - 1) + 1)
|
31
|
-
end
|
24
|
+
def actual_records_length
|
25
|
+
loaded? ? @actual_records.length : count(:all)
|
32
26
|
end
|
33
27
|
|
34
28
|
private
|
@@ -44,10 +38,6 @@ module SimplePaginate
|
|
44
38
|
end
|
45
39
|
end
|
46
40
|
end
|
47
|
-
|
48
|
-
def self.page(num = nil)
|
49
|
-
self.paginate(page: num)
|
50
|
-
end
|
51
41
|
end
|
52
42
|
end
|
53
43
|
end
|
data/simple_paginate.gemspec
CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = SimplePaginate::VERSION
|
9
9
|
spec.authors = ["Yong Gu"]
|
10
10
|
spec.email = ["zerogy921@gmail.com"]
|
11
|
-
spec.summary =
|
12
|
-
spec.description =
|
11
|
+
spec.summary = 'Simple pagination solution for previous and next page navigation.'
|
12
|
+
spec.description = 'Simple pagination solution for previous and next page navigation.'
|
13
13
|
spec.homepage = ""
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
@@ -0,0 +1,18 @@
|
|
1
|
+
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from singleton class at /Users/flyerhzm/Sites/xinminlabs/simple_paginate/lib/simple_paginate/models/active_record_extension.rb:20)
|
2
|
+
DEPRECATION WARNING: #tables currently returns both tables and views. This behavior is deprecated and will be changed with Rails 5.1 to only return tables. Use #data_sources instead. (called from block (2 levels) in <top (required)> at /Users/flyerhzm/Sites/xinminlabs/simple_paginate/spec/support/database_cleaner.rb:4)
|
3
|
+
DEPRECATION WARNING: Method with_indifferent_access is deprecated and will be removed in Rails 5.1, as `ActionController::Parameters` no longer inherits from hash. Using this deprecated behavior exposes potential security problems. If you continue to use this method you may be creating a security vulnerability in your app that can be exploited. Instead, consider using one of these documented methods which are not deprecated: http://api.rubyonrails.org/v5.0.4/classes/ActionController/Parameters.html (called from params_for at /Users/flyerhzm/Sites/xinminlabs/simple_paginate/lib/simple_paginate/helpers/tags.rb:25)
|
4
|
+
DEPRECATION WARNING: Method with_indifferent_access is deprecated and will be removed in Rails 5.1, as `ActionController::Parameters` no longer inherits from hash. Using this deprecated behavior exposes potential security problems. If you continue to use this method you may be creating a security vulnerability in your app that can be exploited. Instead, consider using one of these documented methods which are not deprecated: http://api.rubyonrails.org/v5.0.4/classes/ActionController/Parameters.html (called from params_for at /Users/flyerhzm/Sites/xinminlabs/simple_paginate/lib/simple_paginate/helpers/tags.rb:25)
|
5
|
+
DEPRECATION WARNING: Method with_indifferent_access is deprecated and will be removed in Rails 5.1, as `ActionController::Parameters` no longer inherits from hash. Using this deprecated behavior exposes potential security problems. If you continue to use this method you may be creating a security vulnerability in your app that can be exploited. Instead, consider using one of these documented methods which are not deprecated: http://api.rubyonrails.org/v5.0.4/classes/ActionController/Parameters.html (called from params_for at /Users/flyerhzm/Sites/xinminlabs/simple_paginate/lib/simple_paginate/helpers/tags.rb:25)
|
6
|
+
DEPRECATION WARNING: Method with_indifferent_access is deprecated and will be removed in Rails 5.1, as `ActionController::Parameters` no longer inherits from hash. Using this deprecated behavior exposes potential security problems. If you continue to use this method you may be creating a security vulnerability in your app that can be exploited. Instead, consider using one of these documented methods which are not deprecated: http://api.rubyonrails.org/v5.0.4/classes/ActionController/Parameters.html (called from params_for at /Users/flyerhzm/Sites/xinminlabs/simple_paginate/lib/simple_paginate/helpers/tags.rb:25)
|
7
|
+
DEPRECATION WARNING: Method with_indifferent_access is deprecated and will be removed in Rails 5.1, as `ActionController::Parameters` no longer inherits from hash. Using this deprecated behavior exposes potential security problems. If you continue to use this method you may be creating a security vulnerability in your app that can be exploited. Instead, consider using one of these documented methods which are not deprecated: http://api.rubyonrails.org/v5.0.4/classes/ActionController/Parameters.html (called from params_for at /Users/flyerhzm/Sites/xinminlabs/simple_paginate/lib/simple_paginate/helpers/tags.rb:25)
|
8
|
+
DEPRECATION WARNING: Method with_indifferent_access is deprecated and will be removed in Rails 5.1, as `ActionController::Parameters` no longer inherits from hash. Using this deprecated behavior exposes potential security problems. If you continue to use this method you may be creating a security vulnerability in your app that can be exploited. Instead, consider using one of these documented methods which are not deprecated: http://api.rubyonrails.org/v5.0.4/classes/ActionController/Parameters.html (called from params_for at /Users/flyerhzm/Sites/xinminlabs/simple_paginate/lib/simple_paginate/helpers/tags.rb:25)
|
9
|
+
DEPRECATION WARNING: Method with_indifferent_access is deprecated and will be removed in Rails 5.1, as `ActionController::Parameters` no longer inherits from hash. Using this deprecated behavior exposes potential security problems. If you continue to use this method you may be creating a security vulnerability in your app that can be exploited. Instead, consider using one of these documented methods which are not deprecated: http://api.rubyonrails.org/v5.0.4/classes/ActionController/Parameters.html (called from params_for at /Users/flyerhzm/Sites/xinminlabs/simple_paginate/lib/simple_paginate/helpers/tags.rb:25)
|
10
|
+
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from singleton class at /Users/flyerhzm/Sites/xinminlabs/simple_paginate/lib/simple_paginate/models/active_record_extension.rb:20)
|
11
|
+
DEPRECATION WARNING: #tables currently returns both tables and views. This behavior is deprecated and will be changed with Rails 5.1 to only return tables. Use #data_sources instead. (called from block (2 levels) in <top (required)> at /Users/flyerhzm/Sites/xinminlabs/simple_paginate/spec/support/database_cleaner.rb:4)
|
12
|
+
DEPRECATION WARNING: Method with_indifferent_access is deprecated and will be removed in Rails 5.1, as `ActionController::Parameters` no longer inherits from hash. Using this deprecated behavior exposes potential security problems. If you continue to use this method you may be creating a security vulnerability in your app that can be exploited. Instead, consider using one of these documented methods which are not deprecated: http://api.rubyonrails.org/v5.0.4/classes/ActionController/Parameters.html (called from params_for at /Users/flyerhzm/Sites/xinminlabs/simple_paginate/lib/simple_paginate/helpers/tags.rb:25)
|
13
|
+
DEPRECATION WARNING: Method with_indifferent_access is deprecated and will be removed in Rails 5.1, as `ActionController::Parameters` no longer inherits from hash. Using this deprecated behavior exposes potential security problems. If you continue to use this method you may be creating a security vulnerability in your app that can be exploited. Instead, consider using one of these documented methods which are not deprecated: http://api.rubyonrails.org/v5.0.4/classes/ActionController/Parameters.html (called from params_for at /Users/flyerhzm/Sites/xinminlabs/simple_paginate/lib/simple_paginate/helpers/tags.rb:25)
|
14
|
+
DEPRECATION WARNING: Method with_indifferent_access is deprecated and will be removed in Rails 5.1, as `ActionController::Parameters` no longer inherits from hash. Using this deprecated behavior exposes potential security problems. If you continue to use this method you may be creating a security vulnerability in your app that can be exploited. Instead, consider using one of these documented methods which are not deprecated: http://api.rubyonrails.org/v5.0.4/classes/ActionController/Parameters.html (called from params_for at /Users/flyerhzm/Sites/xinminlabs/simple_paginate/lib/simple_paginate/helpers/tags.rb:25)
|
15
|
+
DEPRECATION WARNING: Method with_indifferent_access is deprecated and will be removed in Rails 5.1, as `ActionController::Parameters` no longer inherits from hash. Using this deprecated behavior exposes potential security problems. If you continue to use this method you may be creating a security vulnerability in your app that can be exploited. Instead, consider using one of these documented methods which are not deprecated: http://api.rubyonrails.org/v5.0.4/classes/ActionController/Parameters.html (called from params_for at /Users/flyerhzm/Sites/xinminlabs/simple_paginate/lib/simple_paginate/helpers/tags.rb:25)
|
16
|
+
DEPRECATION WARNING: Method with_indifferent_access is deprecated and will be removed in Rails 5.1, as `ActionController::Parameters` no longer inherits from hash. Using this deprecated behavior exposes potential security problems. If you continue to use this method you may be creating a security vulnerability in your app that can be exploited. Instead, consider using one of these documented methods which are not deprecated: http://api.rubyonrails.org/v5.0.4/classes/ActionController/Parameters.html (called from params_for at /Users/flyerhzm/Sites/xinminlabs/simple_paginate/lib/simple_paginate/helpers/tags.rb:25)
|
17
|
+
DEPRECATION WARNING: Method with_indifferent_access is deprecated and will be removed in Rails 5.1, as `ActionController::Parameters` no longer inherits from hash. Using this deprecated behavior exposes potential security problems. If you continue to use this method you may be creating a security vulnerability in your app that can be exploited. Instead, consider using one of these documented methods which are not deprecated: http://api.rubyonrails.org/v5.0.4/classes/ActionController/Parameters.html (called from params_for at /Users/flyerhzm/Sites/xinminlabs/simple_paginate/lib/simple_paginate/helpers/tags.rb:25)
|
18
|
+
DEPRECATION WARNING: Method with_indifferent_access is deprecated and will be removed in Rails 5.1, as `ActionController::Parameters` no longer inherits from hash. Using this deprecated behavior exposes potential security problems. If you continue to use this method you may be creating a security vulnerability in your app that can be exploited. Instead, consider using one of these documented methods which are not deprecated: http://api.rubyonrails.org/v5.0.4/classes/ActionController/Parameters.html (called from params_for at /Users/flyerhzm/Sites/xinminlabs/simple_paginate/lib/simple_paginate/helpers/tags.rb:25)
|
data/spec/fake_app/rails_app.rb
CHANGED
@@ -6,7 +6,7 @@ require 'fake_app/active_record/config'
|
|
6
6
|
app = Class.new(Rails::Application)
|
7
7
|
app.config.secret_key_base = '9489b3eee4eccf317ed77407553e8adc97baca7c74dc7ee33cd93e4c8b69477eea66eaedeb18af0be2679887c7c69c0a28c0fded0a71ea472a8c4laalal19cb'
|
8
8
|
app.config.secret_token = '3b7cd727ee24e8444053437c36cc66c4'
|
9
|
-
app.config.session_store :cookie_store, :
|
9
|
+
app.config.session_store :cookie_store, key: '_myapp_session'
|
10
10
|
app.config.active_support.deprecation = :log
|
11
11
|
app.config.eager_load = false
|
12
12
|
# Rais.root
|
@@ -27,7 +27,7 @@ class ApplicationController < ActionController::Base; end
|
|
27
27
|
class UsersController < ApplicationController
|
28
28
|
def index
|
29
29
|
@users = User.paginate page: params[:page]
|
30
|
-
render :
|
30
|
+
render inline: <<-ERB
|
31
31
|
<%= @users.map(&:name).join("\n") %>
|
32
32
|
<%= simple_paginate @users %>
|
33
33
|
ERB
|
@@ -4,7 +4,13 @@ include SimplePaginate::Helpers
|
|
4
4
|
describe 'SimplePaginate::Helpers', type: :helper do
|
5
5
|
describe 'Tag' do
|
6
6
|
describe '#page_url_for' do
|
7
|
-
before
|
7
|
+
before do
|
8
|
+
if Gem::Version.new(Rails.version) < Gem::Version.new('5.0.0')
|
9
|
+
helper.request.assign_parameters(_routes, 'users', 'index')
|
10
|
+
else
|
11
|
+
helper.request.assign_parameters(_routes, 'users', 'index', {}, '', [])
|
12
|
+
end
|
13
|
+
end
|
8
14
|
|
9
15
|
context 'for first page' do
|
10
16
|
subject { Tag.new(helper).page_url_for(1) }
|
@@ -13,7 +19,11 @@ describe 'SimplePaginate::Helpers', type: :helper do
|
|
13
19
|
|
14
20
|
context 'with a friendly route setting' do
|
15
21
|
before do
|
16
|
-
|
22
|
+
if Gem::Version.new(Rails.version) < Gem::Version.new('5.0.0')
|
23
|
+
helper.request.assign_parameters(_routes, 'users', 'index', { page: 3 })
|
24
|
+
else
|
25
|
+
helper.request.assign_parameters(_routes, 'users', 'index', { page: 3 }, '', [])
|
26
|
+
end
|
17
27
|
end
|
18
28
|
|
19
29
|
context 'for first page' do
|
@@ -35,41 +35,6 @@ describe SimplePaginate::ActiveRecordExtension do
|
|
35
35
|
|
36
36
|
it { expect(subject).to be_empty }
|
37
37
|
end
|
38
|
-
end
|
39
|
-
|
40
|
-
describe '#page' do
|
41
|
-
subject { User.page(page) }
|
42
|
-
|
43
|
-
context 'page 1' do
|
44
|
-
let(:page) { 1 }
|
45
|
-
|
46
|
-
it { expect(subject.first.name).to eq('user001') }
|
47
|
-
end
|
48
|
-
|
49
|
-
context 'page 2' do
|
50
|
-
let(:page) { 2 }
|
51
|
-
|
52
|
-
it { expect(subject.first.name).to eq('user026') }
|
53
|
-
end
|
54
|
-
|
55
|
-
context 'page < 1' do
|
56
|
-
let(:page) { 0 }
|
57
|
-
|
58
|
-
it { expect(subject.first.name).to eq('user001') }
|
59
|
-
end
|
60
|
-
|
61
|
-
context 'page > max page' do
|
62
|
-
let(:page) { 5 }
|
63
|
-
|
64
|
-
it { expect(subject).to be_empty }
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
|
-
describe '#per' do
|
69
|
-
context 'page 1 per 5' do
|
70
|
-
subject { User.page(1).per(5) }
|
71
|
-
it { expect(subject.last.name).to eq('user006') }
|
72
|
-
end
|
73
38
|
end
|
74
39
|
|
75
40
|
describe '#current_page' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_paginate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yong Gu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -103,6 +103,7 @@ extra_rdoc_files: []
|
|
103
103
|
files:
|
104
104
|
- ".gitignore"
|
105
105
|
- ".travis.yml"
|
106
|
+
- CHANGELOG.md
|
106
107
|
- Gemfile
|
107
108
|
- LICENSE
|
108
109
|
- LICENSE.txt
|
@@ -120,7 +121,7 @@ files:
|
|
120
121
|
- config/locales/simple_paginate.en.yml
|
121
122
|
- gemfiles/.bundle/config
|
122
123
|
- gemfiles/active_record_42.gemfile
|
123
|
-
- gemfiles/
|
124
|
+
- gemfiles/active_record_50.gemfile
|
124
125
|
- lib/generators/simple_paginate/config_generator.rb
|
125
126
|
- lib/generators/simple_paginate/templates/simple_paginate_config.rb
|
126
127
|
- lib/generators/simple_paginate/views_generator.rb
|
@@ -143,7 +144,6 @@ files:
|
|
143
144
|
- spec/simple_paginate/helpers/action_view_extension_spec.rb
|
144
145
|
- spec/simple_paginate/helpers/tags_spec.rb
|
145
146
|
- spec/simple_paginate/models/active_record_extension_spec.rb
|
146
|
-
- spec/simple_paginate/version_spec.rb
|
147
147
|
- spec/spec_helper.rb
|
148
148
|
- spec/support/database_cleaner.rb
|
149
149
|
homepage: ''
|
@@ -166,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
166
166
|
version: '0'
|
167
167
|
requirements: []
|
168
168
|
rubyforge_project:
|
169
|
-
rubygems_version: 2.
|
169
|
+
rubygems_version: 2.6.12
|
170
170
|
signing_key:
|
171
171
|
specification_version: 4
|
172
172
|
summary: Simple pagination solution for previous and next page navigation.
|
@@ -179,6 +179,5 @@ test_files:
|
|
179
179
|
- spec/simple_paginate/helpers/action_view_extension_spec.rb
|
180
180
|
- spec/simple_paginate/helpers/tags_spec.rb
|
181
181
|
- spec/simple_paginate/models/active_record_extension_spec.rb
|
182
|
-
- spec/simple_paginate/version_spec.rb
|
183
182
|
- spec/spec_helper.rb
|
184
183
|
- spec/support/database_cleaner.rb
|
@@ -1,319 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: ../
|
3
|
-
specs:
|
4
|
-
simple_paginate (0.0.1)
|
5
|
-
actionpack (>= 3.0.0)
|
6
|
-
activesupport (>= 3.0.0)
|
7
|
-
|
8
|
-
GEM
|
9
|
-
remote: https://rubygems.org/
|
10
|
-
specs:
|
11
|
-
actionpack (4.2.0)
|
12
|
-
actionview (= 4.2.0)
|
13
|
-
activesupport (= 4.2.0)
|
14
|
-
rack (~> 1.6.0)
|
15
|
-
rack-test (~> 0.6.2)
|
16
|
-
rails-dom-testing (~> 1.0, >= 1.0.5)
|
17
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.1)
|
18
|
-
actionview (4.2.0)
|
19
|
-
activesupport (= 4.2.0)
|
20
|
-
builder (~> 3.1)
|
21
|
-
erubis (~> 2.7.0)
|
22
|
-
rails-dom-testing (~> 1.0, >= 1.0.5)
|
23
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.1)
|
24
|
-
activemodel (4.2.0)
|
25
|
-
activesupport (= 4.2.0)
|
26
|
-
builder (~> 3.1)
|
27
|
-
activerecord (4.2.0)
|
28
|
-
activemodel (= 4.2.0)
|
29
|
-
activesupport (= 4.2.0)
|
30
|
-
arel (~> 6.0)
|
31
|
-
activesupport (4.2.0)
|
32
|
-
i18n (~> 0.7)
|
33
|
-
json (~> 1.7, >= 1.7.7)
|
34
|
-
minitest (~> 5.1)
|
35
|
-
thread_safe (~> 0.3, >= 0.3.4)
|
36
|
-
tzinfo (~> 1.1)
|
37
|
-
arel (6.0.0)
|
38
|
-
builder (3.2.2)
|
39
|
-
database_cleaner (1.4.0)
|
40
|
-
diff-lcs (1.2.5)
|
41
|
-
erubis (2.7.0)
|
42
|
-
ffi2-generators (0.1.1)
|
43
|
-
i18n (0.7.0)
|
44
|
-
json (1.8.2)
|
45
|
-
loofah (2.0.1)
|
46
|
-
nokogiri (>= 1.5.9)
|
47
|
-
mini_portile (0.6.2)
|
48
|
-
minitest (5.5.1)
|
49
|
-
nokogiri (1.6.6.2)
|
50
|
-
mini_portile (~> 0.6.0)
|
51
|
-
racc (1.4.12)
|
52
|
-
rack (1.6.0)
|
53
|
-
rack-test (0.6.3)
|
54
|
-
rack (>= 1.0)
|
55
|
-
rails-deprecated_sanitizer (1.0.3)
|
56
|
-
activesupport (>= 4.2.0.alpha)
|
57
|
-
rails-dom-testing (1.0.5)
|
58
|
-
activesupport (>= 4.2.0.beta, < 5.0)
|
59
|
-
nokogiri (~> 1.6.0)
|
60
|
-
rails-deprecated_sanitizer (>= 1.0.1)
|
61
|
-
rails-html-sanitizer (1.0.1)
|
62
|
-
loofah (~> 2.0)
|
63
|
-
railties (4.2.0)
|
64
|
-
actionpack (= 4.2.0)
|
65
|
-
activesupport (= 4.2.0)
|
66
|
-
rake (>= 0.8.7)
|
67
|
-
thor (>= 0.18.1, < 2.0)
|
68
|
-
rake (10.4.2)
|
69
|
-
rspec (3.2.0)
|
70
|
-
rspec-core (~> 3.2.0)
|
71
|
-
rspec-expectations (~> 3.2.0)
|
72
|
-
rspec-mocks (~> 3.2.0)
|
73
|
-
rspec-core (3.2.1)
|
74
|
-
rspec-support (~> 3.2.0)
|
75
|
-
rspec-expectations (3.2.0)
|
76
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
77
|
-
rspec-support (~> 3.2.0)
|
78
|
-
rspec-mocks (3.2.1)
|
79
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
80
|
-
rspec-support (~> 3.2.0)
|
81
|
-
rspec-rails (3.2.1)
|
82
|
-
actionpack (>= 3.0, < 4.3)
|
83
|
-
activesupport (>= 3.0, < 4.3)
|
84
|
-
railties (>= 3.0, < 4.3)
|
85
|
-
rspec-core (~> 3.2.0)
|
86
|
-
rspec-expectations (~> 3.2.0)
|
87
|
-
rspec-mocks (~> 3.2.0)
|
88
|
-
rspec-support (~> 3.2.0)
|
89
|
-
rspec-support (3.2.2)
|
90
|
-
rubinius-coverage (2.0.3)
|
91
|
-
rubinius-debugger (2.2.1)
|
92
|
-
rubinius-developer_tools (2.0.0)
|
93
|
-
rubinius-coverage (~> 2.0)
|
94
|
-
rubinius-debugger (~> 2.0)
|
95
|
-
rubinius-profiler (~> 2.0)
|
96
|
-
rubinius-profiler (2.0.1)
|
97
|
-
rubysl (2.1.0)
|
98
|
-
rubysl-abbrev (~> 2.0)
|
99
|
-
rubysl-base64 (~> 2.0)
|
100
|
-
rubysl-benchmark (~> 2.0)
|
101
|
-
rubysl-bigdecimal (~> 2.0)
|
102
|
-
rubysl-cgi (~> 2.0)
|
103
|
-
rubysl-cgi-session (~> 2.0)
|
104
|
-
rubysl-cmath (~> 2.0)
|
105
|
-
rubysl-complex (~> 2.0)
|
106
|
-
rubysl-continuation (~> 2.0)
|
107
|
-
rubysl-coverage (~> 2.0)
|
108
|
-
rubysl-csv (~> 2.0)
|
109
|
-
rubysl-curses (~> 2.0)
|
110
|
-
rubysl-date (~> 2.0)
|
111
|
-
rubysl-delegate (~> 2.0)
|
112
|
-
rubysl-digest (~> 2.0)
|
113
|
-
rubysl-drb (~> 2.0)
|
114
|
-
rubysl-e2mmap (~> 2.0)
|
115
|
-
rubysl-english (~> 2.0)
|
116
|
-
rubysl-enumerator (~> 2.0)
|
117
|
-
rubysl-erb (~> 2.0)
|
118
|
-
rubysl-etc (~> 2.0)
|
119
|
-
rubysl-expect (~> 2.0)
|
120
|
-
rubysl-fcntl (~> 2.0)
|
121
|
-
rubysl-fiber (~> 2.0)
|
122
|
-
rubysl-fileutils (~> 2.0)
|
123
|
-
rubysl-find (~> 2.0)
|
124
|
-
rubysl-forwardable (~> 2.0)
|
125
|
-
rubysl-getoptlong (~> 2.0)
|
126
|
-
rubysl-gserver (~> 2.0)
|
127
|
-
rubysl-io-console (~> 2.0)
|
128
|
-
rubysl-io-nonblock (~> 2.0)
|
129
|
-
rubysl-io-wait (~> 2.0)
|
130
|
-
rubysl-ipaddr (~> 2.0)
|
131
|
-
rubysl-irb (~> 2.1)
|
132
|
-
rubysl-logger (~> 2.0)
|
133
|
-
rubysl-mathn (~> 2.0)
|
134
|
-
rubysl-matrix (~> 2.0)
|
135
|
-
rubysl-mkmf (~> 2.0)
|
136
|
-
rubysl-monitor (~> 2.0)
|
137
|
-
rubysl-mutex_m (~> 2.0)
|
138
|
-
rubysl-net-ftp (~> 2.0)
|
139
|
-
rubysl-net-http (~> 2.0)
|
140
|
-
rubysl-net-imap (~> 2.0)
|
141
|
-
rubysl-net-pop (~> 2.0)
|
142
|
-
rubysl-net-protocol (~> 2.0)
|
143
|
-
rubysl-net-smtp (~> 2.0)
|
144
|
-
rubysl-net-telnet (~> 2.0)
|
145
|
-
rubysl-nkf (~> 2.0)
|
146
|
-
rubysl-observer (~> 2.0)
|
147
|
-
rubysl-open-uri (~> 2.0)
|
148
|
-
rubysl-open3 (~> 2.0)
|
149
|
-
rubysl-openssl (~> 2.0)
|
150
|
-
rubysl-optparse (~> 2.0)
|
151
|
-
rubysl-ostruct (~> 2.0)
|
152
|
-
rubysl-pathname (~> 2.0)
|
153
|
-
rubysl-prettyprint (~> 2.0)
|
154
|
-
rubysl-prime (~> 2.0)
|
155
|
-
rubysl-profile (~> 2.0)
|
156
|
-
rubysl-profiler (~> 2.0)
|
157
|
-
rubysl-pstore (~> 2.0)
|
158
|
-
rubysl-pty (~> 2.0)
|
159
|
-
rubysl-rational (~> 2.0)
|
160
|
-
rubysl-resolv (~> 2.0)
|
161
|
-
rubysl-rexml (~> 2.0)
|
162
|
-
rubysl-rinda (~> 2.0)
|
163
|
-
rubysl-rss (~> 2.0)
|
164
|
-
rubysl-scanf (~> 2.0)
|
165
|
-
rubysl-securerandom (~> 2.0)
|
166
|
-
rubysl-set (~> 2.0)
|
167
|
-
rubysl-shellwords (~> 2.0)
|
168
|
-
rubysl-singleton (~> 2.0)
|
169
|
-
rubysl-socket (~> 2.0)
|
170
|
-
rubysl-stringio (~> 2.0)
|
171
|
-
rubysl-strscan (~> 2.0)
|
172
|
-
rubysl-sync (~> 2.0)
|
173
|
-
rubysl-syslog (~> 2.0)
|
174
|
-
rubysl-tempfile (~> 2.0)
|
175
|
-
rubysl-thread (~> 2.0)
|
176
|
-
rubysl-thwait (~> 2.0)
|
177
|
-
rubysl-time (~> 2.0)
|
178
|
-
rubysl-timeout (~> 2.0)
|
179
|
-
rubysl-tmpdir (~> 2.0)
|
180
|
-
rubysl-tsort (~> 2.0)
|
181
|
-
rubysl-un (~> 2.0)
|
182
|
-
rubysl-uri (~> 2.0)
|
183
|
-
rubysl-weakref (~> 2.0)
|
184
|
-
rubysl-webrick (~> 2.0)
|
185
|
-
rubysl-xmlrpc (~> 2.0)
|
186
|
-
rubysl-yaml (~> 2.0)
|
187
|
-
rubysl-zlib (~> 2.0)
|
188
|
-
rubysl-abbrev (2.0.4)
|
189
|
-
rubysl-base64 (2.0.0)
|
190
|
-
rubysl-benchmark (2.0.1)
|
191
|
-
rubysl-bigdecimal (2.0.2)
|
192
|
-
rubysl-cgi (2.0.1)
|
193
|
-
rubysl-cgi-session (2.0.1)
|
194
|
-
rubysl-cmath (2.0.0)
|
195
|
-
rubysl-complex (2.0.0)
|
196
|
-
rubysl-continuation (2.0.0)
|
197
|
-
rubysl-coverage (2.0.3)
|
198
|
-
rubysl-csv (2.0.2)
|
199
|
-
rubysl-english (~> 2.0)
|
200
|
-
rubysl-curses (2.0.1)
|
201
|
-
rubysl-date (2.0.9)
|
202
|
-
rubysl-delegate (2.0.1)
|
203
|
-
rubysl-digest (2.0.3)
|
204
|
-
rubysl-drb (2.0.1)
|
205
|
-
rubysl-e2mmap (2.0.0)
|
206
|
-
rubysl-english (2.0.0)
|
207
|
-
rubysl-enumerator (2.0.0)
|
208
|
-
rubysl-erb (2.0.2)
|
209
|
-
rubysl-etc (2.0.3)
|
210
|
-
ffi2-generators (~> 0.1)
|
211
|
-
rubysl-expect (2.0.0)
|
212
|
-
rubysl-fcntl (2.0.4)
|
213
|
-
ffi2-generators (~> 0.1)
|
214
|
-
rubysl-fiber (2.0.0)
|
215
|
-
rubysl-fileutils (2.0.3)
|
216
|
-
rubysl-find (2.0.1)
|
217
|
-
rubysl-forwardable (2.0.1)
|
218
|
-
rubysl-getoptlong (2.0.0)
|
219
|
-
rubysl-gserver (2.0.0)
|
220
|
-
rubysl-socket (~> 2.0)
|
221
|
-
rubysl-thread (~> 2.0)
|
222
|
-
rubysl-io-console (2.0.0)
|
223
|
-
rubysl-io-nonblock (2.0.0)
|
224
|
-
rubysl-io-wait (2.0.0)
|
225
|
-
rubysl-ipaddr (2.0.0)
|
226
|
-
rubysl-irb (2.1.1)
|
227
|
-
rubysl-e2mmap (~> 2.0)
|
228
|
-
rubysl-mathn (~> 2.0)
|
229
|
-
rubysl-thread (~> 2.0)
|
230
|
-
rubysl-logger (2.1.0)
|
231
|
-
rubysl-mathn (2.0.0)
|
232
|
-
rubysl-matrix (2.1.0)
|
233
|
-
rubysl-e2mmap (~> 2.0)
|
234
|
-
rubysl-mkmf (2.0.1)
|
235
|
-
rubysl-fileutils (~> 2.0)
|
236
|
-
rubysl-shellwords (~> 2.0)
|
237
|
-
rubysl-monitor (2.0.0)
|
238
|
-
rubysl-mutex_m (2.0.0)
|
239
|
-
rubysl-net-ftp (2.0.1)
|
240
|
-
rubysl-net-http (2.0.4)
|
241
|
-
rubysl-cgi (~> 2.0)
|
242
|
-
rubysl-erb (~> 2.0)
|
243
|
-
rubysl-singleton (~> 2.0)
|
244
|
-
rubysl-net-imap (2.0.1)
|
245
|
-
rubysl-net-pop (2.0.1)
|
246
|
-
rubysl-net-protocol (2.0.1)
|
247
|
-
rubysl-net-smtp (2.0.1)
|
248
|
-
rubysl-net-telnet (2.0.0)
|
249
|
-
rubysl-nkf (2.0.1)
|
250
|
-
rubysl-observer (2.0.0)
|
251
|
-
rubysl-open-uri (2.0.0)
|
252
|
-
rubysl-open3 (2.0.0)
|
253
|
-
rubysl-openssl (2.2.1)
|
254
|
-
rubysl-optparse (2.0.1)
|
255
|
-
rubysl-shellwords (~> 2.0)
|
256
|
-
rubysl-ostruct (2.0.4)
|
257
|
-
rubysl-pathname (2.1.0)
|
258
|
-
rubysl-prettyprint (2.0.3)
|
259
|
-
rubysl-prime (2.0.1)
|
260
|
-
rubysl-profile (2.0.0)
|
261
|
-
rubysl-profiler (2.0.1)
|
262
|
-
rubysl-pstore (2.0.0)
|
263
|
-
rubysl-pty (2.0.3)
|
264
|
-
rubysl-rational (2.0.1)
|
265
|
-
rubysl-resolv (2.1.2)
|
266
|
-
rubysl-rexml (2.0.4)
|
267
|
-
rubysl-rinda (2.0.1)
|
268
|
-
rubysl-rss (2.0.0)
|
269
|
-
rubysl-scanf (2.0.0)
|
270
|
-
rubysl-securerandom (2.0.0)
|
271
|
-
rubysl-set (2.0.1)
|
272
|
-
rubysl-shellwords (2.0.0)
|
273
|
-
rubysl-singleton (2.0.0)
|
274
|
-
rubysl-socket (2.0.1)
|
275
|
-
rubysl-stringio (2.0.0)
|
276
|
-
rubysl-strscan (2.0.0)
|
277
|
-
rubysl-sync (2.0.0)
|
278
|
-
rubysl-syslog (2.1.0)
|
279
|
-
ffi2-generators (~> 0.1)
|
280
|
-
rubysl-tempfile (2.0.1)
|
281
|
-
rubysl-thread (2.0.3)
|
282
|
-
rubysl-thwait (2.0.0)
|
283
|
-
rubysl-time (2.0.3)
|
284
|
-
rubysl-timeout (2.0.0)
|
285
|
-
rubysl-tmpdir (2.0.1)
|
286
|
-
rubysl-tsort (2.0.1)
|
287
|
-
rubysl-un (2.0.0)
|
288
|
-
rubysl-fileutils (~> 2.0)
|
289
|
-
rubysl-optparse (~> 2.0)
|
290
|
-
rubysl-uri (2.0.0)
|
291
|
-
rubysl-weakref (2.0.0)
|
292
|
-
rubysl-webrick (2.0.0)
|
293
|
-
rubysl-xmlrpc (2.0.0)
|
294
|
-
rubysl-yaml (2.1.0)
|
295
|
-
rubysl-zlib (2.0.1)
|
296
|
-
sqlite3 (1.3.10)
|
297
|
-
thor (0.19.1)
|
298
|
-
thread_safe (0.3.4)
|
299
|
-
tzinfo (1.2.2)
|
300
|
-
thread_safe (~> 0.1)
|
301
|
-
|
302
|
-
PLATFORMS
|
303
|
-
ruby
|
304
|
-
|
305
|
-
DEPENDENCIES
|
306
|
-
activerecord (~> 4.2.0)
|
307
|
-
activerecord-jdbcsqlite3-adapter (>= 1.3.0)
|
308
|
-
bundler (~> 1.6)
|
309
|
-
database_cleaner (~> 1.4.0)
|
310
|
-
minitest
|
311
|
-
racc
|
312
|
-
railties (~> 4.2.0)
|
313
|
-
rake
|
314
|
-
rspec (~> 3.2)
|
315
|
-
rspec-rails (~> 3.2.1)
|
316
|
-
rubinius-developer_tools
|
317
|
-
rubysl (~> 2.0)
|
318
|
-
simple_paginate!
|
319
|
-
sqlite3
|