minitest-silence 0.2.3 → 0.2.4

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
2
  SHA256:
3
- metadata.gz: b03c276bec193fd8b77ccc59ef6ed8263ebe88838c0cddb097bf6be9cc07c1ad
4
- data.tar.gz: c97ec8a9c1b72f06cceed2ef71f34a5677458abb6a0c36d7024829ca9ab04490
3
+ metadata.gz: ba38e3bdb96751df36f3ea01b1e81cf30bd4d0a4368c251ea6e1ddae9b443b2e
4
+ data.tar.gz: 796edae9f0796115e6ae2695e1c7bde32d587013ce2ac4582f6466fa1151a382
5
5
  SHA512:
6
- metadata.gz: 159dd1fd663c415f7906a138be58969369efc04353efaebada92f70e85bcd5b164009e1b05df251ab215cbd727d668b23156b4a53389abfba90eb23b999bf7ab
7
- data.tar.gz: c351cd101e58c1a8415956a850727e4e2b74a845f2d7a31fe6f19c5a888f2ba82d351412d9e55d16db312f42b142944e90b23bf1a3f864a9768e084008697cd2
6
+ metadata.gz: 324baca320f1db91b0e0a226034626d2fe280a3386c171412bdb6e48ad3a0450eb321304ae9af320f0e2e4163f80faf45b5fc9a821ed4b654fbdcde1aab927c1
7
+ data.tar.gz: 622f58efbca12b35eb445fccd5f22c2214fdf26536412d85b9b076cac7863e1a8e2bcbd8115ddd8064194762dcf8daa83b3fbb73a8db35e50948fffd30c359d2
data/README.md CHANGED
@@ -18,13 +18,13 @@ gem 'minitest-silence', require: false
18
18
 
19
19
  ## Usage
20
20
 
21
- The plugin will be automatically activated by Minitest if it is in your application's bundle.
21
+ The plugin will be automatically loaded by Minitest if it is in your application's bundle.
22
22
 
23
- - By default, the captured output produced by tests will be discarded, so the output of the test runner will look like how it was intended.
23
+ - By default, output will be written to `STDOUT` and `STDERR` normally for local test runs, and captured for CI runs. In CI (environments with `ENV["CI"]` set), out put will be captured and discarded, so the output of the test runner will look like how it was intended.
24
24
  - If you run tests with the `--verbose` option , it will be nicely included in the test runner's output, inside a box that will tell you what test it originated from.
25
- - You can also run this plugin in "strict mode": by running tests with the `--fail-on-output` option, tests will fail if they produce any output to STDOUT or STDERR.
25
+ - You can also run this plugin in "strict mode": by running tests with the `--fail-on-output` option, tests will fail if they produce any output to `STDOUT` or `STDERR`.
26
26
 
27
- You can disable the plugin by providing the `--disable-silence` command line option to your test invocation. The primary use case for this is when you want to use a debugger inside a test, which will require a the standard input and outputs to work interactively.
27
+ You can enable the plugin in any environment by providing the `--enable-silence` command line option to your test invocation. The primary use case for this is when you want to silence output locally.
28
28
 
29
29
  ## Development
30
30
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module Minitest
3
3
  module Silence
4
- VERSION = "0.2.3"
4
+ VERSION = "0.2.4"
5
5
  end
6
6
  end
@@ -54,8 +54,8 @@ module Minitest
54
54
 
55
55
  class << self
56
56
  def plugin_silence_options(opts, options)
57
- opts.on('--disable-silence', "Do not rebind standard IO") do
58
- options[:disable_silence] = true
57
+ opts.on('--enable-silence', "Rebind standard IO") do
58
+ options[:enable_silence] = true
59
59
  end
60
60
  opts.on('--fail-on-output', "Fail a test when it writes to STDOUT or STDERR") do
61
61
  options[:fail_on_output] = true
@@ -63,7 +63,7 @@ module Minitest
63
63
  end
64
64
 
65
65
  def plugin_silence_init(options)
66
- unless options[:disable_silence]
66
+ if options[:enable_silence] || ENV["CI"]
67
67
  Minitest::Result.prepend(Minitest::Silence::ResultOutputPatch)
68
68
  Minitest.singleton_class.prepend(Minitest::Silence::RunOneMethodPatch)
69
69
 
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  DESCRIPTION
18
18
  spec.homepage = "https://github.com/Shopify/minitest-silence"
19
19
  spec.license = "MIT"
20
- spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
20
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
21
21
 
22
22
  spec.metadata["allowed_push_host"] = "https://rubygems.org"
23
23
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-silence
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Willem van Bergen
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-18 00:00:00.000000000 Z
11
+ date: 2021-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -61,7 +61,7 @@ metadata:
61
61
  allowed_push_host: https://rubygems.org
62
62
  homepage_uri: https://github.com/Shopify/minitest-silence
63
63
  source_code_uri: https://github.com/Shopify/minitest-silence
64
- post_install_message:
64
+ post_install_message:
65
65
  rdoc_options: []
66
66
  require_paths:
67
67
  - lib
@@ -69,7 +69,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
69
69
  requirements:
70
70
  - - ">="
71
71
  - !ruby/object:Gem::Version
72
- version: 2.3.0
72
+ version: 2.5.0
73
73
  required_rubygems_version: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - ">="
@@ -77,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
77
  version: '0'
78
78
  requirements: []
79
79
  rubygems_version: 3.0.3
80
- signing_key:
80
+ signing_key:
81
81
  specification_version: 4
82
82
  summary: Minitest plugin to suppress output from tests.
83
83
  test_files: []