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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7c46b75100d524c1e99a08d7b3c19642e6772743
4
- data.tar.gz: 64ca903e7fe42f35463cfd41738a70fd7860f052
3
+ metadata.gz: b2489de3825c857eafa4ce5ed003756b6982d17f
4
+ data.tar.gz: b45954c7b2f625091dd4d7ad8655356eb34f252b
5
5
  SHA512:
6
- metadata.gz: 3d7fb6d5553790fb4010b8132333f6d82117d89ce363f65732aecd4626a3e1a7536f8fe8703c3351649c4b4b65cfce4434587fbfe7dff72ac7bfc8ac7d997058
7
- data.tar.gz: 2f25c8001b902dfc800d37a4708adecdc10168ef47bad529bc6f0cdbc9d8720b7876b7a37660bff0d5ae9c10c4232f2d7eb3642c66475b6abc7391a4f1af612f
6
+ metadata.gz: 3713b7f2902368cbfb14511474759a354d2d996d4866020d424b759a4becd43ee7184d148bd34cd05155e58aff661e47e07e0681104006127de9f333b2d0b43e
7
+ data.tar.gz: 3302950a73fa0c982bbd3edb7e41e7f2086b67fecdcfec64f5cc62cd142a0c4c58fbee1a02ca8a6a8e74158ad350d1712363576990b780769ac653035139d3f5
checksums.yaml.gz.sig CHANGED
@@ -1,2 +1 @@
1
- x�4u�/���*�4O5�q���x�Q���B�?Q*�Ȧ�����\�v����;�=�<B�@��%peS?Q͒�U�֞����
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���qu����+�^�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
- ���-�:NNU�&�y
1
+ |gY���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(NUMERICAL_RANGE)
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'
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Drillbit
3
- VERSION = '2.5.0'
3
+ VERSION = '2.6.0'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: drillbit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - thegranddesign
metadata.gz.sig CHANGED
Binary file