paginate-responder 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +2 -0
- data/.travis.yml +11 -1
- data/Gemfile +5 -0
- data/README.md +36 -3
- data/gemfiles/Gemfile.rails-3-2 +8 -0
- data/gemfiles/Gemfile.rails-4-0 +7 -0
- data/gemfiles/Gemfile.rails-4-1 +7 -0
- data/gemfiles/Gemfile.rails-head +6 -0
- data/lib/paginate-responder/adapter/kaminari_adapter.rb +4 -0
- data/lib/paginate-responder/adapter/paginate_adapter.rb +4 -0
- data/lib/paginate-responder/paginator.rb +5 -0
- data/lib/paginate-responder/version.rb +1 -1
- data/paginate-responder.gemspec +3 -2
- data/test/paginate_responder_test.rb +91 -79
- data/test/test_helper.rb +20 -10
- metadata +36 -51
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3b9268c9274f88ad5106746c1accb8e6893c8ef3
|
4
|
+
data.tar.gz: 6aa8f1c72fa668249f4e3849588af34f042633f4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8f6218c4c12ef47093c28e114071a5739f65436f35aa966e9f411eb2686d5fb5efd5fb18fc3d36df6636600329bab878d2eae4b1f14fe666c23b063091fc560a
|
7
|
+
data.tar.gz: 3cd5272d5377e84ea6ba6a4a6433cc8fd16d615ab80e1bfb7721391e19ceb4d768b30002549c20abf10acdb4148a2e9eaa475b7f5ead43fa3d23cba6b5d21b43
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,7 +1,17 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
- 2.
|
3
|
+
- 2.1
|
4
|
+
- 2.0
|
4
5
|
- 1.9.3
|
6
|
+
- rbx
|
5
7
|
env:
|
6
8
|
- GEM=will_paginate
|
7
9
|
- GEM=kaminari
|
10
|
+
gemfile:
|
11
|
+
- gemfiles/Gemfile.rails-3-2
|
12
|
+
- gemfiles/Gemfile.rails-4-0
|
13
|
+
- gemfiles/Gemfile.rails-4-1
|
14
|
+
- gemfiles/Gemfile.rails-head
|
15
|
+
matrix:
|
16
|
+
allow_failures:
|
17
|
+
- gemfile: gemfiles/Gemfile.rails-head
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
-
# Paginate::Responder
|
1
|
+
# Paginate::Responder
|
2
|
+
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/paginate-responder.png)](http://badge.fury.io/rb/paginate-responder)
|
4
|
+
[![Build Status](https://travis-ci.org/jgraichen/paginate-responder.png?branch=master)](https://travis-ci.org/jgraichen/paginate-responder)
|
5
|
+
[![Code Climate](https://codeclimate.com/github/jgraichen/paginate-responder.png)](https://codeclimate.com/github/jgraichen/paginate-responder)
|
2
6
|
|
3
7
|
A Rails pagination responder with link header support.
|
4
8
|
|
@@ -20,7 +24,7 @@ You will also need a pagination gem. `PaginateResponder` comes with adapters for
|
|
20
24
|
* [will_paginate](https://github.com/mislav/will_paginate) and
|
21
25
|
* [kaminari](https://github.com/amatsuda/kaminari).
|
22
26
|
|
23
|
-
It is recommended to use only
|
27
|
+
It is recommended to use only one pagination gem at once.
|
24
28
|
|
25
29
|
## Usage
|
26
30
|
|
@@ -56,9 +60,38 @@ Next and previous page links will not be added if current
|
|
56
60
|
page is first or last page.
|
57
61
|
|
58
62
|
Also a `X-Total-Pages` header will be added with the total
|
59
|
-
number of pages if available
|
63
|
+
number of pages if available and a `X-Total-Count` header
|
64
|
+
with the total number of items. This allows applications
|
60
65
|
to display a progress bar or similar while fetching pages.
|
61
66
|
|
67
|
+
## Override page detections and options
|
68
|
+
|
69
|
+
You can override the page detection by creating a method
|
70
|
+
`page` in your controller that returns the page index as
|
71
|
+
a fixnum:
|
72
|
+
|
73
|
+
```
|
74
|
+
class ApplicationController
|
75
|
+
def page
|
76
|
+
params[:seite].to_i # seite means page in German
|
77
|
+
end
|
78
|
+
end
|
79
|
+
```
|
80
|
+
|
81
|
+
Same goes for `per_page` and `max_per_page`:
|
82
|
+
|
83
|
+
```
|
84
|
+
class ApplicationController
|
85
|
+
def per_page
|
86
|
+
10
|
87
|
+
end
|
88
|
+
|
89
|
+
def max_per_page
|
90
|
+
25
|
91
|
+
end
|
92
|
+
end
|
93
|
+
```
|
94
|
+
|
62
95
|
## TODOs
|
63
96
|
|
64
97
|
* Documentation
|
@@ -41,6 +41,7 @@ module PaginateResponder
|
|
41
41
|
link! 'last', total_pages if total_pages
|
42
42
|
|
43
43
|
response.headers["X-Total-Pages"] = total_pages.to_s if total_pages
|
44
|
+
response.headers["X-Total-Count"] = total_count.to_s if total_count
|
44
45
|
end
|
45
46
|
|
46
47
|
def link!(rel, page)
|
@@ -77,5 +78,9 @@ module PaginateResponder
|
|
77
78
|
def total_pages
|
78
79
|
@adapter.total_pages
|
79
80
|
end
|
81
|
+
|
82
|
+
def total_count
|
83
|
+
@adapter.total_count
|
84
|
+
end
|
80
85
|
end
|
81
86
|
end
|
data/paginate-responder.gemspec
CHANGED
@@ -10,7 +10,8 @@ Gem::Specification.new do |gem|
|
|
10
10
|
gem.email = ['jg@altimos.de']
|
11
11
|
gem.description = %q{A Rails pagination responder with link header support.}
|
12
12
|
gem.summary = %q{A Rails pagination responder with link header support.}
|
13
|
-
gem.homepage = ""
|
13
|
+
gem.homepage = "https://github.com/jgraichen/paginate-responder"
|
14
|
+
gem.license = 'MIT'
|
14
15
|
|
15
16
|
gem.files = `git ls-files`.split($/)
|
16
17
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
@@ -24,7 +25,7 @@ Gem::Specification.new do |gem|
|
|
24
25
|
gem.add_development_dependency 'activerecord', '>= 3.2.0'
|
25
26
|
gem.add_development_dependency 'sqlite3'
|
26
27
|
gem.add_development_dependency 'minitest'
|
27
|
-
gem.add_development_dependency 'minitest-reporters'
|
28
|
+
gem.add_development_dependency 'minitest-reporters'
|
28
29
|
gem.add_development_dependency 'will_paginate'
|
29
30
|
gem.add_development_dependency 'kaminari'
|
30
31
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'test_helper.rb'
|
2
2
|
|
3
3
|
GEM = ENV['GEM'].to_s.split ','
|
4
|
-
GEM = [
|
4
|
+
GEM = ['will_paginate'] if GEM.empty?
|
5
5
|
puts "[INFO] Running tests with #{GEM.join(' and ')}."
|
6
6
|
|
7
7
|
class PaginateResponderTest < ActionController::TestCase
|
@@ -13,33 +13,39 @@ class PaginateResponderTest < ActionController::TestCase
|
|
13
13
|
|
14
14
|
GEM.each do |gem|
|
15
15
|
case gem
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
else
|
16
|
+
when 'will_paginate'
|
17
|
+
require 'will_paginate/array'
|
18
|
+
require 'will_paginate/active_record'
|
19
|
+
when 'kaminari'
|
20
|
+
require 'kaminari'
|
21
|
+
require 'kaminari/models/array_extension'
|
22
|
+
Kaminari::Hooks.init
|
23
|
+
|
24
|
+
Kaminari.configure do |config|
|
25
|
+
config.default_per_page = 50
|
26
|
+
config.max_per_page = 50
|
27
|
+
end
|
28
|
+
|
29
|
+
def array_resource
|
30
|
+
Kaminari.paginate_array ('AA'..'zz').to_a
|
31
|
+
end
|
33
32
|
end
|
34
33
|
end
|
35
34
|
|
36
35
|
def setup
|
37
|
-
|
36
|
+
if ActiveRecord::VERSION::MAJOR >= 4
|
37
|
+
@controller.resource = ArModel.all
|
38
|
+
else
|
39
|
+
@controller.resource = ArModel.scoped
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def json
|
44
|
+
JSON[@response.body]
|
38
45
|
end
|
39
|
-
def json; JSON[@response.body] end
|
40
46
|
|
41
47
|
def test_pagination
|
42
|
-
get :index, :
|
48
|
+
get :index, format: :json
|
43
49
|
|
44
50
|
assert_equal 50, json.size
|
45
51
|
assert_equal (1..50).to_a, json
|
@@ -47,7 +53,7 @@ class PaginateResponderTest < ActionController::TestCase
|
|
47
53
|
|
48
54
|
def test_pagination_arr
|
49
55
|
@controller.resource = array_resource
|
50
|
-
get :index, :
|
56
|
+
get :index, format: :json
|
51
57
|
|
52
58
|
assert_equal 50, json.size
|
53
59
|
assert_equal ('AA'..'zz').to_a[0..49], json
|
@@ -55,14 +61,14 @@ class PaginateResponderTest < ActionController::TestCase
|
|
55
61
|
|
56
62
|
def test_pagination_assoc
|
57
63
|
@controller.resource = ArModel.find(1).ar_assoc_models
|
58
|
-
get :index, :
|
64
|
+
get :index, format: :json
|
59
65
|
|
60
66
|
assert_equal 5, json.size
|
61
67
|
assert_equal (1..5).to_a, json
|
62
68
|
end
|
63
69
|
|
64
70
|
def test_pagination_page_2
|
65
|
-
get :index, :
|
71
|
+
get :index, format: :json, page: 2
|
66
72
|
|
67
73
|
assert_equal 50, json.size
|
68
74
|
assert_equal (51..100).to_a, json
|
@@ -70,14 +76,14 @@ class PaginateResponderTest < ActionController::TestCase
|
|
70
76
|
|
71
77
|
def test_pagination_arr_page_2
|
72
78
|
@controller.resource = array_resource
|
73
|
-
get :index, :
|
79
|
+
get :index, format: :json, page: 2
|
74
80
|
|
75
81
|
assert_equal 50, json.size
|
76
82
|
assert_equal ('AA'..'zz').to_a[50..99], json
|
77
83
|
end
|
78
84
|
|
79
85
|
def test_pagination_per_page
|
80
|
-
get :index, :
|
86
|
+
get :index, format: :json, page: 1, per_page: 10
|
81
87
|
|
82
88
|
assert_equal 10, json.size
|
83
89
|
assert_equal (1..10).to_a, json
|
@@ -86,14 +92,14 @@ class PaginateResponderTest < ActionController::TestCase
|
|
86
92
|
|
87
93
|
def test_pagination_arr_per_page
|
88
94
|
@controller.resource = array_resource
|
89
|
-
get :index, :
|
95
|
+
get :index, format: :json, page: 1, per_page: 10
|
90
96
|
|
91
97
|
assert_equal 10, json.size
|
92
98
|
assert_equal ('AA'..'zz').to_a[0..9], json
|
93
99
|
end
|
94
100
|
|
95
101
|
def test_pagination_per_page_2
|
96
|
-
get :index, :
|
102
|
+
get :index, format: :json, page: 2, per_page: 10
|
97
103
|
|
98
104
|
assert_equal 10, json.size
|
99
105
|
assert_equal (11..20).to_a, json
|
@@ -101,114 +107,120 @@ class PaginateResponderTest < ActionController::TestCase
|
|
101
107
|
|
102
108
|
def test_pagination_arr_per_page_2
|
103
109
|
@controller.resource = array_resource
|
104
|
-
get :index, :
|
110
|
+
get :index, format: :json, page: 2, per_page: 10
|
105
111
|
|
106
112
|
assert_equal 10, json.size
|
107
113
|
assert_equal ('AA'..'zz').to_a[10..19], json
|
108
114
|
end
|
109
115
|
|
110
116
|
def test_headers
|
111
|
-
get :index, :
|
117
|
+
get :index, format: :json
|
112
118
|
|
113
119
|
assert_equal 3, response.links.size
|
114
120
|
|
115
|
-
assert_equal
|
116
|
-
assert_equal
|
121
|
+
assert_equal 'first', response.links[0][:params][:rel]
|
122
|
+
assert_equal 'http://test.host/index.json?page=1', response.links[0][:url]
|
117
123
|
|
118
|
-
assert_equal
|
119
|
-
assert_equal
|
124
|
+
assert_equal 'next', response.links[1][:params][:rel]
|
125
|
+
assert_equal 'http://test.host/index.json?page=2', response.links[1][:url]
|
120
126
|
|
121
|
-
assert_equal
|
122
|
-
assert_equal
|
127
|
+
assert_equal 'last', response.links[2][:params][:rel]
|
128
|
+
assert_equal 'http://test.host/index.json?page=14', response.links[2][:url]
|
123
129
|
end
|
124
130
|
|
125
131
|
def test_headers_page_2
|
126
|
-
get :index, :
|
132
|
+
get :index, format: :json, page: 2
|
127
133
|
|
128
134
|
assert_equal 4, response.links.size
|
129
135
|
|
130
|
-
assert_equal
|
131
|
-
assert_equal
|
136
|
+
assert_equal 'first', response.links[0][:params][:rel]
|
137
|
+
assert_equal 'http://test.host/index.json?page=1', response.links[0][:url]
|
132
138
|
|
133
|
-
assert_equal
|
134
|
-
assert_equal
|
139
|
+
assert_equal 'prev', response.links[1][:params][:rel]
|
140
|
+
assert_equal 'http://test.host/index.json?page=1', response.links[1][:url]
|
135
141
|
|
136
|
-
assert_equal
|
137
|
-
assert_equal
|
142
|
+
assert_equal 'next', response.links[2][:params][:rel]
|
143
|
+
assert_equal 'http://test.host/index.json?page=3', response.links[2][:url]
|
138
144
|
|
139
|
-
assert_equal
|
140
|
-
assert_equal
|
145
|
+
assert_equal 'last', response.links[3][:params][:rel]
|
146
|
+
assert_equal 'http://test.host/index.json?page=14', response.links[3][:url]
|
141
147
|
end
|
142
148
|
|
143
149
|
def test_headers_page_5
|
144
|
-
get :index, :
|
150
|
+
get :index, format: :json, page: 5
|
145
151
|
|
146
152
|
assert_equal 4, response.links.size
|
147
153
|
|
148
|
-
assert_equal
|
149
|
-
assert_equal
|
154
|
+
assert_equal 'first', response.links[0][:params][:rel]
|
155
|
+
assert_equal 'http://test.host/index.json?page=1', response.links[0][:url]
|
150
156
|
|
151
|
-
assert_equal
|
152
|
-
assert_equal
|
157
|
+
assert_equal 'prev', response.links[1][:params][:rel]
|
158
|
+
assert_equal 'http://test.host/index.json?page=4', response.links[1][:url]
|
153
159
|
|
154
|
-
assert_equal
|
155
|
-
assert_equal
|
160
|
+
assert_equal 'next', response.links[2][:params][:rel]
|
161
|
+
assert_equal 'http://test.host/index.json?page=6', response.links[2][:url]
|
156
162
|
|
157
|
-
assert_equal
|
158
|
-
assert_equal
|
163
|
+
assert_equal 'last', response.links[3][:params][:rel]
|
164
|
+
assert_equal 'http://test.host/index.json?page=14', response.links[3][:url]
|
159
165
|
end
|
160
166
|
|
161
167
|
def test_headers_last_page
|
162
|
-
get :index, :
|
168
|
+
get :index, format: :json, page: 14
|
163
169
|
|
164
170
|
assert_equal 3, response.links.size
|
165
171
|
|
166
|
-
assert_equal
|
167
|
-
assert_equal
|
172
|
+
assert_equal 'first', response.links[0][:params][:rel]
|
173
|
+
assert_equal 'http://test.host/index.json?page=1', response.links[0][:url]
|
168
174
|
|
169
|
-
assert_equal
|
170
|
-
assert_equal
|
175
|
+
assert_equal 'prev', response.links[1][:params][:rel]
|
176
|
+
assert_equal 'http://test.host/index.json?page=13', response.links[1][:url]
|
171
177
|
|
172
|
-
assert_equal
|
173
|
-
assert_equal
|
178
|
+
assert_equal 'last', response.links[2][:params][:rel]
|
179
|
+
assert_equal 'http://test.host/index.json?page=14', response.links[2][:url]
|
174
180
|
end
|
175
181
|
|
176
182
|
def test_headers_page_before_last_page
|
177
|
-
get :index, :
|
183
|
+
get :index, format: :json, page: 13
|
178
184
|
|
179
185
|
assert_equal 4, response.links.size
|
180
186
|
|
181
|
-
assert_equal
|
182
|
-
assert_equal
|
187
|
+
assert_equal 'first', response.links[0][:params][:rel]
|
188
|
+
assert_equal 'http://test.host/index.json?page=1', response.links[0][:url]
|
183
189
|
|
184
|
-
assert_equal
|
185
|
-
assert_equal
|
190
|
+
assert_equal 'prev', response.links[1][:params][:rel]
|
191
|
+
assert_equal 'http://test.host/index.json?page=12', response.links[1][:url]
|
186
192
|
|
187
|
-
assert_equal
|
188
|
-
assert_equal
|
193
|
+
assert_equal 'next', response.links[2][:params][:rel]
|
194
|
+
assert_equal 'http://test.host/index.json?page=14', response.links[2][:url]
|
189
195
|
|
190
|
-
assert_equal
|
191
|
-
assert_equal
|
196
|
+
assert_equal 'last', response.links[3][:params][:rel]
|
197
|
+
assert_equal 'http://test.host/index.json?page=14', response.links[3][:url]
|
192
198
|
end
|
193
199
|
|
194
200
|
def test_headers_per_page
|
195
|
-
get :index, :
|
201
|
+
get :index, format: :json, page: 1, per_page: 10
|
196
202
|
|
197
203
|
assert_equal 3, response.links.size
|
198
204
|
|
199
|
-
assert_equal
|
200
|
-
assert_equal
|
205
|
+
assert_equal 'first', response.links[0][:params][:rel]
|
206
|
+
assert_equal 'http://test.host/index.json?page=1&per_page=10', response.links[0][:url]
|
201
207
|
|
202
|
-
assert_equal
|
203
|
-
assert_equal
|
208
|
+
assert_equal 'next', response.links[1][:params][:rel]
|
209
|
+
assert_equal 'http://test.host/index.json?page=2&per_page=10', response.links[1][:url]
|
204
210
|
|
205
|
-
assert_equal
|
206
|
-
assert_equal
|
211
|
+
assert_equal 'last', response.links[2][:params][:rel]
|
212
|
+
assert_equal 'http://test.host/index.json?page=68&per_page=10', response.links[2][:url]
|
207
213
|
end
|
208
214
|
|
209
215
|
def test_headers_total_pages
|
210
|
-
get :index, :
|
216
|
+
get :index, format: :json
|
217
|
+
|
218
|
+
assert_equal '14', response.headers['X-Total-Pages']
|
219
|
+
end
|
220
|
+
|
221
|
+
def test_headers_total_count
|
222
|
+
get :index, format: :json
|
211
223
|
|
212
|
-
assert_equal
|
224
|
+
assert_equal '676', response.headers['X-Total-Count']
|
213
225
|
end
|
214
226
|
end
|
data/test/test_helper.rb
CHANGED
@@ -4,7 +4,7 @@ require 'bundler'
|
|
4
4
|
Bundler.setup
|
5
5
|
|
6
6
|
# Configure Rails
|
7
|
-
ENV[
|
7
|
+
ENV['RAILS_ENV'] = 'test'
|
8
8
|
|
9
9
|
require 'active_support'
|
10
10
|
require 'action_controller'
|
@@ -12,11 +12,12 @@ require 'active_record'
|
|
12
12
|
require 'minitest/reporters'
|
13
13
|
MiniTest::Reporters.use!
|
14
14
|
|
15
|
+
|
15
16
|
require 'paginate-responder'
|
16
17
|
|
17
18
|
Responders::Routes = ActionDispatch::Routing::RouteSet.new
|
18
19
|
Responders::Routes.draw do
|
19
|
-
|
20
|
+
get '/index' => 'paginate#index'
|
20
21
|
end
|
21
22
|
|
22
23
|
class ActiveSupport::TestCase
|
@@ -27,21 +28,30 @@ end
|
|
27
28
|
|
28
29
|
class ArModel < ActiveRecord::Base
|
29
30
|
has_many :ar_assoc_models
|
30
|
-
def as_json(opts = {})
|
31
|
+
def as_json(opts = {})
|
32
|
+
id
|
33
|
+
end
|
31
34
|
end
|
32
35
|
|
33
36
|
class ArAssocModel < ActiveRecord::Base
|
34
|
-
def as_json(opts = {})
|
37
|
+
def as_json(opts = {})
|
38
|
+
id
|
39
|
+
end
|
35
40
|
end
|
36
41
|
|
37
42
|
ActiveRecord::Base.establish_connection(
|
38
|
-
:
|
39
|
-
:
|
43
|
+
adapter: 'sqlite3',
|
44
|
+
database: ':memory:'
|
40
45
|
)
|
41
|
-
ActiveRecord::Base.connection.execute
|
42
|
-
|
43
|
-
|
44
|
-
|
46
|
+
ActiveRecord::Base.connection.execute <<SQL
|
47
|
+
CREATE TABLE ar_models (id INTEGER PRIMARY KEY AUTOINCREMENT);
|
48
|
+
SQL
|
49
|
+
ActiveRecord::Base.connection.execute <<SQL
|
50
|
+
CREATE TABLE ar_assoc_models (
|
51
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT, ar_model_id INTEGER
|
52
|
+
);
|
53
|
+
SQL
|
54
|
+
|
45
55
|
676.times do
|
46
56
|
ArModel.create!.tap do |ar_model|
|
47
57
|
5.times do
|
metadata
CHANGED
@@ -1,158 +1,139 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paginate-responder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
5
|
-
prerelease:
|
4
|
+
version: 1.4.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Jan Graichen
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-04-28 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rack-link_headers
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '2.2'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '2.2'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: rake
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - ">="
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - ">="
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: actionpack
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - ">="
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: 3.2.0
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - ">="
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: 3.2.0
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: activerecord
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - ">="
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: 3.2.0
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
66
|
+
- - ">="
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: 3.2.0
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: sqlite3
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
|
-
- -
|
73
|
+
- - ">="
|
84
74
|
- !ruby/object:Gem::Version
|
85
75
|
version: '0'
|
86
76
|
type: :development
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
|
-
- -
|
80
|
+
- - ">="
|
92
81
|
- !ruby/object:Gem::Version
|
93
82
|
version: '0'
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: minitest
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
|
-
- -
|
87
|
+
- - ">="
|
100
88
|
- !ruby/object:Gem::Version
|
101
89
|
version: '0'
|
102
90
|
type: :development
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
93
|
requirements:
|
107
|
-
- -
|
94
|
+
- - ">="
|
108
95
|
- !ruby/object:Gem::Version
|
109
96
|
version: '0'
|
110
97
|
- !ruby/object:Gem::Dependency
|
111
98
|
name: minitest-reporters
|
112
99
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
100
|
requirements:
|
115
|
-
- -
|
101
|
+
- - ">="
|
116
102
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0
|
103
|
+
version: '0'
|
118
104
|
type: :development
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
107
|
requirements:
|
123
|
-
- -
|
108
|
+
- - ">="
|
124
109
|
- !ruby/object:Gem::Version
|
125
|
-
version: 0
|
110
|
+
version: '0'
|
126
111
|
- !ruby/object:Gem::Dependency
|
127
112
|
name: will_paginate
|
128
113
|
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
114
|
requirements:
|
131
|
-
- -
|
115
|
+
- - ">="
|
132
116
|
- !ruby/object:Gem::Version
|
133
117
|
version: '0'
|
134
118
|
type: :development
|
135
119
|
prerelease: false
|
136
120
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
121
|
requirements:
|
139
|
-
- -
|
122
|
+
- - ">="
|
140
123
|
- !ruby/object:Gem::Version
|
141
124
|
version: '0'
|
142
125
|
- !ruby/object:Gem::Dependency
|
143
126
|
name: kaminari
|
144
127
|
requirement: !ruby/object:Gem::Requirement
|
145
|
-
none: false
|
146
128
|
requirements:
|
147
|
-
- -
|
129
|
+
- - ">="
|
148
130
|
- !ruby/object:Gem::Version
|
149
131
|
version: '0'
|
150
132
|
type: :development
|
151
133
|
prerelease: false
|
152
134
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
-
none: false
|
154
135
|
requirements:
|
155
|
-
- -
|
136
|
+
- - ">="
|
156
137
|
- !ruby/object:Gem::Version
|
157
138
|
version: '0'
|
158
139
|
description: A Rails pagination responder with link header support.
|
@@ -162,12 +143,16 @@ executables: []
|
|
162
143
|
extensions: []
|
163
144
|
extra_rdoc_files: []
|
164
145
|
files:
|
165
|
-
- .gitignore
|
166
|
-
- .travis.yml
|
146
|
+
- ".gitignore"
|
147
|
+
- ".travis.yml"
|
167
148
|
- Gemfile
|
168
149
|
- LICENSE.txt
|
169
150
|
- README.md
|
170
151
|
- Rakefile
|
152
|
+
- gemfiles/Gemfile.rails-3-2
|
153
|
+
- gemfiles/Gemfile.rails-4-0
|
154
|
+
- gemfiles/Gemfile.rails-4-1
|
155
|
+
- gemfiles/Gemfile.rails-head
|
171
156
|
- lib/paginate-responder.rb
|
172
157
|
- lib/paginate-responder/adapter/base.rb
|
173
158
|
- lib/paginate-responder/adapter/kaminari_adapter.rb
|
@@ -178,29 +163,29 @@ files:
|
|
178
163
|
- paginate-responder.gemspec
|
179
164
|
- test/paginate_responder_test.rb
|
180
165
|
- test/test_helper.rb
|
181
|
-
homepage:
|
182
|
-
licenses:
|
166
|
+
homepage: https://github.com/jgraichen/paginate-responder
|
167
|
+
licenses:
|
168
|
+
- MIT
|
169
|
+
metadata: {}
|
183
170
|
post_install_message:
|
184
171
|
rdoc_options: []
|
185
172
|
require_paths:
|
186
173
|
- lib
|
187
174
|
required_ruby_version: !ruby/object:Gem::Requirement
|
188
|
-
none: false
|
189
175
|
requirements:
|
190
|
-
- -
|
176
|
+
- - ">="
|
191
177
|
- !ruby/object:Gem::Version
|
192
178
|
version: '0'
|
193
179
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
194
|
-
none: false
|
195
180
|
requirements:
|
196
|
-
- -
|
181
|
+
- - ">="
|
197
182
|
- !ruby/object:Gem::Version
|
198
183
|
version: '0'
|
199
184
|
requirements: []
|
200
185
|
rubyforge_project:
|
201
|
-
rubygems_version:
|
186
|
+
rubygems_version: 2.2.2
|
202
187
|
signing_key:
|
203
|
-
specification_version:
|
188
|
+
specification_version: 4
|
204
189
|
summary: A Rails pagination responder with link header support.
|
205
190
|
test_files:
|
206
191
|
- test/paginate_responder_test.rb
|