Skip to content

Instantly share code, notes, and snippets.

@jumph4x
Created March 20, 2012 20:39
Show Gist options
  • Save jumph4x/2141056 to your computer and use it in GitHub Desktop.
Save jumph4x/2141056 to your computer and use it in GitHub Desktop.
Loopty loop
# rake
# Same as invoke, but explicitly pass a call chain to detect
# circular dependencies.
def invoke_with_call_chain(task_args, invocation_chain) # :nodoc:
new_chain = InvocationChain.append(self, invocation_chain)
@lock.synchronize do
if application.options.trace
$stderr.puts "** Invoke #{name} #{format_trace_flags}"
end
return if @already_invoked
@already_invoked = true
invoke_prerequisites(task_args, new_chain)
puts task_args
puts invocation_chain
execute(task_args) if needed?
end
rescue Exception => ex
add_chain_to(ex, new_chain)
raise ex
end
protected :invoke_with_call_chain
./bundler_stubs/rake:16:in `load'
./bundler_stubs/rake:16:in `<main>'
Tasks: TOP => assets:precompile:all
denis@h213h:~/rails/vanilla-spree$ /home/denis/.rvm/rubies/ruby-1.9.2-p290/bin/ruby ./bundler_stubs/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
** Invoke assets:precompile:all (first_time)
{}
TOP
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
{}
TOP => assets:precompile:primary
** Execute assets:environment
** Invoke environment (first_time)
{}
TOP
** Execute environment
[DEPRECATION WARNING] Nested I18n namespace lookup under "activerecord.attributes.spree/order" is no longer supported
** Invoke tmp:cache:clear (first_time)
{}
TOP => assets:precompile:primary
** Execute tmp:cache:clear
{}
TOP
** Execute assets:precompile:primary
rake aborted!
stack level too deep
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment