guillaumegentil-rspactor 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Rakefile +1 -1
  2. data/lib/runner.rb +6 -14
  3. data/rspactor.gemspec +1 -1
  4. metadata +1 -1
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('rspactor', '0.2.3') do |p|
5
+ Echoe.new('rspactor', '0.2.4') do |p|
6
6
  p.description = "RSpactor is a little command line tool to automatically run your changed specs (much like autotest)."
7
7
  p.url = "http://github.com/guillaumegentil/rspactor/"
8
8
  p.author = "Andreas Wolff"
data/lib/runner.rb CHANGED
@@ -5,7 +5,7 @@ class Runner
5
5
  @interactor = Interactor.new
6
6
  @drb = drb
7
7
 
8
- puts "** RSpactor is now watching at '#{Dir.pwd}'"
8
+ puts "** RSpactor is now watching at '#{Dir.pwd}'#{' and using spec_server' if @drb}"
9
9
 
10
10
  if initial_spec_run_abort
11
11
  @interactor.start_termination_handler
@@ -15,15 +15,7 @@ class Runner
15
15
  end
16
16
 
17
17
  Listener.new do |files|
18
- files_to_spec = []
19
- files.each do |file|
20
- spec_file = @inspector.find_spec_file(file)
21
- if spec_file
22
- puts spec_file
23
- files_to_spec << spec_file
24
- end
25
- end
26
- run_spec_command(files_to_spec) unless files_to_spec.empty?
18
+ run_specs_for_files(files)
27
19
  end
28
20
  end
29
21
 
@@ -31,12 +23,12 @@ class Runner
31
23
  run_spec_command([@inspector.inner_spec_directory(Dir.pwd)])
32
24
  end
33
25
 
34
- def self.run_specs_for_files(files, verbose = false)
26
+ def self.run_specs_for_files(files)
35
27
  files_to_spec = []
36
28
  files.each do |file|
37
29
  spec_file = @inspector.find_spec_file(file)
38
- if spec_file
39
- puts spec_file if verbose
30
+ if spec_file && !files_to_spec.include?(spec_file)
31
+ puts spec_file
40
32
  files_to_spec << spec_file
41
33
  end
42
34
  end
@@ -53,7 +45,7 @@ class Runner
53
45
  cmd << "#{locations} #{spec_opts(base_spec_root)} "
54
46
  cmd << "--drb " if @drb
55
47
  cmd << "-r #{File.dirname(__FILE__)}/../lib/resulting.rb -f RSpactorFormatter:STDOUT"
56
- puts cmd
48
+ # puts cmd
57
49
  system(cmd)
58
50
  end
59
51
  end
data/rspactor.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{rspactor}
5
- s.version = "0.2.3"
5
+ s.version = "0.2.4"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Andreas Wolff"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guillaumegentil-rspactor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andreas Wolff