Sha256: 97380d1ef1fd00f92edd7b45e1bd625aeae1bf7223c4bd04dc12b4edf6d5033c

Contents?: true

Size: 987 Bytes

Versions: 9

Compression:

Stored size: 987 Bytes

Contents

# Capistrano plugin hook to set default values
namespace :load do
  task :defaults do
    set :bundled_sidekiq_symlink, fetch(:bundled_sidekiq_symlink, false)
    set :bundled_sidekiq_roles, fetch(:bundled_sidekiq_roles, [:app])
  end
end

# Integrate sidekiq-bundle hook into Capistrano
namespace :deploy do
  before :starting, :add_bundled_sidekiq_hook do
    invoke 'bundled_sidekiq:add_hook' if fetch(:bundled_sidekiq_symlink)
  end
end

namespace :bundled_sidekiq do
  # NOTE: no `desc` here to avoid publishing this task in the `cap -T` list
  task :add_hook do
    after 'bundler:install', 'bundled_sidekiq:symlink'
  end

  # NOTE: no `desc` here to avoid publishing this task in the `cap -T` list
  task :symlink do
    on roles fetch(:bundled_sidekiq_roles) do
      within release_path do
        bundled_sidekiq_path = capture(:bundle, :info, '--path', :sidekiq)
        execute(:ln, '-sf', bundled_sidekiq_path, "#{shared_path}/bundled_sidekiq")
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
dlss-capistrano-4.1.0 lib/dlss/capistrano/tasks/bundled_sidekiq.rake
dlss-capistrano-4.0.0 lib/dlss/capistrano/tasks/bundled_sidekiq.rake
dlss-capistrano-3.11.1 lib/dlss/capistrano/tasks/bundled_sidekiq.rake
dlss-capistrano-3.11.0 lib/dlss/capistrano/tasks/bundled_sidekiq.rake
dlss-capistrano-3.10.1 lib/dlss/capistrano/tasks/bundled_sidekiq.rake
dlss-capistrano-3.10.0 lib/dlss/capistrano/tasks/bundled_sidekiq.rake
dlss-capistrano-3.9.0 lib/dlss/capistrano/tasks/bundled_sidekiq.rake
dlss-capistrano-3.8.0 lib/dlss/capistrano/tasks/bundled_sidekiq.rake
dlss-capistrano-3.7.0 lib/dlss/capistrano/tasks/bundled_sidekiq.rake