bazaarvoice / cloudformation-ruby-dsl

Ruby DSL for creating Cloudformation templates
Apache License 2.0
210 stars 76 forks source link

Updating with interactive parameters causes error #116

Closed hjkatz closed 7 years ago

hjkatz commented 7 years ago

Parameters were updated to use a new class Parameter < String, but the interactive mode of creating params was forgotten about. This causes the following error when updating:

/var/www/vhosts/ises.harrison.neadwerx.com/build/cloud_formation/vendor/bundle/ruby/2.3.0/gems/cloudformation-ruby-dsl-1.4.5/lib/cloudformation-ruby-dsl/cfntemplate.rb:570:in `block in cfn': undefined method `use_previous_value' for "test-customer":String (NoMethodError)
    from /var/www/vhosts/ises.harrison.neadwerx.com/build/cloud_formation/vendor/bundle/ruby/2.3.0/gems/cloudformation-ruby-dsl-1.4.5/lib/cloudformation-ruby-dsl/cfntemplate.rb:570:in `each'
    from /var/www/vhosts/ises.harrison.neadwerx.com/build/cloud_formation/vendor/bundle/ruby/2.3.0/gems/cloudformation-ruby-dsl-1.4.5/lib/cloudformation-ruby-dsl/cfntemplate.rb:570:in `map'
    from /var/www/vhosts/ises.harrison.neadwerx.com/build/cloud_formation/vendor/bundle/ruby/2.3.0/gems/cloudformation-ruby-dsl-1.4.5/lib/cloudformation-ruby-dsl/cfntemplate.rb:570:in `cfn'
    from /var/www/vhosts/ises.harrison.neadwerx.com/build/cloud_formation/vendor/bundle/ruby/2.3.0/gems/cloudformation-ruby-dsl-1.4.5/lib/cloudformation-ruby-dsl/cfntemplate.rb:661:in `exec!'
    from ./xerp_user.cfn.rb:22:in `<main>'

This is because ruby String doesn't have the new param method .use_previous_value. I'll create a pull request that resolves this.

temujin9 commented 7 years ago

Fixed via #117, thanks again.