opscode/chef-metal — pull request #43 by irvingpop (2014-04-01 01:08:19+00:00)
Title: Do not merge yet, WIP:   mode doesn't work

This branch adds owner, group and mode attributes to machine_file.

It also includes a fix for set_attributes to call get_attributes instead of get_file_attributes.

owner and group have been validated and work fine for me.
mode, however, fails with the following:

```
enerated at 2014-03-31 17:56:46 -0700
ArgumentError: machine_file[/root/authorized_keys] (ec-harness::private_chef_ha line 36) had an error: ArgumentError: wrong number of arguments (1 for 0)
/Library/Ruby/Gems/2.0.0/gems/chef-metal-0.4/lib/chef_metal/machine/unix_machine.rb:69:in `to_i'
/Library/Ruby/Gems/2.0.0/gems/chef-metal-0.4/lib/chef_metal/machine/unix_machine.rb:69:in `set_attributes'
/Library/Ruby/Gems/2.0.0/gems/chef-metal-0.4/lib/chef/provider/machine_file.rb:36:in `block in '
/Library/Ruby/Gems/2.0.0/gems/chef-11.10.4/lib/chef/provider/lwrp_base.rb:60:in `instance_eval'
/Library/Ruby/Gems/2.0.0/gems/chef-11.10.4/lib/chef/provider/lwrp_base.rb:60:in `recipe_eval_with_update_check'
/Library/Ruby/Gems/2.0.0/gems/chef-11.10.4/lib/chef/provider/lwrp_base.rb:45:in `block in action'
/Library/Ruby/Gems/2.0.0/gems/chef-11.10.4/lib/chef/provider.rb:120:in `run_action'
/Library/Ruby/Gems/2.0.0/gems/chef-11.10.4/lib/chef/resource.rb:625:in `run_action'
/Library/Ruby/Gems/2.0.0/gems/chef-11.10.4/lib/chef/runner.rb:49:in `run_action'
/Library/Ruby/Gems/2.0.0/gems/chef-11.10.4/lib/chef/runner.rb:81:in `block (2 levels) in converge'
/Library/Ruby/Gems/2.0.0/gems/chef-11.10.4/lib/chef/runner.rb:81:in `each'
/Library/Ruby/Gems/2.0.0/gems/chef-11.10.4/lib/chef/runner.rb:81:in `block in converge'
/Library/Ruby/Gems/2.0.0/gems/chef-11.10.4/lib/chef/resource_collection.rb:98:in `block in execute_each_resource'
/Library/Ruby/Gems/2.0.0/gems/chef-11.10.4/lib/chef/resource_collection/stepable_iterator.rb:116:in `call'
/Library/Ruby/Gems/2.0.0/gems/chef-11.10.4/lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block'
/Library/Ruby/Gems/2.0.0/gems/chef-11.10.4/lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
/Library/Ruby/Gems/2.0.0/gems/chef-11.10.4/lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate'
/Library/Ruby/Gems/2.0.0/gems/chef-11.10.4/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
/Library/Ruby/Gems/2.0.0/gems/chef-11.10.4/lib/chef/resource_collection.rb:96:in `execute_each_resource'
/Library/Ruby/Gems/2.0.0/gems/chef-11.10.4/lib/chef/runner.rb:80:in `converge'
/Library/Ruby/Gems/2.0.0/gems/chef-11.10.4/lib/chef/client.rb:335:in `converge'
/Library/Ruby/Gems/2.0.0/gems/chef-11.10.4/lib/chef/client.rb:415:in `do_run'
/Library/Ruby/Gems/2.0.0/gems/chef-11.10.4/lib/chef/client.rb:200:in `block in run'
/Library/Ruby/Gems/2.0.0/gems/chef-11.10.4/lib/chef/client.rb:194:in `fork'
/Library/Ruby/Gems/2.0.0/gems/chef-11.10.4/lib/chef/client.rb:194:in `run'
/Library/Ruby/Gems/2.0.0/gems/chef-11.10.4/lib/chef/application.rb:215:in `run_chef_client'
/Library/Ruby/Gems/2.0.0/gems/chef-11.10.4/lib/chef/application/client.rb:314:in `block in run_application'
/Library/Ruby/Gems/2.0.0/gems/chef-11.10.4/lib/chef/application/client.rb:306:in `loop'
/Library/Ruby/Gems/2.0.0/gems/chef-11.10.4/lib/chef/application/client.rb:306:in `run_application'
/Library/Ruby/Gems/2.0.0/gems/chef-11.10.4/lib/chef/application.rb:66:in `run'
/Library/Ruby/Gems/2.0.0/gems/chef-11.10.4/bin/chef-client:26:in `'
/usr/bin/chef-client:23:in `load'
/usr/bin/chef-client:23:in `

'
```