ghostbuster 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ghostbuster.rb +5 -4
- data/lib/ghostbuster/runner.rb +2 -2
- data/lib/ghostbuster/version.rb +1 -1
- metadata +3 -3
data/lib/ghostbuster.rb
CHANGED
@@ -6,15 +6,16 @@ class Ghostbuster
|
|
6
6
|
autoload :Rake, 'ghostbuster/rake'
|
7
7
|
autoload :Runner, 'ghostbuster/runner'
|
8
8
|
|
9
|
-
def initialize(
|
10
|
-
@
|
11
|
-
@
|
9
|
+
def initialize(*paths)
|
10
|
+
@paths = paths
|
11
|
+
@paths.flatten!
|
12
|
+
@dir = File.directory?(@paths[0]) ? @paths[0] : File.dirname(@paths[0])
|
12
13
|
@ghost_lib = File.expand_path(File.join(File.dirname(__FILE__), "ghostbuster.coffee"))
|
13
14
|
@phantom_bin = File.join(ENV['HOME'], '.ghostbuster', 'phantomjs')
|
14
15
|
end
|
15
16
|
|
16
17
|
def run
|
17
|
-
files = Dir[
|
18
|
+
files = Array(@paths).map{|path| Dir[path].to_a}.flatten.map{|f| File.expand_path(f)}
|
18
19
|
status = 1
|
19
20
|
Dir.chdir(@dir) do
|
20
21
|
sh "./start.sh"
|
data/lib/ghostbuster/runner.rb
CHANGED
@@ -5,12 +5,12 @@ class Ghostbuster
|
|
5
5
|
end
|
6
6
|
|
7
7
|
def run
|
8
|
-
if @args.size
|
8
|
+
if @args.size == 0
|
9
9
|
puts "ghostbuster <path/to/tests>"
|
10
10
|
puts " Version #{VERSION}"
|
11
11
|
exit(1)
|
12
12
|
else
|
13
|
-
Ghostbuster.new(@args
|
13
|
+
Ghostbuster.new(@args).run
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
data/lib/ghostbuster/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ghostbuster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Josh Hull
|