public
Rubygem
Description: Bang! You've deployed!
Homepage: http://opensource.thinkrelevance.com/
Clone URL: git://github.com/relevance/cap_gun.git
Search Repo:
rsanheim (author)
Mon Jun 30 11:46:54 -0700 2008
commit  b9a6ed5633b701077542fc90e79573ba85da0d73
tree    a8800e8840118b810f9964209cc33b010aaa5b67
parent  133dba2bc5c1970d2d7d98e56f317b69717088df
name age message
folder .autotest Wed Apr 16 23:01:13 -0700 2008 update autotest config [rsanheim]
folder .gitignore Thu Apr 17 18:53:49 -0700 2008 doc tweaks [rsanheim]
folder CHANGELOG Mon Jun 30 11:45:51 -0700 2008 Add dev dependency on echoe; update manifest [rsanheim]
folder MIT-LICENSE Fri Apr 04 07:15:34 -0700 2008 initial commit [rsanheim]
folder README.rdoc Wed Jun 18 23:37:43 -0700 2008 update readme and stuff [rsanheim]
folder Rakefile Mon Jun 30 11:45:51 -0700 2008 Add dev dependency on echoe; update manifest [rsanheim]
folder cap_gun.gemspec Mon Jun 30 11:46:54 -0700 2008 update gem spec for 0.0.4 [rsanheim]
folder init.rb Fri Apr 04 07:15:34 -0700 2008 initial commit [rsanheim]
folder install.rb Fri Apr 04 07:15:34 -0700 2008 initial commit [rsanheim]
folder lib/ Mon Jun 30 11:45:51 -0700 2008 Add dev dependency on echoe; update manifest [rsanheim]
folder manifest.txt Mon Jun 30 11:45:51 -0700 2008 Add dev dependency on echoe; update manifest [rsanheim]
folder spec/ Tue May 27 04:41:59 -0700 2008 don't try to display rails env if its not set [rsanheim]
folder tasks/ Sun Apr 06 19:55:56 -0700 2008 more specs and few more renames [rsanheim]
folder vendor/ Fri Apr 04 07:15:34 -0700 2008 initial commit [rsanheim]
README.rdoc

CapGun

DESCRIPTION

Tell everyone about your releases! Send email notification after Capistrano deployments! Rule the world!

Drop your ActionMailer configuration information into your deploy.rb file, configure recipients for the deployment notifications, and setup the callback task.

Setup and configuration are done entirely inside your deploy.rb file to keep it super simple. Your emails are sent locally from the box performing the deployment, but CapGun queries the server to grab the necessary release info.

This even includes the Net::SMTP TLS hack inside as a vendored dependancy to allow super easy email sending without setting up an MTA.

CONFIG

In your Capistrano config file (usually deploy.rb):

    # require cap_gun (the path will depend on where you unpacked or if you are just using it as a gem)
    require 'vendor/plugins/cap_gun/lib/cap_gun' # typical Rails vendor/plugins location

    # setup action mailer with a hash of options
    set :cap_gun_action_mailer_config, {
      :address => "smtp.gmail.com",
      :port => 587,
      :user_name => "[YOUR_USERNAME]@gmail.com",
      :password => "[YOUR_PASSWORD]",
      :authentication => :plain
    }

    # define the options for the actual emails that go out -- :recipients is the only required option
    set :cap_gun_email_envelope, { :recipients => %w[joe@example.com, jane@example.com] }

    # register email as a callback after restart
    after "deploy:restart", "cap_gun:email"

    # Test everything out by running "cap cap_gun:email"

REQUIREMENTS

  • Capistrano 2+
  • A Gmail account to send from, or an MTA (mail transport agent) installed locally to send from
  • Something to deploy

TODO & KNOWN ISSUES

  • displays the release times in UTC (Capistrano default) - could be flipped to specified time zone
  • some stuff will probably break on windows

INSTALL

  • sudo gem install cap_gun and gem unpack into your vendor/plugins
  • or just grab the tarball from github (see below)

URLS

  • Log bugs, issues, and suggestions on Trac: http://opensource.thinkrelevance.com/wiki/cap_gun
  • View source: http://github.com/relevance/cap_gun/tree/master
  • Git: git clone git://github.com/relevance/cap_gun.git
  • RDocs: http://thinkrelevance.rubyforge.org/cap_gun/

LICENSE

(The MIT License)

Copyright © 2008 Relevance, Inc. - http://thinkrelevance.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.