opening_hours_converter 1.14.3 → 1.14.4

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: 61c9f39ea1892679f76822561dd11b33f185549cea33c1d270a02fa7ac097660
4
- data.tar.gz: 852c01645d72c6f7d694315565796c72909e9a7d6a1338fcf8d478ea9dde02b4
3
+ metadata.gz: 966920734465a1aba46b5fc5b6f9f602a83b449ea5fbb58ed5b214563a133c6f
4
+ data.tar.gz: 5d14a3271546a90beaabfb6a1078a701b4df0feb517fef87585a146350f3e902
5
5
  SHA512:
6
- metadata.gz: 5807378ab97473627243d9037baeaef40cd8c25851756b791c1abc81f7bf21e6066581afe33524b58085e224cfeeac24a4b1b2c54cd67d21abc0233cd8d783b0
7
- data.tar.gz: fba5e0c27e71cd9e7d27d189db972b022d92e70d89fc47cf236fd6de58c9db86f970e181d6c54da72d42f01fd830a1f5250f54fc3a61dfa5a900760b17101ea5
6
+ metadata.gz: 2ace5c1a41d14870876f1211d2a0a64958f16010972f3cb8864f9b0d7422dd66907dff6925c77f2c534d1707600e6ed9a26ef7b55033530ede1e3964b90ceac9
7
+ data.tar.gz: '04856da4b58bf95bd6feddf81d1576ef79441179d708b9ed0ecac73d0e6db97aa3998606f1ed7c49fbfec3607001dd157275c6e76c5bd9500617b9e01a8f4337'
@@ -338,7 +338,15 @@ module OpeningHoursConverter
338
338
  else
339
339
  week_index.to_i
340
340
  end
341
- }
341
+ }.sort_by do |index|
342
+ if index.is_a?(Integer)
343
+ index
344
+ elsif index.is_a?(Hash)
345
+ index[:from]
346
+ else
347
+ 0
348
+ end
349
+ end
342
350
 
343
351
  { year_from: years[0].to_i, week_indexes: indexes }.tap do |hsh|
344
352
  hsh[:year_to] = years.length > 1 ? years[1].to_i : nil
@@ -299,7 +299,7 @@ module OpeningHoursConverter
299
299
  true
300
300
  else
301
301
  @date.each_with_index do |d, i|
302
- return false if (d.wide_interval.start&.dig(:year) != o.date[i].wide_interval.start&.dig(:year)) && d.wide_interval.type != o.date[i].wide_interval.type
302
+ return false if (d.wide_interval.start&.dig(:year) != o.date[i].wide_interval.start&.dig(:year)) && d.wide_interval.type != o.date[i].wide_interval.type || (d.wide_interval.type == "week" && o.date[i].wide_interval.type == "week" && d.wide_interval.indexes != o.date[i].wide_interval.indexes)
303
303
  end
304
304
  true
305
305
  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.14.3
4
+ version: 1.14.4
5
5
  platform: ruby
6
6
  authors:
7
- - Ziserman Martin
7
+ - Publidata
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-21 00:00:00.000000000 Z
11
+ date: 2024-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json