seatsio 35.1.0 → 35.1.1

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: 4e9e68de3cd7eac52d0604ab81e6572bc897bfed4ef71ec40f0ef2bf598d5ef0
4
- data.tar.gz: 999a8991efff73ef71f0c4b0b18bb41d589c0a7aaf7a11784d2f65db5f803b8a
3
+ metadata.gz: 05a386fb3a2fc728c96f944afcb47225a5f8ae048838473a84dc08baea2859be
4
+ data.tar.gz: b030fa96fbab3f70f292197857adfcaf1b99c68f13d1093349d651701e9b2c42
5
5
  SHA512:
6
- metadata.gz: 2b40d67fadfc461bbf774d2ae580b467dc7b81d63e0f245b92c3532a571e061cb0ee73b0e6f3650496c0a3dbbd523756ce70414f3c243014286134143a6af434
7
- data.tar.gz: 06776edd55219aee088bc763bd91e657c0b8c3f72a9358e7d6ca9b6b84fcc1149aaa8f63d9c1401008201511f7ff96870aba496690917e7b3a97fd3310cff304
6
+ metadata.gz: 25a5b5a1672a5daeff609280ef2cdaf6f526c9cbee3b9f0667394a0fcb047c43a0f3fbdbb6764341bc9627ae8ecb6c50670f6a908ae953b091e80e43c6de19b6
7
+ data.tar.gz: d27dcc2cbfc02a02c95ff5f979bf8d4c54ef3f6b999f39644e21aac6de5c600f0454ecc3fb61d74fdacdbc05e42d6bfa686e8355094166ad29a83236f24fab6c
@@ -12,7 +12,7 @@ jobs:
12
12
  runs-on: ubuntu-latest
13
13
  strategy:
14
14
  matrix:
15
- ruby-version: ['2.4']
15
+ ruby-version: ['2.4', '3.0']
16
16
 
17
17
  steps:
18
18
  - uses: actions/checkout@v2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- seatsio (35.1.0)
4
+ seatsio (35.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -19,7 +19,7 @@ GEM
19
19
  mime-types (3.3.1)
20
20
  mime-types-data (~> 3.2015)
21
21
  mime-types-data (3.2021.0225)
22
- minitest (5.14.4)
22
+ minitest (5.15.0)
23
23
  netrc (0.11.0)
24
24
  public_suffix (4.0.6)
25
25
  rake (13.0.6)
data/README.md CHANGED
@@ -13,13 +13,34 @@ seatsio-ruby follows semver since v23.3.0.
13
13
 
14
14
  You can find a full API reference at https://www.rubydoc.info/gems/seatsio/
15
15
 
16
- ## Examples
16
+ ## Usage
17
+
18
+ ### General instructions
19
+
20
+ To use this library, you'll need to create a `Seatsio::Client`:
21
+
22
+ ```ruby
23
+ require('seatsio')
24
+ client = Seatsio::Client.new(Seatsio::Region.EU(), "my-workspace-secret-key")
25
+ ...
26
+ ```
27
+
28
+ You can find your _workspace secret key_ in the [settings section of the workspace](https://app.seats.io/workspace-settings).
29
+
30
+ The region should correspond to the region of your account:
31
+
32
+ - `Seatsio::Region.EU()`: Europe
33
+ - `Seatsio::Region.NA()`: North-America
34
+ - `Seatsio::Region.SA()`: South-America
35
+ - `Seatsio::Region.OC()`: Oceania
36
+
37
+ If you're unsure about your region, have a look at your [company settings page](https://app.seats.io/company-settings).
17
38
 
18
39
  ### Creating a chart and an event
19
40
 
20
41
  ```ruby
21
42
  require('seatsio')
22
- client = Seatsio::Client.new(Seatsio::Region.EU(), "my-workspace-secret-key") # can be found on https://app.seats.io/workspace-settings
43
+ client = Seatsio::Client.new(Seatsio::Region.EU(), "my-workspace-secret-key")
23
44
  chart = client.charts.create
24
45
  event = client.events.create chart_key: chart.key
25
46
  ```
@@ -19,7 +19,7 @@ module Seatsio
19
19
  @first_page = false
20
20
  end
21
21
 
22
- def each(start = 0)
22
+ def each(start = 0, &block)
23
23
  return to_enum(:each, start) unless block_given?
24
24
 
25
25
  Array(@collection[start..-1]).each do |element|
@@ -30,7 +30,7 @@ module Seatsio
30
30
 
31
31
  start = [@collection.size, start].max
32
32
  fetch_next_page
33
- each(start, &Proc.new)
33
+ each(start, &block)
34
34
  end
35
35
 
36
36
  def set_query_param(key, value)
@@ -1,3 +1,3 @@
1
1
  module Seatsio
2
- VERSION = "35.1.0"
2
+ VERSION = "35.1.1"
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: 35.1.0
4
+ version: 35.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seats.io
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-16 00:00:00.000000000 Z
11
+ date: 2022-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler