wwtd 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/wwtd.rb +0 -1
- data/lib/wwtd/cli.rb +29 -20
- data/lib/wwtd/tasks.rb +1 -1
- data/lib/wwtd/version.rb +1 -1
- metadata +1 -2
- metadata.gz.sig +0 -0
- data/lib/wwtd/colors.rb +0 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bc9fc99c14b0d246c0fa04f9dd3555d8cace6be
|
4
|
+
data.tar.gz: 42c7cd96d020415b8e4809fb3bdfaffd1cee3964
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0c5eee13ac1855633dd96578029ee1bc777c625280940c5be2e0fb30c842ff534b1aa0ad5b33b4fb5b97cd39f7df4156b07511e68484fe9f86db0bdeb39282f
|
7
|
+
data.tar.gz: 848d096ac13598c827c2cccd3a828e85153d7329f265e4ed6b7eaade1b5b40e525322a8e15b7e3316519ecf825425619ccba069ea0ed47890f2acc3c82d8916e
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/wwtd.rb
CHANGED
data/lib/wwtd/cli.rb
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
module WWTD
|
2
2
|
module CLI
|
3
3
|
INFO_MAX_CHARACTERS = 30
|
4
|
-
|
4
|
+
STATE_COLOR_MAP = {:start => :yellow, :success => :green}
|
5
|
+
ASCII_COLORS = {:red => 31, :green => 32, :yellow => 33}
|
5
6
|
|
6
7
|
class << self
|
7
8
|
def run(argv=[])
|
8
9
|
# Read travis.yml
|
9
10
|
matrix, ignored = ::WWTD.read_travis_yml
|
10
|
-
puts "Ignoring: #{ignored.sort.join(", ")}"
|
11
|
+
puts "Ignoring: #{ignored.sort.join(", ")}" if ignored.any?
|
11
12
|
|
12
13
|
# Execute tests
|
13
14
|
results = ::WWTD.run(matrix, parse_options(argv)) do |state, config|
|
@@ -25,10 +26,28 @@ module WWTD
|
|
25
26
|
|
26
27
|
private
|
27
28
|
|
29
|
+
def parse_options(argv)
|
30
|
+
options = {}
|
31
|
+
OptionParser.new do |opts|
|
32
|
+
opts.banner = <<-BANNER.gsub(/^ {10}/, "")
|
33
|
+
WWTD: Travis simulator - faster + no more waiting for build emails
|
34
|
+
|
35
|
+
Usage:
|
36
|
+
wwtd
|
37
|
+
|
38
|
+
Options:
|
39
|
+
BANNER
|
40
|
+
opts.on("-p", "--parallel [PROCESSES]", Integer, "Run in parallel") { |c| options[:parallel] = c || Parallel.processor_count }
|
41
|
+
opts.on("-h", "--help", "Show this.") { puts opts; exit }
|
42
|
+
opts.on("-v", "--version", "Show Version"){ puts WWTD::VERSION; exit}
|
43
|
+
end.parse!(argv)
|
44
|
+
options
|
45
|
+
end
|
46
|
+
|
28
47
|
def info_line(state, config, matrix)
|
29
48
|
config_info = config_info(matrix, config)
|
30
|
-
color =
|
31
|
-
"#{
|
49
|
+
color = STATE_COLOR_MAP[state] || :red
|
50
|
+
"#{colorize(color, state.to_s.upcase)} #{config_info}"
|
32
51
|
end
|
33
52
|
|
34
53
|
# human readable config without options that are the same in all configs
|
@@ -51,22 +70,12 @@ module WWTD
|
|
51
70
|
end
|
52
71
|
end
|
53
72
|
|
54
|
-
def
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
Usage:
|
61
|
-
wwtd
|
62
|
-
|
63
|
-
Options:
|
64
|
-
BANNER
|
65
|
-
opts.on("-p", "--parallel [PROCESSES]", Integer, "Run in parallel") { |c| options[:parallel] = c || Parallel.processor_count }
|
66
|
-
opts.on("-h", "--help", "Show this.") { puts opts; exit }
|
67
|
-
opts.on("-v", "--version", "Show Version"){ puts WWTD::VERSION; exit}
|
68
|
-
end.parse!(argv)
|
69
|
-
options
|
73
|
+
def colorize(color, string)
|
74
|
+
if $stdout.tty?
|
75
|
+
"\e[#{ASCII_COLORS[color]}m#{string}\e[0m"
|
76
|
+
else
|
77
|
+
string
|
78
|
+
end
|
70
79
|
end
|
71
80
|
end
|
72
81
|
end
|
data/lib/wwtd/tasks.rb
CHANGED
data/lib/wwtd/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wwtd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
@@ -55,7 +55,6 @@ files:
|
|
55
55
|
- bin/wwtd
|
56
56
|
- lib/wwtd.rb
|
57
57
|
- lib/wwtd/cli.rb
|
58
|
-
- lib/wwtd/colors.rb
|
59
58
|
- lib/wwtd/ruby.rb
|
60
59
|
- lib/wwtd/tasks.rb
|
61
60
|
- lib/wwtd/version.rb
|
metadata.gz.sig
CHANGED
Binary file
|
data/lib/wwtd/colors.rb
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
module WWTD
|
2
|
-
module Colors
|
3
|
-
class << self
|
4
|
-
def tint(color, string)
|
5
|
-
if $stdout.tty?
|
6
|
-
"\e[#{color}m#{string}\e[0m"
|
7
|
-
else
|
8
|
-
string
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
def red(string)
|
13
|
-
tint(31, string)
|
14
|
-
end
|
15
|
-
|
16
|
-
def green(string)
|
17
|
-
tint(32, string)
|
18
|
-
end
|
19
|
-
|
20
|
-
def yellow(string)
|
21
|
-
tint(33, string)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|