Skip to content
Browse files

initial commit

  • Loading branch information...
0 parents commit 64206ea5c2451f12a5b4d0f134d5d56aa1a84699 @dakrone committed Aug 31, 2009
Showing with 114 additions and 0 deletions.
  1. +52 −0 README.markdown
  2. +5 −0 Rakefile
  3. +23 −0 integrity-cap-notifier.gemspec
  4. +29 −0 lib/integrity/notifier/cap.rb
  5. +5 −0 lib/integrity/notifier/config.haml
52 README.markdown
@@ -0,0 +1,52 @@
+Integrity
+=========
+
+[Integrity][] is your friendly automated Continuous Integration server.
+
+Integrity Email Notifier
+========================
+
+This lets Integrity send emails after each build is made.
+
+Setup Instructions
+==================
+
+Just install this gem via `sudo gem install integrity-email` and then in your
+Rackup (ie, `config.ru`) file:
+
+ require "rubygems"
+ require "integrity/notifier/email"
+
+And badabing! Now you can set up your projects to send emails after
+each build (just edit the project and the config options should be
+there)
+
+License
+=======
+
+(The MIT License)
+
+Copyright (c) 2008, 2009 [Nicolás Sanguinetti][foca], [entp][]
+
+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.
+
+[Integrity]: http://integrityapp.com
+[foca]: http://nicolassanguinetti.info
+[entp]: http://entp.com
5 Rakefile
@@ -0,0 +1,5 @@
+begin
+ require "mg"
+ MG.new("integrity-cap-notifier.gemspec")
+rescue LoadError
+end
23 integrity-cap-notifier.gemspec
@@ -0,0 +1,23 @@
+Gem::Specification.new do |s|
+ s.name = "integrity-cap-notifier"
+ s.version = "0.0.1"
+ s.date = "2009-09-22"
+ s.summary = "Cap deployer for the Integrity continuous integration server"
+ s.description = "Easily let Integrity deploy using cap after each build"
+ s.homepage = "http://integrityapp.com"
+ s.email = "info@integrityapp.com"
+ s.authors = ["Lee Hinman"]
+ s.has_rdoc = false
+
+ s.add_dependency "integrity"
+
+ s.rubyforge_project = "integrity-cap-notifier"
+
+ s.files = %w[
+README.markdown
+Rakefile
+integrity-cap-notifier.gemspec
+lib/integrity/notifier/config.haml
+lib/integrity/notifier/cap.rb
+]
+end
29 lib/integrity/notifier/cap.rb
@@ -0,0 +1,29 @@
+require "rubygems"
+require "integrity"
+
+module Integrity
+ class Notifier
+ class Deploy < Notifier::Base
+
+ def self.to_haml
+ File.read(File.dirname(__FILE__) + "/config.haml")
+ end
+
+ def initialize(commit, config = {})
+ @ready = commit.successful?
+ super(commit, config)
+ end
+
+
+ def deliver!
+ system("echo '#{@ready.inspect}' >> /tmp/worked")
+ #system("touch /tmp/worked") if @ready
+ end
+
+ end
+
+ register Deploy
+ end
+end
+
+
5 lib/integrity/notifier/config.haml
@@ -0,0 +1,5 @@
+
+%p.normal
+ %label{ :for => "integrity_cap_notifier_target" } Capistrano target
+ %input.text#integrity_cap_notifier_target{ :name => "notifiers[IntegrityCapNotifier][target]", :value => config["target"], :type => "text" }
+

0 comments on commit 64206ea

Please sign in to comment.
Something went wrong with that request. Please try again.