Skip to content

Commit

Permalink
make run_ci work for more specs
Browse files Browse the repository at this point in the history
  • Loading branch information
rdp committed Feb 17, 2010
1 parent 57b5fa5 commit 2f43cf3
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -159,22 +159,24 @@ end

desc 'Run a watchr continuous integration daemon for the specs'
task :run_ci do
require 'watchr'
require 'watchr'
script = Watchr::Script.new
script.watch(/.*\/([^\/]+).rb$/) { |filename| if filename[0] =~ /_spec\.rb/ # a spec file
a = ("jruby -S spec #{filename} --backtrace")
script.watch(/.*\/([^\/]+).rb$/) { |filename|
if filename[0] =~ /_spec\.rb/ # a spec file
a = "jruby -S spec #{filename} --backtrace"
puts a
system a
end

spec_filename = filename[0] + '/spec/' + filename[1] + "/#{filename[2]}_spec.rb"
if File.exist? spec_filename
a = ("jruby -S spec #{spec_filename}")
system a
end

spec_filename = "#{filename[1]}_spec.rb"
spec = Dir["**/#{spec_filename}"]
if spec.length > 0
a = "jruby -S spec #{spec[0]}"
puts a
system a
end
system a
end
}
contrl = Watchr::Controller.new(script, Watchr.handler.new)
contrl = Watchr::Controller.new(script, Watchr.handler.new)
contrl.run
end

0 comments on commit 2f43cf3

Please sign in to comment.