Permalink
Browse files

Change airbrake:notify to airbrake:deploy to be more clear that it is…

… a deploy notification
  • Loading branch information...
1 parent 21f66be commit 48ab11dd3cff5bfb2b4253e4095d161fe4d9cc0f @czarneckid czarneckid committed with Harold Giménez Sep 3, 2011
Showing with 9 additions and 9 deletions.
  1. +2 −2 features/rails.feature
  2. +3 −3 lib/airbrake/capistrano.rb
  3. +4 −4 test/capistrano_test.rb
View
4 features/rails.feature
@@ -67,7 +67,7 @@ Feature: Install the Gem in a Rails application
And I configure my application to require the "airbrake" gem
And I run the airbrake generator with "-k myapikey"
And I run "cap -T"
- Then I should see "airbrake:notify"
+ Then I should see "airbrake:deploy"
Scenario: Configure and deploy using only vendored gem
When I generate a new Rails application
@@ -79,7 +79,7 @@ Feature: Install the Gem in a Rails application
And I uninstall the "airbrake" gem
And I install cached gems
And I run "cap -T"
- Then I should see "airbrake:notify"
+ Then I should see "airbrake:deploy"
Scenario: Try to install when the airbrake plugin still exists
When I generate a new Rails application
View
6 lib/airbrake/capistrano.rb
@@ -5,12 +5,12 @@ module Airbrake
module Capistrano
def self.load_into(configuration)
configuration.load do
- after "deploy", "airbrake:notify"
- after "deploy:migrations", "airbrake:notify"
+ after "deploy", "airbrake:deploy"
+ after "deploy:migrations", "airbrake:deploy"
namespace :airbrake do
desc "Notify Airbrake of the deployment"
- task :notify, :except => { :no_release => true } do
+ task :deploy, :except => { :no_release => true } do
rails_env = fetch(:airbrake_env, fetch(:rails_env, "production"))
local_user = ENV['USER'] || ENV['USERNAME']
executable = RUBY_PLATFORM.downcase.include?('mswin') ? fetch(:rake, 'rake.bat') : fetch(:rake, 'rake')
View
8 test/capistrano_test.rb
@@ -13,19 +13,19 @@ def setup
@configuration.dry_run = true
end
- should "define airbrake:notify task" do
- assert_not_nil @configuration.find_task('airbrake:notify')
+ should "define airbrake:deploy task" do
+ assert_not_nil @configuration.find_task('airbrake:deploy')
end
- should "log when calling airbrake:notify task" do
+ should "log when calling airbrake:deploy task" do
@configuration.set(:current_revision, '084505b1c0e0bcf1526e673bb6ac99fbcb18aecc')
@configuration.set(:repository, 'repository')
io = StringIO.new
logger = Capistrano::Logger.new(:output => io)
logger.level = Capistrano::Logger::MAX_LEVEL
@configuration.logger = logger
- @configuration.find_and_execute_task('airbrake:notify')
+ @configuration.find_and_execute_task('airbrake:deploy')
assert io.string.include?('** Notifying Airbrake of Deploy')
assert io.string.include?('** Airbrake Notification Complete')

0 comments on commit 48ab11d

Please sign in to comment.