Sha256: 8109a738f71d20f82d74fe2d0800c8e255ff755ba780720cc49198e2d7d8aaf8

Contents?: true

Size: 778 Bytes

Versions: 2

Compression:

Stored size: 778 Bytes

Contents

# When Hoptoad is installed as a plugin this is loaded automatically.
#
# When Hoptoad installed as a gem, you need to add 
#  require 'hoptoad_notifier/recipes/hoptoad'
# to your deploy.rb
#
# Defines deploy:notify_hoptoad which will send information about the deploy to Hoptoad.
#
after "deploy:cleanup", "deploy:notify_hoptoad"

namespace :deploy do
  desc "Notify Hoptoad of the deployment"
  task :notify_hoptoad do
    rails_env = fetch(:rails_env, "production")
    local_user = ENV['USER'] || ENV['USERNAME']
    notify_command = "rake hoptoad:deploy TO=#{rails_env} REVISION=#{current_revision} REPO=#{repository} USER=#{local_user}"
    puts "Notifying Hoptoad of Deploy (#{notify_command})"
    `#{notify_command}`
    puts "Hoptoad Notification Complete."
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
markbates-hoptoad_notifier-1.2.0.1 recipes/hoptoad.rb
markbates-hoptoad_notifier-1.2.0.2 recipes/hoptoad.rb