Class: Magnum::Payload::Beanstalk

Inherits:
Base
  • Object
show all
Defined in:
lib/magnum/payload/beanstalk.rb

Constant Summary

Constants inherited from Base

Magnum::Payload::Base::GIT_ZERO_SHA

Constants included from MessageParser

MessageParser::REGEX_SKIP

Instance Attribute Summary

Attributes inherited from Base

#author, #author_email, #branch, #commit, #commit_url, #committer, #committer_email, #compare_url, #data, #message, #raw_data, #skip, #test

Instance Method Summary collapse

Methods inherited from Base

#attributes_hash, #initialize, #skip?

Methods included from MessageParser

#skip_message?

Constructor Details

This class inherits a constructor from Magnum::Payload::Base

Instance Method Details

#last_commitObject


10
11
12
# File 'lib/magnum/payload/beanstalk.rb', line 10

def last_commit
  @last_commit ||= Hashr.new(data.commits.last)
end

#parse!Object


3
4
5
6
7
8
# File 'lib/magnum/payload/beanstalk.rb', line 3

def parse!
  @data = data.payload if data && data.payload

  data.revision ? parse_svn! : parse_git!
  detect_fake_payload!
end