seatsio 44.1.0 → 44.2.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 +4 -4
- data/.github/workflows/release.yml +2 -0
- data/Gemfile.lock +1 -1
- data/lib/seatsio/domain.rb +3 -1
- data/lib/seatsio/events.rb +10 -3
- data/lib/seatsio/version.rb +1 -1
- data/release.mjs +24 -13
- metadata +2 -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/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']
|
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-06-
|
11
|
+
date: 2023-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|