seatsio 44.0.0 → 44.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +2 -0
- data/Gemfile.lock +1 -1
- data/LICENSE +21 -0
- data/lib/seatsio/domain.rb +8 -2
- data/lib/seatsio/events.rb +10 -3
- data/lib/seatsio/version.rb +1 -1
- data/release.mjs +24 -13
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2f899f2daaa48fb264fba7b9464cea36fa38b9833533c82da822b00f4943f23
|
4
|
+
data.tar.gz: fd9c902355fe4bd2e54719e33b28cc068aa3505db924be5c6d057846db933b7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d9dc99a9388e154f74b0411eb22217481ec374b0904055f278d60a1375c2da3549bb32a9500f199f19102f42546e743170412e109a3cd81fc302182393d4a4f
|
7
|
+
data.tar.gz: 646fdc9f59eb8336844bda914365bd90831da4e3bd624f5d5a9f52cccbe0e9635504ac2bf9e3f7d1800607def17a004416b046985519795b4850ef10d3cacb6b
|
data/Gemfile.lock
CHANGED
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2017 seats.io
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/lib/seatsio/domain.rb
CHANGED
@@ -161,7 +161,7 @@ module Seatsio
|
|
161
161
|
|
162
162
|
class Event
|
163
163
|
|
164
|
-
attr_accessor :id, :key, :chart_key, :supports_best_available,
|
164
|
+
attr_accessor :id, :key, :chart_key, :name, :date, :supports_best_available,
|
165
165
|
:table_booking_config, :for_sale_config, :created_on, :updated_on, :channels,
|
166
166
|
:social_distancing_ruleset_key, :is_top_level_season, :is_partial_season,
|
167
167
|
:is_event_in_season, :top_level_season_key,
|
@@ -171,6 +171,8 @@ module Seatsio
|
|
171
171
|
@id = data['id']
|
172
172
|
@key = data['key']
|
173
173
|
@chart_key = data['chartKey']
|
174
|
+
@name = data['name']
|
175
|
+
@date = Date.iso8601(data['date']) if data['date']
|
174
176
|
@supports_best_available = data['supportsBestAvailable']
|
175
177
|
@table_booking_config = TableBookingConfig::from_json(data['tableBookingConfig'])
|
176
178
|
@for_sale_config = ForSaleConfig.new(data['forSaleConfig']) if data['forSaleConfig']
|
@@ -316,7 +318,8 @@ module Seatsio
|
|
316
318
|
class ChartObjectInfo
|
317
319
|
|
318
320
|
attr_reader :label, :labels, :ids, :category_key, :category_label, :section, :entrance, :capacity, :object_type,
|
319
|
-
:left_neighbour, :right_neighbour, :book_as_a_whole, :distance_to_focal_point, :num_seats
|
321
|
+
:left_neighbour, :right_neighbour, :book_as_a_whole, :distance_to_focal_point, :num_seats, :is_accessible,
|
322
|
+
:is_companion_seat, :has_restricted_view
|
320
323
|
|
321
324
|
def initialize(data)
|
322
325
|
@label = data['label']
|
@@ -333,6 +336,9 @@ module Seatsio
|
|
333
336
|
@book_as_a_whole = data['bookAsAWhole']
|
334
337
|
@distance_to_focal_point = data['distanceToFocalPoint']
|
335
338
|
@num_seats = data['numSeats']
|
339
|
+
@is_accessible = data['isAccessible']
|
340
|
+
@is_companion_seat = data['isCompanionSeat']
|
341
|
+
@has_restricted_view = data['hasRestrictedView']
|
336
342
|
end
|
337
343
|
end
|
338
344
|
|
data/lib/seatsio/events.rb
CHANGED
@@ -18,8 +18,9 @@ module Seatsio
|
|
18
18
|
@channels = ChannelsClient.new(@http_client)
|
19
19
|
end
|
20
20
|
|
21
|
-
def create(chart_key: nil, event_key: nil, table_booking_config: nil, social_distancing_ruleset_key: nil, object_categories: nil, categories: nil)
|
21
|
+
def create(chart_key: nil, event_key: nil, name: nil, date: nil, table_booking_config: nil, social_distancing_ruleset_key: nil, object_categories: nil, categories: nil)
|
22
22
|
payload = build_event_request(chart_key: chart_key, event_key: event_key,
|
23
|
+
name: name, date: date,
|
23
24
|
table_booking_config: table_booking_config,
|
24
25
|
social_distancing_ruleset_key: social_distancing_ruleset_key,
|
25
26
|
object_categories: object_categories, categories: categories)
|
@@ -33,10 +34,12 @@ module Seatsio
|
|
33
34
|
Events.new(response).events
|
34
35
|
end
|
35
36
|
|
36
|
-
def update(key:, chart_key: nil, event_key: nil, table_booking_config: nil, social_distancing_ruleset_key: nil, object_categories: nil, categories: nil)
|
37
|
+
def update(key:, chart_key: nil, event_key: nil, name: nil, date: nil, table_booking_config: nil, social_distancing_ruleset_key: nil, object_categories: nil, categories: nil)
|
37
38
|
payload = build_event_request(
|
38
39
|
chart_key: chart_key,
|
39
40
|
event_key: event_key,
|
41
|
+
name: name,
|
42
|
+
date: date,
|
40
43
|
table_booking_config: table_booking_config,
|
41
44
|
social_distancing_ruleset_key: social_distancing_ruleset_key,
|
42
45
|
object_categories: object_categories,
|
@@ -168,10 +171,12 @@ module Seatsio
|
|
168
171
|
payload
|
169
172
|
end
|
170
173
|
|
171
|
-
def build_event_request(chart_key: nil, event_key: nil, table_booking_config: nil, social_distancing_ruleset_key: nil, object_categories: nil, categories: nil)
|
174
|
+
def build_event_request(chart_key: nil, event_key: nil, name: nil, date: nil, table_booking_config: nil, social_distancing_ruleset_key: nil, object_categories: nil, categories: nil)
|
172
175
|
result = {}
|
173
176
|
result["chartKey"] = chart_key if chart_key
|
174
177
|
result["eventKey"] = event_key if event_key
|
178
|
+
result["name"] = name if name
|
179
|
+
result["date"] = date.iso8601 if date
|
175
180
|
result["tableBookingConfig"] = table_booking_config_to_request(table_booking_config) if table_booking_config != nil
|
176
181
|
result["socialDistancingRulesetKey"] = social_distancing_ruleset_key if social_distancing_ruleset_key != nil
|
177
182
|
result["objectCategories"] = object_categories if object_categories != nil
|
@@ -191,6 +196,8 @@ module Seatsio
|
|
191
196
|
params.each do |param|
|
192
197
|
r = {}
|
193
198
|
r["eventKey"] = param[:event_key] if param[:event_key] != nil
|
199
|
+
r["name"] = param[:name] if param[:name]
|
200
|
+
r["date"] = param[:date].iso8601 if param[:date]
|
194
201
|
r["tableBookingConfig"] = table_booking_config_to_request(param[:table_booking_config]) if param[:table_booking_config] != nil
|
195
202
|
r["socialDistancingRulesetKey"] = param[:social_distancing_ruleset_key] if param[:social_distancing_ruleset_key] != nil
|
196
203
|
r["objectCategories"] = param[:object_categories] if param[:object_categories] != nil
|
data/lib/seatsio/version.rb
CHANGED
data/release.mjs
CHANGED
@@ -20,13 +20,14 @@
|
|
20
20
|
$.verbose = false
|
21
21
|
|
22
22
|
const versionToBump = getVersionToBump()
|
23
|
-
const
|
23
|
+
const latestReleaseTag = await fetchLatestReleasedVersionNumber()
|
24
|
+
const latestVersion = removeLeadingV(latestReleaseTag)
|
24
25
|
const nextVersion = await determineNextVersionNumber(latestVersion)
|
25
26
|
|
26
|
-
await
|
27
|
-
|
28
|
-
|
29
|
-
|
27
|
+
await assertChangesSinceRelease(latestReleaseTag)
|
28
|
+
await bumpVersionInFiles()
|
29
|
+
await commitAndPush()
|
30
|
+
await release()
|
30
31
|
|
31
32
|
function getVersionToBump() {
|
32
33
|
if (!argv.v || !(argv.v === 'minor' || argv.v === 'major')) {
|
@@ -44,8 +45,7 @@ function removeLeadingV(tagName) {
|
|
44
45
|
|
45
46
|
async function fetchLatestReleasedVersionNumber() {
|
46
47
|
let result = await $`gh release view --json tagName`
|
47
|
-
|
48
|
-
return removeLeadingV(tagName)
|
48
|
+
return JSON.parse(result).tagName
|
49
49
|
}
|
50
50
|
|
51
51
|
async function determineNextVersionNumber(previous) {
|
@@ -70,11 +70,6 @@ async function replaceInFile(filename, latestVersion, nextVersion) {
|
|
70
70
|
.then(() => gitAdd(filename))
|
71
71
|
}
|
72
72
|
|
73
|
-
async function pullLastVersion() {
|
74
|
-
await $`git checkout master`
|
75
|
-
await $`git pull origin master`
|
76
|
-
}
|
77
|
-
|
78
73
|
async function gitAdd(filename) {
|
79
74
|
return await $`git add ${filename}`
|
80
75
|
}
|
@@ -84,8 +79,24 @@ async function commitAndPush() {
|
|
84
79
|
await $`git push origin master`
|
85
80
|
}
|
86
81
|
|
82
|
+
async function getCurrentCommitHash() {
|
83
|
+
return (await $`git rev-parse HEAD`).stdout.trim()
|
84
|
+
}
|
85
|
+
|
86
|
+
async function getCommitHashOfTag(tag) {
|
87
|
+
return (await $`git rev-list -n 1 ${tag}`).stdout.trim()
|
88
|
+
}
|
89
|
+
|
90
|
+
async function assertChangesSinceRelease(releaseTag) {
|
91
|
+
let masterCommitHash = await getCurrentCommitHash()
|
92
|
+
let releaseCommitHash = await getCommitHashOfTag(releaseTag)
|
93
|
+
if(masterCommitHash === releaseCommitHash) {
|
94
|
+
throw new Error("No changes on master since release tagged " + releaseTag)
|
95
|
+
}
|
96
|
+
}
|
97
|
+
|
87
98
|
async function release() {
|
88
|
-
|
99
|
+
const newTag = 'v' + nextVersion
|
89
100
|
return await $`gh release create ${newTag} --generate-notes`.catch(error => {
|
90
101
|
console.error('something went wrong while creating the release. Please revert the version change!')
|
91
102
|
throw error
|
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: 44.
|
4
|
+
version: 44.2.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: 2023-
|
11
|
+
date: 2023-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -121,6 +121,7 @@ files:
|
|
121
121
|
- ".ruby-version"
|
122
122
|
- Gemfile
|
123
123
|
- Gemfile.lock
|
124
|
+
- LICENSE
|
124
125
|
- README.md
|
125
126
|
- Rakefile
|
126
127
|
- bin/console
|