minitest-utils 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/minitest/utils/reporter.rb +15 -2
- data/lib/minitest/utils/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: 4133da410c70092ff9e63a0d169364a74776ea40
|
4
|
+
data.tar.gz: 3217e7fb9c40e60b281f16045652caeeeaf6cfc9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a949dc3addeeac7e97b6c13b16d7323230bb5e9660e388ffeaa9cba2916f4ee5b322f731cf00631ea1b33c6f1a4911a62de53f311163724dd5fd5754ba80d461
|
7
|
+
data.tar.gz: e9d78f5d7c79e7d815cb42cb8692a0622f8db836326d92162017b95fc325b154e5f111c2b6ac267f52716da815a4507909aa50d053bb1224b4af6d554de9a720
|
@@ -15,6 +15,11 @@ module Minitest
|
|
15
15
|
blue: 34
|
16
16
|
}
|
17
17
|
|
18
|
+
def initialize(*)
|
19
|
+
super
|
20
|
+
@color_enabled = io.respond_to?(:tty?) && io.tty?
|
21
|
+
end
|
22
|
+
|
18
23
|
def statistics
|
19
24
|
super
|
20
25
|
end
|
@@ -141,8 +146,16 @@ module Minitest
|
|
141
146
|
end
|
142
147
|
|
143
148
|
def color(string, color = :default)
|
144
|
-
|
145
|
-
|
149
|
+
if color_enabled?
|
150
|
+
color = COLOR.fetch(color, 0)
|
151
|
+
"\e[#{color}m#{string}\e[0m"
|
152
|
+
else
|
153
|
+
string
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
def color_enabled?
|
158
|
+
@color_enabled
|
146
159
|
end
|
147
160
|
|
148
161
|
def pluralize(word, count)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nando Vieira
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|