Permalink
Browse files

Pass SPEC_DIR on down through to daemon.rb.

  • Loading branch information...
1 parent cfbca9b commit e4291d92be570959d1f02a25c6290ce3ef642dae @bobmcwhirter bobmcwhirter committed Oct 25, 2011
Showing with 3 additions and 2 deletions.
  1. +1 −0 lib/torquespec/daemon.rb
  2. +1 −1 lib/torquespec/deployment_descriptor.rb
  3. +1 −1 lib/torquespec/torquespec.rb
View
@@ -13,6 +13,7 @@ def initialize(opts={})
dir = opts['pwd'].to_s
raise "The 'pwd' option must contain a valid directory name" if dir.empty? || !File.exist?(dir)
@analyzer = inject( 'runtime-injection-analyzer' )
+ $: << opts['spec_dir'] if opts['spec_dir']
Dir.chdir( dir ) do
RSpec::Core::Runner.disable_autorun! # avoid a bunch of at_exit finalizer errors
@options = RSpec::Core::ConfigurationOptions.new( opts['argv'].to_a )
@@ -46,7 +46,7 @@ def verify( path )
yaml['application'] ||= {}
yaml['application']['root'] ||= TorqueSpec.app_root
yaml['services'] ||= {}
- yaml['services'].update( 'TorqueSpec::Daemon' => { 'argv' => TorqueSpec.argv, 'pwd' => Dir.pwd } )
+ yaml['services'].update( 'TorqueSpec::Daemon' => { 'argv' => TorqueSpec.argv, 'pwd' => Dir.pwd, 'spec_dir' => TorqueSpec.spec_dir } )
yaml['environment'] ||= {}
env = { 'RUBYLIB' => TorqueSpec.rubylib }
yaml['environment'].update(env) {|k,oldval,newval| "#{oldval}:#{newval}"}
@@ -19,7 +19,7 @@ def deploy(*descriptors, &block)
end
class << self
- attr_accessor :knob_root, :jboss_home, :jvm_args, :max_heap, :lazy, :drb_port
+ attr_accessor :knob_root, :jboss_home, :jvm_args, :max_heap, :lazy, :drb_port, :spec_dir
def configure
yield self
end

0 comments on commit e4291d9

Please sign in to comment.