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: 9f7b0332fa39ab7fd7bccd3367f011ea09fe6c3b
4
- data.tar.gz: 315bdf3aec20526afd2fbdf34c8d095029fa6484
3
+ metadata.gz: 67a479b753f9d83514090a20eb2ef39bc2b5717f
4
+ data.tar.gz: cff7b4446a330280562a490c0e0b2be04d82d182
5
5
  SHA512:
6
- metadata.gz: 9d2a0e8e17c646d946c8a6a8f404ffbd2eede13eb4d9480430b06d9a4f8b35a62713e577a63e101550ed348430ff112cb26505437146ac06123781764ab9b960
7
- data.tar.gz: 75cc6de841dd19b8c9e8300d3471b667f5f0c455e8a12e30b2e6118a09af615070b8bbbc953d5a77187f3aaedc8beb0ebafe5c03007ab0da6d3993b45311f9d1
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
- if minute
50
- minute_start = i
51
- end
52
- elsif i == minute_array.length - 1
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opening_hours_converter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.14
4
+ version: 1.4.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ziserman Martin