gitlab-sdk 0.3.0 → 0.3.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: 38ec160731634aef4547e601d3e8b69ad5c885963d9236e89d8eff213c28743f
4
- data.tar.gz: bf4a0c6454ae9102211a1fc3e8bcd7f3bd4b928d96a4703f92f9d2bcd07a4afd
3
+ metadata.gz: aea01fe6700609b32e376e19478b48d269f023e1f5276b823e4f7497c050cacb
4
+ data.tar.gz: a9bda3fc4c97fe8fd207144d004a8abb71fff72d81232630327461fdfbe1f835
5
5
  SHA512:
6
- metadata.gz: 91844d2429060c4ad01212d9306a4073e4f631296fee2361dc344dc4c8fe25147796361e348a0af567e0c0f13a287befb4427923c8238b30c5991f2a64be7ed4
7
- data.tar.gz: 8cce8707020443c8dd48aae6c0de1d8cd5601b8404209d446bf53a70b5244d06e98b1f6c61745f0daef3e413d85799b14510bfeb202a40c06b47d3628c63f20f
6
+ metadata.gz: 1a673a3212d5f457d1ea521944e69d338d759d8087b182859eb179b85e21918d81e228529d20dccf0b7c39a7b4ba8c350a04de5bbea636d33418ebede975bd86
7
+ data.tar.gz: 218fd1c7c44fd37faba7d1dff14dd106a7cabd83a5b13e2cb89f029f7b3504430641674c6249346202419b60dfd69ae7ce38aa9246c5873646dedecc08556ea4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-sdk (0.3.0)
4
+ gitlab-sdk (0.3.1)
5
5
  activesupport (>= 5.2.0)
6
6
  rake (~> 13.0)
7
7
  snowplow-tracker (~> 0.8.0)
data/README.md CHANGED
@@ -33,6 +33,22 @@ For more details see Snowplow Ruby Tracker [docs](https://snowplow.github.io/sno
33
33
 
34
34
  ## Methods
35
35
 
36
+ ### `flush`
37
+
38
+ Used to manually flush all events from Snowplow Ruby Tracker's emitters, defaults to synchronous.
39
+
40
+ ```ruby
41
+ # Flush events synchronously (default)
42
+ client.flush_events
43
+
44
+ # Flush events asynchronously
45
+ client.flush_events(async: true)
46
+ ```
47
+
48
+ | Property | Type | Description |
49
+ |:-----------------|:----------|:--------------------------------------------------------------------------|
50
+ | `async` | `Boolean` | Optional. Default `false`. Use `true` to flush all events asynchronously. |
51
+
36
52
  ### `identify`
37
53
 
38
54
  Used to associate a user and their attributes with the session and tracking events.
@@ -25,7 +25,7 @@ module GitlabSDK
25
25
  )
26
26
  end
27
27
 
28
- def track(event_name, event_payload)
28
+ def track(event_name, event_payload = {})
29
29
  self_desc_json = SnowplowTracker::SelfDescribingJson.new(
30
30
  SCHEMAS[:custom_event],
31
31
  name: event_name,
@@ -45,6 +45,10 @@ module GitlabSDK
45
45
  GitlabSDK::CurrentUser.user_attributes = user_attributes
46
46
  end
47
47
 
48
+ def flush_events(async: false)
49
+ tracker.flush(async: async)
50
+ end
51
+
48
52
  private
49
53
 
50
54
  attr_reader :tracker
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GitlabSDK
4
- VERSION = "0.3.0"
4
+ VERSION = "0.3.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitLab
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-01-16 00:00:00.000000000 Z
11
+ date: 2024-02-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport