minitest-cc 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/minitest/cc/reporter.rb +0 -10
- data/lib/minitest/cc/version.rb +1 -1
- data/lib/minitest/cc.rb +5 -0
- data/lib/minitest/cc_plugin.rb +0 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 848f6762978bb5db1d4bfb03e13ff466a9fc7111ee1525f5825a558863b026ae
|
4
|
+
data.tar.gz: fa59d3d0887831482fb6ea9ce737f841bd326d42808d3c3b89556f914657ba8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff8cc42c16e7b0baad675f64f275a3435b8f990d43dff8ccca0288888625c3480b4e20584a2dcbb58f231c996ecefcd98609431a00eeaafdeba863afab8c9b96
|
7
|
+
data.tar.gz: 469ca5c033d2f4075207cd070758592b2d43248bf212eb0cd395b824b30c67b1a994a13f02d7e0078fb7e4ff12416c9ac8bcb87c1b98231fd37cbb102e844f66
|
data/lib/minitest/cc/reporter.rb
CHANGED
@@ -1,19 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'minitest'
|
4
|
-
|
5
3
|
module Minitest
|
6
4
|
module Cc
|
7
5
|
# Reporter class extend of Minitest Reporter
|
8
|
-
# this get 5 important methods from the parent
|
9
|
-
# but we use only 2
|
10
6
|
class Reporter < Minitest::AbstractReporter
|
11
|
-
##
|
12
|
-
# Executed in the beginin of the minitest run
|
13
|
-
def start
|
14
|
-
Cc.start_coverage
|
15
|
-
end
|
16
|
-
|
17
7
|
##
|
18
8
|
# Executed in the final of the minitest run
|
19
9
|
def report
|
data/lib/minitest/cc/version.rb
CHANGED
data/lib/minitest/cc.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'minitest'
|
4
|
+
|
3
5
|
require_relative 'cc/version'
|
4
6
|
require_relative 'cc/reporter'
|
5
7
|
require_relative 'cc/file_coverage'
|
@@ -42,6 +44,7 @@ module Minitest
|
|
42
44
|
# @see https://runebook.dev/en/docs/ruby/coverage Coverage blog post explaining the use
|
43
45
|
# @see https://ruby-doc.org/stdlib-2.7.6/libdoc/coverage/rdoc/Coverage.html Documentation of the module
|
44
46
|
def start_coverage
|
47
|
+
require 'coverage'
|
45
48
|
Coverage.start(coverage_mode.collect { |m| [m, true] }.to_h)
|
46
49
|
end
|
47
50
|
|
@@ -54,6 +57,8 @@ module Minitest
|
|
54
57
|
@files.each { |f| puts f.to_s } if cc_mode == :per_file
|
55
58
|
puts resume if cc_mode == :resume
|
56
59
|
puts
|
60
|
+
rescue NameError
|
61
|
+
puts "\n\n[!] cc extension is installed but was not started."
|
57
62
|
end
|
58
63
|
|
59
64
|
##
|
data/lib/minitest/cc_plugin.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-cc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- a-chacon
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: 'Plugin for minitest, provide a minimal information of code coverage
|
14
14
|
to your test output. '
|