gitlab-sdk 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -10
- data/lib/gitlab-sdk/client.rb +2 -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: 11dac83656bfe8df2dfe90b36e3a9f2adeedfe86af5c8e92d546eb9e5767c8b7
|
4
|
+
data.tar.gz: e0ced41b6c9d81c1fbef2b3a1ec110bfa5839bfb4325129f77aaf958368630a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24d117ad6d13a7fe33bb24839ca26abc42dc5957c9d4e250b3c9fdac131b003d9a90c5109c2e1119045a0625129af66b1e74f12836a0a065088a76c66659e5d4
|
7
|
+
data.tar.gz: 679a40115a364cb253ed68a6261d79acdd4cf24beb6006526a9b5fc07b040b46d9db6bb7d03e72fa8d41557e450bd5f6fa1cb1abe3081e10102903c65cfa7f50
|
data/README.md
CHANGED
@@ -22,10 +22,10 @@ client = GitlabSDK::Client.new(app_id: 'YOUR_APP_ID', host: 'YOUR_HOST')
|
|
22
22
|
|
23
23
|
## Client initialization options
|
24
24
|
|
25
|
-
| Option | Description
|
26
|
-
|
27
|
-
| `app_id`
|
28
|
-
| `host` | The GitLab Project Analytics instance specified in the setup guide.
|
25
|
+
| Option | Description |
|
26
|
+
|:----------------|:---------------------------------------------------------------------------------------------------------------------------------------------------|
|
27
|
+
| `app_id` | The ID specified in the GitLab Project Analytics setup guide. It ensures your data is sent to your analytics instance. |
|
28
|
+
| `host` | The GitLab Project Analytics instance specified in the setup guide. When using a non-standard port, includde it here, e.g. `http://localhost:9091` |
|
29
29
|
|
30
30
|
## Methods
|
31
31
|
|
@@ -37,10 +37,10 @@ Used to associate a user and their attributes with the session and tracking even
|
|
37
37
|
client.identify('123abc', { user_name: 'Matthew' })
|
38
38
|
```
|
39
39
|
|
40
|
-
| Property | Type
|
41
|
-
|
42
|
-
| `user_id` | `String` | The ID of the user.
|
43
|
-
| `user_attributes` | `Hash`
|
40
|
+
| Property | Type | Description |
|
41
|
+
|:-----------------|:----------|:-------------------------------------------------------------------------|
|
42
|
+
| `user_id` | `String` | The ID of the user. |
|
43
|
+
| `user_attributes` | `Hash` | Optional. The user attributes to add to the session and tracking events. |
|
44
44
|
|
45
45
|
### `track`
|
46
46
|
|
@@ -53,7 +53,7 @@ client.track(event_name, event_attributes)
|
|
53
53
|
| Property | Type | Description |
|
54
54
|
|:------------------|:----------|:-----------------------------------------------------------------|
|
55
55
|
| `event_name` | `String` | The name of the event. |
|
56
|
-
| `event_attributes` | `Hash` | The event attributes to add to the tracked event.
|
56
|
+
| `event_attributes` | `Hash` | The event attributes to add to the tracked event. |
|
57
57
|
|
58
58
|
## Developing with the devkit
|
59
59
|
|
@@ -66,4 +66,4 @@ To test the gem's functionality, run `bin/console`.
|
|
66
66
|
To release a new version of the gem:
|
67
67
|
|
68
68
|
1. Update the version in [lib/gitlab-sdk/version.rb](lib/gitlab-sdk/version.rb).
|
69
|
-
|
69
|
+
1. After the MR with the changes made in the previous step is merged, the new version of the gem is uploaded to [RubyGems](https://rubygems.org/gems/gitlab-sdk).
|
data/lib/gitlab-sdk/client.rb
CHANGED
@@ -53,7 +53,8 @@ module GitlabSDK
|
|
53
53
|
uri = URI(host)
|
54
54
|
raise HostHasNoSchemeError unless uri.scheme
|
55
55
|
|
56
|
-
|
56
|
+
endpoint = "#{uri.hostname}:#{uri.port}#{uri.path}"
|
57
|
+
SnowplowTracker::Emitter.new(endpoint: endpoint, options: { protocol: uri.scheme })
|
57
58
|
end
|
58
59
|
|
59
60
|
def set_subject_data
|
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.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitLab
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|