have runner tried to build qtwebkit widget if it's missing

This commit is contained in:
John Bintz 2011-07-14 16:23:29 -04:00
parent e72eaef7a1
commit efd8150a55

View File

@ -22,7 +22,8 @@ module Jasmine
'src_files' => [] 'src_files' => []
} }
RUNNER = File.expand_path('../../../../ext/jasmine-webkit-specrunner/jasmine-webkit-specrunner', __FILE__) RUNNER_DIR = File.expand_path('../../../../ext/jasmine-webkit-specrunner', __FILE__)
RUNNER = File.join(RUNNER_DIR, 'jasmine-webkit-specrunner')
attr_reader :options attr_reader :options
@ -32,7 +33,13 @@ module Jasmine
end end
def initialize(options) def initialize(options)
if !File.file?(RUNNER)
$stderr.puts "No runner found, attempting to compile..."
Dir.chdir RUNNER_DIR do
system %{ruby extconf.rb}
end
raise NoRunnerError if !File.file?(RUNNER) raise NoRunnerError if !File.file?(RUNNER)
end
@options = options @options = options
end end