minitest-silence 0.2.3 → 0.2.4
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 +4 -4
- data/README.md +4 -4
- data/lib/minitest/silence/version.rb +1 -1
- data/lib/minitest/silence_plugin.rb +3 -3
- data/minitest-silence.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba38e3bdb96751df36f3ea01b1e81cf30bd4d0a4368c251ea6e1ddae9b443b2e
|
4
|
+
data.tar.gz: 796edae9f0796115e6ae2695e1c7bde32d587013ce2ac4582f6466fa1151a382
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
21
|
+
The plugin will be automatically loaded by Minitest if it is in your application's bundle.
|
22
22
|
|
23
|
-
- By default,
|
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
|
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
|
|
@@ -54,8 +54,8 @@ module Minitest
|
|
54
54
|
|
55
55
|
class << self
|
56
56
|
def plugin_silence_options(opts, options)
|
57
|
-
opts.on('--
|
58
|
-
options[:
|
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
|
-
|
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
|
|
data/minitest-silence.gemspec
CHANGED
@@ -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.
|
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.
|
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:
|
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.
|
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: []
|