query_params 1.4.3 → 1.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 322226a09a5fb8822a75fe7edf985d0b43d9dcff
4
- data.tar.gz: 4e665ac550f94894649871f0ed03f2448108f701
3
+ metadata.gz: e71531d9bd6ead5f165b5b4963db86b5e96adfd0
4
+ data.tar.gz: bc83d5be83f632514949ebea4a6a14194986fe8c
5
5
  SHA512:
6
- metadata.gz: 01c865f8a245237840e5b4ca897815eec27870fa1ab267d5b7a350ee2619dc2a3632d3bd7c43b3b3f04e25d4c4a54db504558b3115c6792ce5a4c2dbbe663f42
7
- data.tar.gz: 47f2367a3cad7ba976018767c904bd94ac429fa7c007ecc8ee373315a9b3a9d27959df73374ec5b6316b178dc5d8f23d4c64670d36e6b3a3b7eca7463458f825
6
+ metadata.gz: 1abf294b67afd3ba24cf4f7c2f8626f0ee6cc470bd03d7e31cafec75edbdaef78fa224f63b2c569c7613a31cdbfb20910ab4eac71b720cb3135f5ac7c161bb70
7
+ data.tar.gz: 513cee7ef10c803090359b78eabeff3ee1a489dc146175336a7149492b588c31b4ea1faf539eefc6a0e5cc74cbc4a84f3edfabd6d31967caa468357486dd28fe
data/README.md CHANGED
@@ -28,7 +28,7 @@ Or install it yourself as:
28
28
 
29
29
  ```ruby
30
30
  # Only query params
31
- URI::QueryParams.filters(filters: ["type = 1", "height <= 2", "age between 18 and 21"], "status in(1,3,5)")
31
+ URI::QueryParams.filters(["type = 1", "height <= 2", "age between 18 and 21", "status in(1,3,5)"])
32
32
  # => "type::eq(1)|height::le(2)|age::bt(18,21)|status::in(1,3,5)"
33
33
 
34
34
  # Complete URI
@@ -1,3 +1,3 @@
1
1
  module QueryParams
2
- VERSION = "1.4.3"
2
+ VERSION = "1.4.4"
3
3
  end
data/lib/query_params.rb CHANGED
@@ -42,9 +42,8 @@ module URI
42
42
  end
43
43
 
44
44
  def self.filters(filters)
45
- if filters.nil? || filters.empty?
46
- raise(ArgumentError, "Missing required parameter filters. Example: ['age >= 18']")
47
- end
45
+ return "" if filters.nil? || filters.empty?
46
+
48
47
  queryParams = QueryParams.new()
49
48
  queryParams.set_conditions(filters)
50
49
  queryParams.build_filters()
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: query_params
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.3
4
+ version: 1.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Souza