rspec-buildkite-analytics 0.6.0 → 0.6.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/Gemfile.lock +1 -1
- data/lib/rspec/buildkite/analytics/reporter.rb +10 -5
- data/lib/rspec/buildkite/analytics/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: 541f8d1bf4465e411f3fa17757b1c13bc073ea361db1e66973060cb673779d39
|
|
4
|
+
data.tar.gz: 87bb5b43638e2db1951ab0fc0a60a67f5edc7f41c0b4d4735bf75d4202745d21
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e98d13112dddf07fbad1cef13042de7fadd856b3c92202859ebf7e9c935b72eb8d960525181c726fd2ac1d15f72e9252273c9c1e8553f466a0aa415e0307b7df
|
|
7
|
+
data.tar.gz: 9380dce5392e09ef0758780e8a58586f11aabc57ca11ea345d2ae3d7a0f9fa2bac1c982e514b0b556faddf10b0b5ba02f9495320a628bf7add4700898fb29d0e
|
data/Gemfile.lock
CHANGED
|
@@ -53,10 +53,15 @@ module RSpec::Buildkite::Analytics
|
|
|
53
53
|
|
|
54
54
|
private
|
|
55
55
|
|
|
56
|
+
MULTIPLE_ERRORS = [
|
|
57
|
+
RSpec::Expectations::MultipleExpectationsNotMetError,
|
|
58
|
+
RSpec::Core::MultipleExceptionError
|
|
59
|
+
]
|
|
60
|
+
|
|
56
61
|
def failure_info(notification)
|
|
57
62
|
failure_expanded = []
|
|
58
63
|
|
|
59
|
-
if notification.exception.class
|
|
64
|
+
if RSpec::Buildkite::Analytics::Reporter::MULTIPLE_ERRORS.include?(notification.exception.class)
|
|
60
65
|
failure_reason = notification.exception.summary
|
|
61
66
|
notification.exception.all_exceptions.each do |exception|
|
|
62
67
|
# an example with multiple failures doesn't give us a
|
|
@@ -71,10 +76,8 @@ module RSpec::Buildkite::Analytics
|
|
|
71
76
|
}
|
|
72
77
|
end
|
|
73
78
|
else
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
# the second line is always whitespace padding
|
|
77
|
-
message_lines = notification.colorized_message_lines[2..]
|
|
79
|
+
message_lines = notification.colorized_message_lines
|
|
80
|
+
failure_reason = strip_diff_colors(message_lines.shift)
|
|
78
81
|
|
|
79
82
|
failure_expanded << {
|
|
80
83
|
expanded: format_message_lines(message_lines),
|
|
@@ -87,6 +90,8 @@ module RSpec::Buildkite::Analytics
|
|
|
87
90
|
|
|
88
91
|
def format_message_lines(message_lines)
|
|
89
92
|
message_lines.map! { |l| strip_diff_colors(l) }
|
|
93
|
+
# the first line is sometimes blank, depending on the error reported
|
|
94
|
+
message_lines.shift if message_lines.first.blank?
|
|
90
95
|
# the last line is sometimes blank, depending on the error reported
|
|
91
96
|
message_lines.pop if message_lines.last.blank?
|
|
92
97
|
message_lines
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rspec-buildkite-analytics
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Buildkite
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-12-
|
|
11
|
+
date: 2021-12-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|