lib/caploy/recipes/paperclip.rb in caploy-0.2.5 vs lib/caploy/recipes/paperclip.rb in caploy-1.0.0
- old
+ new
@@ -1,11 +1,10 @@
-Capistrano::Configuration.instance.load do
-
- namespace :deploy do
- desc "build missing paperclip styles"
- task :build_missing_paperclip_styles, :roles => :app do
- run "cd #{release_path}; RAILS_ENV=#{rails_env} #{rake} paperclip:refresh:missing_styles"
+namespace :deploy do
+ desc 'build missing paperclip styles'
+ task :build_missing_paperclip_styles do
+ on roles(:app) do
+ execute "cd #{current_path}; RAILS_ENV=production bundle exec rake paperclip:refresh:missing_styles"
end
end
-
- #after("deploy:update_code", "deploy:build_missing_paperclip_styles")
end
+
+after('deploy:compile_assets', 'deploy:build_missing_paperclip_styles')