Sha256: 4faa26f6c12681c50345a3b2f92d1e8eb5b7ba6d56597c0daa26a4eafff94af7
Contents?: true
Size: 1.29 KB
Versions: 15
Compression:
Stored size: 1.29 KB
Contents
require 'capistrano' module Appsignal module Integrations class Capistrano def self.tasks(config) config.load do after 'deploy', 'appsignal:deploy' after 'deploy:migrations', 'appsignal:deploy' namespace :appsignal do task :deploy do env = fetch(:rails_env, fetch(:rack_env, 'production')) user = ENV['USER'] || ENV['USERNAME'] appsignal_config = Appsignal::Config.new( ENV['PWD'], env, fetch(:appsignal_config, {}), logger ) if appsignal_config && appsignal_config.active? marker_data = { :revision => current_revision, :repository => repository, :user => user } marker = Marker.new(marker_data, appsignal_config, logger) if config.dry_run logger.info('Dry run: Deploy marker not actually sent.') else marker.transmit end end end end end end end end end if ::Capistrano::Configuration.instance Appsignal::Integrations::Capistrano.tasks(::Capistrano::Configuration.instance) end
Version data entries
15 entries across 15 versions & 1 rubygems