chronic_between 0.2.14 → 0.2.15
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/chronic_between.rb +1 -5
- 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: 26ba61b8a877769c8aa9f80da9655858336882e7
|
4
|
+
data.tar.gz: 23072f2944490440b031adf861d10ed1ef05d8f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aca8d73eb9185cf8e4e2eee483c59ea1cd264effcfc2398e623094d3337c8c803cab5010c1edd642cb1f981046efd87d23a6521a41eea959d815e556536d2905
|
7
|
+
data.tar.gz: d65077ae29516081dfb7d67a07126bbae33750347cfc4f6ba815333320bd33b066d1dd3fa175dacef3c6acccd808080318eeda5e3893cc1127a5ad62ca5c8c3f
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/chronic_between.rb
CHANGED
@@ -13,7 +13,6 @@ class ChronicBetween
|
|
13
13
|
def initialize(x)
|
14
14
|
|
15
15
|
@times = x.is_a?(String) ? x.split(/[,;&]/).map(&:strip) : x
|
16
|
-
puts '@times : ' + @times.inspect
|
17
16
|
@routes = {}; @params = {}
|
18
17
|
end
|
19
18
|
|
@@ -29,7 +28,6 @@ class ChronicBetween
|
|
29
28
|
closed_times.map!{|x| x[/^#{negatives}(.*)/,2]}
|
30
29
|
|
31
30
|
dates = build times
|
32
|
-
puts 'dates : ' + dates.inspect
|
33
31
|
inside_range = dates.detect {|d1, d2| p [d1,d2]; date.between? d1, d2}
|
34
32
|
|
35
33
|
neg_dates = build closed_times
|
@@ -54,7 +52,6 @@ class ChronicBetween
|
|
54
52
|
# e.g. Mon-Fri 9:00-16:30
|
55
53
|
get %r{(\w+)-(\w+)\s+(\d[\w:]*)-(\d[\w:]*)$} do
|
56
54
|
d1, d2, t1, t2 = params[:captures]
|
57
|
-
puts 'fooo'
|
58
55
|
date_range_time_range(date, d1 ,d2, t1, t2)
|
59
56
|
end
|
60
57
|
|
@@ -178,7 +175,6 @@ class ChronicBetween
|
|
178
175
|
|
179
176
|
def build(times)
|
180
177
|
times.inject([]) do |result, x|
|
181
|
-
puts 'x: ' + x
|
182
178
|
r = run_route(x.strip)
|
183
179
|
r.first.is_a?(Array) ? result + r : result << r
|
184
180
|
end
|
@@ -213,4 +209,4 @@ class ChronicBetween
|
|
213
209
|
|
214
210
|
alias datetime_range time_range
|
215
211
|
|
216
|
-
end
|
212
|
+
end
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|