Top Level Namespace
Defined Under Namespace
Modules: Capistrano, O2h
Instance Method Summary collapse
Instance Method Details
#in_rails_root(taskname) ⇒ Object
9 10 11 12 13 |
# File 'lib/o2h/recipes.rb', line 9 def in_rails_root(taskname) rails_env = fetch(:rails_env, "production") directory = current_release run %{cd #{directory}; RAILS_ENV=#{rails_env} #{taskname}} end |
#rake_task(taskname) ⇒ Object
3 4 5 6 7 |
# File 'lib/o2h/recipes.rb', line 3 def rake_task(taskname) rake = fetch(:rake, "rake") rake_env = fetch(:rake_env, "") in_rails_root("#{rake} #{rake_env} #{taskname}") end |