paginate-responder 1.6.0 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +7 -3
- data/Appraisals +4 -4
- data/CHANGELOG.md +40 -0
- data/gemfiles/rails_4_2.gemfile +1 -1
- data/gemfiles/rails_5_0.gemfile +1 -1
- data/gemfiles/{rails_3_2.gemfile → rails_5_1.gemfile} +2 -2
- data/gemfiles/rails_head.gemfile +2 -2
- data/lib/paginate-responder/base.rb +4 -3
- data/lib/paginate-responder/version.rb +1 -1
- data/spec/paginate_responder_spec.rb +1 -0
- data/spec/spec_helper.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a6cc9eda71db6450ff7bd5607db1662a6611382
|
4
|
+
data.tar.gz: 90c046db266b6720c601edeffbcac50dc01a5cc9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c932b5edae57215e25e82d40514db777cdfc10f6c251357e51181062288d2def594b232a39c8828df67fca83ea98e5b8f5d81ada42cd8df6d2b839a84cff769
|
7
|
+
data.tar.gz: 3740ca577f36090214e750bd04701d334653cfb0d7936b949d3dffb3e389584486d965379ca890e1e110ee0b0463ae7b9bbd16fae41c810acc933821463334c4
|
data/.travis.yml
CHANGED
@@ -1,21 +1,25 @@
|
|
1
1
|
sudo: false
|
2
|
+
dist: trusty
|
2
3
|
language: ruby
|
3
4
|
rvm:
|
4
|
-
- '2.
|
5
|
-
- '2.
|
5
|
+
- '2.4.1'
|
6
|
+
- '2.3.4'
|
7
|
+
- '2.2.7'
|
6
8
|
- '2.1.10'
|
7
9
|
env:
|
8
10
|
- GEM=will_paginate
|
9
11
|
- GEM=kaminari
|
10
12
|
gemfile:
|
11
|
-
- gemfiles/rails_3_2.gemfile
|
12
13
|
- gemfiles/rails_4_2.gemfile
|
13
14
|
- gemfiles/rails_5_0.gemfile
|
15
|
+
- gemfiles/rails_5_1.gemfile
|
14
16
|
- gemfiles/rails_head.gemfile
|
15
17
|
matrix:
|
16
18
|
exclude:
|
17
19
|
- rvm: '2.1.10'
|
18
20
|
gemfile: gemfiles/rails_5_0.gemfile
|
21
|
+
- rvm: '2.1.10'
|
22
|
+
gemfile: gemfiles/rails_5_1.gemfile
|
19
23
|
- rvm: '2.1.10'
|
20
24
|
gemfile: gemfiles/rails_head.gemfile
|
21
25
|
allow_failures:
|
data/Appraisals
CHANGED
@@ -1,7 +1,3 @@
|
|
1
|
-
appraise "rails-3-2" do
|
2
|
-
gem 'rails', '~> 3.2.0'
|
3
|
-
end
|
4
|
-
|
5
1
|
appraise "rails-4-2" do
|
6
2
|
gem 'rails', '~> 4.2.0'
|
7
3
|
end
|
@@ -10,6 +6,10 @@ appraise "rails-5-0" do
|
|
10
6
|
gem 'rails', '~> 5.0.0'
|
11
7
|
end
|
12
8
|
|
9
|
+
appraise "rails-5-1" do
|
10
|
+
gem 'rails', '~> 5.1.0'
|
11
|
+
end
|
12
|
+
|
13
13
|
appraise "rails-head" do
|
14
14
|
gem 'rails', github: 'rails/rails'
|
15
15
|
end
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## 1.7.0
|
4
|
+
|
5
|
+
* Add `X-Current-Page` header (#10)
|
6
|
+
|
7
|
+
## 1.6.0
|
8
|
+
|
9
|
+
* Large rewrite of adapters to provide more customizable logic
|
10
|
+
* Add controller hook for adapter initialization
|
11
|
+
|
12
|
+
## 1.5.0
|
13
|
+
|
14
|
+
* Adjust `per_page` parameter if max-per-page limit is exceeded (#6)
|
15
|
+
* Add `X-Per-Page` header (#7)
|
16
|
+
|
17
|
+
## 1.4.2
|
18
|
+
|
19
|
+
* Fix performance issue with adapter lookup
|
20
|
+
|
21
|
+
## 1.4.1
|
22
|
+
|
23
|
+
* Fix issue with non-paginated resources
|
24
|
+
|
25
|
+
## 1.4.0
|
26
|
+
|
27
|
+
* Add `X-Total-Count` header (#4)
|
28
|
+
|
29
|
+
## 1.3.0
|
30
|
+
|
31
|
+
* Fix issues with adapter selection
|
32
|
+
|
33
|
+
## 1.2.0
|
34
|
+
|
35
|
+
* Add kaminari support
|
36
|
+
* Fix issue with missing #each on Fixnum in header generation
|
37
|
+
|
38
|
+
## 1.1.0
|
39
|
+
|
40
|
+
* Generate Link header using `rack-link_headers`
|
data/gemfiles/rails_4_2.gemfile
CHANGED
data/gemfiles/rails_5_0.gemfile
CHANGED
data/gemfiles/rails_head.gemfile
CHANGED
@@ -39,9 +39,10 @@ module PaginateResponder
|
|
39
39
|
link! 'next', page: next_page if next_page
|
40
40
|
link! 'last', page: last_page if last_page
|
41
41
|
|
42
|
-
response.headers["X-Total-Pages"]
|
43
|
-
response.headers["X-Total-Count"]
|
44
|
-
response.headers["X-Per-Page"]
|
42
|
+
response.headers["X-Total-Pages"] = total_pages.to_s if total_pages
|
43
|
+
response.headers["X-Total-Count"] = total_count.to_s if total_count
|
44
|
+
response.headers["X-Per-Page"] = per_page.to_s if per_page
|
45
|
+
response.headers["X-Current-Page"] = page.to_s if page
|
45
46
|
end
|
46
47
|
|
47
48
|
def page
|
@@ -154,5 +154,6 @@ RSpec.describe Responders::PaginateResponder, type: :controller do
|
|
154
154
|
it { is_expected.to include 'X-Total-Pages' => '14' }
|
155
155
|
it { is_expected.to include 'X-Total-Count' => '676' }
|
156
156
|
it { is_expected.to include 'X-Per-Page' => '50' }
|
157
|
+
it { is_expected.to include 'X-Current-Page' => '1' }
|
157
158
|
end
|
158
159
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paginate-responder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Graichen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack-link_headers
|
@@ -216,13 +216,14 @@ files:
|
|
216
216
|
- ".gitignore"
|
217
217
|
- ".travis.yml"
|
218
218
|
- Appraisals
|
219
|
+
- CHANGELOG.md
|
219
220
|
- Gemfile
|
220
221
|
- LICENSE.txt
|
221
222
|
- README.md
|
222
223
|
- Rakefile
|
223
|
-
- gemfiles/rails_3_2.gemfile
|
224
224
|
- gemfiles/rails_4_2.gemfile
|
225
225
|
- gemfiles/rails_5_0.gemfile
|
226
|
+
- gemfiles/rails_5_1.gemfile
|
226
227
|
- gemfiles/rails_head.gemfile
|
227
228
|
- lib/paginate-responder.rb
|
228
229
|
- lib/paginate-responder/base.rb
|
@@ -255,7 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
255
256
|
version: '0'
|
256
257
|
requirements: []
|
257
258
|
rubyforge_project:
|
258
|
-
rubygems_version: 2.
|
259
|
+
rubygems_version: 2.6.11
|
259
260
|
signing_key:
|
260
261
|
specification_version: 4
|
261
262
|
summary: A Rails pagination responder with link header support.
|