Class: Composer::Compose

Inherits:
Object
  • Object
show all
Defined in:
lib/composer/compose.rb

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Compose

Returns a new instance of Compose.



4
5
6
7
8
9
10
# File 'lib/composer/compose.rb', line 4

def initialize(args)
  @name      = args[:name]
  @key       = args[:key]
  @directory = args[:directory]
  @config    = args[:config]
  @secret    = args[:secret]
end

Instance Method Details

#checkObject



12
13
14
15
16
17
18
19
20
21
# File 'lib/composer/compose.rb', line 12

def check
  verify_ruby.verify
  verify_config.verify_simple_deploy
  verify_config.verify_heirloom
  verify_name.verify :name => @name
  verify_secret.verify :secret => @secret
  verify_key.verify :key => @key
  verify_directory.verify :directory => @directory
  verify_region.verify
end

#runObject



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/composer/compose.rb', line 23

def run
  setup_heirloom.setup :name  => @name
  setup_simple_deploy.setup
  deploy_heirloom.upload :directory => @directory,
                         :name      => @name,
                         :secret    => @secret
  deploy_stack.create :key       => @key,
                      :name      => @name,
                      :directory => @directory,
                      :secret    => @secret
end