api-pagination 4.5.1 → 4.5.2

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: d1593c1cca4de7e65dae45510075edbc44835c1d
4
- data.tar.gz: 6d4b8192486631b97fd8d7cc2e9faa9a64e690a6
3
+ metadata.gz: 6fb30057d988236c8f5c6e557f7feea70fd79bd5
4
+ data.tar.gz: 98a0b719a0a1ae299bde47edd30b8a6e2ed015e2
5
5
  SHA512:
6
- metadata.gz: c4b2a4006bf64b31ef53bffc3fed788752c6f27865efb5c3ecbdf85d33fc6e8656cc2f72f9edf87972669d0e288d636f4930b4df35d607b77135dafd99d7f231
7
- data.tar.gz: a53e3fb57f146a59456055c40ac56dab2ad51a548efde8e9c565973c7243eed2845f7c9152f50674e77b273c9ff15851c3c504549c3ff9fdb480140e9302e97d
6
+ metadata.gz: 9b8a65195ac6a5feb65932e020ffa460508f8b53e47b16c34a7c22fd2e3816ffaa7d894590bc14593e3d90991adad14bdd9698a0ac36078588ccea6a35479736
7
+ data.tar.gz: d29a8fa3d95a922f4be7a880a18f425a32a391e40ae8ebbef46f6c149fcd561153e01bda567e1e5c65edbffd3bf04422e2d68ef6f671efcad2e98e19209c04e8
@@ -2,7 +2,7 @@ module ApiPagination
2
2
  class Version
3
3
  MAJOR = 4
4
4
  MINOR = 5
5
- PATCH = 1
5
+ PATCH = 2
6
6
 
7
7
  def self.to_s
8
8
  [MAJOR, MINOR, PATCH].join('.')
@@ -27,7 +27,7 @@ module Grape
27
27
  include_total = ApiPagination.config.include_total
28
28
 
29
29
  header 'Link', links.join(', ') unless links.empty?
30
- header total_header, ApiPagination.total_from(collection) if include_total
30
+ header total_header, ApiPagination.total_from(collection).to_s if include_total
31
31
  header per_page_header, options[:per_page].to_s
32
32
  header page_header, options[:page].to_s unless page_header.nil?
33
33
 
@@ -46,7 +46,7 @@ module Rails
46
46
  headers['Link'] = links.join(', ') unless links.empty?
47
47
  headers[per_page_header] = options[:per_page].to_s
48
48
  headers[page_header] = options[:page].to_s unless page_header.nil?
49
- headers[total_header] = total_count(collection, options) if include_total
49
+ headers[total_header] = total_count(collection, options).to_s if include_total
50
50
 
51
51
  return collection
52
52
  end
@@ -212,6 +212,8 @@ describe NumbersController, :type => :controller do
212
212
 
213
213
  specify do
214
214
  get :index_with_paginate_array_options, params: params
215
+
216
+ expect(response.header['Total']).to be_kind_of(String)
215
217
  expect(response.header['Total'].to_i).to eq total_header
216
218
  end
217
219
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api-pagination
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.5.1
4
+ version: 4.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Celis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-08 00:00:00.000000000 Z
11
+ date: 2016-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec