minitest-gcstats 1.3.0 → 1.3.2

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
2
  SHA256:
3
- metadata.gz: 18da434e843b23c6fc0fa45a865681afeafad449b7cc53d80bdfcfbef4545900
4
- data.tar.gz: 4cc273bbd7bbbfd43038fd046d24bb3e6f2f8192cc5bb0bdac015eb608c7bc73
3
+ metadata.gz: 3116bf0b9fe24b09025f60a95abd8949507a7174beae1f94dd989cc397b16e2b
4
+ data.tar.gz: 93d114c9e3148ff5770b9fcdc2e4781d0faea7a6838df211420aad19270e0554
5
5
  SHA512:
6
- metadata.gz: 961cd9d0d7e9f4b3edd4c00c81db1b78e164de572e214c8a179a324ecea451debd912efc2890fbb2176938e2135296e1aac2ad9055b62b02ab2626c969bfbc9b
7
- data.tar.gz: 27bc5c7c452a1fe2e95216224fc672552f8ca4e5d0d800ae0e44d5773648ce1c58a9dd53bcf9f6962a524f2f675f4c7dd76a67462fd418dfc9a11434b3860dd4
6
+ metadata.gz: 2c675d119cc7444885a7a09a410ef50f89d88efb0df74360bf02d606313ac977e5d98ee23ffb17e169995ab98ddf43fb0478ffddda0437444b09a5257dcf9bf3
7
+ data.tar.gz: 7b9f422fe5dc423ec23cf4e2713229fb2e460c79da38678050978bc79e34ab0f771e914faad70da71203c40908c5c929c4cd78c631ca745da1cfff9c1e6584e6
checksums.yaml.gz.sig CHANGED
Binary file
data/History.rdoc CHANGED
@@ -1,3 +1,21 @@
1
+ === 1.3.2 / 2026-01-04
2
+
3
+ * 3 bug fixes:
4
+
5
+ * Loosened rake dependency for ruby 4.
6
+ * Loosened the minitest dependency to include MT6.
7
+ * MT6: Load gcstats plugin from minitest/gcstats.
8
+
9
+ === 1.3.1 / 2024-02-26
10
+
11
+ * 1 minor enhancement:
12
+
13
+ * Remove a bunch of ancient versioned code now that <2.3 is way behind us.
14
+
15
+ * 1 bug fix:
16
+
17
+ * Fix Result.from to include gc_stats. (fatkodima)
18
+
1
19
  === 1.3.0 / 2021-10-27
2
20
 
3
21
  This is release 1024!?!
data/Rakefile CHANGED
@@ -7,17 +7,13 @@ Hoe.plugin :seattlerb
7
7
  Hoe.plugin :rdoc
8
8
  Hoe.plugin :isolate
9
9
 
10
- Hoe.add_include_dirs "../../minitest/dev/lib"
11
-
12
10
  Hoe.spec "minitest-gcstats" do
13
11
  developer "Ryan Davis", "ryand-ruby@zenspider.com"
14
12
  license "MIT"
15
13
 
16
- dependency "minitest", "~> 5.0"
17
- dependency "rake", "< 11", :developer
14
+ dependency "minitest", "> 5.0"
15
+ dependency "rake", "> 13", :developer
18
16
  dependency "minitest-proveit", "~> 1.0", :developer
19
-
20
- multiruby_skip << '1.8'
21
17
  end
22
18
 
23
19
  # vim: syntax=ruby
@@ -1,27 +1,14 @@
1
1
  require "minitest"
2
2
 
3
+ Minitest.load :gcstats if Minitest.respond_to? :load
4
+
3
5
  module Minitest::GCStats
4
- VERSION = "1.3.0"
6
+ VERSION = "1.3.2"
5
7
 
6
8
  attr_accessor :gc_stats
7
9
 
8
- HASH = {}
9
-
10
- begin
11
- if GC.stat[:total_allocated_objects] then # ruby 2.2
12
- def self.current
13
- GC.stat :total_allocated_objects
14
- end
15
- else # ruby 2.1
16
- GC.stat :total_allocated_object # force raise
17
- def self.current
18
- GC.stat :total_allocated_object
19
- end
20
- end
21
- rescue TypeError
22
- def self.current # ruby 2.0
23
- GC.stat(HASH)[:total_allocated_object]
24
- end
10
+ def self.current
11
+ GC.stat :total_allocated_objects
25
12
  end
26
13
 
27
14
  def run
@@ -41,11 +28,24 @@ module Minitest::GCStats
41
28
  end
42
29
  end
43
30
 
44
- class Minitest::Result
31
+ module Minitest::GCStats::Result
45
32
  attr_accessor :gc_stats
33
+
34
+ def self.prepended klass
35
+ klass.singleton_class.prepend ClassMethods
36
+ end
37
+
38
+ module ClassMethods
39
+ def from runnable
40
+ r = super
41
+ r.gc_stats = runnable.gc_stats
42
+ r
43
+ end
44
+ end
46
45
  end
47
46
 
48
47
  Minitest::Test.prepend Minitest::GCStats
48
+ Minitest::Result.prepend Minitest::GCStats::Result
49
49
 
50
50
  module Minitest::Assertions
51
51
  ##
@@ -89,7 +89,7 @@ class Minitest::GCStatsReporter < Minitest::AbstractReporter
89
89
  end
90
90
 
91
91
  def report
92
- total = stats.values.inject(&:+)
92
+ total = stats.values.sum
93
93
  pct = total / 100.0
94
94
 
95
95
  puts
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,18 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-gcstats
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.2
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
- MIIDPjCCAiagAwIBAgIBBTANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
12
+ MIIDPjCCAiagAwIBAgIBCTANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
14
13
  ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
15
- GRYDY29tMB4XDTIwMTIyMjIwMzgzMFoXDTIxMTIyMjIwMzgzMFowRTETMBEGA1UE
14
+ GRYDY29tMB4XDTI1MDEwNjIzMjcwMVoXDTI2MDEwNjIzMjcwMVowRTETMBEGA1UE
16
15
  AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
17
16
  JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
18
17
  b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
@@ -22,43 +21,43 @@ cert_chain:
22
21
  qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
23
22
  gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
24
23
  HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBCwUAA4IB
25
- AQAE3XRm1YZcCVjAJy5yMZvTOFrS7B2SYErc+0QwmKYbHztTTDY2m5Bii+jhpuxh
26
- H+ETcU1z8TUKLpsBUP4kUpIRowkVN1p/jKapV8T3Rbwq+VuYFe+GMKsf8wGZSecG
27
- oMQ8DzzauZfbvhe2kDg7G9BBPU0wLQlY25rDcCy9bLnD7R0UK3ONqpwvsI5I7x5X
28
- ZIMXR0a9/DG+55mawwdGzCQobDKiSNLK89KK7OcNTALKU0DfgdTkktdgKchzKHqZ
29
- d/AHw/kcnU6iuMUoJEcGiJd4gVCTn1l3cDcIvxakGslCA88Jubw0Sqatan0TnC9g
30
- KToW560QIey7SPfHWduzFJnV
24
+ AQAC0WQJcPOWPFwkojhzweilRVjTJ19UiLhiBTw3C1wJO3LVdBkWDmnnhAmKuX4D
25
+ r7vjQvESlABGIPdutI1Yl7mrHQzTkfLfXvNN6MT0nLChPyIYauT6SZZxubwJrUfA
26
+ 7R0c2CJTIboZ0XaGpLsXqHEF1c29H7TV1QvVuqKAN2mCjh4N82QVn+ZKtys28AwT
27
+ 6GfQX2fqLoi4KSc7xIzHKaNzqxeOICmJofk9w5VZ2rRN6yes8jvFYwz9HR41wdj8
28
+ bwfinv7Yp5fA6AysuZLhCykyfDuZVRrUp0Vb68YCKsLjJly/Theak+euNTxvHsB+
29
+ al9oSgPPHICMEX65qvLywitx
31
30
  -----END CERTIFICATE-----
32
- date: 2021-10-28 00:00:00.000000000 Z
31
+ date: 1980-01-02 00:00:00.000000000 Z
33
32
  dependencies:
34
33
  - !ruby/object:Gem::Dependency
35
34
  name: minitest
36
35
  requirement: !ruby/object:Gem::Requirement
37
36
  requirements:
38
- - - "~>"
37
+ - - ">"
39
38
  - !ruby/object:Gem::Version
40
39
  version: '5.0'
41
40
  type: :runtime
42
41
  prerelease: false
43
42
  version_requirements: !ruby/object:Gem::Requirement
44
43
  requirements:
45
- - - "~>"
44
+ - - ">"
46
45
  - !ruby/object:Gem::Version
47
46
  version: '5.0'
48
47
  - !ruby/object:Gem::Dependency
49
48
  name: rake
50
49
  requirement: !ruby/object:Gem::Requirement
51
50
  requirements:
52
- - - "<"
51
+ - - ">"
53
52
  - !ruby/object:Gem::Version
54
- version: '11'
53
+ version: '13'
55
54
  type: :development
56
55
  prerelease: false
57
56
  version_requirements: !ruby/object:Gem::Requirement
58
57
  requirements:
59
- - - "<"
58
+ - - ">"
60
59
  - !ruby/object:Gem::Version
61
- version: '11'
60
+ version: '13'
62
61
  - !ruby/object:Gem::Dependency
63
62
  name: minitest-proveit
64
63
  requirement: !ruby/object:Gem::Requirement
@@ -79,34 +78,34 @@ dependencies:
79
78
  requirements:
80
79
  - - ">="
81
80
  - !ruby/object:Gem::Version
82
- version: '4.0'
81
+ version: '6.0'
83
82
  - - "<"
84
83
  - !ruby/object:Gem::Version
85
- version: '7'
84
+ version: '8'
86
85
  type: :development
87
86
  prerelease: false
88
87
  version_requirements: !ruby/object:Gem::Requirement
89
88
  requirements:
90
89
  - - ">="
91
90
  - !ruby/object:Gem::Version
92
- version: '4.0'
91
+ version: '6.0'
93
92
  - - "<"
94
93
  - !ruby/object:Gem::Version
95
- version: '7'
94
+ version: '8'
96
95
  - !ruby/object:Gem::Dependency
97
96
  name: hoe
98
97
  requirement: !ruby/object:Gem::Requirement
99
98
  requirements:
100
99
  - - "~>"
101
100
  - !ruby/object:Gem::Version
102
- version: '3.22'
101
+ version: '4.5'
103
102
  type: :development
104
103
  prerelease: false
105
104
  version_requirements: !ruby/object:Gem::Requirement
106
105
  requirements:
107
106
  - - "~>"
108
107
  - !ruby/object:Gem::Version
109
- version: '3.22'
108
+ version: '4.5'
110
109
  description: |-
111
110
  A minitest plugin that adds a report of the top tests by number of
112
111
  objects allocated.
@@ -132,7 +131,6 @@ licenses:
132
131
  - MIT
133
132
  metadata:
134
133
  homepage_uri: https://github.com/seattlerb/minitest-gcstats
135
- post_install_message:
136
134
  rdoc_options:
137
135
  - "--main"
138
136
  - README.rdoc
@@ -149,8 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
147
  - !ruby/object:Gem::Version
150
148
  version: '0'
151
149
  requirements: []
152
- rubygems_version: 3.2.16
153
- signing_key:
150
+ rubygems_version: 3.7.2
154
151
  specification_version: 4
155
152
  summary: A minitest plugin that adds a report of the top tests by number of objects
156
153
  allocated.
metadata.gz.sig CHANGED
Binary file