rspec_trunk_flaky_tests 0.12.0-arm64-darwin → 0.12.1-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: 62872462675cb320ecb05c8baaba2ce55b2381f8abe5c413eccd264c69c843b5
4
- data.tar.gz: 88428fb4d4cf68d09644288473bcdeef86b6b3e14d2e0313fc24ba4019367317
3
+ metadata.gz: ed0929594d5cc53c4c14b9a02e29adc56416e092c6e987b06daff4dd06972151
4
+ data.tar.gz: f314681128769438c90a4974ff1991a34005a8831610cc5e648b4966895de1ce
5
5
  SHA512:
6
- metadata.gz: d3cb0abaf25c0bbe133bbe08c97b321482643ae0cec4db551e6a4e48f65f7ba6c0f3909436f9c18cea300caa24c95e5d4103a8117d003a1e1b1b568705138d1a
7
- data.tar.gz: 1803210028fc0b7bddf577f9282ba88cdd90dcb9a901d850d5b8d6299a875a4792b6b978247a45ecf6325120b250df9dbaee8e646df39d1b046a98226283cfec
6
+ metadata.gz: eaa6110c8d0d9740d6172d040ddf717bb8a1820002ed822d957658a8b0933c8228db952a451f85d5bf6df0041a00bfcd4ab3ee5f26bf884d869b9549e6d542bb
7
+ data.tar.gz: 4f6101dbb8a09138e72abc35d1443544b4870244c0746efec6496918a908fb031990164121c8316408e8a6dc71bd65aa67d7f07bb464a49115a93180774886e0
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ begin
4
+ ruby_version = /(\d+\.\d+)/.match(RUBY_VERSION)
5
+ require_relative "rspec_trunk_flaky_tests/#{ruby_version}/rspec_trunk_flaky_tests"
6
+ rescue LoadError
7
+ require_relative 'rspec_trunk_flaky_tests/rspec_trunk_flaky_tests'
8
+ end
@@ -29,7 +29,7 @@
29
29
  #
30
30
  require 'rspec/core'
31
31
  require 'time'
32
- require 'context_ruby'
32
+ require 'rspec_trunk_flaky_tests'
33
33
 
34
34
  # String is an override to the main String class that is used to colorize the output
35
35
  # it is used to make the output more readable
@@ -55,8 +55,21 @@ def escape(str)
55
55
  str.dump[1..-2]
56
56
  end
57
57
 
58
+ # Knapsack example detector instantiates all test cases in order to determine how to shard them
59
+ # These instantiations should not generate test bundles, so we
60
+ # disable the gem when running under knapsack_pro:rspec_test_example_detector
61
+ def knapsack_detector_mode?
62
+ knapsack_detector_command?
63
+ end
64
+
65
+ def knapsack_detector_command?
66
+ command_line = "#{$PROGRAM_NAME} #{ARGV.join(' ')}".strip
67
+ command_line.include?('knapsack_pro:rspec_test_example_detector')
68
+ end
69
+
58
70
  def trunk_disabled
59
- ENV['DISABLE_RSPEC_TRUNK_FLAKY_TESTS'] == 'true' || ENV['TRUNK_ORG_URL_SLUG'].nil? || ENV['TRUNK_API_TOKEN'].nil?
71
+ knapsack_detector_mode? || ENV['DISABLE_RSPEC_TRUNK_FLAKY_TESTS'] == 'true' ||
72
+ ENV['TRUNK_ORG_URL_SLUG'].nil? || ENV['TRUNK_API_TOKEN'].nil?
60
73
  end
61
74
 
62
75
  # we want to cache the test report so we can add to it as we go and reduce the number of API calls
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.0
4
+ version: 0.12.1
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-12-05 00:00:00.000000000 Z
11
+ date: 2025-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec-core
@@ -46,12 +46,12 @@ executables: []
46
46
  extensions: []
47
47
  extra_rdoc_files: []
48
48
  files:
49
- - lib/context_ruby.rb
50
- - lib/context_ruby/3.0/context_ruby.bundle
51
- - lib/context_ruby/3.1/context_ruby.bundle
52
- - lib/context_ruby/3.2/context_ruby.bundle
53
- - lib/context_ruby/3.3/context_ruby.bundle
54
- - lib/context_ruby/3.4/context_ruby.bundle
49
+ - lib/rspec_trunk_flaky_tests.rb
50
+ - lib/rspec_trunk_flaky_tests/3.0/rspec_trunk_flaky_tests.bundle
51
+ - lib/rspec_trunk_flaky_tests/3.1/rspec_trunk_flaky_tests.bundle
52
+ - lib/rspec_trunk_flaky_tests/3.2/rspec_trunk_flaky_tests.bundle
53
+ - lib/rspec_trunk_flaky_tests/3.3/rspec_trunk_flaky_tests.bundle
54
+ - lib/rspec_trunk_flaky_tests/3.4/rspec_trunk_flaky_tests.bundle
55
55
  - lib/trunk_spec_helper.rb
56
56
  homepage: https://docs.trunk.io/flaky-tests/get-started/frameworks/rspec
57
57
  licenses:
data/lib/context_ruby.rb DELETED
@@ -1,8 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- begin
4
- ruby_version = /(\d+\.\d+)/.match(RUBY_VERSION)
5
- require_relative "context_ruby/#{ruby_version}/context_ruby"
6
- rescue LoadError
7
- require_relative 'context_ruby/context_ruby'
8
- end