Sha256: 50d96aacf362c3f000b6488331e75b4b2fe8cf05ac339962ca97a0fee7235f1c

Contents?: true

Size: 927 Bytes

Versions: 22

Compression:

Stored size: 927 Bytes

Contents

require File.dirname(__FILE__) + '/base' unless defined?(Capper)

# hoptoad requires bundler
require 'capper/bundler'

Capper.load do
  # redefine the notify task without after hooks, so we can use them in
  # specific stages only.
  namespace :hoptoad do
    desc "Notify Hoptoad of the deployment"
    task :notify, :except => { :no_release => true } do
      rails_env = fetch(:hoptoad_env, fetch(:rails_env, "production"))
      local_user = ENV['USER'] || ENV['USERNAME']
      executable = fetch(:rake, 'rake')

      notify_command = "#{executable} hoptoad:deploy TO=#{rails_env} REVISION=#{current_revision} REPO=#{repository} USER=#{local_user}"
      notify_command << " DRY_RUN=true" if dry_run
      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

22 entries across 22 versions & 1 rubygems

Version Path
capper-0.7.3 lib/capper/hoptoad.rb
capper-0.7.2 lib/capper/hoptoad.rb
capper-0.7.1 lib/capper/hoptoad.rb
capper-0.7.0 lib/capper/hoptoad.rb
capper-0.6.8 lib/capper/hoptoad.rb
capper-0.6.7 lib/capper/hoptoad.rb
capper-0.6.6 lib/capper/hoptoad.rb
capper-0.6.5 lib/capper/hoptoad.rb
capper-0.6.4 lib/capper/hoptoad.rb
capper-0.6.3 lib/capper/hoptoad.rb
capper-0.6.2 lib/capper/hoptoad.rb
capper-0.6.1 lib/capper/hoptoad.rb
capper-0.6.0 lib/capper/hoptoad.rb
capper-0.5.0 lib/capper/hoptoad.rb
capper-0.4.0 lib/capper/hoptoad.rb
capper-0.3.6 lib/capper/hoptoad.rb
capper-0.3.5 lib/capper/hoptoad.rb
capper-0.3.4 lib/capper/hoptoad.rb
capper-0.3.3 lib/capper/hoptoad.rb
capper-0.3.2 lib/capper/hoptoad.rb