yaqb 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +4 -4
  3. data/README.md +24 -0
  4. data/lib/yaqb/version.rb +1 -1
  5. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 436bd28740688de2a4659178c5ea5dc89038a30e9d5fce4227245f261f80ccca
4
- data.tar.gz: da9b0c72598edb960f813fc19f7ded690596fcfdd7bdd77d6bf6cedf6da83975
3
+ metadata.gz: 1e3c4e25f25207ccb49356fee9d109944d077f1b5fbd1b2106a18f73336dcdf2
4
+ data.tar.gz: da1c88534d1656ed1654c86597101526f9c237c5cf11f93fe34ad17daba14ba0
5
5
  SHA512:
6
- metadata.gz: 3dfe63e3eb9c845a080b242bae227b0d296b7addab112a01165f22d08fd055bdbf207f102f7af4b7dac7a68d51acf6650157d127fb75e923b5ead8629c00f364
7
- data.tar.gz: 9f5adbf59a43b10395dedd37d12e44aa5863791a4aa15bfd5ca67464e4a4bc09c4a0c8ffff4d6fe705b87c96042133bbecac6fbeb55eb4ffd63794cbd6ee9517
6
+ metadata.gz: 882cb0430edabbf5a9a0914612be1667d2dc46faaf5e1eb65b7051fab449ed8fc9b80c43906a000d426880e87481819b2fc5ee55a25510b7d556a09496c8599f
7
+ data.tar.gz: 2808e4d168c37b4fee1b022b6f8f96536621ac3f9d1a2516d68a0c46a1ccdbcadb9c86f76464ff8414d99764ba028d89879461d246158fdcfb857cd379a986e1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- yaqb (0.5.3)
4
+ yaqb (0.5.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -48,13 +48,13 @@ GEM
48
48
  activerecord
49
49
  kaminari-core (= 1.1.1)
50
50
  kaminari-core (1.1.1)
51
- loofah (2.3.0)
51
+ loofah (2.3.1)
52
52
  crass (~> 1.0.2)
53
53
  nokogiri (>= 1.5.9)
54
54
  method_source (0.9.2)
55
55
  mini_portile2 (2.4.0)
56
56
  minitest (5.12.2)
57
- nokogiri (1.10.4)
57
+ nokogiri (1.10.9)
58
58
  mini_portile2 (~> 2.4.0)
59
59
  pry (0.12.2)
60
60
  coderay (~> 1.1.0)
@@ -100,4 +100,4 @@ DEPENDENCIES
100
100
  yaqb!
101
101
 
102
102
  BUNDLED WITH
103
- 2.0.2
103
+ 2.1.2
data/README.md CHANGED
@@ -66,6 +66,30 @@ class BooksController < ApplicationController
66
66
  end
67
67
  ```
68
68
 
69
+ At the moment Yaqb will require the following parameters to be passed through:
70
+
71
+ pagination: `page` and `per`
72
+
73
+ sorting: `sort` and `dir`
74
+
75
+ filtering: `q[]`
76
+
77
+ ### Filtering
78
+
79
+ #### Supported predicates
80
+
81
+ The following predicates are available: `eq`, `cont` `notcont` `start` `end` `gt` `lt`
82
+
83
+ Predicates can be appended to a field set in your Presenter.
84
+
85
+ #### Parameters
86
+
87
+ Parameters are passed through the param `q[]`.
88
+
89
+ E.g. To filter by a title containing a word: `q[title_cont]`
90
+
91
+ E.g. `title_eq` or `created_at_lt`
92
+
69
93
  ### Presenters
70
94
 
71
95
  Presenters will allow you to control what a consumer of your API can sort and filter by.
data/lib/yaqb/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Yaqb
4
- VERSION = '0.5.3'
4
+ VERSION = '0.5.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yaqb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ronald Chacon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-10-26 00:00:00.000000000 Z
11
+ date: 2020-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -195,7 +195,7 @@ requirements:
195
195
  - Kaminari
196
196
  - WillPaginate
197
197
  - Pagy
198
- rubygems_version: 3.0.3
198
+ rubygems_version: 3.1.2
199
199
  signing_key:
200
200
  specification_version: 4
201
201
  summary: YAQB