opening_hours_converter 1.4.14 → 1.4.15
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67a479b753f9d83514090a20eb2ef39bc2b5717f
|
4
|
+
data.tar.gz: cff7b4446a330280562a490c0e0b2be04d82d182
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5170be0e3e7dedfaf6bb0a12c9ba6e2ff8dacea2f73db0b07fc7908d12dc87f833874d25ae5d436091cf4849ebd32650872ff3a3339ffacb5815fc0352d1fbce
|
7
|
+
data.tar.gz: eb9ab725793ec70b1cb8c406f9c98eb81aeebe3330c305e99228166fdd8ac11c953fc70b10dd24b1221fedba1fa2d5a6b55eea0b6e2f5e7c2b48a0fe48d2ec88
|
@@ -45,15 +45,11 @@ module OpeningHoursConverter
|
|
45
45
|
minute_start = -1
|
46
46
|
minute_end = nil
|
47
47
|
minute_array.each_with_index do |minute, i|
|
48
|
-
if i == 0
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
if minute
|
54
|
-
intervals << OpeningHoursConverter::Interval.new(0, minute_start, 0, i - 1)
|
55
|
-
minute_start = -1
|
56
|
-
end
|
48
|
+
if i == 0 && minute
|
49
|
+
minute_start = i
|
50
|
+
elsif i == minute_array.length - 1 && minute
|
51
|
+
intervals << OpeningHoursConverter::Interval.new(0, minute_start, 0, i - 1)
|
52
|
+
minute_start = -1
|
57
53
|
else
|
58
54
|
if minute && minute_start < 0
|
59
55
|
minute_start = i
|
@@ -13,7 +13,6 @@ module OpeningHoursConverter
|
|
13
13
|
day_ph = false
|
14
14
|
|
15
15
|
date_ranges.each_with_index do |date_range, date_range_index|
|
16
|
-
|
17
16
|
if !date_range.nil?
|
18
17
|
date_range.typical.intervals.each_with_index do |interval, interval_id|
|
19
18
|
if interval&.day_start == -2 && interval&.day_start == interval&.day_end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'opening_hours_converter/constants'
|
2
|
+
require 'pry-nav'
|
2
3
|
|
3
4
|
module OpeningHoursConverter
|
4
5
|
class OpeningHoursRule
|
@@ -322,7 +323,6 @@ module OpeningHoursConverter
|
|
322
323
|
end
|
323
324
|
|
324
325
|
def add_time(time)
|
325
|
-
|
326
326
|
if (@time.length == 0 || @time[0].get != "off") && !include_time?(time)
|
327
327
|
@time << time
|
328
328
|
end
|