require_bench 1.0.4.pre.alpha.2 → 1.0.4.pre.alpha.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/require_bench/version.rb +1 -1
- data/lib/require_bench.rb +8 -2
- 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: 026d8a38aa26e66261868831f961e0b6f9fcc11b155d662b72a74a34eb29fa33
|
4
|
+
data.tar.gz: b61edbde73769d00fd2c48f48852712803a935475b67aefbb640a615b828b625
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9e1d511651debe3a12d6542b1546f407d30e919dbc331de463f62775a6a155ea9bca4e749bd4b7e3da945d7247e7d3ee8e7a59685ae3ae16130c962b6537607
|
7
|
+
data.tar.gz: 7a06355f673765e18f116f01b7fd59199ab5c850d7cfaaccfc237ff1bdfe5f48ae8cf7fdac22cf9c2b6a9fd0a12cc4bb3815c5382819862614c68d1f9915700d
|
data/lib/require_bench.rb
CHANGED
@@ -39,6 +39,12 @@ module RequireBench
|
|
39
39
|
require 'require_bench/printer'
|
40
40
|
end
|
41
41
|
PRINTER = Printer.new
|
42
|
+
|
43
|
+
if rescued_classes.any?
|
44
|
+
rescued_classes.map! do |klass|
|
45
|
+
Kernel.const_get(klass)
|
46
|
+
end
|
47
|
+
end
|
42
48
|
if skips && !skips.empty?
|
43
49
|
skip_pattern = case skips
|
44
50
|
when /,/
|
@@ -151,12 +157,12 @@ if REQUIRE_BENCH_ENABLED
|
|
151
157
|
short_type = type[0]
|
152
158
|
measure = RequireBench::INCLUDE_PATTERN && file_path.match?(RequireBench::INCLUDE_PATTERN)
|
153
159
|
skippy = RequireBench::SKIP_PATTERN && file_path.match?(RequireBench::SKIP_PATTERN)
|
154
|
-
PRINTER.p(file, short_type) if RequireBench::LOG_START
|
160
|
+
RequireBench::PRINTER.p(file, short_type) if RequireBench::LOG_START
|
155
161
|
if RequireBench::RESCUED_CLASSES.any?
|
156
162
|
begin
|
157
163
|
_require_bench_file(type, measure, skippy, file_path)
|
158
164
|
rescue *RequireBench::RESCUED_CLASSES => e
|
159
|
-
PRINTER.e(e, file, short_type)
|
165
|
+
RequireBench::PRINTER.e(e, file, short_type)
|
160
166
|
end
|
161
167
|
else
|
162
168
|
_require_bench_file(type, measure, skippy, file_path)
|