Service
The Email plugin supports the @promote@ action to send out an annoucement to a set of email addresses.
By default it generates an release announcement based on your README.* file.
TODO: Use Ratch’s email command.
Email announcement message.
# File lib/plugins/syckle/email.rb, line 69 def announce mailopts = self.mailopts if mailto.empty? else if trial? subject = mailopts['subject'] mailto = mailopts['to'].flatten.join(", ") puts "email '#{subject}' to #{mailto}" else #emailer = Emailer.new(mailopts) #emailer.email if mail_confirm? email(mailopts) end end end end
Confirm announcement
# File lib/plugins/syckle/email.rb, line 90 def mail_confirm? if mailto return true if force? to = [mailto].flatten.join(", ") ans = ask("Announce to #{to}?", "(v)iew|(y)es|(N)o") case ans.downcase when 'y', 'yes' true when 'v', 'view' puts message mail_confirm? else false end end end
# File lib/plugins/syckle/email.rb, line 108 def mailopts { 'message' => self.message, 'to' => self.to, 'from' => self.from, 'subject' => self.subject, 'server' => self.server, 'port' => self.port, 'account' => self.account, 'domain' => self.domain, 'login' => self.login, 'secure' => self.secure } end
Generated with the Darkfish Rdoc Generator 2.