minitest-coverage 1.0.0.b1 → 1.0.0.b3
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 +5 -5
- checksums.yaml.gz.sig +0 -0
- data/History.rdoc +21 -1
- data/Rakefile +2 -2
- data/bin/minitest_coverage +2 -0
- data/bin/minitest_coverage_baseline +16 -0
- data/bin/minitest_coverage_report +9 -0
- data/lib/coverage/pruner.rb +4 -0
- data/lib/minitest/coverage.rb +1 -1
- data/lib/minitest/coverage_plugin.rb +1 -4
- data/minitest-coverage.el +3 -0
- data/test/minitest/test_coverage.rb +3 -2
- data.tar.gz.sig +0 -0
- metadata +45 -29
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: e145342db682fc5d54b776569acffc35fbd673c9710ab96c5cb39601e57135c9
|
|
4
|
+
data.tar.gz: c7836299b3a38a0e5332bc22f11029dbd4bd7dc3be0df1be2621f07afc35a8d4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eddb4ed3493ba66a42b399a4f02b4f9f17882858ec372628468a990bf40c69398a6f23c93a0c113bc7f73ec074298807195e16d955f1de81efee20f78aaed37f
|
|
7
|
+
data.tar.gz: 6e1fa1add1fed44ea82cb924d5f3bf65ae59ffc8afb39b061c2312fdd1982fdca34cb15a4d2bf0efcfaf95abea0b987219cce0121b253c70691f7c4b309f3372
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/History.rdoc
CHANGED
|
@@ -1,6 +1,26 @@
|
|
|
1
|
+
=== 1.0.0.b3 / 2026-01-12
|
|
2
|
+
|
|
3
|
+
* 3 bug fixes:
|
|
4
|
+
|
|
5
|
+
* Bumped ruby dependency to 3.2+
|
|
6
|
+
* Don't call Coverage.start in minitest/coverage_plugin.rb
|
|
7
|
+
* MT6: Load coverage plugin in bin/minitest_coverage.
|
|
8
|
+
|
|
9
|
+
=== 1.0.0.b2 / 2017-05-09
|
|
10
|
+
|
|
11
|
+
* 3 minor enhancements:
|
|
12
|
+
|
|
13
|
+
* Added location discovery to baseline generation. Helps with mapping test to impl.
|
|
14
|
+
* Produce SimpleCov HTML report if simplecov is installed! (jamesdabbs)
|
|
15
|
+
* Stripped Dir.pwd from class/module locations on creation.
|
|
16
|
+
|
|
17
|
+
* 2 bug fixes:
|
|
18
|
+
|
|
19
|
+
* Added require_ruby_version to use 2.3+
|
|
20
|
+
* Turned rdoc generation back on. Gem hell resolved.
|
|
21
|
+
|
|
1
22
|
=== 1.0.0.b1 / 2016-09-12
|
|
2
23
|
|
|
3
24
|
* 1 major enhancement
|
|
4
25
|
|
|
5
26
|
* Birthday!
|
|
6
|
-
|
data/Rakefile
CHANGED
data/bin/minitest_coverage
CHANGED
|
@@ -12,6 +12,18 @@ if File.file? path then
|
|
|
12
12
|
require path
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
+
$mtc_location = Hash.new { |h,k| h[k] = [] }
|
|
16
|
+
|
|
17
|
+
class Object
|
|
18
|
+
def self.inherited x
|
|
19
|
+
pwd = Dir.pwd
|
|
20
|
+
where = caller.first.split(/:/, 2).first
|
|
21
|
+
return unless where.include? pwd
|
|
22
|
+
where = where[pwd.length+1..-1]
|
|
23
|
+
$mtc_location[x] << where
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
15
27
|
# TODO: app/** shouldn't be necessary given RAILS_ENV + environment.rb above.
|
|
16
28
|
Dir["app/**/*.rb", "lib/**/*.rb"].each do |path|
|
|
17
29
|
begin
|
|
@@ -22,4 +34,8 @@ Dir["app/**/*.rb", "lib/**/*.rb"].each do |path|
|
|
|
22
34
|
end
|
|
23
35
|
end
|
|
24
36
|
|
|
37
|
+
$mtc_location.each do |k,v|
|
|
38
|
+
$mtc_location[k] = v.uniq.sort.first
|
|
39
|
+
end
|
|
40
|
+
|
|
25
41
|
require "coverage/pruner"
|
|
@@ -14,6 +14,15 @@ ARGV.each do |input_path|
|
|
|
14
14
|
end
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
begin
|
|
18
|
+
require "simplecov"
|
|
19
|
+
SimpleCov.command_name "Minitest"
|
|
20
|
+
SimpleCov.add_filter "/test/"
|
|
21
|
+
SimpleCov::Formatter::HTMLFormatter.new.format SimpleCov::Result.new data
|
|
22
|
+
rescue LoadError
|
|
23
|
+
warn "NOTE: simplecov not found. Unable to generate HTML report."
|
|
24
|
+
end
|
|
25
|
+
|
|
17
26
|
puts "uncv covr% totl : path"
|
|
18
27
|
puts
|
|
19
28
|
puts data.map { |path, lines|
|
data/lib/coverage/pruner.rb
CHANGED
|
@@ -8,6 +8,10 @@ at_exit { # get behind minitest if we're running alongside
|
|
|
8
8
|
at_exit {
|
|
9
9
|
coverage = Coverage.result.reject(&pruner)
|
|
10
10
|
|
|
11
|
+
if defined? $mtc_location then
|
|
12
|
+
coverage[:mtc_location] = $mtc_location
|
|
13
|
+
end
|
|
14
|
+
|
|
11
15
|
File.open "coverage.json", "w" do |f|
|
|
12
16
|
f.puts JSON.pretty_generate coverage
|
|
13
17
|
end
|
data/lib/minitest/coverage.rb
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
require "coverage"
|
|
2
|
-
Coverage.start
|
|
3
|
-
|
|
4
2
|
require "minitest"
|
|
5
|
-
require "pp"
|
|
6
3
|
|
|
7
4
|
module Minitest
|
|
8
5
|
@coverage = false
|
|
@@ -23,7 +20,7 @@ module Minitest
|
|
|
23
20
|
def self.plugin_coverage_init options # :nodoc:
|
|
24
21
|
if @coverage then
|
|
25
22
|
require "coverage"
|
|
26
|
-
|
|
23
|
+
require_relative "coverage"
|
|
27
24
|
Minitest::Test.singleton_class.prepend Minitest::CoverageRunner
|
|
28
25
|
|
|
29
26
|
if String === @coverage then
|
data/minitest-coverage.el
CHANGED
|
@@ -28,7 +28,8 @@ class TestMinitest::TestCoverage < Minitest::Test
|
|
|
28
28
|
"--coverage",
|
|
29
29
|
]
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
nope = ENV["DEBUG"] ? "/dev/stdout" : "/dev/null"
|
|
32
|
+
Process.wait spawn(*cmd, out:nope, err:nope)
|
|
32
33
|
|
|
33
34
|
assert_operator File, :file?, CPATH
|
|
34
35
|
self.data = JSON.load File.read CPATH
|
|
@@ -64,6 +65,6 @@ class TestMinitest::TestCoverage < Minitest::Test
|
|
|
64
65
|
cover "example/test/test_example.rb", "example/test/test_indirect.rb"
|
|
65
66
|
|
|
66
67
|
assert_coverage "example/lib/indirect.rb", [1, N, 1, 1, 1, N, N]
|
|
67
|
-
assert_coverage "example/lib/example.rb", [1, 1,
|
|
68
|
+
assert_coverage "example/lib/example.rb", [1, 1, 1, N, N, 1, 2, N, N]
|
|
68
69
|
end
|
|
69
70
|
end
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: minitest-coverage
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.0.
|
|
4
|
+
version: 1.0.0.b3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryan Davis
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain:
|
|
11
10
|
- |
|
|
12
11
|
-----BEGIN CERTIFICATE-----
|
|
13
|
-
|
|
12
|
+
MIIDPjCCAiagAwIBAgIBCjANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
|
|
14
13
|
ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
|
|
15
|
-
|
|
14
|
+
GRYDY29tMB4XDTI2MDEwNzA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0xKY
|
|
27
|
+
xL84ipM5kr0bHGf9/MRZJWcw51urueNycBXu1Xh+pEN8qBmYsFRR4SIODLClybAO
|
|
28
|
+
6cbm2PyPQgKNiqE4H+IQrDVHd9bJs1XgLElk3qoaJBWXc/5fy0J1imYb25UqmiHG
|
|
29
|
+
snGe1hrppvBRdcyEzvhfIPjI
|
|
32
30
|
-----END CERTIFICATE-----
|
|
33
|
-
date:
|
|
31
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
34
32
|
dependencies:
|
|
33
|
+
- !ruby/object:Gem::Dependency
|
|
34
|
+
name: rdoc
|
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - ">="
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '6.0'
|
|
40
|
+
- - "<"
|
|
41
|
+
- !ruby/object:Gem::Version
|
|
42
|
+
version: '8'
|
|
43
|
+
type: :development
|
|
44
|
+
prerelease: false
|
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
46
|
+
requirements:
|
|
47
|
+
- - ">="
|
|
48
|
+
- !ruby/object:Gem::Version
|
|
49
|
+
version: '6.0'
|
|
50
|
+
- - "<"
|
|
51
|
+
- !ruby/object:Gem::Version
|
|
52
|
+
version: '8'
|
|
35
53
|
- !ruby/object:Gem::Dependency
|
|
36
54
|
name: hoe
|
|
37
55
|
requirement: !ruby/object:Gem::Requirement
|
|
38
56
|
requirements:
|
|
39
|
-
- - ~>
|
|
57
|
+
- - "~>"
|
|
40
58
|
- !ruby/object:Gem::Version
|
|
41
|
-
version: '
|
|
59
|
+
version: '4.5'
|
|
42
60
|
type: :development
|
|
43
61
|
prerelease: false
|
|
44
62
|
version_requirements: !ruby/object:Gem::Requirement
|
|
45
63
|
requirements:
|
|
46
|
-
- - ~>
|
|
64
|
+
- - "~>"
|
|
47
65
|
- !ruby/object:Gem::Version
|
|
48
|
-
version: '
|
|
66
|
+
version: '4.5'
|
|
49
67
|
description: |-
|
|
50
68
|
Ruby's contemporary test coverage tools all lie, exaggerating coverage
|
|
51
69
|
through false-positives and creating a false sense of security;
|
|
@@ -71,7 +89,7 @@ extra_rdoc_files:
|
|
|
71
89
|
- Manifest.txt
|
|
72
90
|
- README.rdoc
|
|
73
91
|
files:
|
|
74
|
-
- .autotest
|
|
92
|
+
- ".autotest"
|
|
75
93
|
- History.rdoc
|
|
76
94
|
- Manifest.txt
|
|
77
95
|
- README.rdoc
|
|
@@ -95,27 +113,25 @@ files:
|
|
|
95
113
|
homepage: https://github.com/seattlerb/minitest-coverage
|
|
96
114
|
licenses:
|
|
97
115
|
- MIT
|
|
98
|
-
metadata:
|
|
99
|
-
|
|
116
|
+
metadata:
|
|
117
|
+
homepage_uri: https://github.com/seattlerb/minitest-coverage
|
|
100
118
|
rdoc_options:
|
|
101
|
-
- --main
|
|
119
|
+
- "--main"
|
|
102
120
|
- README.rdoc
|
|
103
121
|
require_paths:
|
|
104
122
|
- lib
|
|
105
123
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
106
124
|
requirements:
|
|
107
|
-
- -
|
|
125
|
+
- - ">="
|
|
108
126
|
- !ruby/object:Gem::Version
|
|
109
|
-
version: '
|
|
127
|
+
version: '3.2'
|
|
110
128
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
129
|
requirements:
|
|
112
|
-
- -
|
|
130
|
+
- - ">="
|
|
113
131
|
- !ruby/object:Gem::Version
|
|
114
|
-
version:
|
|
132
|
+
version: '0'
|
|
115
133
|
requirements: []
|
|
116
|
-
|
|
117
|
-
rubygems_version: 2.4.5
|
|
118
|
-
signing_key:
|
|
134
|
+
rubygems_version: 3.7.2
|
|
119
135
|
specification_version: 4
|
|
120
136
|
summary: Ruby's contemporary test coverage tools all lie, exaggerating coverage through
|
|
121
137
|
false-positives and creating a false sense of security; minitest-coverage tries
|
metadata.gz.sig
CHANGED
|
Binary file
|