runyoufools 0.1.4 → 0.1.5
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/Gemfile.lock +1 -1
- data/README.md +13 -2
- data/bin/runyoufools +18 -14
- data/lib/runyoufools/runner.rb +4 -2
- data/lib/runyoufools/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 97b8a71c54b97a1ce5f2d49891ac6071baa42fd7
|
|
4
|
+
data.tar.gz: 1acae12f07942d3aaefdae449ad21ca71eecdddd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f730625fdcce6f7fc7484b0595d6ff9c24c4ba41ca03bc0071405d0685629643e29622f7ad664e3a71fd318a0d5ce84f4c237abfd9e9b96d7cc55f9afa7d6678
|
|
7
|
+
data.tar.gz: 20b17a3bed1bfd091b6bd5ae80b3fbfc88a7743a82a3e8410e4f6148e4019e01ef0c326eaf853068cb5115fca5584b8dd0bc3645d0df1f6bbbf725fb0afdbd57
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -27,11 +27,15 @@ RunYouFools is a ruby gem:
|
|
|
27
27
|
|
|
28
28
|
$ gem install runyoufools
|
|
29
29
|
|
|
30
|
-
Once it is installed,
|
|
30
|
+
Once it is installed, run it with:
|
|
31
31
|
|
|
32
32
|
$ runyoufools --help
|
|
33
33
|
|
|
34
|
-
To get an explanation.
|
|
34
|
+
To get an explanation.
|
|
35
|
+
|
|
36
|
+
# Basic Operation
|
|
37
|
+
|
|
38
|
+
Basically, you specify a filename pattern with `--pattern`,
|
|
35
39
|
which RunYouFools uses to determine which files are tests (all relative the
|
|
36
40
|
current directory). The pattern is a *regular expression*, *NOT* a "glob".
|
|
37
41
|
Google regular expressions if you don't know what they are.
|
|
@@ -44,6 +48,13 @@ Note that if you do not include the final `/`, RunYouFools might try to run a fi
|
|
|
44
48
|
|
|
45
49
|
The pattern is *MANDATORY*.
|
|
46
50
|
|
|
51
|
+
# Adjusting The Pattern
|
|
52
|
+
|
|
53
|
+
If you're not entirely sure which pattern you should specify, use the `--list` option.
|
|
54
|
+
|
|
55
|
+
$ runyoufools --pattern test/system/ --list
|
|
56
|
+
|
|
57
|
+
This will tell RunYouFools to only *print* the test files it finds, *without* actually running them.
|
|
47
58
|
|
|
48
59
|
# What if I don't want my test files to be executable?
|
|
49
60
|
|
data/bin/runyoufools
CHANGED
|
@@ -5,21 +5,21 @@ require 'ostruct'
|
|
|
5
5
|
|
|
6
6
|
module Runyoufools
|
|
7
7
|
|
|
8
|
-
def self.main( options )
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
def self.main( options )
|
|
9
|
+
runner = Runner.new( options )
|
|
10
|
+
start = Time.now
|
|
11
|
+
runner.go
|
|
12
|
+
durationMinutes = "%.2f" % ( ( Time.now - start ) / 60 )
|
|
13
|
+
puts "\n\n"
|
|
14
|
+
say "TESTS OVER - SUMMARY".white.bold
|
|
15
|
+
say_list runner.results[ :pass ]
|
|
16
|
+
say_list runner.results[ :fail ]
|
|
17
|
+
say "====== OVERALL ======".white.bold
|
|
18
|
+
say "#{runner.message}"
|
|
19
|
+
say "#{durationMinutes} minutes."
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
end
|
|
21
|
+
exit( runner.success )
|
|
22
|
+
end
|
|
23
23
|
|
|
24
24
|
end
|
|
25
25
|
|
|
@@ -27,6 +27,7 @@ options = OpenStruct.new
|
|
|
27
27
|
options.pattern = nil
|
|
28
28
|
options.command = nil
|
|
29
29
|
options.retries = 1
|
|
30
|
+
options.list = false
|
|
30
31
|
|
|
31
32
|
parser = OptionParser.new
|
|
32
33
|
parser.banner = "RunYouFools! - a test runner"
|
|
@@ -39,6 +40,9 @@ end
|
|
|
39
40
|
parser.on "--retries=NUMBER", '-r', 'number of retries (default: 1)' do |retries|
|
|
40
41
|
options.retries = retries.to_i
|
|
41
42
|
end
|
|
43
|
+
parser.on "--list", '-l', 'only list the tests found - do not actually run them' do |retries|
|
|
44
|
+
options.list = true
|
|
45
|
+
end
|
|
42
46
|
|
|
43
47
|
parser.parse!
|
|
44
48
|
if options.pattern == nil
|
data/lib/runyoufools/runner.rb
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
require 'fileutils'
|
|
2
|
-
require 'pp'
|
|
3
2
|
|
|
4
3
|
module Runyoufools
|
|
5
4
|
|
|
@@ -11,7 +10,10 @@ class Runner
|
|
|
11
10
|
@tests = []
|
|
12
11
|
find_tests
|
|
13
12
|
Runyoufools.log :info, "found #{@tests.count} tests:"
|
|
14
|
-
|
|
13
|
+
@tests.each do |test|
|
|
14
|
+
puts test
|
|
15
|
+
end
|
|
16
|
+
exit( 0 ) if options.list
|
|
15
17
|
@results = { fail: [], pass: [] }
|
|
16
18
|
end
|
|
17
19
|
|
data/lib/runyoufools/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: runyoufools
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yoav Kleinberger
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-04-
|
|
11
|
+
date: 2015-04-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|