yuslow 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/yuslow.rb +3 -2
- data/lib/yuslow/stdout_printer.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f013ecce83cd75d707b225ad951b479932b0281ef28c73a058e5488edac16c4
|
4
|
+
data.tar.gz: 761d692cfcc1d9fdbef5f46d00ace16a96ac37ec4b4ce869166a8eebde64fc47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77d7aa3fb85e7bfea2a8a698abf1c8161bc8940b63faac868cb947699ee8c63691119a1c308c08f7cdd799cbf890af5736058de3c7ec72c9a1cf35be687abd37
|
7
|
+
data.tar.gz: 65db2929fcd268a555ff31cab72a1e0906aeea6e7d90a8f051d5fddd06ca796eac84bf1f41fc0b14995a9cccf2045c3ea38484512d6e19a4061e38480aebaf90
|
data/README.md
CHANGED
data/lib/yuslow.rb
CHANGED
@@ -5,14 +5,15 @@ require_relative 'yuslow/stdout_printer'
|
|
5
5
|
module Yuslow
|
6
6
|
extend self
|
7
7
|
|
8
|
-
def
|
8
|
+
def investigate(debug: false, output: nil, max_depth: nil)
|
9
9
|
raise 'Block expected' unless block_given?
|
10
10
|
|
11
11
|
investigation = Investigation.new debug: debug, printer: printer_from(output), max_depth: max_depth
|
12
12
|
investigation.start
|
13
|
-
yield
|
13
|
+
result = yield
|
14
14
|
investigation.finish
|
15
15
|
investigation
|
16
|
+
result
|
16
17
|
end
|
17
18
|
|
18
19
|
def investigation(debug: false, output: nil, max_depth: nil)
|
@@ -28,7 +28,7 @@ module Yuslow
|
|
28
28
|
output << "#{indentation}#{identifier} elapsed #{elapsed} ms"
|
29
29
|
else
|
30
30
|
text = "#{operation.identifier} did not finish"
|
31
|
-
colorize(text, :yellow) if colorize
|
31
|
+
text = colorize(text, :yellow) if colorize
|
32
32
|
|
33
33
|
output << "#{indentation}#{text}"
|
34
34
|
end
|