Class: Integrity::Notifier::IntegrityTwitter

Inherits:
Notifier::Base
  • Object
show all
Defined in:
lib/notifier/twitter.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.to_hamlObject



9
10
11
# File 'lib/notifier/twitter.rb', line 9

def self.to_haml
  File.read File.dirname(__FILE__) / "config.haml"
end

Instance Method Details

#deliver!Object



13
14
15
16
# File 'lib/notifier/twitter.rb', line 13

def deliver!
  @tweet = Twitter::Base.new(@config["email"], @config["pass"])
  @tweet.post(message)
end

#messageObject



18
19
20
# File 'lib/notifier/twitter.rb', line 18

def message
  "#{build_status} | #{project.name}, commit #{build.short_commit_identifier} - [committer: #{build.commit_author.name}]"
end