Sha256: a992e8f7a24823c8ae604eb38c945f585277459457e2f79dc714bb6530c7e7cc

Contents?: true

Size: 545 Bytes

Versions: 68

Compression:

Stored size: 545 Bytes

Contents

Rails::Generator::Commands::Create.class_eval do
  def rake(cmd, opts = {})
    logger.rake "rake #{cmd}"
    unless system("rake #{cmd}")
      logger.rake "#{cmd} failed. Rolling back"      
      command(:destroy).invoke!
    end
  end
end

Rails::Generator::Commands::Destroy.class_eval do
  def rake(cmd, opts = {})
    unless opts[:generate_only]
      logger.rake "rake #{cmd}"
      system "rake #{cmd}"
    end
  end
end

Rails::Generator::Commands::List.class_eval do
  def rake(cmd, opts = {})
    logger.rake "rake #{cmd}"
  end
end

Version data entries

68 entries across 68 versions & 9 rubygems

Version Path
airbrake-3.0.2 generators/airbrake/lib/rake_commands.rb
airbrake-3.0.1 generators/airbrake/lib/rake_commands.rb
airbrake-3.0 generators/airbrake/lib/rake_commands.rb
airbrake-3.0.rc2 generators/airbrake/lib/rake_commands.rb
airbrake-3.0.rc1 generators/airbrake/lib/rake_commands.rb
hoptoad_notifier-2.4.11 generators/hoptoad/lib/rake_commands.rb
hoptoad_notifier-2.4.10 generators/hoptoad/lib/rake_commands.rb
hoptoad_notifier-2.4.9 generators/hoptoad/lib/rake_commands.rb
square-hoptoad_notifier-2.4.8 generators/hoptoad/lib/rake_commands.rb
hoptoad_notifier-2.4.8 generators/hoptoad/lib/rake_commands.rb
hoptoad_notifier-2.4.7 generators/hoptoad/lib/rake_commands.rb
hoptoad_notifier-2.4.6 generators/hoptoad/lib/rake_commands.rb
hoptoad_notifier-2.4.5 generators/hoptoad/lib/rake_commands.rb
hoptoad_notifier-2.4.4 generators/hoptoad/lib/rake_commands.rb
hoptoad_notifier-2.4.2 generators/hoptoad/lib/rake_commands.rb
hoptoad_notifier-2.4.1 generators/hoptoad/lib/rake_commands.rb
hoptoad_notifier-2.4.0 generators/hoptoad/lib/rake_commands.rb
hoptoad_notifier-2.3.12 generators/hoptoad/lib/rake_commands.rb
hoptoad_notifier-2.3.11 generators/hoptoad/lib/rake_commands.rb
hoptoad_notifier-2.3.10 generators/hoptoad/lib/rake_commands.rb