Capistrano deployment code refactoring