Sha256: e6bd85712607c9870310a2fc4f27295e53650a64ec9d2981cedec060e0073b35

Contents?: true

Size: 859 Bytes

Versions: 1

Compression:

Stored size: 859 Bytes

Contents

require 'errplane'

Capistrano::Configuration.instance(:must_exist).load do
  after 'deploy',            'deploy:notify_errplane'
  after 'deploy:migrations', 'deploy:notify_errplane'

  namespace :deploy do
    desc 'Notify Errplane of the deployment'
    task :notify_errplane, :except => {:no_release => true} do
      puts "Notifying Errplane of the deployment.."
      framework_env = fetch(:rails_env, fetch(:errplane_env, 'production'))
      load File.join(Dir.pwd, "config/initializers/errplane.rb")
      Errplane.configuration.rails_environment = framework_env

      deploy_options = {
        :environment => framework_env,
        :revision => current_revision,
        :repository => repository,
        :scm => scm,
        :host => host
      }
      Errplane::Transmitter.new.relay(deploy_options, true)
      puts 'Done.'
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
errplane-0.2.0 lib/errplane/capistrano.rb