mattray / spiceweasel

Generates Chef knife commands from a simple JSON or YAML file.
Apache License 2.0
283 stars 66 forks source link

cluster delete throws an error #59

Closed arussel closed 9 years ago

arussel commented 11 years ago

The error: /Users/alexandrerussel/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/spiceweasel-2.6.0/lib/spiceweasel/execute.rb:29:in block in initialize': undefined methodcommand' for #String:0x007fb3a5c54760 (NoMethodError) from /Users/alexandrerussel/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/spiceweasel-2.6.0/lib/spiceweasel/execute.rb:27:in each' from /Users/alexandrerussel/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/spiceweasel-2.6.0/lib/spiceweasel/execute.rb:27:ininitialize' from /Users/alexandrerussel/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/spiceweasel-2.6.0/lib/spiceweasel/cli.rb:198:in new' from /Users/alexandrerussel/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/spiceweasel-2.6.0/lib/spiceweasel/cli.rb:198:inrun' from /Users/alexandrerussel/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/spiceweasel-2.6.0/bin/spiceweasel:23:in <top (required)>' from /Users/alexandrerussel/.rbenv/versions/1.9.3-p392/bin/spiceweasel:23:inload' from /Users/alexandrerussel/.rbenv/versions/1.9.3-p392/bin/spiceweasel:23:in `

'

it seems from: https://github.com/mattray/spiceweasel/blob/master/lib/spiceweasel/clusters.rb line 53 that @delete is an array of String, not Command like @create, making execute.rb unhappy.

Running the command without -e outputs the correct commands.

mattray commented 9 years ago

Fixed in the upcoming 2.8 branch.