Skip to content

Commit

Permalink
Merge pull request #22 from heroku/asset_compilation_message
Browse files Browse the repository at this point in the history
Fixes #19.
  • Loading branch information
hone committed Jun 13, 2012
2 parents 30f1303 + 89334e2 commit 2893378
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/language_pack/rails3.rb
Expand Up @@ -47,12 +47,12 @@ def run_assets_precompile_rake_task
ENV["RAILS_ENV"] ||= "production"

puts "Running: rake assets:precompile"
rake_output = ""
rake_output << run("env PATH=$PATH:bin bundle exec rake assets:precompile 2>&1")
puts rake_output
require 'benchmark'
time = Benchmark.realtime { pipe("env PATH=$PATH:bin bundle exec rake assets:precompile 2>&1") }

if $?.success?
log "assets_precompile", :status => "success"
puts "Asset precompilation completed (#{"%.2f" % time}s)"
else
log "assets_precompile", :status => "failure"
puts "Precompiling assets failed, enabling runtime asset compilation"
Expand Down
7 changes: 6 additions & 1 deletion lib/language_pack/ruby.rb
Expand Up @@ -496,8 +496,13 @@ def add_node_js_binary

def run_assets_precompile_rake_task
if rake_task_defined?("assets:precompile")
require 'benchmark'

topic "Running: rake assets:precompile"
pipe("env PATH=$PATH:bin bundle exec rake assets:precompile 2>&1")
time = Benchmark.realtime { pipe("env PATH=$PATH:bin bundle exec rake assets:precompile 2>&1") }
if $?.success?
puts "Asset precompilation completed (#{"%.2f" % time}s)"
end
end
end
end

0 comments on commit 2893378

Please sign in to comment.