yaqb 0.5.3 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/README.md +24 -0
- data/lib/yaqb/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1e3c4e25f25207ccb49356fee9d109944d077f1b5fbd1b2106a18f73336dcdf2
|
|
4
|
+
data.tar.gz: da1c88534d1656ed1654c86597101526f9c237c5cf11f93fe34ad17daba14ba0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
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.
|
|
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:
|
|
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.
|
|
198
|
+
rubygems_version: 3.1.2
|
|
199
199
|
signing_key:
|
|
200
200
|
specification_version: 4
|
|
201
201
|
summary: YAQB
|