Merge branch 'master' of github.com:ngauthier/hydra

Conflicts:
	VERSION
	hydra.gemspec
This commit is contained in:
Nick Gauthier 2010-09-07 14:26:59 -04:00
commit 304fbb9c85
4 changed files with 11 additions and 3 deletions

View File

@ -1 +1 @@
0.21.1
0.22.2

View File

@ -5,7 +5,7 @@
Gem::Specification.new do |s|
s.name = %q{hydra}
s.version = "0.21.1"
s.version = "0.22.2"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Nick Gauthier"]

View File

@ -14,6 +14,7 @@ module Hydra #:nodoc:
include Hydra::Messages::Master
include Open3
traceable('MASTER')
attr_reader :failed_files
# Create a new Master
#
@ -54,6 +55,7 @@ module Hydra #:nodoc:
@files = Array(opts.fetch('files') { nil })
raise "No files, nothing to do" if @files.empty?
@incomplete_files = @files.dup
@failed_files = []
@workers = []
@listeners = []
@event_listeners = Array(opts.fetch('listeners') { nil } )
@ -116,6 +118,9 @@ module Hydra #:nodoc:
@incomplete_files.delete_at(@incomplete_files.index(message.file))
trace "#{@incomplete_files.size} Files Remaining"
@event_listeners.each{|l| l.file_end(message.file, message.output) }
unless message.output == '.'
@failed_files << message.file
end
if @incomplete_files.empty?
@workers.each do |worker|
@event_listeners.each{|l| l.worker_end(worker) }

View File

@ -109,7 +109,10 @@ module Hydra #:nodoc:
$stderr.puts %{WARNING: Rails Environment is "development". Make sure to set it properly (ex: "RAILS_ENV=test rake hydra")}
end
Hydra::Master.new(@opts)
master = Hydra::Master.new(@opts)
unless master.failed_files.empty?
raise "Hydra: Not all tests passes"
end
end
end
end