seatsio 27.0.0 → 28.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 387ed52306c0b323ea46c428338e2b710769bf1aad466f846c45c098181fa6c6
4
- data.tar.gz: 481627a92f34480ad8eaff3b50df48c49a375e187917e433792a226d96608381
3
+ metadata.gz: 3d051975adb905e21e99a21b9eaba54b348f45f74ac9686364fe844804f7259b
4
+ data.tar.gz: ed83d35ccb688b8741257123daef0742bb822fe4e5a6a5cac299b6b5fad97787
5
5
  SHA512:
6
- metadata.gz: 6a686de47074aa17d326a3f88b92221d15148484293bba3443f0203fb883f3cc29a5b0279a3482a6a4cad69df38350ff38a0de06ffa8d9ff084767ee2e404b3a
7
- data.tar.gz: d113f54e14e58123928483ac2b40b34750edeb613fbc1cdff941cccfa4ffafabff84d1e77d7b54bb94418583969c465bde5fa3b625f1805699443037a226f2cc
6
+ metadata.gz: 7ef44be79488dba3831bf5b2da54711963a8cf25c48dfd15ede94af7cd5d4a399740909e58db8f75242e55df1be9b111b685146ce006dbad156bb1c440e2ae0c
7
+ data.tar.gz: 9da2975e2cdd0fc319dcffc03766961941b87318a626fad76be129ce26f5c2c541a56f827433c962e8e7381743958685cf6e5fcbe44debf078e9134d4412be26
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- seatsio (27.0.0)
4
+ seatsio (28.0.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -22,10 +22,19 @@ module Seatsio
22
22
  @archived = data['archived']
23
23
  @validation = data['validation']
24
24
  @social_distancing_rulesets = data['socialDistancingRulesets'].map {
25
- |key, r| [key, SocialDistancingRuleset.new(r['name'], r['numberOfDisabledSeatsToTheSides'], r['disableSeatsInFrontAndBehind'],
26
- r['numberOfDisabledAisleSeats'], r['maxGroupSize'],
27
- r['maxOccupancyAbsolute'], r['maxOccupancyPercentage'], r['oneGroupPerTable'], r['fixedGroupLayout'],
28
- r['disabledSeats'], r['enabledSeats'], r['index'])]
25
+ |key, r| [key, SocialDistancingRuleset.new(r['name'],
26
+ number_of_disabled_seats_to_the_sides: r['numberOfDisabledSeatsToTheSides'],
27
+ disable_seats_in_front_and_behind: r['disableSeatsInFrontAndBehind'],
28
+ disable_diagonal_seats_in_front_and_behind: r['disableDiagonalSeatsInFrontAndBehind'],
29
+ number_of_disabled_aisle_seats: r['numberOfDisabledAisleSeats'],
30
+ max_group_size: r['maxGroupSize'],
31
+ max_occupancy_absolute: r['maxOccupancyAbsolute'],
32
+ max_occupancy_percentage: r['maxOccupancyPercentage'],
33
+ one_group_per_table: r['oneGroupPerTable'],
34
+ fixed_group_layout: r['fixedGroupLayout'],
35
+ disabled_seats: r['disabledSeats'],
36
+ enabled_seats: r['enabledSeats'],
37
+ index: r['index'])]
29
38
  }.to_h
30
39
  end
31
40
  end
@@ -506,15 +515,16 @@ module Seatsio
506
515
 
507
516
  class SocialDistancingRuleset
508
517
  attr_reader :name, :number_of_disabled_seats_to_the_sides, :disable_seats_in_front_and_behind,
509
- :number_of_disabled_aisle_seats, :max_group_size, :max_occupancy_absolute,
518
+ :disable_diagonal_seats_in_front_and_behind, :number_of_disabled_aisle_seats, :max_group_size, :max_occupancy_absolute,
510
519
  :max_occupancy_percentage, :one_group_per_table, :fixed_group_layout, :disabled_seats, :enabled_seats, :index
511
520
 
512
- def initialize(name, number_of_disabled_seats_to_the_sides = 0, disable_seats_in_front_and_behind = false, number_of_disabled_aisle_seats = 0,
513
- max_group_size = 0, max_occupancy_absolute = 0, max_occupancy_percentage = 0, one_group_per_table = false,
514
- fixed_group_layout = false, disabled_seats = [], enabled_seats = [], index = 0)
521
+ def initialize(name, number_of_disabled_seats_to_the_sides: 0, disable_seats_in_front_and_behind: false, disable_diagonal_seats_in_front_and_behind: false,
522
+ number_of_disabled_aisle_seats: 0, max_group_size: 0, max_occupancy_absolute: 0, max_occupancy_percentage: 0, one_group_per_table: false,
523
+ fixed_group_layout: false, disabled_seats: [], enabled_seats: [], index: 0)
515
524
  @name = name
516
525
  @number_of_disabled_seats_to_the_sides = number_of_disabled_seats_to_the_sides
517
526
  @disable_seats_in_front_and_behind = disable_seats_in_front_and_behind
527
+ @disable_diagonal_seats_in_front_and_behind = disable_diagonal_seats_in_front_and_behind
518
528
  @number_of_disabled_aisle_seats = number_of_disabled_aisle_seats
519
529
  @max_group_size = max_group_size
520
530
  @max_occupancy_absolute = max_occupancy_absolute
@@ -526,22 +536,33 @@ module Seatsio
526
536
  @index = index
527
537
  end
528
538
 
529
- def self.fixed(name, disabled_seats = [], index = 0)
530
- SocialDistancingRuleset.new(name, 0, false, 0, 0, 0, 0, false, true, disabled_seats, [], index)
539
+ def self.fixed(name, disabled_seats: [], index: 0)
540
+ return SocialDistancingRuleset.new(name, index: index, disabled_seats: disabled_seats, fixed_group_layout: true)
531
541
  end
532
542
 
533
- def self.rule_based(name, number_of_disabled_seats_to_the_sides = 0, disable_seats_in_front_and_behind = false, number_of_disabled_aisle_seats = 0,
534
- max_group_size = 0, max_occupancy_absolute = 0, max_occupancy_percentage = 0, one_group_per_table = false,
535
- disabled_seats = [], enabled_seats = [], index = 0)
536
- SocialDistancingRuleset.new(name, number_of_disabled_seats_to_the_sides, disable_seats_in_front_and_behind, number_of_disabled_aisle_seats,
537
- max_group_size, max_occupancy_absolute, max_occupancy_percentage,
538
- one_group_per_table, false, disabled_seats, enabled_seats, index)
543
+ def self.rule_based(name, number_of_disabled_seats_to_the_sides: 0, disable_seats_in_front_and_behind: false, disable_diagonal_seats_in_front_and_behind: false,
544
+ number_of_disabled_aisle_seats: 0, max_group_size: 0, max_occupancy_absolute: 0, max_occupancy_percentage: 0, one_group_per_table: false,
545
+ disabled_seats: [], enabled_seats: [], index: 0)
546
+ return SocialDistancingRuleset.new(name,
547
+ number_of_disabled_seats_to_the_sides: number_of_disabled_seats_to_the_sides,
548
+ disable_seats_in_front_and_behind: disable_seats_in_front_and_behind,
549
+ disable_diagonal_seats_in_front_and_behind: disable_diagonal_seats_in_front_and_behind,
550
+ number_of_disabled_aisle_seats: number_of_disabled_aisle_seats,
551
+ max_group_size: max_group_size,
552
+ max_occupancy_absolute: max_occupancy_absolute,
553
+ max_occupancy_percentage: max_occupancy_percentage,
554
+ one_group_per_table: one_group_per_table,
555
+ fixed_group_layout: false,
556
+ disabled_seats: disabled_seats,
557
+ enabled_seats: enabled_seats,
558
+ index: index)
539
559
  end
540
560
 
541
561
  def == (other)
542
562
  self.name == other.name &&
543
563
  self.number_of_disabled_seats_to_the_sides == other.number_of_disabled_seats_to_the_sides &&
544
564
  self.disable_seats_in_front_and_behind == other.disable_seats_in_front_and_behind &&
565
+ self.disable_diagonal_seats_in_front_and_behind == other.disable_diagonal_seats_in_front_and_behind &&
545
566
  self.number_of_disabled_aisle_seats == other.number_of_disabled_aisle_seats &&
546
567
  self.max_group_size == other.max_group_size &&
547
568
  self.max_occupancy_absolute == other.max_occupancy_absolute &&
@@ -1,3 +1,3 @@
1
1
  module Seatsio
2
- VERSION = "27.0.0"
2
+ VERSION = "28.0.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seatsio
3
3
  version: !ruby/object:Gem::Version
4
- version: 27.0.0
4
+ version: 28.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seats.io
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-03 00:00:00.000000000 Z
11
+ date: 2020-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler