seatsio 25.3.0 → 26.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: 2ddd5b9e1dfd54adec1188d7f253a483c691b83e4368888eacc6f5cb2ae74bfe
4
- data.tar.gz: 16d56d9cf53aa9659a81d286ccc71e4942a1469368cf83bea2ca84f0c7eba3c2
3
+ metadata.gz: 56dacdba1281d3633ebd9eec2ef5ce9b3b35b1f6c5bd823be2e5f02bd8157962
4
+ data.tar.gz: b54123ab3b42336f2b490dbc669996be69e6cd3438c3591ed4722993cbd22c44
5
5
  SHA512:
6
- metadata.gz: '09d1ee115bb79ed24a26c4caefadd90e951eee37273d4aa3fc4336c254555b60f1f1aa8be347af3665ea502106b781c1a57c6926dc5896faab66bd2837058273'
7
- data.tar.gz: 8fb5bdb6e9b3625c884e83657614ffd27046e45d3a4a7852e7268ccc1fd13c792dc315b19e056dba7e3fb4d07ecc2fa787695ad98b526527fc471307028a7b54
6
+ metadata.gz: 58833779b5be413655325bc3dce81ac8bd78382887d7c13caba7097e3a52f33dd6009e91abdce0bcbc7961b09a7518046b809c8348940d1dee1ab1ff0615b87a
7
+ data.tar.gz: 71ac86858ccb803b5eb5002ce59552c261daebae7ef509334b2bf38ac828f66bd10d77b95274f8a059bdf64c1c13d389c13bfc8407404cf607c3ecb7434b74d0
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- seatsio (25.3.0)
4
+ seatsio (26.0.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -24,6 +24,7 @@ module Seatsio::Domain
24
24
  @social_distancing_rulesets = data['socialDistancingRulesets'].map {
25
25
  |key, r| [key, SocialDistancingRuleset.new(r['name'], r['numberOfDisabledSeatsToTheSides'], r['disableSeatsInFrontAndBehind'],
26
26
  r['numberOfDisabledAisleSeats'], r['maxGroupSize'],
27
+ r['maxOccupancyAbsolute'], r['maxOccupancyPercentage'], r['fixedGroupLayout'],
27
28
  r['disabledSeats'], r['enabledSeats'], r['index'])]
28
29
  }.to_h
29
30
  end
@@ -474,31 +475,50 @@ module Seatsio::Domain
474
475
 
475
476
  class SocialDistancingRuleset
476
477
  attr_reader :name, :number_of_disabled_seats_to_the_sides, :disable_seats_in_front_and_behind,
477
- :number_of_disabled_aisle_seats, :max_group_size, :disabled_seats, :enabled_seats, :index
478
+ :number_of_disabled_aisle_seats, :max_group_size, :max_occupancy_absolute,
479
+ :max_occupancy_percentage, :fixed_group_layout, :disabled_seats, :enabled_seats, :index
478
480
 
479
481
  def initialize(name, number_of_disabled_seats_to_the_sides = 0, disable_seats_in_front_and_behind = false, number_of_disabled_aisle_seats = 0,
480
- max_group_size = 0, disabled_seats = [], enabled_seats = [], index = 0)
482
+ max_group_size = 0, max_occupancy_absolute = 0, max_occupancy_percentage = 0, fixed_group_layout = false,
483
+ disabled_seats = [], enabled_seats = [], index = 0)
481
484
  @name = name
482
485
  @number_of_disabled_seats_to_the_sides = number_of_disabled_seats_to_the_sides
483
486
  @disable_seats_in_front_and_behind = disable_seats_in_front_and_behind
484
487
  @number_of_disabled_aisle_seats = number_of_disabled_aisle_seats
485
488
  @max_group_size = max_group_size
489
+ @max_occupancy_absolute = max_occupancy_absolute
490
+ @max_occupancy_percentage = max_occupancy_percentage
491
+ @fixed_group_layout = fixed_group_layout
486
492
  @disabled_seats = disabled_seats
487
493
  @enabled_seats = enabled_seats
488
494
  @index = index
489
495
  end
490
496
 
497
+ def self.fixed(name, disabled_seats = [], index = 0)
498
+ SocialDistancingRuleset.new(name, 0, false, 0, 0, 0, 0, true, disabled_seats, [], index)
499
+ end
500
+
501
+ 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,
502
+ max_group_size = 0, max_occupancy_absolute = 0, max_occupancy_percentage = 0,
503
+ disabled_seats = [], enabled_seats = [], index = 0)
504
+ SocialDistancingRuleset.new(name, number_of_disabled_seats_to_the_sides, disable_seats_in_front_and_behind, number_of_disabled_aisle_seats,
505
+ max_group_size, max_occupancy_absolute, max_occupancy_percentage,
506
+ false, disabled_seats, enabled_seats, index)
507
+ end
508
+
491
509
  def == (other)
492
510
  self.name == other.name &&
493
511
  self.number_of_disabled_seats_to_the_sides == other.number_of_disabled_seats_to_the_sides &&
494
512
  self.disable_seats_in_front_and_behind == other.disable_seats_in_front_and_behind &&
495
513
  self.number_of_disabled_aisle_seats == other.number_of_disabled_aisle_seats &&
496
514
  self.max_group_size == other.max_group_size &&
515
+ self.max_occupancy_absolute == other.max_occupancy_absolute &&
516
+ self.max_occupancy_percentage == other.max_occupancy_percentage &&
517
+ self.fixed_group_layout == other.fixed_group_layout &&
497
518
  self.disabled_seats == other.disabled_seats &&
498
519
  self.enabled_seats == other.enabled_seats &&
499
520
  self.index == other.index
500
521
  end
501
-
502
522
  end
503
523
 
504
524
  end
@@ -1,3 +1,3 @@
1
1
  module Seatsio
2
- VERSION = "25.3.0"
2
+ VERSION = "26.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: 25.3.0
4
+ version: 26.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-10-02 00:00:00.000000000 Z
11
+ date: 2020-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler