Permalink
Browse files

Added "rails destroy" support

  • Loading branch information...
1 parent 85c92f6 commit 06007fa048eca30253d15a24091e8bcdfb743ed7 Borna Novak committed Nov 13, 2012
Showing with 13 additions and 5 deletions.
  1. +1 −0 examples/zeus.json
  2. +12 −5 rubygem/lib/zeus/rails.rb
View
@@ -10,6 +10,7 @@
"console": ["c"],
"server": ["s"],
"generate": ["g"],
+ "destroy": ["d"],
"dbconsole": []
},
"test_environment": {
@@ -100,14 +100,15 @@ def rake
end
def generate
- begin
- require 'rails/generators'
- ::Rails.application.load_generators
- rescue LoadError # Rails 3.0 doesn't require this block to be run, but 3.2+ does
- end
+ load_rails_generators
require 'rails/commands/generate'
end
+ def destroy
+ load_rails_generators
+ require 'rails/commands/destroy'
+ end
+
def runner
require 'rails/commands/runner'
end
@@ -206,6 +207,12 @@ def reconnect_redis
end
end
+ def load_rails_generators
+ require 'rails/generators'
+ ::Rails.application.load_generators
+ rescue LoadError # Rails 3.0 doesn't require this block to be run, but 3.2+ does
+ end
+
end
end

0 comments on commit 06007fa

Please sign in to comment.