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 CHANGED
@@ -6,15 +6,16 @@ class Ghostbuster
6
6
  autoload :Rake, 'ghostbuster/rake'
7
7
  autoload :Runner, 'ghostbuster/runner'
8
8
 
9
- def initialize(path)
10
- @path = path
11
- @dir = File.directory?(path) ? path : File.dirname(path)
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[@path].to_a.map{|f| File.expand_path(f)}
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"
@@ -5,12 +5,12 @@ class Ghostbuster
5
5
  end
6
6
 
7
7
  def run
8
- if @args.size != 1
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.first).run
13
+ Ghostbuster.new(@args).run
14
14
  end
15
15
  end
16
16
  end
@@ -1,3 +1,3 @@
1
1
  class Ghostbuster
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
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: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Josh Hull