amian84/cookbooks-chef — pull request #1 by juanje (2011-11-02 03:27:45+00:00)
Title: Put the code in a more Ruby way

Hi Amian,

I hope you don't mind but I did some refactorization and put the code in more Ruby style. I couldn't test all the code but some parts, so you sould test it yourself.
The few things I did were:

* Change the _4 spaces_ intendation (_Python's style_) to _2 spaces_ one (_Ruby's style_)
* Make a function with the duplicated code
* Get the file's content into a variable so we don't need a backup
* Use `gsub!` to replace the line instead of going line by line
* Some minor cosmetic changes

I also hope you like the patch and you find it useful to learn some Ruby way ;-)

Thanks