winr 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -0
  3. data/bin/winr +3 -2
  4. data/winr.gemspec +1 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 38f86d556218355c4e595fb33774565d9ccda930368801e5a22f132836e0fb18
4
- data.tar.gz: 502c9dbceec99afd1194380bb27421fcfa240fe74d09f1c6e159ef53720c28b9
3
+ metadata.gz: ba8bbf65060f86c1c4e4c4b5ed6949292cf8668cb799f53552c139a9ccc58f7a
4
+ data.tar.gz: 7609cc91cac4a78f8f7d6746d666ba711739773e75c61640e302ad76bd114d8b
5
5
  SHA512:
6
- metadata.gz: 7f452bc2804419bb14b818613351cd963663bf8f191138e481662f5ca8850d8045d46985a8b412753aae7179bc9fc1c91f57ed414af59e97561db6eec00e1deb
7
- data.tar.gz: 1cf7d74de6ecebef12d73c6e257db1e4fc76d3a4d5c1b115b22f5bda22d549dd9144f2a81816fcc6e045fb0843d6234496118ca3885a9a84f94a24efac1b0057
6
+ metadata.gz: 5c3d5611e76d98e022306023455b704d7d9e06e725eeac96fa779ec7b7ba3554a8684ee6f8ff7a763175bb8f172928302693dbd8ce7ca5caf8c06d120005da29
7
+ data.tar.gz: c8332f1ca9f8dd3d5e400098644be5c3188ffe0b8ec732f27b5b7c1677d50989a90aff561d4d6dc920aab4e517be4c47afab441c3e52a495698dc3062a004427
data/README.md CHANGED
@@ -117,6 +117,10 @@ $ winr test/sum.rb
117
117
  └──────────────────┴─────────────┴──────────────┴────────┘
118
118
  ```
119
119
 
120
+ The following screenshot shows the output (notice the units and color), when the value of `max` is changed to `1e3`.
121
+
122
+ <img src="https://user-images.githubusercontent.com/142875/219610505-64569102-f294-4b2b-b08b-c103d18da247.png" width="640">
123
+
120
124
  ## Install
121
125
 
122
126
  Install via `rubygems` with:
data/bin/winr CHANGED
@@ -60,6 +60,7 @@ show.empty? and abort "invalid list of statistics #{opts[:stats].inspect}"
60
60
 
61
61
  # ==[ Define some constants, ansi codes, and make hashes more flexible ]==
62
62
 
63
+ # used by the scale() method below
63
64
  Infinity = 1.0 / 0
64
65
  Overflow = "\n\nERROR: numeric overflow"
65
66
 
@@ -75,7 +76,7 @@ module Ansi
75
76
  ansi
76
77
  end
77
78
  def ansi (*list); list.map {|code| "\e[#{$ansi[code.to_s] || 0}m"}.join + self; end
78
- def ansi!(*list); ansi(*list) + "\e[0m"; end
79
+ def ansi!(*list); ansi(*list, :reset); end
79
80
  end
80
81
  end
81
82
 
@@ -195,7 +196,7 @@ end
195
196
 
196
197
  def scale(show, unit)
197
198
  slot = 3
198
- span = ["G", "M", "K", " ", "m", "µ", "p"]
199
+ span = ["G", "M", "K", " ", "m", "µ", "n"]
199
200
  [0, Infinity].include?(show) and abort Overflow
200
201
  show *= 1000.0 and slot += 1 while show > 0 && show < 1.0
201
202
  show /= 1000.0 and slot -= 1 while show >= 1000.0
data/winr.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "winr"
5
- s.version = "1.0.4"
5
+ s.version = "1.0.5"
6
6
  s.author = "Steve Shreeve"
7
7
  s.email = "steve.shreeve@gmail.com"
8
8
  s.summary =
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: winr
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Shreeve
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-14 00:00:00.000000000 Z
11
+ date: 2023-02-18 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A quick and lightweight benchmarking tool for Ruby
14
14
  email: steve.shreeve@gmail.com