opening_hours_converter 1.13.3 → 1.13.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/opening_hours_converter/tokens_handler.rb +14 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3aa4f100c0d94af234e082bb2bb80b023ae5abff4a1a6931243f8bd038c722c
|
4
|
+
data.tar.gz: 85e5efa4f22f7d9415a0f7f823a0cb1295d4b73e2949972d2a244c732f936b26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e59e894e699683857bdc242bb3d9225d94272ab23b97566a182f5278aff04a447b7a608a6bc5fd78bb25b9a0eb3d990d036361b3da9aa9208dfb67a741768eb
|
7
|
+
data.tar.gz: 2dda598800d025afe4a40363487efb07e6635cb5aebbd09b06640f7f24541619b2f5a02d24865f0bd7b2aa1235b27f9f7a9838e556aa87c405afbde212a5539d
|
@@ -427,16 +427,21 @@ module OpeningHoursConverter
|
|
427
427
|
end
|
428
428
|
|
429
429
|
def current_token_is_all_time?
|
430
|
-
current_token?
|
431
|
-
|
432
|
-
|
433
|
-
current_token.
|
434
|
-
|
435
|
-
|
430
|
+
return false unless current_token?
|
431
|
+
return false unless ['24', '7', '/'].include?(current_token.value)
|
432
|
+
|
433
|
+
if current_token.value == '24'
|
434
|
+
return false unless next_token? && next_token.slash?
|
435
|
+
return false unless !@unhandled_tokens[@index + 2].nil? && @unhandled_tokens[@index + 2].value == '7'
|
436
|
+
elsif current_token.slash?
|
437
|
+
return false unless previous_token? && previous_token.value == '24'
|
438
|
+
return false unless next_token? && next_token.value == '7'
|
439
|
+
else # current token is 7
|
440
|
+
return false unless previous_token? && previous_token.slash?
|
441
|
+
return false unless !@unhandled_tokens[@index - 2].nil? && @unhandled_tokens[@index - 2].value == '24'
|
442
|
+
end
|
436
443
|
|
437
|
-
|
438
|
-
previous_token? && previous_token.value == '24' &&
|
439
|
-
next_token? && next_token.value == '7'
|
444
|
+
true
|
440
445
|
end
|
441
446
|
|
442
447
|
def current_token
|
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.
|
4
|
+
version: 1.13.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ziserman Martin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|