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

View File

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

View File

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