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: 7b7e35b7d495028d01f0666488b16b4e7394245a
4
- data.tar.gz: 808d270802a6e27573e3109772d5b89748734bd6
3
+ metadata.gz: 8eb3ebf4ec08d6ef316ac9d4f462bd320ee622ba
4
+ data.tar.gz: da810b2ea163102795299dea7cdf810079923944
5
5
  SHA512:
6
- metadata.gz: dcfdec107a2c4040d91a7edfa9a882a99cd0116364eed5ff834a87ca1176ffc4b2e243bd40a0ba0ce14afc559c0a1f6dc790fc2f641f33628439620ef7dae209
7
- data.tar.gz: f060b3d98d0b96486daf9accaa4844b933f2aae942c078271e44404ed6855c27dbcfc93c7630a6f6eae335acebb96bfd4fbf40724715692d87303f3ebe4d4324
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
- "./#{full_path.match(/^(.*)test\//)[1]}"
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.2.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-03 00:00:00.000000000 Z
11
+ date: 2014-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor