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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e19ed01ef24061fbfa704ed22e38f4c8f1156c3d
4
- data.tar.gz: cd7cff955cbd605b7d141e7e30ffc3c29d9e5420
3
+ metadata.gz: 18761f0484fe62b672dae89aec9b8b2acd666c51
4
+ data.tar.gz: f349a873b82f429e1ae097fa1df30f58e99330f7
5
5
  SHA512:
6
- metadata.gz: 072530285e1f8eb1a5890f0ac16d9c31bf64d17b806cb71b973ccc5968c77ee1ab9c0bb63ad1557715629e46e291c97c69088d9edef0e2c54240b2686b287409
7
- data.tar.gz: 962918212ffbffe7fba4a309d77993a1e7fac7e1093a4c3f3b9b87af444194fe1554683f8bfb7ef2d16af8464f354c7820f3f59fc44713085ef1bee1189c869f
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
@@ -1,3 +1,3 @@
1
1
  module SingleCov
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: single_cov
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser