sfb_scripts 1.2.1 → 1.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8eb3ebf4ec08d6ef316ac9d4f462bd320ee622ba
|
4
|
+
data.tar.gz: da810b2ea163102795299dea7cdf810079923944
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9269cf51001f79af60f8ab56f3de331e41f58b5d10bcd695e8c605633182d67ac6802376b251d091d8ce5e561c9d706fb73b2dfdb0cc4902a6ab19a152ec6f5e
|
7
|
+
data.tar.gz: 1ae10878537a2e86ee3f9c9b39d42826751a6e48159790d1e829e98a75223f7283d71779c24cb2c5b0855406640674154a718e97c32eb736c0fc2cb3393e79cd
|
@@ -13,7 +13,7 @@ class TestCase
|
|
13
13
|
def working_dir
|
14
14
|
@working_dir ||=
|
15
15
|
if full_path.match(/^(.*)test\//)
|
16
|
-
"
|
16
|
+
File.join(".", full_path.match(/^(.*)test\//)[1])
|
17
17
|
else
|
18
18
|
raise TestDirectoryError.new("Can't find test's working directory")
|
19
19
|
end
|
@@ -13,6 +13,8 @@ class TestFinder
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def find
|
16
|
+
return tests_found_by_absolute_path if query.match(Repo.root_dir)
|
17
|
+
|
16
18
|
return tests_found_by_name if tests_found_by_name.present?
|
17
19
|
|
18
20
|
return tests_found_by_file_name if tests_found_by_file_name.present?
|
@@ -24,6 +26,10 @@ class TestFinder
|
|
24
26
|
|
25
27
|
private
|
26
28
|
|
29
|
+
def tests_found_by_absolute_path
|
30
|
+
TestCollection.new([file: query.gsub(Repo.root_dir, '')])
|
31
|
+
end
|
32
|
+
|
27
33
|
def tests_found_by_name
|
28
34
|
@tests_found_by_name ||=
|
29
35
|
begin
|
@@ -49,7 +55,7 @@ class TestFinder
|
|
49
55
|
@tests_found_by_file_name ||=
|
50
56
|
begin
|
51
57
|
files = []
|
52
|
-
files << repo.find_files(query).map {|f| {:file => f} }
|
58
|
+
files << repo.find_files(query).select {|f| f.match /_test\.rb\Z/ }.map {|f| {:file => f} }
|
53
59
|
files.flatten!
|
54
60
|
TestCollection.new(files)
|
55
61
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sfb_scripts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: '1.3'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pete Kinnecom
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|