single_cov 0.4.1 → 0.5.0
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/version.rb +1 -1
- data/lib/single_cov.rb +4 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc667d156b62b8d5eceae868eaf399c293a79fd9
|
4
|
+
data.tar.gz: 52070d8e8472751adb06531c993b9ca106fe8207
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 786294b0dbbde29277cfd6f285a54792ff58c15809b81bfa58fabfb0da13009289719b822479b8be35a427b5afc6fd979ab96a1f5f3053d14815d5b319e0dad8
|
7
|
+
data.tar.gz: b6d8d5a29fbbd521e8b47c90630a1f23a037dec302032db820f947b26d8226ba00dcc3f5280c45b66a858de71232de2bf122d076cb6d925a7ad550b461f7686e
|
data/lib/single_cov/version.rb
CHANGED
data/lib/single_cov.rb
CHANGED
@@ -162,7 +162,9 @@ module SingleCov
|
|
162
162
|
raise "#{file} does not exist and cannot be covered." unless File.exist?("#{root}/#{file}")
|
163
163
|
else
|
164
164
|
file = file_under_test(caller[1])
|
165
|
-
|
165
|
+
if file.start_with?("/")
|
166
|
+
raise "Found file #{file} which is not relative to the root #{root}.\nUse `SingleCov.covered file: 'target_file.rb'` to set covered file location."
|
167
|
+
elsif !File.exist?("#{root}/#{file}")
|
166
168
|
raise "Tried to guess covered file as #{file}, but it does not exist.\nUse `SingleCov.covered file: 'target_file.rb'` to set covered file location."
|
167
169
|
end
|
168
170
|
end
|
@@ -235,7 +237,7 @@ module SingleCov
|
|
235
237
|
end
|
236
238
|
|
237
239
|
def root
|
238
|
-
@root ||= (defined?(Bundler) && Bundler.root.to_s) || Dir.pwd
|
240
|
+
@root ||= (defined?(Bundler) && Bundler.root.to_s.sub(/\/gemfiles$/, '')) || Dir.pwd
|
239
241
|
end
|
240
242
|
end
|
241
243
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: single_cov
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: michael@grosser.it
|