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
hoptoad_notifier-2.3.9 generators/hoptoad/lib/rake_commands.rb
hoptoad_notifier-2.3.8 generators/hoptoad/lib/rake_commands.rb
hoptoad_notifier-2.3.7 generators/hoptoad/lib/rake_commands.rb
errornot_notifier-1.1.1 generators/errornot/lib/rake_commands.rb
errornot_notifier-1.1.0 generators/errornot/lib/rake_commands.rb
riscfuture-hoptoad_notifier-2.3.6 generators/hoptoad/lib/rake_commands.rb
hoptoad_notifier-2.3.6 generators/hoptoad/lib/rake_commands.rb
hoptoad_notifier-2.3.5 generators/hoptoad/lib/rake_commands.rb
hoptoad_notifier-2.3.4 generators/hoptoad/lib/rake_commands.rb
hoptoad_notifier-2.3.3 generators/hoptoad/lib/rake_commands.rb
hoptoad_notifier-2.3.2 generators/hoptoad/lib/rake_commands.rb
jordan-brough-hoptoad_notifier-2.3.0 generators/hoptoad/lib/rake_commands.rb
hoptoad_notifier-2.3.0 generators/hoptoad/lib/rake_commands.rb
hatless-hoptoad_notifier-2.2.6.1 generators/hoptoad/lib/rake_commands.rb
hatless-hoptoad_notifier-2.2.6.001 generators/hoptoad/lib/rake_commands.rb
hatless-hoptoad_notifier-2.2.6 generators/hoptoad/lib/rake_commands.rb
hoptoad_notifier-2.2.6 generators/hoptoad/lib/rake_commands.rb
hoptoad_notifier-2.2.5 generators/hoptoad/lib/rake_commands.rb
errornot_notifier-1.0.2 generators/errornot/lib/rake_commands.rb
errornot_notifier-1.0.1 generators/errornot/lib/rake_commands.rb