Sha256: 1dab8b416192367565ff50aba08b2c986de3c6d8baf347d15eee917174c91ed5

Contents?: true

Size: 944 Bytes

Versions: 37

Compression:

Stored size: 944 Bytes

Contents

# Defines deploy:notify_hoptoad which will send information about the deploy to Hoptoad.

Capistrano::Configuration.instance(:must_exist).load do
  after "deploy",            "deploy:notify_hoptoad"
  after "deploy:migrations", "deploy:notify_hoptoad"

  namespace :deploy do
    desc "Notify Hoptoad of the deployment"
    task :notify_hoptoad, :except => { :no_release => true } do
      rails_env = fetch(:hoptoad_env, fetch(:rails_env, "production"))
      local_user = ENV['USER'] || ENV['USERNAME']
      executable = RUBY_PLATFORM.downcase.include?('mswin') ? 'rake.bat' : 'rake'
      notify_command = "#{executable} hoptoad:deploy TO=#{rails_env} REVISION=#{current_revision} REPO=#{repository} USER=#{local_user}"
      notify_command << " API_KEY=#{ENV['API_KEY']}" if ENV['API_KEY']
      puts "Notifying Hoptoad of Deploy (#{notify_command})"
      `#{notify_command}`
      puts "Hoptoad Notification Complete."
    end
  end
end

Version data entries

37 entries across 37 versions & 6 rubygems

Version Path
square-hoptoad_notifier-2.4.9 lib/hoptoad_notifier/capistrano.rb
hoptoad_notifier-2.4.9 lib/hoptoad_notifier/capistrano.rb
square-hoptoad_notifier-2.4.8 lib/hoptoad_notifier/capistrano.rb
hoptoad_notifier-2.4.8 lib/hoptoad_notifier/capistrano.rb
hoptoad_notifier-2.4.7 lib/hoptoad_notifier/capistrano.rb
hoptoad_notifier-2.4.6 lib/hoptoad_notifier/capistrano.rb
hoptoad_notifier-2.4.5 lib/hoptoad_notifier/capistrano.rb
hoptoad_notifier-2.4.4 lib/hoptoad_notifier/capistrano.rb
hoptoad_notifier-2.4.2 lib/hoptoad_notifier/capistrano.rb
hoptoad_notifier-2.4.1 lib/hoptoad_notifier/capistrano.rb
hoptoad_notifier-2.4.0 lib/hoptoad_notifier/capistrano.rb
hoptoad_notifier-2.3.12 lib/hoptoad_notifier/capistrano.rb
hoptoad_notifier-2.3.11 lib/hoptoad_notifier/capistrano.rb
hoptoad_notifier-2.3.10 lib/hoptoad_notifier/capistrano.rb
hoptoad_notifier-2.3.9 lib/hoptoad_notifier/capistrano.rb
hoptoad_notifier-2.3.8 lib/hoptoad_notifier/capistrano.rb
hoptoad_notifier-2.3.7 lib/hoptoad_notifier/capistrano.rb
riscfuture-hoptoad_notifier-2.3.6 lib/hoptoad_notifier/capistrano.rb
hoptoad_notifier-2.3.6 lib/hoptoad_notifier/capistrano.rb
hoptoad_notifier-2.3.5 lib/hoptoad_notifier/capistrano.rb