integrity-notifyio 0.2.1 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/Changelog ADDED
@@ -0,0 +1,6 @@
1
+ 0.2.3
2
+ Improved printout, including project name and pass or failed
3
+ Added link attribute to be passed to Notify.io
4
+ Added installation instructions to README
5
+ 0.2.1
6
+ First Working version
data/README.markdown CHANGED
@@ -4,22 +4,22 @@ Integrity
4
4
  [Integrity][] is your friendly automated Continuous Integration server.
5
5
 
6
6
  Integrity Notify.io Notifier
7
- =========================
7
+ ============================
8
8
 
9
9
  This lets Integrity post notifications to Notify.io after each build is made.
10
10
 
11
11
  Setup Instructions
12
12
  ==================
13
13
 
14
- Just install this gem via `sudo gem install integrity-notifyio` and then in your
15
- Rackup (ie, `config.ru`) file:
16
-
17
- require "rubygems"
18
- require "integrity/notifier/notifyio"
19
-
20
- Now you can set up your projects to post notifications to your
21
- Notify.io after each build (just edit the project and the config options
22
- should be there)
14
+ To use integrity-notifyio you need to do the following:
15
+ In the *Gemfile* add:
16
+ gem "integrity-notifyio", '>=0.2.2'
17
+
18
+ In *init.rb* add:
19
+ # = Notify.io
20
+ require "integrity/notifier/notifyio"
21
+
22
+ Reload Integrity and you should be able to add/edit your projects and see the new Notify.IO panel
23
23
 
24
24
  License
25
25
  =======
data/README.rdoc CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  A Notify.io based notifier for the Integrity continuous integration server.
4
4
 
5
+ == Installation
6
+
7
+ To use integrity-notifyio you need to do the following:
8
+ In the *Gemfile* add:
9
+ gem "integrity-notifyio", '>=0.2.2'
10
+
11
+ In *init.rb* add:
12
+ # = Notify.io
13
+ require "integrity/notifier/notifyio"
14
+
15
+ Reload Integrity and you should be able to add/edit your projects and see the new Notify.IO panel
16
+
5
17
  == Copyright
6
18
 
7
19
  Copyright (c) 2010 Andrew Kalek. See LICENSE for details.
data/Rakefile CHANGED
@@ -10,6 +10,7 @@ begin
10
10
  gem.email = "andrew.kalek@anlek.com"
11
11
  gem.homepage = "http://github.com/anlek/integrity-notifyio"
12
12
  gem.authors = ["Andrew Kalek"]
13
+ gem.extra_rdoc_files = ['Changelog']
13
14
  ["httparty"].each do |dep|
14
15
  gem.add_dependency dep
15
16
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.3
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{integrity-notifyio}
8
- s.version = "0.2.1"
8
+ s.version = "0.2.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Andrew Kalek"]
@@ -13,12 +13,11 @@ Gem::Specification.new do |s|
13
13
  s.description = %q{Let Integrity post notifications to your Notifiy.io account after each build}
14
14
  s.email = %q{andrew.kalek@anlek.com}
15
15
  s.extra_rdoc_files = [
16
- "LICENSE",
17
- "README.markdown",
18
- "README.rdoc"
16
+ "Changelog"
19
17
  ]
20
18
  s.files = [
21
19
  ".gitignore",
20
+ "Changelog",
22
21
  "LICENSE",
23
22
  "README.markdown",
24
23
  "README.rdoc",
@@ -11,7 +11,7 @@ module Integrity
11
11
  end
12
12
 
13
13
  def deliver!
14
- post(config['email'], config['api_key'], short_message, full_message) if announce_build?
14
+ post(config['email'], config['api_key'], short_message, full_message, :link => build_url) if announce_build?
15
15
  end
16
16
 
17
17
  def to_s
@@ -22,20 +22,24 @@ module Integrity
22
22
  private
23
23
  #######
24
24
 
25
+ def short_message
26
+ "#{build.project.name} :: #{build.human_status}"
27
+ end
28
+
25
29
  def full_message
26
- <<-EOM
27
- == #{short_message}
28
-
29
- Commit Message: #{build.commit.message}
30
- Commit Date: #{build.commit.committed_at}
31
- Commit Author: #{build.commit.author.name}
32
-
33
- Link: #{build_url}
34
-
35
- EOM
30
+ msg = []
31
+ msg << "== #{build.failed? ? "Failed" : "Passed!"} =="
32
+ msg << ''
33
+ msg << "Commit Author: #{build.commit.author.name}"
34
+ msg << "Commit Date: #{build.commit.committed_at}"
35
+ msg << "Commit Message: #{build.commit.message}"
36
+ msg << ''
37
+ msg << "Link: #{build_url}"
38
+
39
+ msg.join("\n")
36
40
  end
37
41
 
38
- def post(emails, api_key, title, body)
42
+ def post(emails, api_key, title, body, options={})
39
43
  return if emails.nil? || emails.empty? || api_key.nil? || api_key.empty?
40
44
  emails.split(',').each do |email|
41
45
  email_hash = MD5.hexdigest(email.strip)
@@ -44,7 +48,8 @@ EOM
44
48
  :query => {
45
49
  :api_key => api_key,
46
50
  :title => title,
47
- :text => body
51
+ :text => body,
52
+ :link => options[:link]
48
53
  }
49
54
 
50
55
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: integrity-notifyio
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 1
10
- version: 0.2.1
9
+ - 3
10
+ version: 0.2.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Andrew Kalek
@@ -53,11 +53,10 @@ executables: []
53
53
  extensions: []
54
54
 
55
55
  extra_rdoc_files:
56
- - LICENSE
57
- - README.markdown
58
- - README.rdoc
56
+ - Changelog
59
57
  files:
60
58
  - .gitignore
59
+ - Changelog
61
60
  - LICENSE
62
61
  - README.markdown
63
62
  - README.rdoc