added ability to set the rails environment to run tests under
This commit is contained in:
parent
aa4b315833
commit
133ad90894
@ -48,6 +48,7 @@ module Hydra #:nodoc:
|
|||||||
@verbose = opts.fetch('verbose') { false }
|
@verbose = opts.fetch('verbose') { false }
|
||||||
@autosort = opts.fetch('autosort') { true }
|
@autosort = opts.fetch('autosort') { true }
|
||||||
@sync = opts.fetch('sync') { nil }
|
@sync = opts.fetch('sync') { nil }
|
||||||
|
@environment = opts.fetch('environment') { 'test' }
|
||||||
|
|
||||||
if @autosort
|
if @autosort
|
||||||
sort_files_from_report
|
sort_files_from_report
|
||||||
@ -139,7 +140,7 @@ module Hydra #:nodoc:
|
|||||||
|
|
||||||
runners = worker.fetch('runners') { raise "You must specify the number of runners" }
|
runners = worker.fetch('runners') { raise "You must specify the number of runners" }
|
||||||
command = worker.fetch('command') {
|
command = worker.fetch('command') {
|
||||||
"ruby -e \"require 'rubygems'; require 'hydra'; Hydra::Worker.new(:io => Hydra::Stdio.new, :runners => #{runners}, :verbose => #{@verbose});\""
|
"RAILS_ENV=#{@environment} ruby -e \"require 'rubygems'; require 'hydra'; Hydra::Worker.new(:io => Hydra::Stdio.new, :runners => #{runners}, :verbose => #{@verbose});\""
|
||||||
}
|
}
|
||||||
|
|
||||||
trace "Booting SSH worker"
|
trace "Booting SSH worker"
|
||||||
|
@ -188,7 +188,7 @@ module Hydra #:nodoc:
|
|||||||
end
|
end
|
||||||
@listeners.each{|l| l.join}
|
@listeners.each{|l| l.join}
|
||||||
$stdout.write "\n==== Hydra Running #{@name} COMPLETE ====\n\n"
|
$stdout.write "\n==== Hydra Running #{@name} COMPLETE ====\n\n"
|
||||||
$stdout.write @results.values.join('\n')
|
$stdout.write @results.values.join("\n")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user