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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 86bcc7a21e9f3139f23a5b705948c08a6556a096
4
- data.tar.gz: 86387a496d64055c920b5f7fb37a793c6c747521
2
+ SHA256:
3
+ metadata.gz: e145342db682fc5d54b776569acffc35fbd673c9710ab96c5cb39601e57135c9
4
+ data.tar.gz: c7836299b3a38a0e5332bc22f11029dbd4bd7dc3be0df1be2621f07afc35a8d4
5
5
  SHA512:
6
- metadata.gz: ee5f01db049c2c840c96dbde539fa237815a066b77fb4b5304ebcd9150c4983735922e60354b72adcdc5b23d63670ae0821a17e347365a49bcba44e7e2ca757c
7
- data.tar.gz: b839b72737afdbea82c9f3891b940728c93d563af43e13c56557ecc28f95a57c02bf1b9e877889124ddc8443cf3b629547e9e4437ef3a97d2deee86ca1f041d7
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
@@ -10,9 +10,9 @@ Hoe.plugin :rdoc
10
10
  Hoe.spec "minitest-coverage" do
11
11
  developer "Ryan Davis", "ryand-ruby@zenspider.com"
12
12
 
13
- self.need_rdoc = false
14
-
15
13
  license "MIT"
14
+
15
+ require_ruby_version ">= 3.2"
16
16
  end
17
17
 
18
18
  # vim: syntax=ruby
@@ -7,6 +7,8 @@ $: << "."
7
7
  require "coverage/start"
8
8
  require "minitest/autorun"
9
9
 
10
+ Minitest.load :coverage if Minitest.respond_to? :load
11
+
10
12
  new_argv = []
11
13
 
12
14
  ARGV.each do |path_or_glob|
@@ -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|
@@ -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
@@ -2,7 +2,7 @@ module Minitest; end
2
2
 
3
3
  module Minitest
4
4
  module CoverageRunner
5
- VERSION = "1.0.0.b1"
5
+ VERSION = "1.0.0.b3"
6
6
 
7
7
  def self.coverage_baseline
8
8
  @@coverage_baseline
@@ -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
- require "minitest/coverage"
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
@@ -61,3 +61,6 @@
61
61
 
62
62
  ;; (with-current-buffer (window-buffer (next-window)) (mtc-update))
63
63
  ;; (with-current-buffer (window-buffer (next-window)) (mtc-clear))
64
+
65
+ ;; (global-set-key (kbd "C-c u") 'mtc-update)
66
+ ;; (global-set-key (kbd "C-c U") 'mtc-clear)
@@ -28,7 +28,8 @@ class TestMinitest::TestCoverage < Minitest::Test
28
28
  "--coverage",
29
29
  ]
30
30
 
31
- Process.wait spawn(*cmd, :out => "/dev/null", :err => "/dev/null")
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, 0, N, N, 1, 1, N, N]
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.b1
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
- MIIDijCCAnKgAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
12
+ MIIDPjCCAiagAwIBAgIBCjANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
14
13
  ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
15
- GRYDY29tMB4XDTE2MDkyNjAxNTczNVoXDTE3MDkyNjAxNTczNVowRTETMBEGA1UE
14
+ GRYDY29tMB4XDTI2MDEwNzAxMDkxNFoXDTI3MDEwNzAxMDkxNFowRTETMBEGA1UE
16
15
  AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
17
16
  JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
18
17
  b9DCgK+627gPJkB6XfjZ1itoOQvpqH1E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rtBvPsYvqRuwI1bWUtil
25
+ 2ibJEfIuSIHX6BsUTX18+hlaIussf6EWq/YkE7e2BKmgQE42vSOZMce0kCEAPbx0
26
+ rQtqonfWTHQ8UbQ7GqCL3gDQ0QDD2B+HUlb4uaCZ2icxqa/eOtxMvHC2tj+h0xKY
27
+ xL84ipM5kr0bHGf9/MRZJWcw51urueNycBXu1Xh+pEN8qBmYsFRR4SIODLClybAO
28
+ 6cbm2PyPQgKNiqE4H+IQrDVHd9bJs1XgLElk3qoaJBWXc/5fy0J1imYb25UqmiHG
29
+ snGe1hrppvBRdcyEzvhfIPjI
32
30
  -----END CERTIFICATE-----
33
- date: 2016-11-10 00:00:00.000000000 Z
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: '3.15'
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: '3.15'
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
- post_install_message:
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: '0'
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: 1.3.1
132
+ version: '0'
115
133
  requirements: []
116
- rubyforge_project:
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