gitlab-sdk 0.2.2 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- 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: 803988fb5bf45516c7e87b206a6712f5136573a1064619bdd870f604737d688f
|
4
|
+
data.tar.gz: 4435a3a216273eadef832fa778e794680ec7bd74163f84189be3d27b7c475a6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c54a2d8e1e804015eedd8cda38a320c7141013ab56cc90fbf0369907feed81bdd19b4ba15243b31227e67cd844257453a9abb4eb541228c82d5a738c9be11db4
|
7
|
+
data.tar.gz: b173e71a4374b7ad4bf31b9b0f41796ac9bce89078a1dd9abb0b6047dfa2c775f85d5af09da53df05fa96a6d9eaad15265365b3b835a28469b37082e8ea88311
|
data/Gemfile.lock
CHANGED
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.4
|
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-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|