rspec_trunk_flaky_tests 0.7.10.pre.alpha.0-arm64-darwin → 0.7.10.pre.beta.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d4a2722db58b1a3889916bd1626c9f63b4aa1ac335c31731da39331b1de78f93
4
- data.tar.gz: e188b75e07b0770b12c2f4c0cd017798cdf2033b18ba2f5d8243d453ac4d60c3
3
+ metadata.gz: 6506b8b52ce6fdb859b867df96d22425e4c9857e7cfd217b92014ef59fb9b1c1
4
+ data.tar.gz: db36cb127971a86fc180312dbf04d5f95286f8a2a041d9103aa976af828b1438
5
5
  SHA512:
6
- metadata.gz: 17b674ca8092b92b63af273ef3c82d5376d9fb1f32d1898eee3ca8443c1254f52330e240a40106a613a902f0e47ef15df00c3b89c973edc9c60b2e8226256eba
7
- data.tar.gz: 9c519d54e9174c65e145ea94bfffe1e3a6ac834b09c9aa32a8df36889edd32a99318267506fd2c2b261f1f0f2051b558c4c932770cc4ecc167a8b1ba82e967f5
6
+ metadata.gz: 9539168c19127ebd643528a1e872619f7ce62b14163ee36c4723970a480fdd0444c7be79ca141d42bdace9b4aa97b25149a2be6abfc9cb18c945c31ae9ea3dde
7
+ data.tar.gz: 1082fd2864bf0bec19fb0c85d84a44f7b596b65dcac9e0f0f65c32edcfddcb5371397064b3e062b8aae0df5e42a1b941215ae5b248b23327caa2e40df3ce733e
@@ -45,7 +45,7 @@ module RSpec
45
45
  # RSpec uses the existance of an exception to determine if the test failed
46
46
  # We need to override this to allow us to capture the exception and then
47
47
  # decide if we want to fail the test or not
48
- # trunk-ignore(rubocop/Naming/AccessorMethodName,rubocop/Metrics/MethodLength,rubocop/Metrics/AbcSize)
48
+ # trunk-ignore(rubocop/Metrics/AbcSize,rubocop/Metrics/MethodLength,rubocop/Naming/AccessorMethodName)
49
49
  def set_exception(exception)
50
50
  return set_exception_core(exception) if metadata[:pending]
51
51
  return set_exception_core(exception) if trunk_disabled
@@ -139,20 +139,26 @@ class TrunkAnalyticsListener
139
139
  add_test_case(notification.example)
140
140
  end
141
141
 
142
+ # trunk-ignore(rubocop/Metrics/MethodLength)
142
143
  def close(_notification)
143
- published = @testreport.publish
144
- if published && !ENV['TRUNK_LOCAL_UPLOAD_DIR']
145
- puts 'Flaky tests report upload complete'.green
146
- elsif !published && !ENV['TRUNK_LOCAL_UPLOAD_DIR']
147
- puts 'Failed to publish flaky tests report'.red
148
- elsif published && ENV['TRUNK_LOCAL_UPLOAD_DIR']
149
- puts 'Local Flaky tests report generated'.green
150
- elsif !published && ENV['TRUNK_LOCAL_UPLOAD_DIR']
151
- puts 'Failed to generate local flaky tests report'.red
144
+ if ENV['TRUNK_LOCAL_UPLOAD_DIR']
145
+ saved = @testreport.try_save(ENV['TRUNK_LOCAL_UPLOAD_DIR'])
146
+ if saved
147
+ puts 'Local Flaky tests report generated'.green
148
+ else
149
+ puts 'Failed to generate local flaky tests report'.red
150
+ end
151
+ else
152
+ published = @testreport.publish
153
+ if published
154
+ puts 'Flaky tests report upload complete'.green
155
+ else
156
+ puts 'Failed to publish flaky tests report'.red
157
+ end
152
158
  end
153
159
  end
154
160
 
155
- # trunk-ignore(rubocop/Metrics/AbcSize,rubocop/Metrics/MethodLength,rubocop/Metrics/CyclomaticComplexity)
161
+ # trunk-ignore(rubocop/Metrics/CyclomaticComplexity,rubocop/Metrics/AbcSize,rubocop/Metrics/MethodLength)
156
162
  def add_test_case(example)
157
163
  failure_message = example.exception.to_s if example.exception
158
164
  failure_message = example.metadata[:quarantined_exception].to_s if example.metadata[:quarantined_exception]
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.7.10.pre.alpha.0
4
+ version: 0.7.10.pre.beta.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: 2025-05-01 00:00:00.000000000 Z
11
+ date: 2025-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec-core