opening_hours_converter 1.13.16 → 1.13.17

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
  SHA256:
3
- metadata.gz: 126d84dc400e0d1a210158d8cf895e6fc6dafabaa6416bab76d19dd57f6bca09
4
- data.tar.gz: ea518a29469f84000cc7e125019d35ca97301298e80653372b40d6c7d96a6050
3
+ metadata.gz: f84de92905d530dba2e826eea1a88045fb521cf5a24803f9f0b040574ae05ea4
4
+ data.tar.gz: a464fcc26ebe69fcd7cf8f88cfa992eea87c2c35453710e6f32b407a101c567b
5
5
  SHA512:
6
- metadata.gz: 6b3bcdd4fc3f18da1548a87a4e830f707305be50f627e8980a19dd62bcfc84557bc98d5c2689d6f1d41b48695403d11f186995a9d521655b62d5afce99b47524
7
- data.tar.gz: 8afaf0fcaeee00d501274e88320e70590c9f688bb3a8b7d463cf5374d48fb9cc8a25ae8be04772c2487c481aa2cd2f2ab8e080c7cd147edc1df83fa64db39176
6
+ metadata.gz: f287f0439e502deeac6fc574085526fdf83fb188412287ba025a87b948902ceaeaba3191e3300f866e76baa8530e9ca80150561e4f3ec3cab11c1de930f9b7d4
7
+ data.tar.gz: 28548d677e6e763fa1dbf676b8b7f5fd4f6e2c0f045276a8594231b51ecf7665dfebd7b4ff9683e414ca1d41ad180bdc8548b981b91262b1dc7faf7a12a913c5
@@ -48,7 +48,7 @@ module OpeningHoursConverter
48
48
  end
49
49
 
50
50
  # get state and time associated with weekdays
51
- while @current_token >= 0 && (is_rule_modifier?(tokens[@current_token]) || is_time?(tokens[@current_token]))
51
+ while @current_token >= 0 && (is_rule_modifier?(tokens[@current_token]) || is_time?(tokens[@current_token])) || is_weekday?(tokens[@current_token])
52
52
  if is_rule_modifier?(tokens[@current_token])
53
53
  local_modifier = tokens[@current_token].downcase
54
54
  @current_token -= 1
@@ -72,6 +72,11 @@ module OpeningHoursConverter
72
72
  local_times.concat get_times(time_selector)
73
73
  @current_token -= 1
74
74
  end
75
+
76
+ if local_times.empty?
77
+ local_times.concat get_times("00:00-23:59")
78
+ end
79
+
75
80
  begin
76
81
  weekday_selector = tokens[@current_token]
77
82
  weekdays_and_holidays = get_weekdays(weekday_selector)
@@ -125,6 +130,7 @@ module OpeningHoursConverter
125
130
  elsif !(@regex_handler.week_regex =~ wide_range_selector).nil?
126
131
  weeks << get_week(wide_range_selector)
127
132
  else
133
+
128
134
  raise ParseError, "Unsupported selector #{wide_range_selector}"
129
135
  end
130
136
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opening_hours_converter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.16
4
+ version: 1.13.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ziserman Martin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-24 00:00:00.000000000 Z
11
+ date: 2022-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json