Sha256: 8e226911e3f3c4222bf615bea4567f6fa6c7205d8e585d39751da2eb67a91149

Contents?: true

Size: 973 Bytes

Versions: 36

Compression:

Stored size: 973 Bytes

Contents

Capistrano::Configuration.instance(:must_exist).load do
  namespace :ndr_dev_support do
    desc 'Configure  / precompile assets'
    task :configure_assets do
      asset_script = fetch(:asset_script, <<~SHELL)
        set -e
        ruby -ryaml -e "puts YAML.dump('production' => { 'secret_key_base' => 'compile_me' })" > config/secrets.yml
        ruby -ryaml -e "puts YAML.dump('production' => { 'adapter' => 'placeholder' })" > config/database.yml
        RAILS_ENV=production bundle exec rake assets:clobber assets:precompile
        rm config/secrets.yml config/database.yml
      SHELL

      if fetch(:webapp_deployment)
        # Prepend the build script with asset compilation steps:
        set :build_script, asset_script + fetch(:build_script, '')

        # We'll have replaced all the assets if they're needed:
        set :normalize_asset_timestamps, false
      end
    end
  end

  after 'ndr_dev_support:prepare', 'ndr_dev_support:configure_assets'
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
ndr_dev_support-6.0.3 lib/ndr_dev_support/capistrano/assets.rb
ndr_dev_support-6.0.2 lib/ndr_dev_support/capistrano/assets.rb
ndr_dev_support-6.0.1 lib/ndr_dev_support/capistrano/assets.rb
ndr_dev_support-6.0.0 lib/ndr_dev_support/capistrano/assets.rb
ndr_dev_support-5.10.2 lib/ndr_dev_support/capistrano/assets.rb
ndr_dev_support-5.10.1 lib/ndr_dev_support/capistrano/assets.rb
ndr_dev_support-5.10.0 lib/ndr_dev_support/capistrano/assets.rb
ndr_dev_support-5.9.0 lib/ndr_dev_support/capistrano/assets.rb
ndr_dev_support-5.8.2 lib/ndr_dev_support/capistrano/assets.rb
ndr_dev_support-5.8.1 lib/ndr_dev_support/capistrano/assets.rb
ndr_dev_support-5.8.0 lib/ndr_dev_support/capistrano/assets.rb
ndr_dev_support-5.7.1 lib/ndr_dev_support/capistrano/assets.rb
ndr_dev_support-5.7.0 lib/ndr_dev_support/capistrano/assets.rb
ndr_dev_support-5.6.0 lib/ndr_dev_support/capistrano/assets.rb
ndr_dev_support-5.5.0 lib/ndr_dev_support/capistrano/assets.rb
ndr_dev_support-5.4.8 lib/ndr_dev_support/capistrano/assets.rb