Module: CapistranoDeploy::RailsAssets

Defined in:
lib/capistrano-deploy/rails_assets.rb

Class Method Summary collapse

Class Method Details

.load_into(configuration) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/capistrano-deploy/rails_assets.rb', line 3

def self.load_into(configuration)
  configuration.load do
    use_recipe :rails

    namespace :deploy do
      namespace :assets do
        desc 'Precompile assets'
        task :precompile do
          run "cd #{deploy_to} && RAILS_ENV=#{rails_env} RAILS_GROUPS=assets #{rake} assets:precompile"
        end

        desc 'Clean assets'
        task :clean do
          run "cd #{deploy_to} && RAILS_ENV=#{rails_env} RAILS_GROUPS=assets #{rake} assets:clean"
        end
      end
    end
  end
end