Fix compatibility. ':' replaced by '=>'

Hi, 

cookbook don't work for me because of this error:
```
/tmp/vagrant-cache/chef-solo-1/cookbooks/swap/resources/file.rb:28: syntax error, unexpected ':', expecting $end
attribute :path, kind_of: String, name_attribute: true
```

This pull request fixed it.