deep-cover 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/deep_cover/core_ext/require_overrides.rb +10 -1
- data/lib/deep_cover/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b9a570fcc6a08a94f3cdca911b32d44d1e57219
|
4
|
+
data.tar.gz: a204a1ed36d34bdf64a3f4a86b18fe88a4aa0631
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0db4636db8502b87c8b3af66395857814703bbf26a05132002f2559531ebad9331d69a79ab8e267c4a14de6fe4223d83ccee7288e7538afff5b0ceb5f73fb4f9
|
7
|
+
data.tar.gz: 209c5e33318c27bad6723893a8a8cccdc811bc89c4a2e4c772cef6826ec5674195ef309343d63975ce8cb1e8c0938286434cf23372db2a8c02a564db45303044
|
@@ -1,5 +1,8 @@
|
|
1
1
|
# These are the monkeypatches to replace the default #require and
|
2
2
|
# #require_relative in order to instrument the code before it gets run.
|
3
|
+
# Kernel.require and Kernel#require must both have their version because
|
4
|
+
# each can have been already overwritten individually. (Rubygems only
|
5
|
+
# overrides Kernel#require)
|
3
6
|
|
4
7
|
class << Kernel
|
5
8
|
alias_method :require_without_coverage, :require
|
@@ -22,8 +25,14 @@ class << Kernel
|
|
22
25
|
end
|
23
26
|
|
24
27
|
module Kernel
|
28
|
+
alias_method :require_without_coverage, :require
|
25
29
|
def require(path)
|
26
|
-
|
30
|
+
result = DeepCover.custom_requirer.require(path)
|
31
|
+
if [:not_found, :cover_failed, :not_supported].include?(result)
|
32
|
+
require_without_coverage(path)
|
33
|
+
else
|
34
|
+
result
|
35
|
+
end
|
27
36
|
end
|
28
37
|
|
29
38
|
def require_relative(path)
|
data/lib/deep_cover/version.rb
CHANGED