calavera-integrity-growl 1.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown ADDED
@@ -0,0 +1,46 @@
1
+ Integrity
2
+ =========
3
+
4
+ [Integrity](http://integrityapp.com) is your friendly automated Continuous Integration server.
5
+
6
+ Integrity Growl Notifier
7
+ ===========================
8
+
9
+ This lets Integrity show [Growl](http://growl.info) notifications 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
+ calavera-integrity-growl` and then in your Rackup (ie, `config.ru`) file:
16
+
17
+ require "rubygems"
18
+ require "notifier/growl"
19
+
20
+ License
21
+ =======
22
+
23
+ (The MIT License)
24
+
25
+ Copyright (c) 2009 David Calavera
26
+
27
+ Permission is hereby granted, free of charge, to any person obtaining
28
+ a copy of this software and associated documentation files (the
29
+ 'Software'), to deal in the Software without restriction, including
30
+ without limitation the rights to use, copy, modify, merge, publish,
31
+ distribute, sublicense, and/or sell copies of the Software, and to
32
+ permit persons to whom the Software is furnished to do so, subject to
33
+ the following conditions:
34
+
35
+ The above copyright notice and this permission notice shall be
36
+ included in all copies or substantial portions of the Software.
37
+
38
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
39
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
40
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
41
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
42
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
43
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
44
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
45
+
46
+ [Integrity]: http://integrityapp.com
@@ -0,0 +1,3 @@
1
+ %p.normal
2
+ %label{ :for => "growl_notifier_addresses" } Addresses
3
+ %input.text#growl_notifier_addresses{ :name => "notifiers[Growl][addresses]", :type => "text", :value => config['addresses'] }
@@ -0,0 +1,38 @@
1
+ require 'rubygems'
2
+ require 'integrity'
3
+ require 'ruby-growl'
4
+
5
+ module Integrity
6
+ class Notifier
7
+ class Growl < Notifier::Base
8
+
9
+ def initialize(build, config = {})
10
+ @growl = Growl.new "localhost", "Integrity", ["Integrity build notification"]
11
+ @addresses = config[:addresses].nil? ? [] : config.delete(:addresses).split(/,|\s+/)
12
+ @growl = @addresses.map do |address|
13
+ Growl.new address, "Integrity", ["Integrity build notification"]
14
+ end
15
+ super
16
+ end
17
+
18
+ def self.to_haml
19
+ File.read File.dirname(__FILE__) / "config.haml"
20
+ end
21
+
22
+ def deliver!
23
+ @growl.each do |g|
24
+ g.notify "Integrity build notification", short_message, message
25
+ end
26
+ end
27
+
28
+ def message
29
+ @message ||= <<-content
30
+ #{build.project.name}: #{short_message} (at #{build.commited_at} by #{build.commit_author.name})
31
+ Commit Message: '#{build.commit_message}'
32
+ Link: #{build_url}
33
+ content
34
+ end
35
+
36
+ end
37
+ end
38
+ end
metadata ADDED
@@ -0,0 +1,72 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: calavera-integrity-growl
3
+ version: !ruby/object:Gem::Version
4
+ version: "1.0"
5
+ platform: ruby
6
+ authors:
7
+ - David Calavera
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-01-17 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: ruby-growl
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 show Growl notifications after each build
34
+ email: calavera@apache.org
35
+ executables: []
36
+
37
+ extensions: []
38
+
39
+ extra_rdoc_files: []
40
+
41
+ files:
42
+ - README.markdown
43
+ - lib/notifier/growl.rb
44
+ - lib/notifier/config.haml
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: Growl notifier for the Integrity continuous integration server
71
+ test_files: []
72
+