shindo 0.3.8 → 0.3.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CONTRIBUTING.md +18 -0
- data/CONTRIBUTORS.md +14 -0
- data/LICENSE.md +20 -0
- data/lib/shindo.rb +2 -3
- data/lib/shindo/bin.rb +5 -4
- data/lib/shindo/taciturn.rb +1 -0
- data/lib/shindo/verbose.rb +1 -0
- data/shindo.gemspec +16 -3
- data/tests/bin_tests.rb +16 -1
- data/tests/{build_error_tests.rb → data/contained-error} +9 -5
- data/tests/data/error +22 -0
- data/tests/data/sigint +4 -0
- data/tests/tests_helper.rb +2 -1
- metadata +43 -16
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 0e242a66a1e32f046b9679b17b4bfc81e6c96acca406c59a142a315192f18f91
|
4
|
+
data.tar.gz: 1b24e9ce0a145f077b3e30eb2bc2b6e6ea5f76a855adec26ebde472f9c139db3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: cfcc6bc96a24b0f0a986b53a587c27a1dbe391531206206ad29a908185e616f54f374b22970f1876becebc39a6365dba82c06e01bd380eac04a24959cc8f45dd
|
7
|
+
data.tar.gz: 8da45cf108ab6a42195f01d5d7b272c4bd9070bd177662ec8ef557c1f7bf24c68abde37fda0a3b14184a8249badc20f9ad3074403d0f196d94e43f5d6da67f20
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
## Getting Involved
|
2
|
+
|
3
|
+
New contributors are always welcome, when it doubt please ask questions. We strive to be an open and welcoming community. Please be nice to one another.
|
4
|
+
|
5
|
+
### Coding
|
6
|
+
|
7
|
+
* Pick a task:
|
8
|
+
* Offer feedback on open [pull requests](https://github.com/geemus/shindo/pulls).
|
9
|
+
* Review open [issues](https://github.com/geemus/shindo/issues) for things to help on.
|
10
|
+
* [Create an issue](https://github.com/geemus/shindo/issues/new) to start a discussion on additions or features.
|
11
|
+
* Fork the project, add your changes and tests to cover them in a topic branch.
|
12
|
+
* Commit your changes and rebase against `geemus/shindo` to ensure everything is up to date.
|
13
|
+
* [Submit a pull request](https://github.com/geemus/shindo/compare/).
|
14
|
+
|
15
|
+
### Non-Coding
|
16
|
+
|
17
|
+
* Offer feedback on open [issues](https://github.com/geemus/shindo/issues).
|
18
|
+
* Organize or volunteer at events.
|
data/CONTRIBUTORS.md
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
* Kenichi Kamiya <kachick1@gmail.com>
|
2
|
+
* Kevin Ball <kball@causes.com>
|
3
|
+
* Lee Jarvis <lee@jarvis.co>
|
4
|
+
* Lincoln Stoll <me@lstoll.net>
|
5
|
+
* Max Lincoln <max@devopsy.com>
|
6
|
+
* Sergio Rubio <rubiojr@frameos.org>
|
7
|
+
* Vít Ondruch <vondruch@redhat.com>
|
8
|
+
* Wesley Beary <geemus@engineyard.com>
|
9
|
+
* Wesley Beary <geemus@gmail.com>
|
10
|
+
* Wesley Beary <wbeary@engineyard.com>
|
11
|
+
* geemus (Wesley Beary) <geemus@gmail.com>
|
12
|
+
* geemus (Wesley Beary) <wbeary@engineyard.com>
|
13
|
+
* geemus <geemus@gmail.com>
|
14
|
+
* starbelly <starbelly@pobox.com>
|
data/LICENSE.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2009-2018 [CONTRIBUTORS.md](https://github.com/geemus/shindo/blob/master/CONTRIBUTORS.md)
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
7
|
+
the Software without restriction, including without limitation the rights to
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
10
|
+
subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
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, FITNESS
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/lib/shindo.rb
CHANGED
@@ -5,7 +5,7 @@ module Shindo
|
|
5
5
|
class Pending < StandardError; end
|
6
6
|
|
7
7
|
unless const_defined?(:VERSION)
|
8
|
-
VERSION = '0.3.
|
8
|
+
VERSION = '0.3.9'
|
9
9
|
end
|
10
10
|
|
11
11
|
def self.tests(description = nil, tags = [], &block)
|
@@ -22,7 +22,7 @@ module Shindo
|
|
22
22
|
@tag_stack = []
|
23
23
|
Thread.current[:reload] = false
|
24
24
|
Thread.current[:tags] ||= []
|
25
|
-
Thread.current[:totals] ||= { :failed => 0, :pending => 0, :skipped => 0, :succeeded => 0 }
|
25
|
+
Thread.current[:totals] ||= { :failed => 0, :errored => 0, :pending => 0, :skipped => 0, :succeeded => 0 }
|
26
26
|
@if_tagged = []
|
27
27
|
@unless_tagged = []
|
28
28
|
for tag in Thread.current[:tags]
|
@@ -81,7 +81,6 @@ module Shindo
|
|
81
81
|
display_pending(description)
|
82
82
|
rescue => error
|
83
83
|
display_error(error)
|
84
|
-
abort "An error occurred outside of a test"
|
85
84
|
ensure
|
86
85
|
# HACK: decrease indent
|
87
86
|
indent = Thread.current[:formatador].instance_variable_get(:@indent)
|
data/lib/shindo/bin.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__), '..', 'shindo')
|
2
2
|
|
3
|
-
@interrupt =
|
3
|
+
@interrupt = proc do
|
4
4
|
unless Thread.main[:exit]
|
5
5
|
Formatador.display_line('Gracefully Exiting... (ctrl-c to force)')
|
6
6
|
Thread.main[:exit] = true
|
@@ -20,7 +20,7 @@ if File.directory?('lib')
|
|
20
20
|
end
|
21
21
|
|
22
22
|
helpers = Dir.glob(File.join('tests', '**', '*helper.rb')).sort_by {|helper| helper.count(File::SEPARATOR)}
|
23
|
-
tags = []
|
23
|
+
tags, tests = [], nil
|
24
24
|
for argument in ARGV
|
25
25
|
if argument.match(/^[\+\-]/)
|
26
26
|
tags << argument
|
@@ -71,10 +71,11 @@ def run_in_thread(helpers, tests, thread_locals)
|
|
71
71
|
end
|
72
72
|
run_in_thread(helpers, tests, @thread_locals.merge({:tags => tags}))
|
73
73
|
|
74
|
-
@totals ||= { :failed => 0, :pending => 0, :succeeded => 0 }
|
75
|
-
@success = @totals[:failed] == 0
|
74
|
+
@totals ||= { :failed => 0, :errored => 0, :pending => 0, :succeeded => 0 }
|
75
|
+
@success = @totals[:failed] + @totals[:errored] == 0
|
76
76
|
status = []
|
77
77
|
status << "[red]#{@totals[:failed]} failed[/]," if @totals[:failed] > 0
|
78
|
+
status << "[red]#{@totals[:errored]} errored[/]," if @totals[:errored] > 0
|
78
79
|
status << "[yellow]#{@totals[:pending]} pending[/]," if @totals[:pending] > 0
|
79
80
|
status << "[green]#{@totals[:succeeded]} succeeded[/]"
|
80
81
|
status = status[0...-2].join(', ') << ' and ' << status[-1] if status.length > 3
|
data/lib/shindo/taciturn.rb
CHANGED
data/lib/shindo/verbose.rb
CHANGED
data/shindo.gemspec
CHANGED
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
|
|
13
13
|
## If your rubyforge_project name is different, then edit it and comment out
|
14
14
|
## the sub! line in the Rakefile
|
15
15
|
s.name = 'shindo'
|
16
|
-
s.version = '0.3.
|
17
|
-
s.date = '
|
16
|
+
s.version = '0.3.9'
|
17
|
+
s.date = '2020-12-04'
|
18
18
|
s.rubyforge_project = 'shindo'
|
19
19
|
|
20
20
|
## Make sure your summary is short. The description may be as long
|
@@ -53,13 +53,24 @@ Gem::Specification.new do |s|
|
|
53
53
|
## List your development dependencies here. Development dependencies are
|
54
54
|
## those that are only needed during development
|
55
55
|
# s.add_development_dependency('DEVDEPNAME', [">= 1.1.0", "< 2.0.0"])
|
56
|
+
|
57
|
+
if RUBY_VERSION.to_f <= 1.8
|
58
|
+
s.add_development_dependency('rake', '~> 10.5')
|
59
|
+
else
|
60
|
+
s.add_development_dependency('rake')
|
61
|
+
end
|
62
|
+
|
63
|
+
s.add_development_dependency('rdoc')
|
56
64
|
|
57
65
|
## Leave this section as-is. It will be automatically generated from the
|
58
66
|
## contents of your Git repository via the gemspec task. DO NOT REMOVE
|
59
67
|
## THE MANIFEST COMMENTS, they are used as delimiters by the task.
|
60
68
|
# = MANIFEST =
|
61
69
|
s.files = %w[
|
70
|
+
CONTRIBUTING.md
|
71
|
+
CONTRIBUTORS.md
|
62
72
|
Gemfile
|
73
|
+
LICENSE.md
|
63
74
|
README.rdoc
|
64
75
|
Rakefile
|
65
76
|
bin/shindo
|
@@ -72,12 +83,14 @@ Gem::Specification.new do |s|
|
|
72
83
|
shindo.gemspec
|
73
84
|
tests/basic_tests.rb
|
74
85
|
tests/bin_tests.rb
|
75
|
-
tests/
|
86
|
+
tests/data/contained-error
|
87
|
+
tests/data/error
|
76
88
|
tests/data/exception
|
77
89
|
tests/data/failure
|
78
90
|
tests/data/negative
|
79
91
|
tests/data/pending
|
80
92
|
tests/data/positive
|
93
|
+
tests/data/sigint
|
81
94
|
tests/data/success
|
82
95
|
tests/tag_tests.rb
|
83
96
|
tests/tests_helper.rb
|
data/tests/bin_tests.rb
CHANGED
@@ -28,4 +28,19 @@ Shindo.tests('bin') do
|
|
28
28
|
tests('$?.exitstatus').returns(0) { $?.exitstatus }
|
29
29
|
end
|
30
30
|
|
31
|
-
|
31
|
+
tests('error') do
|
32
|
+
@output = bin(path('error'))
|
33
|
+
includes('ok + returns true') { @output }
|
34
|
+
includes('1 errored, 1 succeeded') { @output }
|
35
|
+
|
36
|
+
tests('$?.exitstatus').returns(1) { $?.exitstatus }
|
37
|
+
end
|
38
|
+
|
39
|
+
tests('contained-error') do
|
40
|
+
@output = bin(path('contained-error'))
|
41
|
+
includes('ok + returns true') { @output }
|
42
|
+
includes('1 failed, 1 errored, 1 succeeded') { @output }
|
43
|
+
|
44
|
+
tests('$?.exitstatus').returns(1) { $?.exitstatus }
|
45
|
+
end
|
46
|
+
end
|
@@ -3,18 +3,22 @@ def given_something
|
|
3
3
|
end
|
4
4
|
|
5
5
|
Shindo.tests('Shindo build errors', ['build_error']) do
|
6
|
-
tests('
|
6
|
+
tests('ok').returns(true) do
|
7
7
|
true
|
8
8
|
end
|
9
9
|
|
10
|
-
|
10
|
+
tests('contained') do
|
11
11
|
given_something do
|
12
12
|
tests('success').returns(true) do
|
13
13
|
false
|
14
14
|
end
|
15
|
+
tests('never_reached').return(true) do
|
16
|
+
true
|
17
|
+
end
|
15
18
|
end
|
16
|
-
rescue
|
17
|
-
# an error occured above, but we intended it
|
18
19
|
end
|
19
|
-
end
|
20
20
|
|
21
|
+
tests('fail').returns(true) do
|
22
|
+
false
|
23
|
+
end
|
24
|
+
end
|
data/tests/data/error
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
def given_something
|
2
|
+
raise 'ERROR!'
|
3
|
+
end
|
4
|
+
|
5
|
+
Shindo.tests('Shindo build errors', ['build_error']) do
|
6
|
+
tests('ok').returns(true) do
|
7
|
+
true
|
8
|
+
end
|
9
|
+
|
10
|
+
given_something do
|
11
|
+
tests('success').returns(true) do
|
12
|
+
false
|
13
|
+
end
|
14
|
+
tests('never_reached').return(true) do
|
15
|
+
true
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
tests('fail').returns(true) do
|
20
|
+
false
|
21
|
+
end
|
22
|
+
end
|
data/tests/data/sigint
ADDED
data/tests/tests_helper.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'shindo'))
|
2
|
+
require 'open3'
|
2
3
|
|
3
4
|
BIN = File.join(File.dirname(__FILE__), '..', 'bin', 'shindo')
|
4
5
|
|
5
6
|
def bin(arguments)
|
6
|
-
`RUBYOPT="-
|
7
|
+
`RUBYOPT="-rrubygems" #{BIN} #{arguments}`
|
7
8
|
end
|
8
9
|
|
9
10
|
def path(name)
|
metadata
CHANGED
@@ -1,32 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shindo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
5
|
-
prerelease:
|
4
|
+
version: 0.3.9
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- geemus (Wesley Beary)
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2020-12-04 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: formatador
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 0.1.1
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: 0.1.1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rdoc
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
30
55
|
description: Work with your tests, not against them.
|
31
56
|
email: geemus@gmail.com
|
32
57
|
executables:
|
@@ -36,7 +61,10 @@ extensions: []
|
|
36
61
|
extra_rdoc_files:
|
37
62
|
- README.rdoc
|
38
63
|
files:
|
64
|
+
- CONTRIBUTING.md
|
65
|
+
- CONTRIBUTORS.md
|
39
66
|
- Gemfile
|
67
|
+
- LICENSE.md
|
40
68
|
- README.rdoc
|
41
69
|
- Rakefile
|
42
70
|
- bin/shindo
|
@@ -49,39 +77,38 @@ files:
|
|
49
77
|
- shindo.gemspec
|
50
78
|
- tests/basic_tests.rb
|
51
79
|
- tests/bin_tests.rb
|
52
|
-
- tests/
|
80
|
+
- tests/data/contained-error
|
81
|
+
- tests/data/error
|
53
82
|
- tests/data/exception
|
54
83
|
- tests/data/failure
|
55
84
|
- tests/data/negative
|
56
85
|
- tests/data/pending
|
57
86
|
- tests/data/positive
|
87
|
+
- tests/data/sigint
|
58
88
|
- tests/data/success
|
59
89
|
- tests/tag_tests.rb
|
60
90
|
- tests/tests_helper.rb
|
61
91
|
homepage: http://github.com/geemus/shindo
|
62
92
|
licenses: []
|
93
|
+
metadata: {}
|
63
94
|
post_install_message:
|
64
95
|
rdoc_options:
|
65
|
-
- --charset=UTF-8
|
96
|
+
- "--charset=UTF-8"
|
66
97
|
require_paths:
|
67
98
|
- lib
|
68
99
|
required_ruby_version: !ruby/object:Gem::Requirement
|
69
|
-
none: false
|
70
100
|
requirements:
|
71
|
-
- -
|
101
|
+
- - ">="
|
72
102
|
- !ruby/object:Gem::Version
|
73
103
|
version: '0'
|
74
104
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
|
-
none: false
|
76
105
|
requirements:
|
77
|
-
- -
|
106
|
+
- - ">="
|
78
107
|
- !ruby/object:Gem::Version
|
79
108
|
version: '0'
|
80
109
|
requirements: []
|
81
|
-
|
82
|
-
rubygems_version: 1.8.23
|
110
|
+
rubygems_version: 3.1.4
|
83
111
|
signing_key:
|
84
112
|
specification_version: 2
|
85
113
|
summary: Simple depth first Ruby testing.
|
86
114
|
test_files: []
|
87
|
-
has_rdoc:
|