Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (22 sloc) 0.809 kb
class Service::Rubyforge < Service
string :groupid, :username
password :password
white_list :groupid, :username
def receive_push
repository = payload['repository']['name']
branch = ref_name
payload['commits'].each do |commit|
id = commit['id']
group_id = data['groupid']
subject = "Commit Notification (#{repository}/#{branch}): #{id}"
body = "`#{commit['message']}`, pushed by #{commit['author']['name']} (#{commit['author']['email']}). View more details for this change at #{commit['url']}."
post_news(group_id, subject, body)
end
end
def post_news(group_id, subject, body)
rubyforge.post_news(group_id, subject, body)
end
def rubyforge
@rubyforge ||= RubyForge.new(data['username'], data['password'])
end
end
Jump to Line
Something went wrong with that request. Please try again.