jfcouture-integrity-jabber 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/notifier/config.haml +13 -0
- data/lib/notifier/jabber.rb +36 -0
- metadata +73 -0
@@ -0,0 +1,13 @@
|
|
1
|
+
%p.normal
|
2
|
+
%label{ :for => "jabber_notifier_recipients" } Recipients
|
3
|
+
%input.text#jabber_notifier_recipients{ :name => "notifiers[Jabber][recipients]", :type => "text", :value => config['recipients'] }
|
4
|
+
|
5
|
+
%h3 Jabber Server Configuration
|
6
|
+
|
7
|
+
%p.normal
|
8
|
+
%label{ :for => "jabber_notifier_user" } User
|
9
|
+
%input.text#jabber_notifier_user{ :name => "notifiers[Jabber][user]", :value => config["user"], :type => "text", :value => config['user'] }
|
10
|
+
|
11
|
+
%p.normal
|
12
|
+
%label{ :for => "jabber_notifier_pass" } Pass
|
13
|
+
%input.text#jabber_notifier_pass{ :name => "notifiers[Jabber][pass]", :value => config["pass"], :type => "text", :value => config['pass'] }
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'integrity'
|
3
|
+
require 'xmpp4r-simple'
|
4
|
+
|
5
|
+
module Integrity
|
6
|
+
class Notifier
|
7
|
+
class Jabber < Notifier::Base
|
8
|
+
attr_reader :recipients
|
9
|
+
|
10
|
+
def self.to_haml
|
11
|
+
File.read File.dirname(__FILE__) / "config.haml"
|
12
|
+
end
|
13
|
+
|
14
|
+
def initialize(build, config = {})
|
15
|
+
@server = ::Jabber::Simple.new(config.delete("user"), config.delete("pass"))
|
16
|
+
sleep 4
|
17
|
+
@recipients = config["recipients"].nil? ? [] : config.delete("recipients").split(/\s+/)
|
18
|
+
super
|
19
|
+
end
|
20
|
+
|
21
|
+
def deliver!
|
22
|
+
@recipients.each do |r|
|
23
|
+
@server.deliver(r, message)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def message
|
28
|
+
@message ||= <<-content
|
29
|
+
#{build.project.name}: #{short_message} (at #{build.commited_at} by #{build.commit_author.name})
|
30
|
+
Commit Message: '#{build.commit_message}'
|
31
|
+
Link: #{build_url}
|
32
|
+
content
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
metadata
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jfcouture-integrity-jabber
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Pier-Hugues Pellerin
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2008-11-16 00:00:00 -08:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: foca-integrity
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0"
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: xmpp4r-simple
|
27
|
+
type: :runtime
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: "0"
|
34
|
+
version:
|
35
|
+
description: Easily let Integrity send jabber messages after each build
|
36
|
+
email: ph@heykimo.com
|
37
|
+
executables: []
|
38
|
+
|
39
|
+
extensions: []
|
40
|
+
|
41
|
+
extra_rdoc_files: []
|
42
|
+
|
43
|
+
files:
|
44
|
+
- lib/notifier/config.haml
|
45
|
+
- lib/notifier/jabber.rb
|
46
|
+
has_rdoc: false
|
47
|
+
homepage: http://integrityapp.com
|
48
|
+
post_install_message:
|
49
|
+
rdoc_options: []
|
50
|
+
|
51
|
+
require_paths:
|
52
|
+
- lib
|
53
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
54
|
+
requirements:
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: "0"
|
58
|
+
version:
|
59
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: "0"
|
64
|
+
version:
|
65
|
+
requirements: []
|
66
|
+
|
67
|
+
rubyforge_project:
|
68
|
+
rubygems_version: 1.2.0
|
69
|
+
signing_key:
|
70
|
+
specification_version: 2
|
71
|
+
summary: Jabber notifier for the Integrity continuous integration server
|
72
|
+
test_files: []
|
73
|
+
|