minitest-rerun 0.1.1

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ae2a37170ef2a34572a56fbe7d4c50928eb6291b
4
+ data.tar.gz: c904b2e72856a2f2cd5dedad4ee399712364db36
5
+ SHA512:
6
+ metadata.gz: 0a66271ddfe3e05d596019610502132ef9c1ff1dcd3c6de51aa00f71b819b79f8dff5f07a5943dce56f538098b938ad883850ec32a48c71afe759b346d27beda
7
+ data.tar.gz: efd7dabb18f22c9acf2fc6beb79ce3efa247f83690bef57eb966e1419fdc3486ade7934d782d0891a10c122aa78225a609b6dfdbd8a77cb7769b5cdd42a51d5a
checksums.yaml.gz.sig ADDED
Binary file
data.tar.gz.sig ADDED
Binary file
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (C) 2013 Michael Grosser <michael@grosser.it>
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,53 @@
1
+ require "minitest/rerun/version"
2
+
3
+ module Minitest::Rerun
4
+ class << self
5
+ def rerun_command(msg)
6
+ info = msg.to_s.split("\n")[1]
7
+ location = info[/ \[(.*?):\d+\]:/]
8
+ name = info.sub(location, "")
9
+ "ruby #{test_file($1)} -n '#{name}'"
10
+ end
11
+
12
+ private
13
+
14
+ def test_file(location)
15
+ tests_run = $0.split(" ").select { |f| File.exist?(f) }
16
+ if tests_run.size == 1
17
+ tests_run.first
18
+ else
19
+ location.sub(/^\.\//, "").sub("#{Dir.pwd}/", "")
20
+ end
21
+ end
22
+ end
23
+
24
+ module M4
25
+ def status(*args)
26
+ if report.any?
27
+ rerun = report.map { |msg| Minitest::Rerun.rerun_command(msg) }
28
+ puts rerun
29
+ puts
30
+ end
31
+ super
32
+ end
33
+ end
34
+
35
+ module M5
36
+ def summary(*args)
37
+ failed = results.reject { |r| r.skipped? && !options[:verbose] }
38
+
39
+ if failed.any?
40
+ rerun = failed.map { |msg| Minitest::Rerun.rerun_command(msg) }
41
+ rerun.join("\n") + "\n\n" + super
42
+ else
43
+ super
44
+ end
45
+ end
46
+ end
47
+ end
48
+
49
+ if defined?(MiniTest::Unit::VERSION) && MiniTest::Unit::VERSION < "5.0"
50
+ MiniTest::Unit.send(:prepend, Minitest::Rerun::M4)
51
+ else
52
+ Minitest::SummaryReporter.send(:prepend, Minitest::Rerun::M5)
53
+ end
@@ -0,0 +1,5 @@
1
+ module Minitest
2
+ module Rerun
3
+ VERSION = "0.1.1"
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,82 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: minitest-rerun
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Michael Grosser
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN C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q7NIBRvmTzRaAghWcQn+Eyr5YLOfMksjVBMUMnzh5/ZDgq53LphgJbGwvz
29
+ ScJAgfNclLHnjk9q1mT1s0e1FPWbiAL3siBIR5HpH8qtSEiivTf2ntciebOqS93f
30
+ F5etKHZg0j3eHO31/i2HnswY04lqGImUu6aM5EnijFTB7PPW2KwKKM4+kKDYFdlw
31
+ /0WV1Ng2/Y6qsHwmqGg2VlYj2h4=
32
+ -----END CERTIFICATE-----
33
+ date: 2014-03-29 00:00:00.000000000 Z
34
+ dependencies:
35
+ - !ruby/object:Gem::Dependency
36
+ name: minitest
37
+ requirement: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ type: :runtime
43
+ prerelease: false
44
+ version_requirements: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ description:
50
+ email: michael@grosser.it
51
+ executables: []
52
+ extensions: []
53
+ extra_rdoc_files: []
54
+ files:
55
+ - MIT-LICENSE
56
+ - lib/minitest/rerun.rb
57
+ - lib/minitest/rerun/version.rb
58
+ homepage: https://github.com/grosser/minitest-rerun
59
+ licenses:
60
+ - MIT
61
+ metadata: {}
62
+ post_install_message:
63
+ rdoc_options: []
64
+ require_paths:
65
+ - lib
66
+ required_ruby_version: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: 2.0.0
71
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ requirements: []
77
+ rubyforge_project:
78
+ rubygems_version: 2.2.2
79
+ signing_key:
80
+ specification_version: 4
81
+ summary: Print copy pasteable rerun snippets after failed runs
82
+ test_files: []
metadata.gz.sig ADDED
Binary file