pager_api 0.1.0 → 0.1.1

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: e79547244421e6ea67f19bdd6b4190b6b6e6086f
4
- data.tar.gz: 0021669263b8652f59664122742e7469b94eedd1
3
+ metadata.gz: 4c159819ca884e9159350451533063c135c89ac6
4
+ data.tar.gz: 9fec8569c260389a25f299cc138f95fa992672d7
5
5
  SHA512:
6
- metadata.gz: c80c5b7ddfe46f0735df8ae3aa7522b3742f0750b7dd1777eaf6ede8db8abe7791c6192db1b407121048802eeacdafecb9c405500806afff1d6194c38fa6d2c7
7
- data.tar.gz: cc86e17bdf752e4e496596c69d38c310f054d500b2a3f91aac7763814fc557536297bdc29b59270b87f7bbf1a55bc5a57c9af6506093970ecbd9533e969ca02f
6
+ metadata.gz: a231ce1af6ecb7c1d2c1bbb14bba3f981a380600d55245d8e7acde0d5f916d810e01c37ec1d3956ffba451b194a20361bcd06fccd5fc39b434e7b64cf23b20df
7
+ data.tar.gz: 020d52f3a0ba4e686f730c4f1b945e7fb7e131d6abce28803d9a2eb10c01c37fb3fbaee356fcca493a096077afd9f82c37809db82cacfa376b240655e57d6f7c
data/.gitignore CHANGED
@@ -8,3 +8,4 @@
8
8
  /spec/reports/
9
9
  /tmp/
10
10
  .DS_Store
11
+ *.gem
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ![Pager](http://iplp.com/pagers/images/448/Gold+Alphanumeric+Pager+-+2871+-+3+-+400.jpg)
4
4
 
5
- API Pagination made it right. Pager API is a library to help you add `meta` information and the adecuate header with pagination information based on the [JSON API standard](http://jsonapi.org) for your Rails app.
5
+ API Pagination done right. Pager API is a library to help you add `meta` information and the adecuate header with pagination information based on the [JSON API standard](http://jsonapi.org) for your Rails app.
6
6
 
7
7
  ## Table of contents
8
8
  - [Quick start](#quick-start)
@@ -18,7 +18,7 @@ API Pagination made it right. Pager API is a library to help you add `meta` info
18
18
 
19
19
  ## Quick Start
20
20
 
21
- `pager_api` depends on [Kaminari](https://github.com/amatsuda/kaminari) or [WillPaginate](https://github.com/mislav/will_paginate) to handle pagination. You need to add one of these to your Gemfile:
21
+ `pager_api` depends on [Kaminari](https://github.com/amatsuda/kaminari) or [WillPaginate](https://github.com/mislav/will_paginate) to handle pagination. You need to add one of these gems to your Gemfile **before** the `pager_api` gem:
22
22
 
23
23
  ```ruby
24
24
  # gem 'will_paginate'
@@ -44,11 +44,11 @@ The gem comes with an installer for you to configure it, for example to switch b
44
44
 
45
45
  This will create a file under the `initializers` directory called `pager_api.rb`. You can easily configure it there to meet your needs.
46
46
 
47
- By default `pager_api` uses [Kaminari](https://github.com/amatsuda/kaminari).
47
+ By default `pager_api` uses [Kaminari](https://github.com/amatsuda/kaminari). Configure the `pager_api.rb` initializer in order to use [WillPaginate](https://github.com/mislav/will_paginate).
48
48
 
49
49
  ## Usage
50
50
 
51
- On your controller where you are providing a paginated collection, where you may have something like:
51
+ In the controller where you are providing a paginated collection, you may have something like this:
52
52
 
53
53
  ```ruby
54
54
  class UsersController < ApplicationController
@@ -64,7 +64,7 @@ class UsersController < ApplicationController
64
64
  end
65
65
  ```
66
66
 
67
- With `pager_api` is really easy to achieve just by:
67
+ With `pager_api` it is really easy to achieve the above by:
68
68
 
69
69
  ```ruby
70
70
  class UsersController < ApplicationController
@@ -109,7 +109,7 @@ By default it will also include a `Link` header with the following information:
109
109
  # <http://example.com/api/v1/users?page="1">; rel="prev",
110
110
  ```
111
111
 
112
- The header will be created with the corresponding `first`, `last`, `prev` and `next`.
112
+ The header will be created with the corresponding `first`, `last`, `prev` and `next` links.
113
113
 
114
114
  ## Bug tracker & feature request
115
115
 
@@ -117,7 +117,7 @@ Have a bug or a feature request? [Please open a new issue](https://github.com/Ic
117
117
 
118
118
  ## Contributing
119
119
 
120
- Please submit all pull requests against a separate branch. Although it does not have tests yet, be a nice guy and add some for your feature. We'll be working hard to add them too.
120
+ Please submit all pull requests against a separate branch. Although `pager_api` does not have tests yet, be a nice guy and add some for your feature. We'll be working hard to add them too.
121
121
 
122
122
  In case you are wondering what to attack, we have a milestone with the version to work, some fixes and refactors. Feel free to start one.
123
123
 
@@ -1,4 +1,3 @@
1
- require 'pry'
2
1
  module PagerApi
3
2
  module Pagination
4
3
  module Kaminari
@@ -1,3 +1,3 @@
1
1
  module PagerApi
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pager_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abraham Kuri
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-03 00:00:00.000000000 Z
11
+ date: 2015-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler