querifier 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: 701de1ffaba4c760abe580c62e16985eb68df74f
4
- data.tar.gz: 8b53ec5cdd62b5c98dfb8e2fbb6854e45c9fd64f
3
+ metadata.gz: 3d9ece5eebe56e40fa8fffa8684dc2f41ee28a52
4
+ data.tar.gz: 13a382c786e6d0c2a90512d58412549d5d099242
5
5
  SHA512:
6
- metadata.gz: e51da15b1102a7f5d2dfc896cd7d1b0dd6623613d2746722311c21f39b2154aadc83ddbc862184f7754296ab51c45dd52f570f37b192e1c45f47ccbf587f70da
7
- data.tar.gz: af643144ff3e1ecd28835b548dee2af206327ebcb2a716667bc60ab3b80dd57aedcce2127b938606651565d31ce3fa19f5b44d1fedc60fefe96367bbc420c381
6
+ metadata.gz: 0cd9c66e1f9f552a2f632a6cb0286b0da4ad68a4a2c4c89cb0ba60195346e6c5aa939d6d8ce3bc7acd6a5b38ab0a656da9b231a60c091cf94f75982600762688
7
+ data.tar.gz: '0077599ee23261b4930473d42bb9ea9e1eaca1ae20168c3304e753e84413ff35e1e712d677086e65c6affc964877056acf232b663f58b1e274c522609424f1b2'
data/.gitignore CHANGED
@@ -10,3 +10,4 @@
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
12
  Gemfile.lock
13
+ *.gem
data/README.md CHANGED
@@ -5,6 +5,12 @@ Querifier is a gem intended to create queries for api's easy & fast, it isn't an
5
5
 
6
6
  The basic use case is when you have an API and you want to filter & order the results without having to think too much
7
7
 
8
+ ## Demo
9
+
10
+ You can check https://querifier-demo.herokuapp.com/v1/books?page=1&filter[where][title]=Season&filter[order][id]=desc for a demo of how it works
11
+
12
+ The source code of the demo is available at https://github.com/hdf1986/querifier-demo
13
+
8
14
  ## Installation
9
15
 
10
16
  Add this line to your application's Gemfile:
@@ -9,7 +9,8 @@ module Querifier
9
9
 
10
10
  def filter
11
11
  return self if @filtered
12
- filter_params.each do |(attribute, value)|
12
+ filter_params.each do |attribute|
13
+ value = filter_value(attribute)
13
14
  send("filter_by_#{attribute}", value) if value
14
15
  end
15
16
  @filtered = true
@@ -1,3 +1,3 @@
1
1
  module Querifier
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: querifier
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
  - Hugo Farji
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-11-01 00:00:00.000000000 Z
11
+ date: 2018-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties