lib/simple_deploy/stack.rb in simple_deploy-0.2.1 vs lib/simple_deploy/stack.rb in simple_deploy-0.2.2

- old
+ new

@@ -1,29 +1,37 @@ require 'stackster' require 'simple_deploy/stack/stack_reader' require 'simple_deploy/stack/stack_lister' +require 'simple_deploy/stack/stack_attribute_formater' module SimpleDeploy class Stack def initialize(args) @environment = args[:environment] @name = args[:name] @config = Config.new + @config.logger = SimpleDeployLogger.new end def self.list(args) StackLister.new(:config => args[:config]).all end def create(args) - stack.create :attributes => args[:attributes], + saf = StackAttributeFormater.new(:attributes => args[:attributes], + :config => @config, + :environment => @environment) + stack.create :attributes => saf.updated_attributes, :template => args[:template] end def update(args) - stack.update :attributes => args[:attributes] + saf = StackAttributeFormater.new(:attributes => args[:attributes], + :config => @config, + :environment => @environment) + stack.update :attributes => saf.updated_attributes end def deploy deployment = Deployment.new :config => @config, :environment => @environment, @@ -47,10 +55,10 @@ def resources stack.resources end def instances - stack.instances_public_ip_addresses + stack.instances_private_ip_addresses end def status stack.status end