Permalink
Browse files

Test task was not allowed + logging

  • Loading branch information...
1 parent cab2a50 commit 6a70cd9e3dbc0c50c75b7385337e7b6b9eb5a168 @iain committed Mar 29, 2012
Showing with 11 additions and 2 deletions.
  1. +1 −1 README.md
  2. +8 −0 lib/capistrano/blaze.rb
  3. +2 −1 lib/capistrano/blaze/recipes.rb
View
@@ -44,7 +44,7 @@ end
To test your configuration, run:
``` shell
-$ cap campfire:test
+$ cap campfire:test_config
```
## Todo
View
@@ -24,6 +24,14 @@ def speak(message)
res = Net::HTTP.start("#{@config.account}.campfirenow.com", port, :use_ssl => @config.ssl) do |http|
http.request(req)
end
+
+ if res.is_a?(Net::HTTPSuccess)
+ puts "Campfire message sent!"
+ else
+ puts "Campfire communication failed!"
+ puts res.inspect
+ puts res.body.inspect
+ end
end
def failure(context, exception)
@@ -12,7 +12,8 @@
Capistrano::Blaze.success(self)
end
- task :test do
+ desc "Sends a test message to Campfire"
+ task :test_config do
Capistrano::Blaze.test(self)
end

0 comments on commit 6a70cd9

Please sign in to comment.