Module: Vx::ServiceConnector::Model

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

Defined Under Namespace

Classes: Payload, Repo

Constant Summary collapse

PAYLOAD_IGNORE_RE =
Regexp.escape("[ci skip]")

Instance Method Summary collapse

Instance Method Details

#test_payload(params = {}) ⇒ Object



62
63
64
# File 'lib/vx/service_connector/model.rb', line 62

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

#test_payload_attributes(params = {}) ⇒ Object



47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/vx/service_connector/model.rb', line 47

def test_payload_attributes(params = {})
  {
    skip:                 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



66
67
68
69
70
71
72
73
74
75
# File 'lib/vx/service_connector/model.rb', line 66

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