azahara_schema 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/azahara_schema/attribute.rb +10 -2
- data/lib/azahara_schema/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d71e803ac5710793409dda0076fd06fb9d161c27d8f535b1b7e52280013dcec9
|
4
|
+
data.tar.gz: 449f11f7d37861f8c052e79601969bacb8de7193133103bf446ecc8528b4a99f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edf1b6b899dd4ff988dd716d485cf85d821163570180f58f16e9272cc1da623862fad582b8f23575b45fe33dc422722cb5d3779f1eadcc8ff33a82abca456bb3
|
7
|
+
data.tar.gz: f16564298b872f4dbf932646a7b21aa5317dc1d6916622e6b58876d07b07d99441e867e3f404a3842769e3f4d5f2512fa3cf8621ad6159f3bbf1f7f62fd02d8c
|
@@ -89,9 +89,17 @@ module AzaharaSchema
|
|
89
89
|
vals[1..-1].each{|v| arl = arl.or( arel_field.matches("%#{v}%") ) }
|
90
90
|
arl
|
91
91
|
when '>='
|
92
|
-
|
92
|
+
if values.any? { /\d{4}-\d{2}-\d{2}/ =~ _1 }
|
93
|
+
arel_field.lteq(values.map { Date.parse(_1) }.min)
|
94
|
+
else
|
95
|
+
arel_field.lteq(values.map(&:to_f).min)
|
96
|
+
end
|
93
97
|
when '<='
|
94
|
-
|
98
|
+
if values.any? { /\d{4}-\d{2}-\d{2}/ =~ _1 }
|
99
|
+
arel_field.lteq(values.map { Date.parse(_1) }.max)
|
100
|
+
else
|
101
|
+
arel_field.lteq(values.map(&:to_f).max)
|
102
|
+
end
|
95
103
|
when '@>'
|
96
104
|
require 'arel/azahara_postgres_exts'
|
97
105
|
arel_field.contains(values)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: azahara_schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ondřej Ezr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|