gitlab-crystalball 1.1.0 → 1.1.3
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: 0b2f24d36d9096bfc8b213b0d5c479f2a9cdd5d3eb7c67dae256ef3263e3d371
|
|
4
|
+
data.tar.gz: f73bf079ec17508213b4cf72445a999fff0c3e8222473d3c4b92bc8306deaa08
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 96dbdf82126afd3763f6d0baa1cb763bb79fe8e4a191eec30ad631f5a0d70fd4e0c9936b9323f3fa943c6115a91a45a3928b89ac37addaab3950991825a3972d
|
|
7
|
+
data.tar.gz: 14b78a6dd03fbd90729b5334ca627b22a975d1dadabd74adbe7a7db9c47d354391893d84210fbdcbb5bcb939531c8cf52c977e89ee58549975c44d7e3dd59b0f
|
data/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Add this line to your application's Gemfile:
|
|
|
12
12
|
|
|
13
13
|
```ruby
|
|
14
14
|
group :test do
|
|
15
|
-
gem 'crystalball'
|
|
15
|
+
gem 'gitlab-crystalball'
|
|
16
16
|
end
|
|
17
17
|
```
|
|
18
18
|
|
|
@@ -48,7 +48,6 @@ In order to release new version, manual pipeline should be triggered via Gitlab
|
|
|
48
48
|
|
|
49
49
|
## Contributing
|
|
50
50
|
|
|
51
|
-
Bug reports and pull requests are welcome on GitHub at <https://github.com/toptal/crystalball>.
|
|
52
51
|
This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
|
53
52
|
|
|
54
53
|
## License
|
|
@@ -16,6 +16,11 @@ module Crystalball
|
|
|
16
16
|
# @param[Array<String>] list of files affected after example execution
|
|
17
17
|
# @return [Array<String>]
|
|
18
18
|
def detect(before, after)
|
|
19
|
+
# `before` can be nil when specs run nested example groups inside a
|
|
20
|
+
# before(:context) hook, causing inner after(:context) hooks to clear
|
|
21
|
+
# the coverage baseline. CoverageStrategy#run_after logs a warning.
|
|
22
|
+
return [] unless before
|
|
23
|
+
|
|
19
24
|
after.filter_map do |file, coverage|
|
|
20
25
|
before_cov = before[file]&.fetch(:lines, [])
|
|
21
26
|
next if before_cov == coverage[:lines]
|
|
@@ -30,6 +30,12 @@ module Crystalball
|
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
def run_after(example_map, example)
|
|
33
|
+
unless before_coverage
|
|
34
|
+
log(:warn, "[CoverageStrategy] Skipping coverage detection for #{example.id}: " \
|
|
35
|
+
"before_coverage is nil (nested context hooks may have cleared it)")
|
|
36
|
+
return
|
|
37
|
+
end
|
|
38
|
+
|
|
33
39
|
log_debug("Recording mappings for example id: #{example.id}")
|
|
34
40
|
mappings = execution_detector.detect(before_coverage, Coverage.peek_result)
|
|
35
41
|
log_debug("#{example.id} recorded #{mappings.size} files")
|
data/lib/crystalball/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gitlab-crystalball
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
-
|
|
7
|
+
- Pavel Shutsin
|
|
8
|
+
- Evgenii Pecherkin
|
|
9
|
+
- Jaimerson Araujo
|
|
10
|
+
- GitLab Developer Experience Team
|
|
8
11
|
bindir: bin
|
|
9
12
|
cert_chain: []
|
|
10
|
-
date:
|
|
13
|
+
date: 2026-03-05 00:00:00.000000000 Z
|
|
11
14
|
dependencies:
|
|
12
15
|
- !ruby/object:Gem::Dependency
|
|
13
16
|
name: git
|