Module: Vx::ServiceConnector::Model

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

Defined Under Namespace

Classes: Commit, Payload, Repo

Instance Method Summary collapse

Instance Method Details

#test_commitObject



64
65
66
# File 'lib/vx/service_connector/model.rb', line 64

def test_commit
  Commit.new('sha', 'message', 'author', 'author_email', 'http_url')
end

#test_payload(params = {}) ⇒ Object



60
61
62
# File 'lib/vx/service_connector/model.rb', line 60

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
# File 'lib/vx/service_connector/model.rb', line 47

def test_payload_attributes(params = {})
  {
    pull_request?:        false,
    pull_request_number:  nil,
    head:                 "HEAD",
    base:                 '0000',
    branch:               'master',
    branch_label:         'master:label',
    url:                  'http://example.com',
    ignore?:              false
  }.merge(params)
end

#test_repoObject



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

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