Skip to content

Commit

Permalink
Merge pull request #28 from westonplatter/master
Browse files Browse the repository at this point in the history
wrap dynamic hook evaluation in a before block so it runs before start
  • Loading branch information
Justin McNally committed Oct 20, 2014
2 parents b47954b + 02d08fa commit d9736c2
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions lib/capistrano/slack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,16 @@ def slack_defaults

def self.extended(configuration)
configuration.load do
slack_defaults


set :deployer do
ENV['GIT_AUTHOR_NAME'] || `git config user.name`.chomp
end

namespace :slack do
before('deploy') do
slack_defaults
end

set :deployer do
ENV['GIT_AUTHOR_NAME'] || `git config user.name`.chomp
end

namespace :slack do
task :starting do
return if slack_token.nil?
announced_deployer = ActiveSupport::Multibyte::Chars.new(fetch(:deployer)).mb_chars.normalize(:kd).gsub(/[^\x00-\x7F]/,'').to_s
Expand Down

0 comments on commit d9736c2

Please sign in to comment.