rspec-retryable 0.1.0 → 0.3.0

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: a4780f14d90cc2bdce6da95e999e53bc8d7161b298840726e88c509bdddfbafc
4
- data.tar.gz: cd5346007d8ce02a9ae49186bd0b5e6f81938641a191bafe7f882e15e47adc4f
3
+ metadata.gz: 74425f47885aa36a1b21e33fd7d063010cc492b5e25162c402758baf526831dd
4
+ data.tar.gz: 384f1dc2b0f850a0383ddd3e0e793eada3c16c47ea2157d5bfe61a1aaf18a433
5
5
  SHA512:
6
- metadata.gz: '0927eb2492bd7c287d2c96a10bbfc1eb811a61d4ac39dd4fc632f7416a112ef623227f0a6813a126332b961dfefdd3a0000f074659b16c12992fc6f8dcbf9bd6'
7
- data.tar.gz: a2feafa640ee50b563983f25554a53281726aa557ff7ac7a4e4b52db699e7ceac3d0de4f1de21192fd6b25ca18a9d869f6d272470e6dfc97b7d471e2440a4255
6
+ metadata.gz: 672cae2a99e162744822dd1bb148f938a3a7dfa604dc2e594424fdb8f2edbd5a479f8804a72e9cfc3ad09675c63f28b97f976c4cfad2361475d85ef428ff97ee
7
+ data.tar.gz: 77bd6c7464e1e752a2f70b3b3fe83606e47fe6832d62212ebd089937967d6b1b20ec958d16b59cababae3ee12a3cefeed762fb4c28748645814af8e5924218d2
@@ -63,7 +63,16 @@ module RSpec
63
63
  # Use same reporter from example instead of the one passing in to behave like
64
64
  # a fresh new example.
65
65
 
66
- new_example.run(instance, reporter)
66
+ result = new_example.run(instance, reporter)
67
+ # Update the execution result status to the new state from retry
68
+ execution_result.status = new_example.execution_result.status
69
+
70
+ if execution_result.status == :failed
71
+ # Sets exception when retry failed
72
+ execution_result.exception = new_example.execution_result.exception
73
+ end
74
+
75
+ result
67
76
  end
68
77
 
69
78
  def notify_reporter
@@ -11,6 +11,10 @@ module RSpec
11
11
  @handlers << klass.new(*args, **kwargs)
12
12
  end
13
13
 
14
+ def reset!
15
+ @handlers.clear
16
+ end
17
+
14
18
  def invoke(payload)
15
19
  traverse(0, payload)
16
20
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RSpec
4
4
  module Retryable
5
- VERSION = "0.1.0"
5
+ VERSION = "0.3.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-retryable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ngan Pham
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-08-27 00:00:00.000000000 Z
11
+ date: 2024-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec-core
@@ -62,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
62
  - !ruby/object:Gem::Version
63
63
  version: '0'
64
64
  requirements: []
65
- rubygems_version: 3.5.0
65
+ rubygems_version: 3.5.9
66
66
  signing_key:
67
67
  specification_version: 4
68
68
  summary: Adds ability to fully control RSpec retrying