drillbit 2.5.0 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +1 -2
- data.tar.gz.sig +1 -1
- data/lib/drillbit/parameters/filter.rb +9 -1
- data/lib/drillbit/version.rb +1 -1
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2489de3825c857eafa4ce5ed003756b6982d17f
|
4
|
+
data.tar.gz: b45954c7b2f625091dd4d7ad8655356eb34f252b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3713b7f2902368cbfb14511474759a354d2d996d4866020d424b759a4becd43ee7184d148bd34cd05155e58aff661e47e07e0681104006127de9f333b2d0b43e
|
7
|
+
data.tar.gz: 3302950a73fa0c982bbd3edb7e41e7f2086b67fecdcfec64f5cc62cd142a0c4c58fbee1a02ca8a6a8e74158ad350d1712363576990b780769ac653035139d3f5
|
checksums.yaml.gz.sig
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
��y�od Q��Pi���%�@F�7�GR}�]�Դ�|5�Y��Dg�o���״�M�����A����9-r}.�MOPT_]�W:W~l������9��(�"^�0B�?�r{J�ݟ��4h���'��+J{�0��
|
1
|
+
f���B�~3~[� �.e���q�u����+�^�g��P�����/ � ��K�R^ %|'DS�xE:Ʊ�������G�,��=�I�`�Bi8�{~<q�ϲ{�Tj!�EѻW�}��uu�fq�yx��D�hW��IB�l�aE����q�RS�����/��%�:�
|
data.tar.gz.sig
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
|g�Y���2�q"7)���W�QW
|
@@ -3,7 +3,9 @@ module Drillbit
|
|
3
3
|
class Parameters
|
4
4
|
class Filter
|
5
5
|
NUMERICAL = /[\d_\.]+?/
|
6
|
+
ISO8601 = /\d{4}-\d{2}-\d{2}T\d{2}\:\d{2}\:\d{2}(?:[+-]\d{2}\:\d{2}|Z)/
|
6
7
|
NUMERICAL_RANGE = /\A(#{NUMERICAL})\.\.\.?(#{NUMERICAL}|Infinity)\z/
|
8
|
+
DATE_RANGE = /\A(#{ISO8601})\.\.\.?(#{ISO8601})\z/
|
7
9
|
|
8
10
|
attr_accessor :raw_parameters
|
9
11
|
|
@@ -37,7 +39,13 @@ class Filter
|
|
37
39
|
def format_value(value)
|
38
40
|
return value unless value.is_a?(String)
|
39
41
|
|
40
|
-
if range_points = value.match(
|
42
|
+
if range_points = value.match(DATE_RANGE)
|
43
|
+
exclusive = value.include? '...'
|
44
|
+
starting_point = Time.iso8601(range_points[1])
|
45
|
+
ending_point = Time.iso8601(range_points[2])
|
46
|
+
|
47
|
+
Range.new(starting_point, ending_point, exclusive)
|
48
|
+
elsif range_points = value.match(NUMERICAL_RANGE)
|
41
49
|
exclusive = value.include? '...'
|
42
50
|
starting_point = range_points[1].to_f
|
43
51
|
ending_point = if range_points[2] == 'Infinity'
|
data/lib/drillbit/version.rb
CHANGED
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|