jeremydurham-integrity-campfire 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown ADDED
@@ -0,0 +1,50 @@
1
+ Integrity
2
+ =========
3
+
4
+ [Integrity][] is your friendly automated Continuous Integration server.
5
+
6
+ Integrity Campfire Notifier
7
+ ===========================
8
+
9
+ This lets Integrity alert Campfire after each build is made.
10
+
11
+ Setup Instructions
12
+ ==================
13
+
14
+ Just install this gem via `sudo gem install -s http://gems.github.com
15
+ defunkt-integrity-campfire` and then in your Rackup (ie, `config.ru`) file:
16
+
17
+ require "rubygems"
18
+ require "notifier/campfire"
19
+
20
+ And badabing! Now you can set up your projects to alert Campfire after
21
+ each build (just edit the project and the config options should be
22
+ there)
23
+
24
+ License
25
+ =======
26
+
27
+ (The MIT License)
28
+
29
+ Copyright (c) 2008 Chris Wanstrath
30
+
31
+ Permission is hereby granted, free of charge, to any person obtaining
32
+ a copy of this software and associated documentation files (the
33
+ 'Software'), to deal in the Software without restriction, including
34
+ without limitation the rights to use, copy, modify, merge, publish,
35
+ distribute, sublicense, and/or sell copies of the Software, and to
36
+ permit persons to whom the Software is furnished to do so, subject to
37
+ the following conditions:
38
+
39
+ The above copyright notice and this permission notice shall be
40
+ included in all copies or substantial portions of the Software.
41
+
42
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
43
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
44
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
45
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
46
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
47
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
48
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
49
+
50
+ [Integrity]: http://integrityapp.com
@@ -0,0 +1,43 @@
1
+ require 'rubygems'
2
+ require 'integrity'
3
+ require 'tinder'
4
+
5
+ module Integrity
6
+ class Notifier
7
+ class Campfire < Notifier::Base
8
+ attr_reader :config
9
+
10
+ def self.to_haml
11
+ File.read File.dirname(__FILE__) / "config.haml"
12
+ end
13
+
14
+ def deliver!
15
+ room.speak "#{short_message}. #{build_url}"
16
+ room.paste full_message if build.failed?
17
+ end
18
+
19
+ private
20
+ def room
21
+ @room ||= begin
22
+ campfire = Tinder::Campfire.new(config['account'])
23
+ campfire.login(config['user'], config['pass'])
24
+ campfire.find_room_by_name(config['room'])
25
+ end
26
+ end
27
+
28
+ def short_message
29
+ "Build #{build.short_commit_identifier} of #{build.project.name} by #{build.commit_author.name}: #{build.commit_message} #{build.successful? ? "was successful" : "failed"}"
30
+ end
31
+
32
+ def full_message
33
+ <<-EOM
34
+ Commit Message: #{build.commit_message}
35
+ Commit Date: #{build.commited_at}
36
+ Commit Author: #{build.commit_author.name}
37
+
38
+ #{stripped_build_output}
39
+ EOM
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,15 @@
1
+ %p.normal
2
+ %label{ :for => "campfire_notifier_account" } Subdomain
3
+ %input.text#campfire_notifier_account{ :name => "notifiers[Campfire][account]", :type => "text", :value => config["account"] }
4
+
5
+ %p.normal
6
+ %label{ :for => "campfire_notifier_room" } Room Name
7
+ %input.text#campfire_notifier_room{ :name => "notifiers[Campfire][room]", :type => "text", :value => config["room"] }
8
+
9
+ %p.normal
10
+ %label{ :for => "campfire_notifier_user" } User
11
+ %input.text#campfire_notifier_user{ :name => "notifiers[Campfire][user]", :value => config["user"], :type => "text" }
12
+
13
+ %p.normal
14
+ %label{ :for => "campfire_notifier_pass" } Password
15
+ %input.text#campfire_notifier_pass{ :name => "notifiers[Campfire][pass]", :value => config["pass"], :type => "text" }
metadata ADDED
@@ -0,0 +1,72 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jeremydurham-integrity-campfire
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Chris Wanstrath
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-02-12 00:00:00 -08:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: foca-integrity
17
+ version_requirement:
18
+ version_requirements: !ruby/object:Gem::Requirement
19
+ requirements:
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: "0"
23
+ version:
24
+ - !ruby/object:Gem::Dependency
25
+ name: tinder
26
+ version_requirement:
27
+ version_requirements: !ruby/object:Gem::Requirement
28
+ requirements:
29
+ - - ">="
30
+ - !ruby/object:Gem::Version
31
+ version: "0"
32
+ version:
33
+ description: Easily let Integrity alert Campfire after each build
34
+ email: chris@ozmm.org
35
+ executables: []
36
+
37
+ extensions: []
38
+
39
+ extra_rdoc_files: []
40
+
41
+ files:
42
+ - README.markdown
43
+ - lib/notifier/config.haml
44
+ - lib/notifier/campfire.rb
45
+ has_rdoc: false
46
+ homepage: http://integrityapp.com
47
+ post_install_message:
48
+ rdoc_options: []
49
+
50
+ require_paths:
51
+ - lib
52
+ required_ruby_version: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: "0"
57
+ version:
58
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: "0"
63
+ version:
64
+ requirements: []
65
+
66
+ rubyforge_project:
67
+ rubygems_version: 1.2.0
68
+ signing_key:
69
+ specification_version: 2
70
+ summary: Campfire notifier for the Integrity continuous integration server
71
+ test_files: []
72
+