gitlab-labkit 1.11.0 → 1.11.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/lib/labkit/user_experience_sli/experience.rb +11 -12
- data/lib/labkit/user_experience_sli/null.rb +4 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e8c136c0ed8617c5023574687e1b1284621726be410583eb7ee17586fe56c20e
|
|
4
|
+
data.tar.gz: f9f496d1b6ea56d986b577052f8f50c7a91f1114307af3bd9856734c482afac1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: caed2e7c544c73856cd6a47a0f63655038f636674cf5070a0cb4b5330c2beda0c07ff0a7352b5d367f293ae818ecf08aa414316485f5cc6a262595c5240f334c
|
|
7
|
+
data.tar.gz: 7c3b49fc037060c21ea36e49e4878f99640e241b5a7358665fddf6bdde354ac26ddda80c87b11f5de183c4a259a9b2d6c8629818a852078393487c1c78ef6ba1
|
|
@@ -61,7 +61,8 @@ module Labkit
|
|
|
61
61
|
#
|
|
62
62
|
# @yield [self] When a block is provided, the experience will be completed automatically.
|
|
63
63
|
# @param extra [Hash] Additional data to include in the log event
|
|
64
|
-
# @return [self]
|
|
64
|
+
# @return [self] When no block is given.
|
|
65
|
+
# @return [Object] The result of the block when a block is given.
|
|
65
66
|
# @raise [UserExperienceError] If the block raises an error.
|
|
66
67
|
#
|
|
67
68
|
# Usage:
|
|
@@ -104,7 +105,9 @@ module Labkit
|
|
|
104
105
|
# Resume the User Experience.
|
|
105
106
|
#
|
|
106
107
|
# @yield [self] When a block is provided, the experience will be completed automatically.
|
|
107
|
-
# @param extra [Hash] Additional data to include in the log
|
|
108
|
+
# @param extra [Hash] Additional data to include in the log event
|
|
109
|
+
# @return [self] When no block is given.
|
|
110
|
+
# @return [Object] The result of the block when a block is given.
|
|
108
111
|
def resume(**extra, &)
|
|
109
112
|
return self unless ensure_started!
|
|
110
113
|
|
|
@@ -190,16 +193,12 @@ module Labkit
|
|
|
190
193
|
end
|
|
191
194
|
|
|
192
195
|
def completable(**extra, &)
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
complete(**extra)
|
|
200
|
-
end
|
|
201
|
-
|
|
202
|
-
self
|
|
196
|
+
yield self
|
|
197
|
+
rescue StandardError => e
|
|
198
|
+
error!(e)
|
|
199
|
+
raise
|
|
200
|
+
ensure
|
|
201
|
+
complete(**extra)
|
|
203
202
|
end
|
|
204
203
|
|
|
205
204
|
def ensure_incomplete!
|
|
@@ -11,12 +11,14 @@ module Labkit
|
|
|
11
11
|
def id = 'null'
|
|
12
12
|
|
|
13
13
|
def start(**_extra)
|
|
14
|
-
yield
|
|
14
|
+
return yield(self) if block_given?
|
|
15
|
+
|
|
15
16
|
self
|
|
16
17
|
end
|
|
17
18
|
|
|
18
19
|
def resume(**_extra)
|
|
19
|
-
yield
|
|
20
|
+
return yield(self) if block_given?
|
|
21
|
+
|
|
20
22
|
self
|
|
21
23
|
end
|
|
22
24
|
|