lib/elasticity/bootstrap_action.rb in elasticity-2.7 vs lib/elasticity/bootstrap_action.rb in elasticity-3.0
- old
+ new
@@ -1,29 +1,28 @@
module Elasticity
class BootstrapAction
attr_accessor :name
- attr_accessor :option
- attr_accessor :value
attr_accessor :script
+ attr_accessor :arguments
- def initialize(script, option, value)
+ def initialize(script, *bootstrap_arguments)
@name = 'Elasticity Bootstrap Action'
- @option = option
- @value = value
@script = script
+ @arguments = bootstrap_arguments
end
def to_aws_bootstrap_action
- {
+ action = {
:name => @name,
:script_bootstrap_action => {
- :path => @script,
- :args => [@option, @value]
+ :path => @script
}
}
+ action[:script_bootstrap_action].merge!(:args => @arguments) unless @arguments.empty?
+ action
end
end
-end
\ No newline at end of file
+end