Module: Vx::ServiceConnector::Model

Extended by:
Model
Included in:
Model
Defined in:
lib/vx/service_connector/model.rb

Defined Under Namespace

Classes: Payload, Repo

Instance Method Summary collapse

Instance Method Details

#test_payload(params = {}) ⇒ Object



56
57
58
# File 'lib/vx/service_connector/model.rb', line 56

def test_payload(params = {})
  Payload.from_hash(test_payload_attributes params)
end

#test_payload_attributes(params = {}) ⇒ Object



41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/vx/service_connector/model.rb', line 41

def test_payload_attributes(params = {})
  {
    ignore?:              false,
    pull_request?:        false,
    pull_request_number:  nil,
    branch:               'master',
    branch_label:         'master:label',
    sha:                  "HEAD",
    message:              'test commit',
    author:               'User Name',
    author_email:         '[email protected]',
    web_url:              'http://example.com',
  }.merge(params)
end

#test_repoObject



60
61
62
63
64
65
66
67
68
69
# File 'lib/vx/service_connector/model.rb', line 60

def test_repo
  Repo.new(
    1,
    'full/name',
    false,
    '[email protected]',
    'http://example.com',
    'description'
  )
end