integrity-notifyio 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ *.sw?
2
+ .DS_Store
3
+ coverage
4
+ doc
5
+ pkg
data/Rakefile ADDED
@@ -0,0 +1,57 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "integrity-notifyio"
8
+ gem.summary = "Notifiy.io notifier for the Integrity continuous integration server"
9
+ gem.description = "Let Integrity post notifications to your Notifiy.io account after each build"
10
+ gem.email = "andrew.kalek@anlek.com"
11
+ gem.homepage = "http://github.com/anlek/integrity-notifyio"
12
+ gem.authors = ["Andrew Kalek"]
13
+ gem.add_dependency "integrity"
14
+ gem.add_development_dependency "shoulda"
15
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
16
+ end
17
+ rescue LoadError
18
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
19
+ end
20
+
21
+ require 'rake/testtask'
22
+ Rake::TestTask.new(:test) do |test|
23
+ test.libs << 'lib' << 'test'
24
+ test.pattern = 'test/**/*_test.rb'
25
+ test.verbose = true
26
+ end
27
+
28
+ begin
29
+ require 'rcov/rcovtask'
30
+ Rcov::RcovTask.new do |test|
31
+ test.libs << 'test'
32
+ test.pattern = 'test/**/*_test.rb'
33
+ test.verbose = true
34
+ end
35
+ rescue LoadError
36
+ task :rcov do
37
+ abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
38
+ end
39
+ end
40
+
41
+ task :test => :check_dependencies
42
+
43
+ task :default => :test
44
+
45
+ require 'rake/rdoctask'
46
+ Rake::RDocTask.new do |rdoc|
47
+ if File.exist?('VERSION')
48
+ version = File.read('VERSION')
49
+ else
50
+ version = ""
51
+ end
52
+
53
+ rdoc.rdoc_dir = 'rdoc'
54
+ rdoc.title = "integrity-notifyio #{version}"
55
+ rdoc.rdoc_files.include('README*')
56
+ rdoc.rdoc_files.include('lib/**/*.rb')
57
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.1
@@ -0,0 +1,60 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{integrity-notifyio}
8
+ s.version = "0.1.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Andrew Kalek"]
12
+ s.date = %q{2010-07-14}
13
+ s.description = %q{Let Integrity post notifications to your Notifiy.io account after each build}
14
+ s.email = %q{andrew.kalek@anlek.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.markdown",
18
+ "README.rdoc"
19
+ ]
20
+ s.files = [
21
+ ".gitignore",
22
+ "LICENSE",
23
+ "README.markdown",
24
+ "README.rdoc",
25
+ "Rakefile",
26
+ "VERSION",
27
+ "integrity-notifyio.gemspec",
28
+ "lib/integrity/notifier/config.haml",
29
+ "lib/integrity/notifier/notifyio.rb",
30
+ "lib/integrity/notifier/notifyio_client.rb",
31
+ "test/integrity-notifyio_test.rb",
32
+ "test/test_helper.rb"
33
+ ]
34
+ s.homepage = %q{http://github.com/anlek/integrity-notifyio}
35
+ s.rdoc_options = ["--charset=UTF-8"]
36
+ s.require_paths = ["lib"]
37
+ s.rubygems_version = %q{1.3.7}
38
+ s.summary = %q{Notifiy.io notifier for the Integrity continuous integration server}
39
+ s.test_files = [
40
+ "test/integrity-notifyio_test.rb",
41
+ "test/test_helper.rb"
42
+ ]
43
+
44
+ if s.respond_to? :specification_version then
45
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
46
+ s.specification_version = 3
47
+
48
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
49
+ s.add_runtime_dependency(%q<integrity>, [">= 0"])
50
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
51
+ else
52
+ s.add_dependency(%q<integrity>, [">= 0"])
53
+ s.add_dependency(%q<shoulda>, [">= 0"])
54
+ end
55
+ else
56
+ s.add_dependency(%q<integrity>, [">= 0"])
57
+ s.add_dependency(%q<shoulda>, [">= 0"])
58
+ end
59
+ end
60
+
@@ -0,0 +1,8 @@
1
+ %p.normal
2
+ %label{ :for => "notifyio_notifier_email" } Email
3
+ %input.text#notifyio_notifier_email{ :name => "notifiers[Notifyio][email]", :value => config['email'], :type => 'text' }
4
+ %span.hint you can do multiple emails by splitting them with a comma (',')
5
+
6
+ %p.normal
7
+ %label{ :for => "notifyio_notifier_api_key" } API key
8
+ %input.text#notifyio_notifier_api_key{ :name => "notifiers[Notifyio][api_key]", :value => config['api_key'], :type => 'text' }
@@ -0,0 +1,24 @@
1
+ require 'integrity'
2
+ require File.dirname(__FILE__) + '/notifyio_client.rb'
3
+
4
+ module Integrity
5
+ class Notifier
6
+ class Notifyio < Notifier::Base
7
+ attr_reader :config
8
+
9
+ def self.to_haml
10
+ File.read(File.dirname(__FILE__) + "/config.haml")
11
+ end
12
+
13
+ def deliver!
14
+ NotifyioClient.post(config['email'], config['api_key'], short_message, full_message)
15
+ end
16
+
17
+ def to_s
18
+ 'Notifyio'
19
+ end
20
+ end
21
+
22
+ register Notifyio
23
+ end
24
+ end
@@ -0,0 +1,20 @@
1
+ require 'httparty'
2
+ require 'md5'
3
+ module Integrity
4
+ class Notifier
5
+ class NotifyioClient
6
+ def self.post(emails, api_key, title, body)
7
+ emails.split(',').each do |email|
8
+ email_hash = MD5.hexdigest(email.strip!)
9
+ HTTParty.post "http://api.notify.io/v1/notify/#{email_hash}?api_key=#{api_key}", :body => {
10
+ :type => 'regular',
11
+ :title => title,
12
+ :body => body,
13
+ :generator => 'integrity-notifyio notifier'
14
+ }
15
+
16
+ end
17
+ end
18
+ end
19
+ end
20
+ 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: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Andrew Kalek
@@ -57,9 +57,16 @@ extra_rdoc_files:
57
57
  - README.markdown
58
58
  - README.rdoc
59
59
  files:
60
+ - .gitignore
60
61
  - LICENSE
61
62
  - README.markdown
62
63
  - README.rdoc
64
+ - Rakefile
65
+ - VERSION
66
+ - integrity-notifyio.gemspec
67
+ - lib/integrity/notifier/config.haml
68
+ - lib/integrity/notifier/notifyio.rb
69
+ - lib/integrity/notifier/notifyio_client.rb
63
70
  - test/integrity-notifyio_test.rb
64
71
  - test/test_helper.rb
65
72
  has_rdoc: true
@@ -91,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
98
  version: "0"
92
99
  requirements: []
93
100
 
94
- rubyforge_project: integrity
101
+ rubyforge_project:
95
102
  rubygems_version: 1.3.7
96
103
  signing_key:
97
104
  specification_version: 3