Sha256: e79c0c3f27876140664b0f415cd51f6392888cd52580320f099aaa40dbedaafd

Contents?: true

Size: 698 Bytes

Versions: 5

Compression:

Stored size: 698 Bytes

Contents

Capistrano::Configuration.instance(:must_exist).load do
  _cset :asset_roles, [:app]

  namespace :assets do
    task :precompile_if_needed, :roles => asset_roles do
      precompile_needed = capture "cd #{current_path} && RAILS_ENV=#{rails_env} #{rake} assets:precompile_needed"

      if precompile_needed.strip == "true"
        precompile
        save_assets_versions
      end
    end

    task :precompile, :roles => asset_roles do
      run "cd #{current_path} && RAILS_ENV=#{rails_env} #{rake} assets:precompile"
    end

    task :save_assets_versions, :roles => asset_roles do
      run "cd #{current_path} && RAILS_ENV=#{rails_env} #{rake} assets:save_assets_versions"
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
thunder_punch-0.1.6 lib/thunder_punch/recipes/asset_pipeline/precompile.rb
thunder_punch-0.1.5 lib/thunder_punch/recipes/asset_pipeline/precompile.rb
thunder_punch-0.1.4 lib/thunder_punch/recipes/asset_pipeline/precompile.rb
thunder_punch-0.1.3 lib/thunder_punch/recipes/asset_pipeline/precompile.rb
thunder_punch-0.1.2 lib/thunder_punch/recipes/asset_pipeline/precompile.rb