theorem 1.2.1 → 1.2.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: '09d0acbeb340968a19cb27122ba6c852b66b2cc4347fdfca7f6ba6a9f7781ce0'
4
- data.tar.gz: aef702741a59ff1a11f08e6225b0804b30b813ed0cc8eb5184cdd50c54587901
3
+ metadata.gz: fa09d87e0b219e171e02728791f787a6ecd68a759e8a21143e85302361f68a1d
4
+ data.tar.gz: 739e1c4e6e19a3145d7c87c8ea688d10be70cce45735939e7f5d0bdf1817d385
5
5
  SHA512:
6
- metadata.gz: 6055b29fd80529f514b73363a18582122a5e23b312fda318b3d83a546bb7d8b062fcaf87f57858340e432bc1327a183f1b494c107d0970861b9548974f34996f
7
- data.tar.gz: 40c0dc5d7660db43bdf6606aae81a43c48cb5015dd29eacd63a4f2afc2e0daa2d70b34f1ce04560f190d2dd282caef3bc67d4c37236c5bcda3abfce5bed65aad
6
+ metadata.gz: 49ef938d77de1eacfd29a61c312acb396de525adb5c9b9699d3698cd31d8511c05665c560b55de61bc0fb9884024b32dbc61771cc0e44ae5267f26301cd46a18
7
+ data.tar.gz: 2fe7a59bec06dfd7b14c02e9245cdd0e9ca1ccf013f83254706cccd8e72a3aba9ac3048d9b0ed083b14f3d3e552c8cdd1b42ed75d24cc6ee67581740e5048f7f
@@ -68,7 +68,7 @@ module Theorem
68
68
  end
69
69
  end
70
70
  hash = {}
71
- hash[:percentile] = (below.size.to_f / sorted.size.to_f) * 100
71
+ hash[:percentile] = (below.size.to_f / (sorted.size.to_f + 1)) * 100
72
72
  hash[:test] = test
73
73
  arr << hash
74
74
  end
@@ -90,12 +90,12 @@ module Theorem
90
90
  return 'Not run' if test[:test].duration.nil?
91
91
 
92
92
  str = "#{format('%<num>0.10f', num: test[:test].duration)} seconds"
93
- rank = ((test[:percentile] / 100) * (test[:test].duration + 1)) * 100
94
- if rank < 5
93
+ rank = test[:percentile]
94
+ if rank < 10
95
95
  str.red
96
- elsif rank > 95
96
+ elsif rank > 90
97
97
  str.green
98
- elsif rank < 10
98
+ elsif rank < 30
99
99
  str.yellow
100
100
  else
101
101
  str
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: theorem
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Gregory