speed and running tweaks

This commit is contained in:
John Bintz 2012-03-20 15:34:42 -04:00
parent c78174a600
commit 7b09dae453
3 changed files with 7 additions and 11 deletions

View File

@ -72,7 +72,7 @@ class Flowerbox::CLI < Thor
def method_missing(method, *args)
if File.directory?(method.to_s)
invoke :test, method.to_s, *args
test(method.to_s, *args)
else
super
end
@ -82,10 +82,6 @@ class Flowerbox::CLI < Thor
def pwd
options[:pwd] || Dir.pwd
end
def asset_paths
Flowerbox.asset_paths.collect { |path| File.join(pwd, path) }
end
end
end

View File

@ -38,6 +38,10 @@ module Flowerbox
<html>
<head>
<title>Flowerbox - #{Flowerbox.test_environment.name} Runner</title>
</head>
<body>
<h1>Flowerbox - #{Flowerbox.test_environment.name} Runner</h1>
<pre id="queue"></pre>
<script type="text/javascript">
console._log = console.log;
@ -47,10 +51,6 @@ console.log = function(msg) {
}
</script>
#{template_files.join("\n")}
</head>
<body>
<h1>Flowerbox - #{Flowerbox.test_environment.name} Runner</h1>
<pre id="queue"></pre>
<script type="text/javascript">
Flowerbox.environment = '#{name}';
Flowerbox.onQueueStateChange = function(msg) {

View File

@ -62,8 +62,8 @@ module Flowerbox
asset_path = asset.pathname.to_s
environment.paths.each do |path|
if asset_path[%r{^#{path}}]
return asset_path.gsub(%r{^#{path}/}, '')
if result = asset_path[%r{^#{path}/(.*)}, 1]
return result
end
end