single_cov 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/single_cov.rb +7 -0
- data/lib/single_cov/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: 18761f0484fe62b672dae89aec9b8b2acd666c51
|
4
|
+
data.tar.gz: f349a873b82f429e1ae097fa1df30f58e99330f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 648e80487fd07d9c75941cbbaf49bf7a45a1adda2da92551194e92bf8fec7b8c14f3d4f5868cb83c3ff5ad8b1aeb4171c4d96e93619204d1d9a04c8a909b5fe6
|
7
|
+
data.tar.gz: bd4bfaa5d37074ed783bcd4bf09c10e769aeca4f260d4cf8bb9f548415d773489c6d16719c8dba67bad6e79eb1c0e12215363e9a17cd77b0468af45484393924
|
data/lib/single_cov.rb
CHANGED
@@ -4,6 +4,11 @@ module SingleCov
|
|
4
4
|
APP_FOLDERS = ["models", "serializers", "helpers", "controllers", "mailers", "views"]
|
5
5
|
|
6
6
|
class << self
|
7
|
+
# optionally rewrite the file we guessed with a lambda
|
8
|
+
def rewrite(&block)
|
9
|
+
@rewrite = block
|
10
|
+
end
|
11
|
+
|
7
12
|
def not_covered!
|
8
13
|
end
|
9
14
|
|
@@ -214,6 +219,8 @@ module SingleCov
|
|
214
219
|
# put back the subfolder
|
215
220
|
file_part[0...0] = "#{subfolder}/" unless subfolder.empty?
|
216
221
|
|
222
|
+
file_part = @rewrite.call(file_part) if @rewrite
|
223
|
+
|
217
224
|
file_part
|
218
225
|
end
|
219
226
|
end
|
data/lib/single_cov/version.rb
CHANGED