gitlab-crystalball 0.8.1 → 0.8.2
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfe4631fc79255c0c4091aca48807cb31f7a596730233b3afaa5a7cf1e913be7
|
4
|
+
data.tar.gz: af6a47b8418995cd7845041d8a0c773ecfb40c64d1cd3c3e0292a574979b5a1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8c59e192fe8be3eee41156660274e82338122e9057b2323c5a72adc66a570ea99b3dc5bbf6aa99f4c4742fbdfebb81c07fc01bf0f7565fcfdf2380fccbe2ce2
|
7
|
+
data.tar.gz: f2352dc108e8ffa284b4a4505f5df7312f970771f573cfdf46bfa9d93090f2a88136c0e9bb39ab393ddcd8411dc8bacbd2e40d064ef5b5aa89f9acc6266acfc9
|
@@ -10,6 +10,7 @@ module Crystalball
|
|
10
10
|
# Map generator strategy based on harvesting Coverage information during example execution
|
11
11
|
class OneshotCoverageStrategy
|
12
12
|
include BaseStrategy
|
13
|
+
include Logging
|
13
14
|
include Helpers::PathFilter
|
14
15
|
|
15
16
|
def after_register
|
@@ -21,10 +22,23 @@ module Crystalball
|
|
21
22
|
# @param [Crystalball::ExampleGroupMap] example_map - object holding example metadata and used files
|
22
23
|
# @param [RSpec::Core::Example] example - a RSpec example
|
23
24
|
def call(example_map, example)
|
24
|
-
|
25
|
+
start_coverage
|
25
26
|
yield example_map, example
|
26
|
-
paths = Coverage.result.keys
|
27
|
-
|
27
|
+
paths = filter(Coverage.result(stop: true, clear: true).keys)
|
28
|
+
log(:debug, "[Crystalball] #{example.id} recorded #{paths.size} files")
|
29
|
+
example_map.push(*paths)
|
30
|
+
end
|
31
|
+
|
32
|
+
# Start coverage or restart it if it was already started
|
33
|
+
#
|
34
|
+
# @return [void] <description>
|
35
|
+
def start_coverage
|
36
|
+
log(:debug, "[Crystalball] Starting oneshot_line coverage capture")
|
37
|
+
return Coverage.start(oneshot_lines: true) unless Coverage.running?
|
38
|
+
|
39
|
+
log(:warn, "[Crystalball] Coverage has been already started, restarting coverage for oneshot_lines!")
|
40
|
+
Coverage.result(stop: true, clear: true)
|
41
|
+
Coverage.start(oneshot_lines: true)
|
28
42
|
end
|
29
43
|
end
|
30
44
|
end
|
data/lib/crystalball/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-crystalball
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Developer Experience Team
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-05-
|
10
|
+
date: 2025-05-20 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: git
|