opening_hours_converter 1.7.1 → 1.7.2

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: ad603db02faa52b0e6eb478f9415a9c940cce5af
4
- data.tar.gz: 948bc5f9c27a7f4314a8b224bb7b31136d58bdf6
3
+ metadata.gz: bce24802ab57a64088af5dc7a47f8e53d6519327
4
+ data.tar.gz: 972e5ce2b13d003e67b28ac3fd3488ef03ba8345
5
5
  SHA512:
6
- metadata.gz: 7de99c3ad711ee3258c722bd53da1be3916e9dbeca3bdce926faca9b1c3d1f0970a29d45a6bd5131c5f8a11bd63a625b3a0493652746b94f03cf3fc7bc2acb86
7
- data.tar.gz: c3b593c79b4d15f81933ba63ba7a31610c713241108034cb8e0263d8c9f0156c7b2038ffb85685764e65d7c1277b0b87280d71732ffdad51b1af95424cdb9344
6
+ metadata.gz: 266073e42c9902ef00136bb8b75946561602a6be1e1ad66994a7e1bc4a7739c515d0021579107ae4ca1dd16976af02b79518fb28c89da42af103783c095badc1
7
+ data.tar.gz: fb3d198d80dad15a141491d1d09d6f19ba500495680c99d929ff4fe8fd157ae5c58b706df0fba82bce35ce5272384be1ed9fae00b4f7e4a85b0b851e3ed979b4
@@ -1,5 +1,6 @@
1
1
  require 'opening_hours_converter/constants'
2
2
  require 'json'
3
+ require 'pry-byebug'
3
4
 
4
5
  module OpeningHoursConverter
5
6
  class OpeningHoursParser
@@ -377,7 +377,7 @@ module OpeningHoursConverter
377
377
  end
378
378
 
379
379
  def my_end_day_is_after_o_start_day?(my, o)
380
- if !o.end.nil?
380
+ if !my.end.nil?
381
381
  (o.start[:month] < my.end[:month] ||
382
382
  (o.start[:month] == my.end[:month] &&
383
383
  o.start[:day] <= my.end[:day]))
@@ -389,7 +389,7 @@ module OpeningHoursConverter
389
389
  end
390
390
 
391
391
  def my_end_day_is_before_o_start_day?(my, o)
392
- if !o.end.nil?
392
+ if !my.end.nil?
393
393
  (o.start[:month] < my.end[:month] ||
394
394
  (o.start[:month] == my.end[:month] &&
395
395
  o.start[:day] <= my.end[:day]))
@@ -410,7 +410,7 @@ module OpeningHoursConverter
410
410
  result = false
411
411
  if has_start_year?(o) && has_start_year?(my)
412
412
  result = o.start[:year] > my.start[:year] || (o.start[:year] == my.start[:year] && has_superior_start_month?(my, o))
413
- elsif !has_start_year?(o) && !has_start_year?(my)
413
+ elsif !has_start_year?(my)
414
414
  result = has_superior_start_month?(my, o)
415
415
  end
416
416
  result
@@ -422,13 +422,13 @@ module OpeningHoursConverter
422
422
  if !o.end.nil?
423
423
  if has_end_year?(o) && has_end_year?(my)
424
424
  result = o.end[:year] < my.end[:year] || (o.end[:year] == my.end[:year] && has_inferior_end_month?(my, o))
425
- elsif !has_end_year?(o) && !has_end_year?(my)
425
+ elsif !has_end_year?(my)
426
426
  result = has_inferior_end_month?(my, o)
427
427
  end
428
428
  else
429
429
  if has_start_year?(o) && has_end_year?(my)
430
430
  result = o.start[:year] < my.end[:year] || (o.start[:year] == my.end[:year] && has_inferior_end_month?(my, o))
431
- elsif !has_start_year?(o) && !has_end_year?(my)
431
+ elsif !has_end_year?(my)
432
432
  result = has_inferior_end_month?(my, o)
433
433
  end
434
434
  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.7.1
4
+ version: 1.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ziserman Martin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-19 00:00:00.000000000 Z
11
+ date: 2017-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json