sass-prof 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6b2ed24aefa1059cfcfd31ed8f8982a2ab152756
4
- data.tar.gz: 3860e3bab2ade75dc3eed9a4015912d0a9ecc0d4
3
+ metadata.gz: b9aa835308e9fd45498589efe559994bcf37914a
4
+ data.tar.gz: 879016e6ccffffb9ad1608cf61418c3f7c86b0d1
5
5
  SHA512:
6
- metadata.gz: 42efddb28f559764c8893ae5f34b8cd1d2c054b7b4145c237b99bbfed7c9e48d5fadd8a3e339f5a347ee35501f2dd769a01c79aed722a6761578f23b1bcb9dec
7
- data.tar.gz: f9edf05b517c9612a4ea35fb73e3a7e7c296db6f3c4ab56a43a2dc631d9f8692f529075806b243e9b4b9b6ba62fbed7bf9f7941da678333dba82504ed41a64fb
6
+ metadata.gz: 590560723910cb82c65b43e5df6fdab3b814652c1ecc1a620be19a613550833bd5c101bba65a29ed584d81cec2c4683ff38b975127491edd8d85f9eea99a9257
7
+ data.tar.gz: 9a2e89208a84ed73c2c0cca7c5ba5e4974dda483a2c5a9b447b03f6405ea0366c85a00c8173dc38dabe35edad1259d9ee74e32f2b19b945ead8b92ea13a9d4cc
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sass
4
4
  module Prof
5
- VERSION = "0.3.1"
5
+ VERSION = "0.3.2"
6
6
  end
7
7
  end
data/lib/sass-prof.rb CHANGED
@@ -76,13 +76,15 @@ module Sass
76
76
 
77
77
  def to_table(rows)
78
78
  t_ms = rows.map { |c|
79
- c[1].gsub(/\e\[(\d+)(;\d+)*m/, "").to_f }.reduce(:+)
79
+ c[1].gsub(/\e\[(\d+)(;\d+)*m/, "").to_f }.reduce :+
80
80
 
81
- if t_ms > 1000
81
+ if t_ms.nil?
82
+ t = Prof::Formatter.colorize "Unknown", :red
83
+ elsif t_ms > 1000
82
84
  t_sec = t_ms / 1000 % 60
83
- t = "#{t_sec.round(Prof::Config.precision - 1)}s"
85
+ t = "%.#{Prof::Config.precision - 1}fs" % t_sec
84
86
  else
85
- t = "#{t_ms.round(Prof::Config.precision - 2)}ms"
87
+ t = "%.#{Prof::Config.precision - 2}fms" % t_ms
86
88
  end
87
89
 
88
90
  # Add total execution time footer
@@ -160,9 +162,9 @@ module Sass
160
162
  end
161
163
 
162
164
  def fn_execution_time
163
- color = @@t_total > Prof::Config.t_max ? :red : :green
164
- Prof::Formatter.colorize @@t_total.round(
165
- Prof::Config.precision).to_s, color
165
+ color = @@t_total > Prof::Config.t_max ? :red : :green
166
+ t_exec = "%.#{Prof::Config.precision}f" % @@t_total
167
+ Prof::Formatter.colorize t_exec, color
166
168
  end
167
169
 
168
170
  def fn_name
data/screenshot.jpg CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sass-prof
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ezekg