querylicious 0.3.2 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -4
- data/VERSION +1 -1
- data/lib/querylicious/key_value_pair.rb +1 -3
- data/lib/querylicious/transform.rb +8 -8
- data/lib/querylicious/types.rb +1 -4
- data/querylicious.gemspec +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc4521bb682077a42673c7cc6d6bb615eb7dbb0cc4c43e5fbce5f71c08e3b6e0
|
4
|
+
data.tar.gz: c7c34cd057c92a4eef6076acdb77ed92d68e84ecf23eaac1c4d53193806fb40e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d0218dc69354544ff8248679b02ee0b70c9af280fc3950c338a323c489eff5aab611e9cd05170e97fc0ee91a14971b14e719c416d00e0b2473518d134ece997
|
7
|
+
data.tar.gz: b3306ef3af5649b0b40f3ac8ae99d8196a5de3d9fa133fbd9e3a7c2b130531a4e934e2cc20891e002a98da52c4616850bf7a3c88834bdc18829e165e21b37f80
|
data/CHANGELOG.md
CHANGED
@@ -7,19 +7,26 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [0.4.0] - 2018-05-07
|
11
|
+
|
12
|
+
### Changed
|
13
|
+
|
14
|
+
- Updated minimum required versions for `dry-types` to `0.13.0` and `dry-struct`
|
15
|
+
to `0.5.0`
|
16
|
+
|
10
17
|
## [0.3.2] - 2018-04-13
|
11
18
|
|
12
|
-
|
19
|
+
### Changed
|
13
20
|
|
14
21
|
- Moved repository to [huyderman/querylicious][github-repo] and added branding
|
15
22
|
|
16
|
-
|
23
|
+
### Fixed
|
17
24
|
|
18
25
|
- Ensure `QueryReducer#to_proc` returns a proper proc
|
19
26
|
|
20
27
|
## [0.3.1] - 2018-02-19
|
21
28
|
|
22
|
-
|
29
|
+
### Changed
|
23
30
|
|
24
31
|
- Update allowed versions of `dry-matcher` gem
|
25
32
|
|
@@ -55,7 +62,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
55
62
|
|
56
63
|
[github-repo]: https://github.com/huyderman/querylicious
|
57
64
|
|
58
|
-
[Unreleased]: https://github.com/huyderman/querylicious/compare/v0.
|
65
|
+
[Unreleased]: https://github.com/huyderman/querylicious/compare/v0.4.0...HEAD
|
66
|
+
[0.4.0]: https://github.com/huyderman/querylicious/compare/v0.3.2...v0.4.0
|
59
67
|
[0.3.2]: https://github.com/huyderman/querylicious/compare/v0.3.1...v0.3.2
|
60
68
|
[0.3.1]: https://github.com/huyderman/querylicious/compare/v0.3.0...v0.3.1
|
61
69
|
[0.3.0]: https://github.com/huyderman/querylicious/compare/v0.2.0...v0.3.0
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.4.0
|
@@ -6,8 +6,6 @@ require 'querylicious/types'
|
|
6
6
|
module Querylicious
|
7
7
|
# A search-query key-value, with optional operator
|
8
8
|
class KeyValuePair < Dry::Struct::Value
|
9
|
-
constructor_type :strict_with_defaults
|
10
|
-
|
11
9
|
Operators = Types::Strict::Symbol.enum(
|
12
10
|
:eql, :not_eql, :gt, :gteq, :lt, :lteq
|
13
11
|
)
|
@@ -15,7 +13,7 @@ module Querylicious
|
|
15
13
|
attribute :key, Types::Strict::String
|
16
14
|
attribute :value,
|
17
15
|
Types::Strict::String |
|
18
|
-
Types::Strict::
|
16
|
+
Types::Strict::Integer |
|
19
17
|
Types::Strict::Date |
|
20
18
|
Types::Strict::DateTime |
|
21
19
|
Types::Strict::Range |
|
@@ -10,12 +10,12 @@ module Querylicious
|
|
10
10
|
class Transform < Parslet::Transform
|
11
11
|
rule('') { nil }
|
12
12
|
rule(string: simple(:it)) { Types::Coercible::String[it].gsub('\"', '"') }
|
13
|
-
rule(integer: simple(:it)) { Types::
|
14
|
-
rule(date: simple(:it)) { Types::
|
15
|
-
rule(datetime: simple(:it)) { Types::
|
13
|
+
rule(integer: simple(:it)) { Types::Params::Integer[it] }
|
14
|
+
rule(date: simple(:it)) { Types::Params::Date[it] }
|
15
|
+
rule(datetime: simple(:it)) { Types::Params::DateTime[it] }
|
16
16
|
|
17
17
|
rule(symbol: simple(:it)) do
|
18
|
-
symbol = Types::
|
18
|
+
symbol = Types::Coercible::Symbol[it.to_s.downcase]
|
19
19
|
|
20
20
|
# Symbol normalization
|
21
21
|
case symbol
|
@@ -29,7 +29,7 @@ module Querylicious
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
-
rule(list: sequence(:it)) { Types::
|
32
|
+
rule(list: sequence(:it)) { Types::Params::Array[it] }
|
33
33
|
|
34
34
|
rule(range: { start: simple(:first), end: simple(:last) }) do
|
35
35
|
if first == :* && last == :*
|
@@ -75,13 +75,13 @@ module Querylicious
|
|
75
75
|
{ object: Types::Coercible::String[it], op: op }
|
76
76
|
end
|
77
77
|
rule(op: simple(:op), integer: simple(:it)) do
|
78
|
-
{ object: Types::
|
78
|
+
{ object: Types::Params::Integer[it], op: op }
|
79
79
|
end
|
80
80
|
rule(op: simple(:op), date: simple(:it)) do
|
81
|
-
{ object: Types::
|
81
|
+
{ object: Types::Params::Date[it], op: op }
|
82
82
|
end
|
83
83
|
rule(op: simple(:op), datetime: simple(:it)) do
|
84
|
-
{ object: Types::
|
84
|
+
{ object: Types::Params::DateTime[it], op: op }
|
85
85
|
end
|
86
86
|
rule(pair: {
|
87
87
|
key: simple(:key),
|
data/lib/querylicious/types.rb
CHANGED
@@ -7,9 +7,6 @@ module Querylicious
|
|
7
7
|
module Types
|
8
8
|
include Dry::Types.module
|
9
9
|
|
10
|
-
|
11
|
-
Strict::Range = Range.constrained(type: ::Range)
|
12
|
-
|
13
|
-
Form::Symbol = Symbol.constructor(&:to_sym)
|
10
|
+
Coercible::Symbol = Symbol.constructor { |sym| String(sym).to_sym }
|
14
11
|
end
|
15
12
|
end
|
data/querylicious.gemspec
CHANGED
@@ -22,8 +22,8 @@ Gem::Specification.new do |spec|
|
|
22
22
|
|
23
23
|
spec.add_runtime_dependency 'dry-initializer', '~> 2.3'
|
24
24
|
spec.add_runtime_dependency 'dry-matcher', '>= 0.6.0', '< 0.8'
|
25
|
-
spec.add_runtime_dependency 'dry-struct', '~> 0.
|
26
|
-
spec.add_runtime_dependency 'dry-types', '~> 0.
|
25
|
+
spec.add_runtime_dependency 'dry-struct', '~> 0.5.0'
|
26
|
+
spec.add_runtime_dependency 'dry-types', '~> 0.13.0'
|
27
27
|
spec.add_runtime_dependency 'parslet', '~> 1.8'
|
28
28
|
|
29
29
|
spec.add_development_dependency 'bundler', '~> 1.15'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: querylicious
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jo-Herman Haugholt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-initializer
|
@@ -50,28 +50,28 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 0.
|
53
|
+
version: 0.5.0
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: 0.
|
60
|
+
version: 0.5.0
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: dry-types
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: 0.
|
67
|
+
version: 0.13.0
|
68
68
|
type: :runtime
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: 0.
|
74
|
+
version: 0.13.0
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: parslet
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|