Class: Evrone::CI::Message::PerformBuild

Inherits:
ProtocolBuffers::Message
  • Object
show all
Includes:
Serializable
Defined in:
lib/evrone/ci/message.rb,
lib/evrone/ci/message/testing.rb

Class Method Summary collapse

Methods included from Serializable

#to_serialized_string

Class Method Details

.test_attributes(options = {}) ⇒ Object



152
153
154
155
156
157
158
159
160
161
# File 'lib/evrone/ci/message/testing.rb', line 152

def test_attributes(options = {})
  key = File.read File.expand_path("../../../../../fixtures/insecure_private_key", __FILE__)
  options.merge({
    id:         options[:id]         || 1,
    name:       options[:name]       || 'evrone/test-repo',
    src:        options[:src]        || "[email protected]:evrone/ci-worker-test-repo.git",
    sha:        options[:sha]        || "b665f90239563c030f1b280a434b3d84daeda1bd",
    deploy_key: options[:deploy_key] || key
  })
end

.test_message(options = {}) ⇒ Object



171
172
173
# File 'lib/evrone/ci/message/testing.rb', line 171

def test_message(options = {})
  new test_attributes(options)
end

.test_pull_request_attributes(options = {}) ⇒ Object



163
164
165
166
167
168
169
# File 'lib/evrone/ci/message/testing.rb', line 163

def test_pull_request_attributes(options = {})
  options = {
    sha: "84158c732ff1af3db9775a37a74ddc39f5c4078f",
    pull_request_id: 4
  }.merge(options)
  test_attributes(options)
end

.test_pull_request_message(options = {}) ⇒ Object



175
176
177
# File 'lib/evrone/ci/message/testing.rb', line 175

def test_pull_request_message(options = {})
  new test_pull_request_attributes(options)
end