Skip to content

Commit

Permalink
Reload permissions table on deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikssn committed Mar 31, 2015
1 parent a3a742e commit 9b553f1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
namespace :deploy do
# before :deploy, "deploy:check_revision"
before :deploy, 'deploy:run_tests'
after :deploy, 'permissions:load'

desc 'Restart application'
task :restart do
Expand Down
11 changes: 11 additions & 0 deletions lib/capistrano/tasks/load_permissions.cap
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace :deploy do
namespace :permissions do
desc 'Reload permissions table'
task :load do
on roles(:all) do
execute "cd #{deploy_to}/current && #{fetch(:rbenv_prefix)} bundle exec "\
"rake permissions:load RAILS_ENV=#{fetch(:rails_env)}"
end
end
end
end

0 comments on commit 9b553f1

Please sign in to comment.