single_cov 0.6.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 81dabd74adba78b4ea06071f16f574b6c227f38b
4
- data.tar.gz: 308331005d799052e2acd79c158d3f379db42afc
3
+ metadata.gz: 7834a79c1226437c3b1da59799ac89d0f00a1a8d
4
+ data.tar.gz: f458e6175feba9720a0c260552339b503bc7cbd2
5
5
  SHA512:
6
- metadata.gz: f5b03557d335abb303379858dd0a86b684d4874924bbabdd4909f6d436cb5fd01c6bfe0ff33098f6d609b0ef89ad5c5cab917da4abc9f1693d1d2322a9d889c0
7
- data.tar.gz: 8570e42cc6e45e479c16b3d29b2cdf6a3ec84437730010141b5265d96575e5ba42e1a328876fa289eece56a547204c77d0ce7df2ebe46c441c42a2541bbf93e7
6
+ metadata.gz: 0d152668983b6f7d1bad2e6f9a630fc47e71be701f37d1aa4c42a07c7fce0118ae06e4672cea695d68e49f588dad07db5a413666739453f543cb6afecf1631ae
7
+ data.tar.gz: 4358e509409719d8f7faed8e41574edcc2bf7288452ff5416ba9bbca741f54f94ebe2ddc2e533cb4711d1fb9a2a5b3e566edae444aff2efcf3098a5bbe38b4d8
@@ -1,3 +1,3 @@
1
1
  module SingleCov
2
- VERSION = "0.6.1"
2
+ VERSION = "0.7.0"
3
3
  end
data/lib/single_cov.rb CHANGED
@@ -215,12 +215,20 @@ module SingleCov
215
215
  else
216
216
  [
217
217
  "#{file} new uncovered lines introduced #{details}",
218
- "Lines missing coverage:",
218
+ red("Lines missing coverage:"),
219
219
  *uncovered_lines
220
220
  ].join("\n")
221
221
  end
222
222
  end
223
223
 
224
+ def red(text)
225
+ if $stdin.tty?
226
+ "\e[31m#{text}\e[0m"
227
+ else
228
+ text
229
+ end
230
+ end
231
+
224
232
  def warn_about_no_coverage(file)
225
233
  if $LOADED_FEATURES.include?("#{root}/#{file}")
226
234
  # we cannot enforce $LOADED_FEATURES during covered! since it would fail when multiple files are loaded
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: single_cov
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-20 00:00:00.000000000 Z
11
+ date: 2017-07-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: michael@grosser.it