Class: SVNCampfireNotifier::Message

Inherits:
Object
  • Object
show all
Defined in:
lib/svn_campfire_notifier/message.rb

Constant Summary collapse

SALUTATIONS =
%w(Hi Heej Faffie Kus-kus O~hai Gütentag Bonjour Trouwens Bananen Perenijsjes Hihi Accordions    Moo Woof Moof!) +
['Je weet zelf', 'Je weet toch', 'Weet je', 'Prijs de heer', 'Voor de verandering', 'Deşteaptă-te, române!', 'Alea iacta est'] +
['Zin in!', 'Not zin in!', 'Kiek \'m gaaaan'] +
['Dear Sir/Madame', 'Madame, Monsieur', 'Sehr geehrte Damen und Herren', 'Sayın Yetkili', 'Chiranjeevi', 'Гражданин'] +
['Intindiquinchu mananchu! Ichaqa']

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project) ⇒ Message

Returns a new instance of Message.



11
12
13
# File 'lib/svn_campfire_notifier/message.rb', line 11

def initialize(project)
  @project = project
end

Instance Attribute Details

#projectObject (readonly)

Returns the value of attribute project.



9
10
11
# File 'lib/svn_campfire_notifier/message.rb', line 9

def project
  @project
end

Instance Method Details

#partsObject



15
16
17
18
19
20
# File 'lib/svn_campfire_notifier/message.rb', line 15

def parts
  parts = []
  parts << ["#{SALUTATIONS.random}, #{project.author.capitalize} just committed revision #{project.revision} of #{project.name}: https://fngtps.com/browser/#{project.name}/changesets/#{project.revision}"]
  parts << ["#{Wrap.wrap(project.log)}\n\n#{project.changed.strip}", {:type => :paste}]
  parts
end