grape-kaminari 0.1.7 → 0.1.8

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: 0650a3fcc5272f2eed79e0e91bfa6eb5fb587163
4
- data.tar.gz: cfdfdff5ef9331723eb5c44aa9664d992649ec6d
3
+ metadata.gz: 663d1ddc692320b72e10892e6557c37409f3dd0d
4
+ data.tar.gz: c87f596ddf5cae8c6251466e2a6b8ceef59a3a84
5
5
  SHA512:
6
- metadata.gz: 4080a0270909df209d36acea7842c54e0b65fe78c463695e9ea42911b0b8ced4ccda6effa7509e387251978e5f7983176a42b8d0628fffcdc4311d08ba661fcf
7
- data.tar.gz: 0b8b07ff42c2b53a93b1804602571fe8b8d331e2294402867e2882c7723060540380611db1e115cf65d80c0b59f70eb4d326ca89cf6f4ae3c67eb39972b1487b
6
+ metadata.gz: 47329f62f0d29254b685fc43fac300625e2db36b2c5a09a457f7405c243d603c5bb6e42d9aa6e944c32d0cf62dea72ee209c9062eb1a20dc06f7251bb2df1567
7
+ data.tar.gz: cc550d350419d156ea34fd65caa5b3e6453d64034f668e203fc1e0542494749c48f7cc257edb7db37011ed30bdc65c84604bdc7e3c9f2dd125381db4ecb3457c
@@ -1,3 +1,4 @@
1
+ require "grape"
1
2
  require "grape/kaminari/version"
2
3
  require "grape/kaminari/max_value_validator"
3
4
  require "kaminari/grape"
@@ -11,7 +12,7 @@ module Grape
11
12
  collection.page(params[:page]).per(params[:per_page]).padding(params[:offset]).tap do |data|
12
13
  header "X-Total", data.total_count.to_s
13
14
  header "X-Total-Pages", data.num_pages.to_s
14
- header "X-Per-Page", params[:per_page].to_s
15
+ header "X-Per-Page", data.limit_value.to_s
15
16
  header "X-Page", data.current_page.to_s
16
17
  header "X-Next-Page", data.next_page.to_s
17
18
  header "X-Prev-Page", data.prev_page.to_s
@@ -1,5 +1,5 @@
1
1
  module Grape
2
2
  module Kaminari
3
- VERSION = "0.1.7"
3
+ VERSION = "0.1.8"
4
4
  end
5
5
  end
@@ -1,4 +1,5 @@
1
1
  require 'spec_helper'
2
+ require 'json'
2
3
 
3
4
  class PaginatedAPI < Grape::API
4
5
  include Grape::Kaminari
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape-kaminari
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tymon Tobolski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-05 00:00:00.000000000 Z
11
+ date: 2015-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grape
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  version: '0'
121
121
  requirements: []
122
122
  rubyforge_project:
123
- rubygems_version: 2.2.2
123
+ rubygems_version: 2.4.5
124
124
  signing_key:
125
125
  specification_version: 4
126
126
  summary: kaminari integration for grape