Module: EY::Serverside::Slug::Generator

Extended by:
Result::DSL
Defined in:
lib/engineyard-serverside/slug/generator.rb

Class Method Summary collapse

Methods included from Result::DSL

Failure, Success

Class Method Details

.generate(data = {}) ⇒ Object


10
11
12
13
14
# File 'lib/engineyard-serverside/slug/generator.rb', line 10

def self.generate(data = {})
  data[:shell].logged_system(ogun(data)).success? ?
    Success(data.merge(:generated => true)) :
    Failure(data.merge(:error => "Ogun build failed"))
end

.ogun(data = {}) ⇒ Object


16
17
18
19
20
21
22
23
24
# File 'lib/engineyard-serverside/slug/generator.rb', line 16

def self.ogun(data = {})
  [
    "/engineyard/bin/ogun",
    "build",
    data[:app_name],
    "--release",
    data[:release_name]
  ].join(' ')
end