minitest-gcstats 1.3.0 → 1.3.1

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: 2fb63e01210aea841294078efd7197478e98bb68ec4d97fa6ed848681178e0a7
4
+ data.tar.gz: 730e958a3fd550590784b4f6c7f2b2722eb8bd8b28e79c117a8a40af46ede605
5
5
  SHA512:
6
- metadata.gz: 961cd9d0d7e9f4b3edd4c00c81db1b78e164de572e214c8a179a324ecea451debd912efc2890fbb2176938e2135296e1aac2ad9055b62b02ab2626c969bfbc9b
7
- data.tar.gz: 27bc5c7c452a1fe2e95216224fc672552f8ca4e5d0d800ae0e44d5773648ce1c58a9dd53bcf9f6962a524f2f675f4c7dd76a67462fd418dfc9a11434b3860dd4
6
+ metadata.gz: c9c0d764e798e8459f6db92f396e5756ee34542435ffe8c3ee96157f4b185cdb6110cadf10fb706b92662a4688f99b280d9fc0fb435b312feea7330be74d0b39
7
+ data.tar.gz: 61d593d318d54b1d3cd76275648ce540d13529c8c2a54aaa3d0e68f9838ad8ace6a90014bdba032fbf16c9f2bc46eae3b623c21ca4cb0b73663bd3dea06cc089
checksums.yaml.gz.sig CHANGED
Binary file
data/History.rdoc CHANGED
@@ -1,3 +1,13 @@
1
+ === 1.3.1 / 2024-02-26
2
+
3
+ * 1 minor enhancement:
4
+
5
+ * Remove a bunch of ancient versioned code now that <2.3 is way behind us.
6
+
7
+ * 1 bug fix:
8
+
9
+ * Fix Result.from to include gc_stats. (fatkodima)
10
+
1
11
  === 1.3.0 / 2021-10-27
2
12
 
3
13
  This is release 1024!?!
@@ -1,27 +1,12 @@
1
1
  require "minitest"
2
2
 
3
3
  module Minitest::GCStats
4
- VERSION = "1.3.0"
4
+ VERSION = "1.3.1"
5
5
 
6
6
  attr_accessor :gc_stats
7
7
 
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
8
+ def self.current
9
+ GC.stat :total_allocated_objects
25
10
  end
26
11
 
27
12
  def run
@@ -41,11 +26,24 @@ module Minitest::GCStats
41
26
  end
42
27
  end
43
28
 
44
- class Minitest::Result
29
+ module Minitest::GCStats::Result
45
30
  attr_accessor :gc_stats
31
+
32
+ def self.prepended klass
33
+ klass.singleton_class.prepend ClassMethods
34
+ end
35
+
36
+ module ClassMethods
37
+ def from runnable
38
+ r = super
39
+ r.gc_stats = runnable.gc_stats
40
+ r
41
+ end
42
+ end
46
43
  end
47
44
 
48
45
  Minitest::Test.prepend Minitest::GCStats
46
+ Minitest::Result.prepend Minitest::GCStats::Result
49
47
 
50
48
  module Minitest::Assertions
51
49
  ##
@@ -89,7 +87,7 @@ class Minitest::GCStatsReporter < Minitest::AbstractReporter
89
87
  end
90
88
 
91
89
  def report
92
- total = stats.values.inject(&:+)
90
+ total = stats.values.sum
93
91
  pct = total / 100.0
94
92
 
95
93
  puts
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
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.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
@@ -10,9 +10,9 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDPjCCAiagAw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Tn1l3cDcIvxakGslCA88Jubw0Sqatan0TnC9g
30
- KToW560QIey7SPfHWduzFJnV
25
+ AQCygvpmncmkiSs9r/Kceo4bBPDszhTv6iBi4LwMReqnFrpNLMOWJw7xi8x+3eL2
26
+ XS09ZPNOt2zm70KmFouBMgOysnDY4k2dE8uF6B8JbZOO8QfalW+CoNBliefOTcn2
27
+ bg5IOP7UoGM5lC174/cbDJrJnRG9bzig5FAP0mvsgA8zgTRXQzIUAZEo92D5K7p4
28
+ B4/O998ho6BSOgYBI9Yk1ttdCtti6Y+8N9+fZESsjtWMykA+WXWeGUScHqiU+gH8
29
+ S7043fq9EbQdBr2AXdj92+CDwuTfHI6/Hj5FVBDULufrJaan4xUgL70Hvc6pTTeW
30
+ deKfBjgVAq7EYHu1AczzlUly
31
31
  -----END CERTIFICATE-----
32
- date: 2021-10-28 00:00:00.000000000 Z
32
+ date: 2024-02-26 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: minitest
@@ -99,14 +99,14 @@ dependencies:
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: '3.22'
102
+ version: '4.2'
103
103
  type: :development
104
104
  prerelease: false
105
105
  version_requirements: !ruby/object:Gem::Requirement
106
106
  requirements:
107
107
  - - "~>"
108
108
  - !ruby/object:Gem::Version
109
- version: '3.22'
109
+ version: '4.2'
110
110
  description: |-
111
111
  A minitest plugin that adds a report of the top tests by number of
112
112
  objects allocated.
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  - !ruby/object:Gem::Version
150
150
  version: '0'
151
151
  requirements: []
152
- rubygems_version: 3.2.16
152
+ rubygems_version: 3.5.3
153
153
  signing_key:
154
154
  specification_version: 4
155
155
  summary: A minitest plugin that adds a report of the top tests by number of objects
metadata.gz.sig CHANGED
Binary file