guillaumegentil-rspactor 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/runner.rb +21 -19
- data/rspactor.gemspec +2 -2
- metadata +2 -2
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.
|
5
|
+
Echoe.new('rspactor', '0.2.2') 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
@@ -3,14 +3,14 @@ class Runner
|
|
3
3
|
def self.load
|
4
4
|
@inspector = Inspector.new
|
5
5
|
@interactor = Interactor.new
|
6
|
-
|
6
|
+
|
7
7
|
puts "** RSpactor is now watching at '#{Dir.pwd}'"
|
8
8
|
|
9
|
-
if initial_spec_run_abort
|
9
|
+
if initial_spec_run_abort
|
10
10
|
@interactor.start_termination_handler
|
11
11
|
else
|
12
12
|
@interactor.start_termination_handler
|
13
|
-
run_all_specs
|
13
|
+
run_all_specs
|
14
14
|
end
|
15
15
|
|
16
16
|
Listener.new do |files|
|
@@ -19,40 +19,42 @@ class Runner
|
|
19
19
|
spec_file = @inspector.find_spec_file(file)
|
20
20
|
if spec_file
|
21
21
|
puts spec_file
|
22
|
-
files_to_spec << spec_file
|
22
|
+
files_to_spec << spec_file
|
23
23
|
end
|
24
|
-
end
|
24
|
+
end
|
25
25
|
run_spec_command(files_to_spec) unless files_to_spec.empty?
|
26
26
|
end
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
29
|
def self.run_all_specs
|
30
30
|
run_spec_command([@inspector.inner_spec_directory(Dir.pwd)])
|
31
31
|
end
|
32
|
-
|
32
|
+
|
33
33
|
def self.run_specs_for_files(files, verbose = false)
|
34
34
|
files_to_spec = []
|
35
35
|
files.each do |file|
|
36
36
|
spec_file = @inspector.find_spec_file(file)
|
37
37
|
if spec_file
|
38
38
|
puts spec_file if verbose
|
39
|
-
files_to_spec << spec_file
|
39
|
+
files_to_spec << spec_file
|
40
40
|
end
|
41
|
-
end
|
41
|
+
end
|
42
42
|
run_spec_command(files_to_spec) unless files_to_spec.empty?
|
43
43
|
end
|
44
44
|
|
45
45
|
def self.run_spec_command(locations)
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
46
|
+
if locations.first
|
47
|
+
base_spec_root = extract_spec_root(locations.first)
|
48
|
+
spec_runner_bin = script_runner(locations.first)
|
49
|
+
locations = locations.join(" ")
|
50
|
+
cmd = "RAILS_ENV=test; "
|
51
|
+
cmd << "#{spec_runner_bin} "
|
52
|
+
cmd << "#{locations} #{spec_opts(base_spec_root)} "
|
53
|
+
# cmd << "--drb "
|
54
|
+
cmd << "-r #{File.dirname(__FILE__)}/../lib/resulting.rb -f RSpactorFormatter:STDOUT"
|
55
|
+
# puts cmd
|
56
|
+
system(cmd)
|
57
|
+
end
|
56
58
|
end
|
57
59
|
|
58
60
|
def self.extract_spec_root(file)
|
data/rspactor.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{rspactor}
|
5
|
-
s.version = "0.2.
|
5
|
+
s.version = "0.2.2"
|
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"]
|
9
|
-
s.date = %q{
|
9
|
+
s.date = %q{2009-01-28}
|
10
10
|
s.default_executable = %q{rspactor}
|
11
11
|
s.description = %q{RSpactor is a little command line tool to automatically run your changed specs (much like autotest).}
|
12
12
|
s.email = %q{treas@dynamicdudes.com}
|
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.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andreas Wolff
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2009-01-28 00:00:00 -08:00
|
13
13
|
default_executable: rspactor
|
14
14
|
dependencies: []
|
15
15
|
|