Skip to content

Instantly share code, notes, and snippets.

@Jamedjo
Created March 26, 2013 01:37
Show Gist options
  • Save Jamedjo/5242420 to your computer and use it in GitHub Desktop.
Save Jamedjo/5242420 to your computer and use it in GitHub Desktop.
Zeus command to run asset compilation in development environment with assets group. Usage: `zeus assets some:nested:task' translates to `rake assets:some:nested:task` E.g. `zeus assets precompile` instead of `rake assets:precompile`
require 'zeus/rails'
class CustomPlan < Zeus::Rails
def assets_environment
Bundler.require(:assets)
ENV['RAILS_GROUPS'] = "assets"
end
def assets_run
ARGV.first.prepend "assets:"
Rake.application.run
end
# def my_custom_command
# # see https://github.com/burke/zeus/blob/master/docs/ruby/modifying.md
# end
end
Zeus.plan = CustomPlan.new
{
"command": "ruby -rubygems -r./custom_plan -eZeus.go",
"plan": {
"boot": {
"default_bundle": {
"development_environment": {
"prerake": {
"rake": [],
"assets_environment":{
"assets_run": ["assets"]
}
},
"runner": ["r"],
"console": ["c"],
"server": ["s"],
"generate": ["g"],
"destroy": ["d"],
"dbconsole": []
},
"test_environment": {
"cucumber_environment": {"cucumber": []},
"test_helper": {"test": ["rspec", "testrb"]}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment