rspectacle 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rspectacle/file_gather.rb +7 -6
- data/lib/rspectacle/version.rb +1 -1
- 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: 5e42d7df78207216d9c7dd2d9be85410bfd2ab86
|
4
|
+
data.tar.gz: fa398ab9aeb30542be6ac3e37ef62159842a5357
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac1a842e96011a4f73ce218fb02995caa76ce9a66a616eb3f70364e3ceb7c7f2c6b4c058374dfb58b61b90094de6c29d6c2200a5738589c99cc9e88f242f95fd
|
7
|
+
data.tar.gz: 2cb6d049580e8f8b143cd374fcb18fbe2f6c127383af4828f8fefba9d327c38cb61b012d5ad22e86695c06467031f256a307d1dfad28ca1791619ed1424dd918
|
@@ -11,8 +11,8 @@ module Rspectacle
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def specs_to_run
|
14
|
-
spec_files = convert_to_spec.select{|file| file =~ /_spec\.rb$/}.uniq
|
15
|
-
spec_files.select{|path| File.exist? path}
|
14
|
+
spec_files = convert_to_spec.select { |file| file =~ /_spec\.rb$/ }.uniq
|
15
|
+
spec_files.select { |path| File.exist? path }
|
16
16
|
end
|
17
17
|
|
18
18
|
private
|
@@ -20,15 +20,16 @@ module Rspectacle
|
|
20
20
|
def convert_to_spec
|
21
21
|
files.each do |file_path|
|
22
22
|
next if file_path =~ /^spec/
|
23
|
-
|
24
|
-
file_path.gsub!(/^app\//, "") if
|
25
|
-
file_path.gsub!(/\.rb$/,
|
23
|
+
in_app_path = app_paths.any? { |path| file_path =~ path }
|
24
|
+
file_path.gsub!(/^app\//, "") if in_app_path
|
25
|
+
file_path.gsub!(/\.rb$/, "_spec.rb")
|
26
26
|
file_path.prepend "spec/"
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
30
|
def app_paths
|
31
|
-
[/\/controllers\//, /\/models\//, /\/views\//, /\/helpers\//, /\/workers\//,
|
31
|
+
[/\/controllers\//, /\/models\//, /\/views\//, /\/helpers\//, /\/workers\//,
|
32
|
+
/\/policies\//, /\/presenters\//]
|
32
33
|
end
|
33
34
|
|
34
35
|
def reject_paths
|
data/lib/rspectacle/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspectacle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Corey Finley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|