gitlab-sdk 0.3.0 → 0.3.1
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/Gemfile.lock +1 -1
- data/README.md +16 -0
- data/lib/gitlab-sdk/client.rb +5 -1
- data/lib/gitlab-sdk/version.rb +1 -1
- 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: aea01fe6700609b32e376e19478b48d269f023e1f5276b823e4f7497c050cacb
|
4
|
+
data.tar.gz: a9bda3fc4c97fe8fd207144d004a8abb71fff72d81232630327461fdfbe1f835
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a673a3212d5f457d1ea521944e69d338d759d8087b182859eb179b85e21918d81e228529d20dccf0b7c39a7b4ba8c350a04de5bbea636d33418ebede975bd86
|
7
|
+
data.tar.gz: 218fd1c7c44fd37faba7d1dff14dd106a7cabd83a5b13e2cb89f029f7b3504430641674c6249346202419b60dfd69ae7ce38aa9246c5873646dedecc08556ea4
|
data/Gemfile.lock
CHANGED
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.
|
data/lib/gitlab-sdk/client.rb
CHANGED
@@ -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
|
data/lib/gitlab-sdk/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2024-02-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|