minitest-retry 0.1.9 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: ecca356b18b220ceac0b267626245edd50f7b343
4
- data.tar.gz: 8fbc8b15e2b12c988c9a4855b2e13a2105db629d
2
+ SHA256:
3
+ metadata.gz: d8f9f6226ef75875a95897d986e79878ce5c09f5406fb3048c0550161281e8aa
4
+ data.tar.gz: 4b969cc059624894c5dcd5d41c56b708867d999a283e2d8c89396074f5e7bdb1
5
5
  SHA512:
6
- metadata.gz: 170bc39e8133e8e6099467d2689fc96d17bf50faa1adbd95bc4044d4537562041dbe3570972e579106ea3506504b626c3a85dde7343915c63797a8f734799111
7
- data.tar.gz: d89bdfaf9cddecd3ec8e426bc8fdcd2409bcdbe5162fb993ad269be8a02a405b6bfdc4f3b22d5c3838498c699caa295466f60d18523ebcfd2eb12dc0996508cb
6
+ metadata.gz: 75616b64822f66378bd933caa1c60fcab593a066045354bc8dfe9bf6510630fe3cd5e2fef9676256e181884a85983c877241d5e95b10a49919187381005951a4
7
+ data.tar.gz: 74ae721f2210599aa00df4cf8ad8815eb3466e7e0abfe447d861434a050dd1d7858b4db0f633d731cfb711863070cefca58824fcba532d64d92e0b7fee0aadaa
@@ -0,0 +1,22 @@
1
+ name: CI
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ build:
7
+ runs-on: ubuntu-latest
8
+ strategy:
9
+ matrix:
10
+ ruby: [ '2.6.x', '2.5.x', '2.4.x', '2.3.x' ]
11
+ steps:
12
+ - uses: actions/checkout@master
13
+ - name: Set up Ruby
14
+ uses: actions/setup-ruby@v1
15
+ with:
16
+ version: ${{ matrix.ruby }}
17
+ - name: Install dependencies
18
+ run: |
19
+ gem install bundler --no-document
20
+ bundle install
21
+ - name: Run test
22
+ run: bundle exec rake
data/.travis.yml CHANGED
@@ -1,7 +1,10 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.1
4
- - 2.2.7
5
- - 2.3.4
6
- - 2.4.1
7
- before_install: gem install bundler
3
+ - 2.3.8
4
+ - 2.4.6
5
+ - 2.5.7
6
+ - 2.6.5
7
+ - ruby-head
8
+
9
+ allow_failures:
10
+ - rvm: ruby-head
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.2.0
2
+
3
+ * Pass a test result to failure and retry callbacks #29 [aabrahamian]
4
+
1
5
  ## 0.1.9
2
6
 
3
7
  * Add on_consistent_failure callback #20 [staugaard]
data/README.md CHANGED
@@ -44,12 +44,12 @@ Minitest::Retry.use!(
44
44
  #### Callbacks
45
45
  The `on_failure` callback is executed each time a test fails:
46
46
  ```ruby
47
- Minitest::Retry.on_failure do |klass, test_name|
47
+ Minitest::Retry.on_failure do |klass, test_name, result|
48
48
  # code omitted
49
49
  end
50
50
  ```
51
51
 
52
- The `on_consistent_failure` callback is executed whan a test consistently fails:
52
+ The `on_consistent_failure` callback is executed when a test consistently fails:
53
53
  ```ruby
54
54
  Minitest::Retry.on_consistent_failure do |klass, test_name|
55
55
  # code omitted
@@ -58,7 +58,7 @@ end
58
58
 
59
59
  The `on_retry` callback is executed each time a test is retried:
60
60
  ```ruby
61
- Minitest::Retry.on_retry do |klass, test_name, retry_count|
61
+ Minitest::Retry.on_retry do |klass, test_name, retry_count, result|
62
62
  # code omitted
63
63
  end
64
64
  ```
@@ -65,9 +65,9 @@ module Minitest
65
65
  result = super(klass, method_name)
66
66
  return result unless Minitest::Retry.failure_to_retry?(result.failures)
67
67
  if !result.skipped?
68
- Minitest::Retry.failure_callback.call(klass, method_name) if Minitest::Retry.failure_callback
68
+ Minitest::Retry.failure_callback.call(klass, method_name, result) if Minitest::Retry.failure_callback
69
69
  Minitest::Retry.retry_count.times do |count|
70
- Minitest::Retry.retry_callback.call(klass, method_name, count + 1) if Minitest::Retry.retry_callback
70
+ Minitest::Retry.retry_callback.call(klass, method_name, count + 1, result) if Minitest::Retry.retry_callback
71
71
  if Minitest::Retry.verbose && Minitest::Retry.io
72
72
  msg = "[MinitestRetry] retry '%s' count: %s, msg: %s\n" %
73
73
  [method_name, count + 1, result.failures.map(&:message).join(",")]
@@ -1,5 +1,5 @@
1
1
  module Minitest
2
2
  module Retry
3
- VERSION = "0.1.9"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
@@ -24,6 +24,6 @@ Gem::Specification.new do |spec|
24
24
 
25
25
  spec.add_dependency 'minitest', '>= 5.0'
26
26
 
27
- spec.add_development_dependency "bundler", "~> 1.10"
28
- spec.add_development_dependency "rake", "~> 10.0"
27
+ spec.add_development_dependency "bundler"
28
+ spec.add_development_dependency "rake"
29
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-retry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuji Yaginuma
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-28 00:00:00.000000000 Z
11
+ date: 2020-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -28,30 +28,30 @@ dependencies:
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '1.10'
33
+ version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '1.10'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '10.0'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '10.0'
54
+ version: '0'
55
55
  description: re-run the test when the test fails
56
56
  email:
57
57
  - yuuji.yaginuma@gmail.com
@@ -59,6 +59,7 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
+ - ".github/workflows/ubuntu.yml"
62
63
  - ".gitignore"
63
64
  - ".travis.yml"
64
65
  - CHANGELOG.md
@@ -91,8 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
92
  - !ruby/object:Gem::Version
92
93
  version: '0'
93
94
  requirements: []
94
- rubyforge_project:
95
- rubygems_version: 2.6.12
95
+ rubygems_version: 3.0.3
96
96
  signing_key:
97
97
  specification_version: 4
98
98
  summary: re-run the test when the test fails