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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1957ee0bd1397a8d501df89778815cb7b031a3e2
4
- data.tar.gz: a79a6353386070aafacd8cbb713d415d70f2f226
3
+ metadata.gz: 7a6cc9eda71db6450ff7bd5607db1662a6611382
4
+ data.tar.gz: 90c046db266b6720c601edeffbcac50dc01a5cc9
5
5
  SHA512:
6
- metadata.gz: 87b48047d3b7c092d568eeccb596961cf8f09e80e3774a712345a4cd92c7603ff48aafb2e0c6de95402c1d8be4820b7d4278a8007379ccbad0a8a207641307ba
7
- data.tar.gz: 1acb18988a31fca3f45bb9063c5018ed728364b529924afa45746d9f59e80eccbc1e5e373cd8a2252a7001ce44fe02e4d342aef29e7bdd46321a865de8d01dfd
6
+ metadata.gz: 7c932b5edae57215e25e82d40514db777cdfc10f6c251357e51181062288d2def594b232a39c8828df67fca83ea98e5b8f5d81ada42cd8df6d2b839a84cff769
7
+ data.tar.gz: 3740ca577f36090214e750bd04701d334653cfb0d7936b949d3dffb3e389584486d965379ca890e1e110ee0b0463ae7b9bbd16fae41c810acc933821463334c4
@@ -1,21 +1,25 @@
1
1
  sudo: false
2
+ dist: trusty
2
3
  language: ruby
3
4
  rvm:
4
- - '2.3.1'
5
- - '2.2.5'
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
@@ -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`
@@ -4,4 +4,4 @@ source "https://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 4.2.0"
6
6
 
7
- gemspec :path => "../"
7
+ gemspec path: "../"
@@ -4,4 +4,4 @@ source "https://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 5.0.0"
6
6
 
7
- gemspec :path => "../"
7
+ gemspec path: "../"
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", "~> 3.2.0"
5
+ gem "rails", "~> 5.1.0"
6
6
 
7
- gemspec :path => "../"
7
+ gemspec path: "../"
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", :github => "rails/rails"
5
+ gem "rails", github: "rails/rails"
6
6
 
7
- gemspec :path => "../"
7
+ gemspec path: "../"
@@ -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"] = 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
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
@@ -1,7 +1,7 @@
1
1
  module PaginateResponder
2
2
  module VERSION
3
3
  MAJOR = 1
4
- MINOR = 6
4
+ MINOR = 7
5
5
  PATCH = 0
6
6
  STAGE = nil
7
7
 
@@ -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
@@ -31,7 +31,7 @@ case $gem
31
31
  require 'kaminari'
32
32
  require 'kaminari/models/array_extension'
33
33
 
34
- Kaminari::Hooks.init
34
+ Kaminari::Hooks.init if defined?(Kaminari::Hooks)
35
35
 
36
36
  Kaminari.configure do |config|
37
37
  config.default_per_page = 50
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.6.0
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: 2016-11-08 00:00:00.000000000 Z
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.5.1
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.