minitest-silence 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/ruby.yml +37 -0
- data/.gitignore +8 -0
- data/.rubocop.yml +32 -0
- data/.travis.yml +6 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +42 -0
- data/LICENSE.txt +21 -0
- data/README.md +37 -0
- data/Rakefile +13 -0
- data/bin/console +15 -0
- data/bin/rake +29 -0
- data/bin/rubocop +29 -0
- data/bin/setup +8 -0
- data/lib/minitest/silence/boxed_output_reporter.rb +14 -0
- data/lib/minitest/silence/fail_on_output_reporter.rb +19 -0
- data/lib/minitest/silence/version.rb +6 -0
- data/lib/minitest/silence_plugin.rb +69 -0
- data/minitest-silence.gemspec +37 -0
- metadata +84 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f6db18145fa32f96ca4c2f3ca5fe7099949b0603ee5fdff92981564f1b18e606
|
4
|
+
data.tar.gz: 456dcf9fe20ddc6302d1c1a611958c65752d3177f31184ab467a9ff53d9946ff
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fa01057df17eb458c34fa559e5b108583cc614b669d85657eb22d254e5ad6b171257f0a39291eb87bb93a93723a8624fbdc8804571fd4c2bd38ab14824be050f
|
7
|
+
data.tar.gz: 6f318bca2ebe5dab21ab5f07ad32ace16b9d02838d25d96d72c8ce843096b1166b03ca79a1f5aa2ccc71944c6f42d7cda6af1a33e3dcacdf6c81433230fa4c55
|
@@ -0,0 +1,37 @@
|
|
1
|
+
name: Ruby
|
2
|
+
|
3
|
+
on: push
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
test:
|
7
|
+
name: "Tests (on Ruby ${{ matrix.ruby_version }})"
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
strategy:
|
10
|
+
fail-fast: false
|
11
|
+
matrix:
|
12
|
+
ruby_version: [2.5, 2.6, 2.7]
|
13
|
+
|
14
|
+
steps:
|
15
|
+
- name: Set up Ruby ${{ matrix.ruby_version }}
|
16
|
+
uses: actions/setup-ruby@v1
|
17
|
+
with:
|
18
|
+
ruby-version: ${{ matrix.ruby_version }}
|
19
|
+
- uses: actions/checkout@v2
|
20
|
+
- name: Install dependencies
|
21
|
+
run: gem update --system && gem install bundler && bundle install
|
22
|
+
- name: Run tests
|
23
|
+
run: bin/rake test
|
24
|
+
|
25
|
+
lint:
|
26
|
+
name: "Lint (using Rubocop)"
|
27
|
+
runs-on: ubuntu-latest
|
28
|
+
steps:
|
29
|
+
- name: Set up Ruby 2.5
|
30
|
+
uses: actions/setup-ruby@v1
|
31
|
+
with:
|
32
|
+
ruby-version: 2.5
|
33
|
+
- uses: actions/checkout@v2
|
34
|
+
- name: Install dependencies
|
35
|
+
run: gem install bundler && bundle install
|
36
|
+
- name: Lint Ruby code
|
37
|
+
run: bin/rubocop
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
inherit_gem:
|
2
|
+
rubocop-shopify: rubocop.yml
|
3
|
+
|
4
|
+
AllCops:
|
5
|
+
TargetRubyVersion: 2.5
|
6
|
+
UseCache: true
|
7
|
+
CacheRootDirectory: tmp/rubocop
|
8
|
+
Exclude:
|
9
|
+
- minitest-stateful.gemspec
|
10
|
+
|
11
|
+
Style/MethodCallWithArgsParentheses:
|
12
|
+
IgnoredMethods:
|
13
|
+
- require
|
14
|
+
- require_relative
|
15
|
+
- raise
|
16
|
+
- assert
|
17
|
+
- refute
|
18
|
+
- assert_equal
|
19
|
+
- refute_equal
|
20
|
+
- assert_nil
|
21
|
+
- refute_nil
|
22
|
+
- assert_predicate
|
23
|
+
- refute_predicate
|
24
|
+
- assert_empty
|
25
|
+
- refute_empty
|
26
|
+
- assert_includes
|
27
|
+
- refute_includes
|
28
|
+
- flunk
|
29
|
+
|
30
|
+
# This cop is still broken
|
31
|
+
Layout/RescueEnsureAlignment:
|
32
|
+
Enabled: false
|
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at willem@vanbergen.org. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [https://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: https://contributor-covenant.org
|
74
|
+
[version]: https://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
minitest-silence (0.1.0)
|
5
|
+
minitest (~> 5.12)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
ast (2.4.0)
|
11
|
+
jaro_winkler (1.5.4)
|
12
|
+
minitest (5.14.1)
|
13
|
+
parallel (1.19.1)
|
14
|
+
parser (2.7.1.3)
|
15
|
+
ast (~> 2.4.0)
|
16
|
+
rainbow (3.0.0)
|
17
|
+
rake (12.3.3)
|
18
|
+
rexml (3.2.4)
|
19
|
+
rubocop (0.82.0)
|
20
|
+
jaro_winkler (~> 1.5.1)
|
21
|
+
parallel (~> 1.10)
|
22
|
+
parser (>= 2.7.0.1)
|
23
|
+
rainbow (>= 2.2.2, < 4.0)
|
24
|
+
rexml
|
25
|
+
ruby-progressbar (~> 1.7)
|
26
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
27
|
+
rubocop-shopify (1.0.2)
|
28
|
+
rubocop (~> 0.82.0)
|
29
|
+
ruby-progressbar (1.10.1)
|
30
|
+
unicode-display_width (1.7.0)
|
31
|
+
|
32
|
+
PLATFORMS
|
33
|
+
ruby
|
34
|
+
|
35
|
+
DEPENDENCIES
|
36
|
+
minitest (~> 5.0)
|
37
|
+
minitest-silence!
|
38
|
+
rake (~> 12.0)
|
39
|
+
rubocop-shopify
|
40
|
+
|
41
|
+
BUNDLED WITH
|
42
|
+
2.1.4
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2020 Willem van Bergen
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# Minitest::Silence
|
2
|
+
|
3
|
+
Minitest plugin to suppress output from tests. This plugin will buffer any output coming from a test going to STDOUT or STDERR, to make sure it doesn't interfere with the output of the test runner itself. By default, it will discard any output, unless the `--verbose` option is set. It also supports failing a test if it is writing anything to STDOUT or STDERR by setting the `--fail-on-output` command line option.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile, and run `bundle install`:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'minitest-silence', require: false
|
11
|
+
```
|
12
|
+
|
13
|
+
## Usage
|
14
|
+
|
15
|
+
The plugin will be automatically activated by Minitest if it is in your application's bundle.
|
16
|
+
|
17
|
+
- By default, it will simply discard any output writting to `STDOUT` or `STDERR` by your tests.
|
18
|
+
- When specifying `--verbose`, the output will be buffered and written to the `STDOUT` inside a box that makes clear what test the output originated from.
|
19
|
+
- When running with the `--fail-on-output` option, a test will fail if it writes anything to either `STDOUT` or `STDERR`.
|
20
|
+
|
21
|
+
## Development
|
22
|
+
|
23
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
24
|
+
|
25
|
+
To install this gem onto your local machine, run `bin/rake install`. To release a new version, update the version number in `version.rb`, and then run `bin/rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
26
|
+
|
27
|
+
## Contributing
|
28
|
+
|
29
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/Shopifyminitest-silence. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/Shopify/minitest-silence/blob/master/CODE_OF_CONDUCT.md).
|
30
|
+
|
31
|
+
## License
|
32
|
+
|
33
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
34
|
+
|
35
|
+
## Code of Conduct
|
36
|
+
|
37
|
+
Everyone interacting in the Minitest::Silence project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/Shopify/minitest-silence/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require "bundler/gem_tasks"
|
3
|
+
require "rake/testtask"
|
4
|
+
|
5
|
+
Rake::TestTask.new(:test) do |t|
|
6
|
+
t.libs << "test"
|
7
|
+
t.libs << "lib"
|
8
|
+
t.test_files = FileList["test/**/*_test.rb"] -
|
9
|
+
FileList["test/lib/**/*_test.rb"] -
|
10
|
+
FileList["test/fixtures/**/*_test.rb"]
|
11
|
+
end
|
12
|
+
|
13
|
+
task(default: :test)
|
data/bin/console
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "bundler/setup"
|
5
|
+
require "minitest/silence"
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
+
# require "pry"
|
12
|
+
# Pry.start
|
13
|
+
|
14
|
+
require "irb"
|
15
|
+
IRB.start(__FILE__)
|
data/bin/rake
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'rake' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load(Gem.bin_path("rake", "rake"))
|
data/bin/rubocop
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'rubocop' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load(Gem.bin_path("rubocop", "rubocop"))
|
data/bin/setup
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Minitest
|
4
|
+
module Silence
|
5
|
+
class BoxedOutputReporter < Minitest::Reporter
|
6
|
+
def record(result)
|
7
|
+
unless result.output.empty?
|
8
|
+
io.puts(Minitest::Silence.boxed("Output from #{result.class_name}##{result.name}", result.output))
|
9
|
+
io.puts
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Minitest
|
4
|
+
module Silence
|
5
|
+
class FailOnOutputReporter < Minitest::Reporter
|
6
|
+
def record(result)
|
7
|
+
unless result.output.empty?
|
8
|
+
assertion = Minitest::Assertion.new(<<~EOM.chomp)
|
9
|
+
The test unexpectedly wrote output to STDOUT or STDERR.
|
10
|
+
|
11
|
+
#{Minitest::Silence.boxed('Output', result.output)}
|
12
|
+
EOM
|
13
|
+
assertion.set_backtrace(caller)
|
14
|
+
result.failures << assertion
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "minitest/silence/fail_on_output_reporter"
|
4
|
+
require "minitest/silence/boxed_output_reporter"
|
5
|
+
require "minitest/silence/version"
|
6
|
+
require "io/console"
|
7
|
+
|
8
|
+
module Minitest
|
9
|
+
module Silence
|
10
|
+
Error = Class.new(StandardError)
|
11
|
+
UnexpectedOutput = Class.new(Error)
|
12
|
+
|
13
|
+
module ResultOutputPatch
|
14
|
+
attr_accessor :output
|
15
|
+
end
|
16
|
+
|
17
|
+
module RunOneMethodPatch
|
18
|
+
def run_one_method(klass, method_name)
|
19
|
+
output_reader, output_writer = IO.pipe
|
20
|
+
output_thread = Thread.new { output_reader.read }
|
21
|
+
|
22
|
+
old_stdout = $stdout.dup
|
23
|
+
old_stderr = $stderr.dup
|
24
|
+
|
25
|
+
result = begin
|
26
|
+
$stdout.reopen(output_writer)
|
27
|
+
$stderr.reopen(output_writer)
|
28
|
+
super
|
29
|
+
ensure
|
30
|
+
$stdout.reopen(old_stdout)
|
31
|
+
$stderr.reopen(old_stderr)
|
32
|
+
output_writer.close
|
33
|
+
end
|
34
|
+
|
35
|
+
result.output = output_thread.value
|
36
|
+
result
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
class << self
|
41
|
+
def boxed(title, content)
|
42
|
+
box = +"── #{title} ──\n"
|
43
|
+
box << "#{content}\n"
|
44
|
+
box << "───#{'─' * title.length}───\n"
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
class << self
|
50
|
+
def plugin_silence_options(opts, options)
|
51
|
+
opts.on('--fail-on-output', "Fail a test when it writes to STDOUT or STDERR") do
|
52
|
+
options[:fail_on_output] = true
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def plugin_silence_init(options)
|
57
|
+
Minitest::Result.prepend(Minitest::Silence::ResultOutputPatch)
|
58
|
+
Minitest.singleton_class.prepend(Minitest::Silence::RunOneMethodPatch)
|
59
|
+
|
60
|
+
if options[:fail_on_output]
|
61
|
+
# We have to make sure this reporter runs as the first reporter, so it can still adjust
|
62
|
+
# the result and other reporters will take the change into account.
|
63
|
+
reporter.reporters.unshift(Minitest::Silence::FailOnOutputReporter.new(options[:io], options))
|
64
|
+
elsif options[:verbose]
|
65
|
+
reporter << Minitest::Silence::BoxedOutputReporter.new(options[:io], options)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_relative 'lib/minitest/silence/version'
|
3
|
+
|
4
|
+
Gem::Specification.new do |spec|
|
5
|
+
spec.name = "minitest-silence"
|
6
|
+
spec.version = Minitest::Silence::VERSION
|
7
|
+
spec.authors = ["Willem van Bergen"]
|
8
|
+
spec.email = ["willem@vanbergen.org"]
|
9
|
+
|
10
|
+
spec.summary = 'Minitest plugin to suppress output from tests.'
|
11
|
+
spec.description = <<~DESCRIPTION
|
12
|
+
Minitest plugin to suppress output from tests. This plugin will buffer any output coming from
|
13
|
+
a test going to STDOUT or STDERR, to make sure it doesn't interfere with the output of the test
|
14
|
+
runner itself. By default, it will discard any output, unless the `--verbose` option is set
|
15
|
+
It also supports failing a test if it is writing anything to STDOUT or STDERR by setting the
|
16
|
+
`--fail-on-output` command line option.
|
17
|
+
DESCRIPTION
|
18
|
+
spec.homepage = "https://github.com/Shopify/minitest-silence"
|
19
|
+
spec.license = "MIT"
|
20
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
21
|
+
|
22
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
23
|
+
|
24
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
25
|
+
spec.metadata["source_code_uri"] = "https://github.com/Shopify/minitest-silence"
|
26
|
+
|
27
|
+
# Specify which files should be added to the gem when it is released.
|
28
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
29
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
30
|
+
%x(git ls-files -z).split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
31
|
+
end
|
32
|
+
spec.bindir = "exe"
|
33
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
34
|
+
spec.require_paths = ["lib"]
|
35
|
+
|
36
|
+
spec.add_dependency("minitest", "~> 5.12")
|
37
|
+
end
|
metadata
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: minitest-silence
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Willem van Bergen
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-06-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: minitest
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '5.12'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '5.12'
|
27
|
+
description: |
|
28
|
+
Minitest plugin to suppress output from tests. This plugin will buffer any output coming from
|
29
|
+
a test going to STDOUT or STDERR, to make sure it doesn't interfere with the output of the test
|
30
|
+
runner itself. By default, it will discard any output, unless the `--verbose` option is set
|
31
|
+
It also supports failing a test if it is writing anything to STDOUT or STDERR by setting the
|
32
|
+
`--fail-on-output` command line option.
|
33
|
+
email:
|
34
|
+
- willem@vanbergen.org
|
35
|
+
executables: []
|
36
|
+
extensions: []
|
37
|
+
extra_rdoc_files: []
|
38
|
+
files:
|
39
|
+
- ".github/workflows/ruby.yml"
|
40
|
+
- ".gitignore"
|
41
|
+
- ".rubocop.yml"
|
42
|
+
- ".travis.yml"
|
43
|
+
- CODE_OF_CONDUCT.md
|
44
|
+
- Gemfile
|
45
|
+
- Gemfile.lock
|
46
|
+
- LICENSE.txt
|
47
|
+
- README.md
|
48
|
+
- Rakefile
|
49
|
+
- bin/console
|
50
|
+
- bin/rake
|
51
|
+
- bin/rubocop
|
52
|
+
- bin/setup
|
53
|
+
- lib/minitest/silence/boxed_output_reporter.rb
|
54
|
+
- lib/minitest/silence/fail_on_output_reporter.rb
|
55
|
+
- lib/minitest/silence/version.rb
|
56
|
+
- lib/minitest/silence_plugin.rb
|
57
|
+
- minitest-silence.gemspec
|
58
|
+
homepage: https://github.com/Shopify/minitest-silence
|
59
|
+
licenses:
|
60
|
+
- MIT
|
61
|
+
metadata:
|
62
|
+
allowed_push_host: https://rubygems.org
|
63
|
+
homepage_uri: https://github.com/Shopify/minitest-silence
|
64
|
+
source_code_uri: https://github.com/Shopify/minitest-silence
|
65
|
+
post_install_message:
|
66
|
+
rdoc_options: []
|
67
|
+
require_paths:
|
68
|
+
- lib
|
69
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: 2.3.0
|
74
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
|
+
requirements:
|
76
|
+
- - ">="
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '0'
|
79
|
+
requirements: []
|
80
|
+
rubygems_version: 3.1.2
|
81
|
+
signing_key:
|
82
|
+
specification_version: 4
|
83
|
+
summary: Minitest plugin to suppress output from tests.
|
84
|
+
test_files: []
|