amian84/cookbooks-chef — pull request #2 by juanje (2011-11-02 04:10:20+00:00)
Title: Get lines shorter and some Ruby idioms

Hi Amian,

Here I did some changes in order to get the code more clean and in a Ruby way. Mostly I put the file names in variables and short up the lines.

I changed the `FileUtils.cp_r` (which means `cp -r`, _ergo_ copy directories recursively) to `FileUtils.copy` because they were just files (not directories) and it makes clear what you are going to to (_copy the file_).

I also use the `Array` method `#inject` because I think it simplify the code and it's useful in many cases, so if you learn it now you can use it later.
I hope you like it.

Thanks