rspec_trunk_flaky_tests 0.12.1.pre.beta.12-arm64-darwin → 0.12.2-arm64-darwin
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/rspec_trunk_flaky_tests/3.0/rspec_trunk_flaky_tests.bundle +0 -0
- data/lib/rspec_trunk_flaky_tests/3.1/rspec_trunk_flaky_tests.bundle +0 -0
- data/lib/rspec_trunk_flaky_tests/3.2/rspec_trunk_flaky_tests.bundle +0 -0
- data/lib/rspec_trunk_flaky_tests/3.3/rspec_trunk_flaky_tests.bundle +0 -0
- data/lib/rspec_trunk_flaky_tests/3.4/rspec_trunk_flaky_tests.bundle +0 -0
- data/lib/rspec_trunk_flaky_tests/4.0/rspec_trunk_flaky_tests.bundle +0 -0
- data/lib/rspec_trunk_flaky_tests.rb +1 -27
- data/lib/trunk_spec_helper.rb +4 -44
- metadata +3 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2c62705bcb40876e1a2701d3352835931d464577d23de9599589ee8e462c8d9a
|
|
4
|
+
data.tar.gz: 7490e115ee002688af7bf51a2a68b6942b2dae441362236a9327d76ec8d95844
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dc6c6d2f2514e4a91e308ac11f781e768214595d55148187b7c51277080f15cbeeb1368e44073061d256f1c4c734d222612247d48808f1e4dc10fef3515b7653
|
|
7
|
+
data.tar.gz: bc66d9be93e8d213d6b93d56176877d3ef13d9cba6cba337e3cae248b68feb00e0e1e5afe039a3f5e5b761e5feb7642e79eee5dc7bc410d10b4de3d56713d888
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -4,31 +4,5 @@ begin
|
|
|
4
4
|
ruby_version = /(\d+\.\d+)/.match(RUBY_VERSION)
|
|
5
5
|
require_relative "rspec_trunk_flaky_tests/#{ruby_version}/rspec_trunk_flaky_tests"
|
|
6
6
|
rescue LoadError
|
|
7
|
-
|
|
8
|
-
require_relative 'rspec_trunk_flaky_tests/rspec_trunk_flaky_tests'
|
|
9
|
-
rescue LoadError
|
|
10
|
-
raise LoadError, <<~MSG
|
|
11
|
-
Could not load the native extension for rspec_trunk_flaky_tests.
|
|
12
|
-
|
|
13
|
-
You are using the pure ruby variant of this gem, which is a placeholder
|
|
14
|
-
that exists so that Gemfile.lock files with `PLATFORMS ruby` can resolve
|
|
15
|
-
this dependency. It does not include a precompiled native extension.
|
|
16
|
-
|
|
17
|
-
Precompiled native gems are available for:
|
|
18
|
-
x86_64-linux, aarch64-linux, arm64-darwin, x86_64-darwin
|
|
19
|
-
|
|
20
|
-
If you are on a supported platform and seeing this error, make sure
|
|
21
|
-
bundler is selecting the native variant for your platform:
|
|
22
|
-
|
|
23
|
-
bundle lock --add-platform #{RUBY_PLATFORM}
|
|
24
|
-
bundle install
|
|
25
|
-
|
|
26
|
-
If you are on an unsupported platform, this gem cannot be used in your
|
|
27
|
-
environment. Please open an issue at:
|
|
28
|
-
https://github.com/trunk-io/analytics-cli/issues
|
|
29
|
-
|
|
30
|
-
Current platform: #{RUBY_PLATFORM}
|
|
31
|
-
Current Ruby version: #{RUBY_VERSION}
|
|
32
|
-
MSG
|
|
33
|
-
end
|
|
7
|
+
require_relative 'rspec_trunk_flaky_tests/rspec_trunk_flaky_tests'
|
|
34
8
|
end
|
data/lib/trunk_spec_helper.rb
CHANGED
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
# TRUNK_REPO_HEAD_BRANCH - HEAD branch name
|
|
17
17
|
# TRUNK_REPO_HEAD_COMMIT_EPOCH - HEAD commit timestamp (seconds since epoch)
|
|
18
18
|
# TRUNK_REPO_HEAD_AUTHOR_NAME - HEAD commit author name
|
|
19
|
-
# TRUNK_PR_NUMBER - PR number, if uploading from a PR (normally inferred from CI environment variables)
|
|
20
19
|
#
|
|
21
20
|
# Optional environment variables for configuration:
|
|
22
21
|
# TRUNK_CODEOWNERS_PATH - Path to CODEOWNERS file
|
|
@@ -66,8 +65,7 @@ end
|
|
|
66
65
|
|
|
67
66
|
def knapsack_detector_command?
|
|
68
67
|
command_line = "#{$PROGRAM_NAME} #{ARGV.join(' ')}".strip
|
|
69
|
-
command_line.include?('knapsack_pro:rspec_test_example_detector')
|
|
70
|
-
command_line.include?('knapsack_pro:queue:rspec:initialize')
|
|
68
|
+
command_line.include?('knapsack_pro:rspec_test_example_detector')
|
|
71
69
|
end
|
|
72
70
|
|
|
73
71
|
def trunk_disabled
|
|
@@ -186,40 +184,9 @@ module RSpec
|
|
|
186
184
|
end
|
|
187
185
|
end
|
|
188
186
|
|
|
189
|
-
def format_exception_message(exception)
|
|
190
|
-
case exception
|
|
191
|
-
when RSpec::Core::MultipleExceptionError
|
|
192
|
-
# MultipleExceptionError contains multiple exceptions in @exceptions array
|
|
193
|
-
messages = exception.all_exceptions.map { |e| "#{e.class}: #{e.message}" }
|
|
194
|
-
"#{exception.class}: #{messages.join(' | ')}"
|
|
195
|
-
else
|
|
196
|
-
exception.to_s
|
|
197
|
-
end
|
|
198
|
-
end
|
|
199
|
-
|
|
200
|
-
# trunk-ignore(rubocop/Metrics/MethodLength)
|
|
201
|
-
def format_exception_backtrace(exception)
|
|
202
|
-
case exception
|
|
203
|
-
when RSpec::Core::MultipleExceptionError
|
|
204
|
-
# Collect backtraces from all nested exceptions
|
|
205
|
-
backtraces = exception.all_exceptions.map do |e|
|
|
206
|
-
if e.backtrace && !e.backtrace.empty?
|
|
207
|
-
"#{e.class}: #{e.message}\n#{e.backtrace.join("\n")}"
|
|
208
|
-
else
|
|
209
|
-
"#{e.class}: #{e.message}"
|
|
210
|
-
end
|
|
211
|
-
end
|
|
212
|
-
backtraces.join("\n\n")
|
|
213
|
-
else
|
|
214
|
-
exception.backtrace&.join("\n") || ''
|
|
215
|
-
end
|
|
216
|
-
end
|
|
217
|
-
|
|
218
187
|
# TrunkAnalyticsListener is a class that is used to listen to the execution of the Example class
|
|
219
188
|
# it generates and submits the final test reports
|
|
220
189
|
class TrunkAnalyticsListener
|
|
221
|
-
MAX_TEXT_FIELD_SIZE = 8_000
|
|
222
|
-
|
|
223
190
|
def initialize
|
|
224
191
|
@testreport = $test_report
|
|
225
192
|
end
|
|
@@ -252,15 +219,8 @@ class TrunkAnalyticsListener
|
|
|
252
219
|
|
|
253
220
|
# trunk-ignore(rubocop/Metrics/CyclomaticComplexity,rubocop/Metrics/AbcSize,rubocop/Metrics/MethodLength)
|
|
254
221
|
def add_test_case(example)
|
|
255
|
-
|
|
256
|
-
failure_message =
|
|
257
|
-
backtrace = ''
|
|
258
|
-
if exception
|
|
259
|
-
failure_message = format_exception_message(exception)
|
|
260
|
-
backtrace = format_exception_backtrace(exception)
|
|
261
|
-
end
|
|
262
|
-
failure_message = failure_message[0...MAX_TEXT_FIELD_SIZE] if failure_message.length > MAX_TEXT_FIELD_SIZE
|
|
263
|
-
backtrace = backtrace[0...MAX_TEXT_FIELD_SIZE] if backtrace.length > MAX_TEXT_FIELD_SIZE
|
|
222
|
+
failure_message = example.exception.to_s if example.exception
|
|
223
|
+
failure_message = example.metadata[:quarantined_exception].to_s if example.metadata[:quarantined_exception]
|
|
264
224
|
# TODO: should we use concatenated string or alias when auto-generated description?
|
|
265
225
|
name = example.full_description
|
|
266
226
|
file = escape(example.metadata[:file_path])
|
|
@@ -285,7 +245,7 @@ class TrunkAnalyticsListener
|
|
|
285
245
|
parent_name = example.example_group.metadata[:description]
|
|
286
246
|
parent_name = parent_name.empty? ? 'rspec' : parent_name
|
|
287
247
|
@testreport.add_test(id, name, classname, file, parent_name, line, status, attempt_number,
|
|
288
|
-
started_at, finished_at, failure_message || '',
|
|
248
|
+
started_at, finished_at, failure_message || '', is_quarantined)
|
|
289
249
|
end
|
|
290
250
|
end
|
|
291
251
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rspec_trunk_flaky_tests
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.12.
|
|
4
|
+
version: 0.12.2
|
|
5
5
|
platform: arm64-darwin
|
|
6
6
|
authors:
|
|
7
7
|
- Trunk Technologies, Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-01-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec-core
|
|
@@ -57,8 +57,7 @@ files:
|
|
|
57
57
|
homepage: https://docs.trunk.io/flaky-tests/get-started/frameworks/rspec
|
|
58
58
|
licenses:
|
|
59
59
|
- MIT
|
|
60
|
-
metadata:
|
|
61
|
-
source_code_uri: https://github.com/trunk-io/analytics-cli/tree/main/rspec-trunk-flaky-tests
|
|
60
|
+
metadata: {}
|
|
62
61
|
post_install_message:
|
|
63
62
|
rdoc_options: []
|
|
64
63
|
require_paths:
|