Merge branch 'master' of github.com:ngauthier/hydra
Conflicts: VERSION hydra.gemspec
This commit is contained in:
commit
304fbb9c85
|
@ -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"]
|
||||
|
|
|
@ -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) }
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue