Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Zeus engine setup.
require 'zeus/rails'
ROOT_PATH = File.expand_path(Dir.pwd)
ENV_PATH = File.expand_path('spec/dummy/config/environment', ROOT_PATH)
BOOT_PATH = File.expand_path('spec/dummy/config/boot', ROOT_PATH)
APP_PATH = File.expand_path('spec/dummy/config/application', ROOT_PATH)
ENGINE_ROOT = File.expand_path(Dir.pwd)
ENGINE_PATH = File.expand_path('lib/my_engine/engine', ENGINE_ROOT)
class CustomPlan < Zeus::Rails
Zeus.plan =
"command": "ruby -rubygems -r./custom_plan -eZeus.go",
"plan": {
"boot": {
"default_bundle": {
"development_environment": {
"prerake": {"rake": []},
"runner": ["r"],
"console": ["c"],
"server": ["s"],
"generate": ["g"],
"destroy": ["d"],
"dbconsole": []
"test_environment": {
"test_helper": {"test": ["rspec", "testrb"]}

This comment has been minimized.

Copy link

millisami commented Oct 27, 2013

It works, just a little note.

If you see your tests running twice, one pass and another fail in case of passing spec, then you should remove

require 'rspec/autorun'

from your rspec_helper.rb file.

And at line 8 from custom_plan.rb , do rename my_engine with your engine name as well.


This comment has been minimized.

Copy link

JustinAiken commented Oct 30, 2013

Works for test and generate, but oddly enough, not for destroy:

jaiken@firefly➜ git:(master) git st
# On branch master
nothing to commit, working directory clean
jaiken@firefly➜ git:(master) zeus generate model Foo
      invoke  active_record
      create    db/migrate/20131030000225_create_foos.rb
      create    app/models/foo.rb
      invoke    rspec
      create      spec/models/foo_spec.rb
      invoke      factory_girl
      create        spec/factories/foos.rb
jaiken@firefly➜ git:(master) ✗ zeus destroy model Foo
      invoke  active_record
      remove    migration.rb
      remove    app/models/foo.rb
      invoke    rspec
      remove      spec/models/foo_spec.rb
      invoke      factory_girl
      remove        spec/factories/foos.rb
jaiken@firefly➜ git:(master) ✗ git st
# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#   app/models/foo.rb
#   db/migrate/20131030000225_create_foos.rb
#   spec/factories/foos.rb
#   spec/models/foo_spec.rb

Still, got me alot zeusy than I was before, thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.