Permalink
Browse files

some fixes

  • Loading branch information...
1 parent 106f12c commit 1c7d9a9e9bbef0c60562bde24cd8d182c7296c34 @smith smith committed Mar 23, 2012
Showing with 6 additions and 5 deletions.
  1. +6 −5 lib/capistrano/notifier/statsd.rb
@@ -3,17 +3,18 @@
require 'capistrano/notifier'
module Capistrano::Notifier::StatsD
- def self.extended(configuration)
+ def self.load_into(configuration)
+ configuration.set(:notifier, self)
configuration.load do
namespace :deploy do
namespace :notify do
desc 'Notify StatsD of deploy.'
task :statsd do
- options = get_options(
- capture("cat #{release_path}/config/stats.yml"),
+ options = notifier.get_options(
+ capture("cat #{current_path}/config/stats.yml"),
configuration
)
- run "echo '#{application}.#{stage + '.' if stage}deploy:1|c' > nc -w 1 -u #{options[:host]} #{options[:port]}"
+ run "echo #{application}.#{stage + '.' if stage}deploy:1\\|c | nc -w 1 -u #{options[:host]} #{options[:port]}"
end
end
end
@@ -35,5 +36,5 @@ def self.get_options(yaml = "", configuration)
end
if Capistrano::Configuration.instance
- Capistrano::Configuration.instance.extend(Capistrano::Configuration.instance)
+ Capistrano::Notifier::StatsD.load_into(Capistrano::Configuration.instance)
end

0 comments on commit 1c7d9a9

Please sign in to comment.