Permalink
Browse files

Readme and license - WIP

  • Loading branch information...
1 parent ddcf1e9 commit 90a17a7fa7e0ce5e975bac1e51c120a3d667e91f @jgn jgn committed Feb 9, 2012
Showing with 96 additions and 1 deletion.
  1. +20 −0 LICENSE.txt
  2. +76 −1 README.md
View
@@ -0,0 +1,20 @@
+Copyright (c) 2012 Iora Health
+
+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.
View
@@ -1,3 +1,78 @@
-### pingdom-cap
+# pingdom-cap
+pingdom-cap provides Capistrano tasks that can pause and unpause Pingdom checks.
+or example, during a deploy, you probably don't want an email from Pingdom telling
+you that your server is unavailable.
+
+## Install
+
+Add the pingdom-cap gem to your Gemfile:
+
+ gem 'pingdom-cap'
+
+Then from your project's RAILS_ROOT, and in your development environment, run:
+
+ bundle install
+
+## Usage
+
+You may configure pingdom_cap with Capistrano variables or with environment variables.
+
+Capistrano variables method: Set the following variables in your Capistrano deploy.rb script:
+
+ set :pingdom_username, 'john@example.com'
+ set :pingdom_password, '123456'
+ set :pingdom_key, 'your-pingdom-key'
+ set :pingdom_check_name, 'check-name'
+
+Environment variables way: Set the environment variables PINGDOM_USERNAME, PINGDOM_PASSWORD,
+PINGDOM_KEY, and PINGDOM_CHECK_NAME.
+
+The environment variables will take priority over the Capistrano variables, providing a means
+to override.
+
+NOTE: To acquire an API key for Pingdom, go here: https://pp.pingdom.com/index.php/member/api/restadd
+
+(The Pingdom docs say: The key "is supposed to be unique on an application basis, not user basis.
+This means that if you produce an application and then distribute it to the public, all users
+of this application should use the same application key" (http://www.pingdom.com/services/api-documentation-rest/).
+However, since Github projects are typically forked, we don't supply our key, and consider your
+use of this gem to be a separate application. So get your own key.)
+
+With these set, you can now type
+
+ cap pingdom:pause
+ cap pingdom:unpause
+
+The first command with pause the check for 'check-name' and the second will unpause
+the same check.
+
+Or you can use before and/or after hooks to trigger these tasks as needed:
+
+ before 'deploy:migrations', 'pingdom:pause'
+ after 'deploy:migrations', 'pingdom:unpause'
+
+## Bonus: Command-line application
+
+The gem ships with a command-line application named: pingdom-cap
+
+The usage is:
+
+ pingdom-cap check-name [status | pause | unpause]
+
+To set the username, password, and key, use the environment variables as described above.
+
+## Contributing to pingdom-cap
+
+* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
+* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
+* Fork the project.
+* Start a feature/bugfix branch.
+* Commit and push until you are happy with your contribution.
+* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
+* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
+
+## Copyright
+
+Copyright (c) 2012 Iora Health. See LICENSE.txt for further details.

0 comments on commit 90a17a7

Please sign in to comment.