{"pull_request":{"state":"closed","user":{"avatar_url":"https://secure.gravatar.com/avatar/574b264bbcdd9d0f830671a7146debba?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"574b264bbcdd9d0f830671a7146debba","url":"https://api.github.com/users/juanje","login":"juanje","id":36670},"deletions":12,"merged_by":{"avatar_url":"https://secure.gravatar.com/avatar/dd534f67b51f7f0b23d201040238b5eb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"dd534f67b51f7f0b23d201040238b5eb","url":"https://api.github.com/users/amian84","login":"amian84","id":840567},"updated_at":"2011-11-02T08:25:22Z","comments":1,"closed_at":"2011-11-02T08:25:22Z","base":{"ref":"master","repo":{"name":"cookbooks-chef","fork":false,"pushed_at":"2011-11-02T08:25:22Z","master_branch":null,"homepage":"","clone_url":"https://github.com/amian84/cookbooks-chef.git","open_issues":0,"updated_at":"2011-11-02T08:25:22Z","language":"Ruby","forks":2,"private":false,"svn_url":"https://svn.github.com/amian84/cookbooks-chef","url":"https://api.github.com/repos/amian84/cookbooks-chef","owner":{"avatar_url":"https://secure.gravatar.com/avatar/dd534f67b51f7f0b23d201040238b5eb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"dd534f67b51f7f0b23d201040238b5eb","url":"https://api.github.com/users/amian84","login":"amian84","id":840567},"html_url":"https://github.com/amian84/cookbooks-chef","description":"","size":156,"id":2547211,"watchers":2,"git_url":"git://github.com/amian84/cookbooks-chef.git","created_at":"2011-10-10T10:23:37Z","ssh_url":"git@github.com:amian84/cookbooks-chef.git"},"user":{"avatar_url":"https://secure.gravatar.com/avatar/dd534f67b51f7f0b23d201040238b5eb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"dd534f67b51f7f0b23d201040238b5eb","url":"https://api.github.com/users/amian84","login":"amian84","id":840567},"label":"amian84:master","sha":"b68056786ceb589f47d53b492bc0d8434533e8ee"},"commits":1,"diff_url":"https://github.com/amian84/cookbooks-chef/pull/2.diff","url":"https://api.github.com/repos/amian84/cookbooks-chef/pulls/2","additions":10,"merged":true,"head":{"ref":"polkit_ruby","repo":{"name":"cookbooks-chef","fork":true,"pushed_at":"2011-11-02T04:01:50Z","master_branch":null,"homepage":"","clone_url":"https://github.com/juanje/cookbooks-chef.git","open_issues":0,"updated_at":"2011-11-02T04:01:50Z","language":"Ruby","forks":0,"private":false,"svn_url":"https://svn.github.com/juanje/cookbooks-chef","url":"https://api.github.com/repos/juanje/cookbooks-chef","owner":{"avatar_url":"https://secure.gravatar.com/avatar/574b264bbcdd9d0f830671a7146debba?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"574b264bbcdd9d0f830671a7146debba","url":"https://api.github.com/users/juanje","login":"juanje","id":36670},"html_url":"https://github.com/juanje/cookbooks-chef","description":"","size":100,"id":2548879,"watchers":1,"git_url":"git://github.com/juanje/cookbooks-chef.git","created_at":"2011-10-10T15:21:06Z","ssh_url":"git@github.com:juanje/cookbooks-chef.git"},"user":{"avatar_url":"https://secure.gravatar.com/avatar/574b264bbcdd9d0f830671a7146debba?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"574b264bbcdd9d0f830671a7146debba","url":"https://api.github.com/users/juanje","login":"juanje","id":36670},"label":"juanje:polkit_ruby","sha":"bd29f6f03aca99ceec3f8aa8e0c3c3302fb14053"},"body":"Hi Amian,\r\n\r\nHere 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.\r\n\r\nI 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_).\r\n\r\nI 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.\r\nI hope you like it.\r\n\r\nThanks","merged_at":"2011-11-02T08:25:22Z","_links":{"comments":{"href":"https://api.github.com/repos/amian84/cookbooks-chef/issues/2/comments"},"html":{"href":"https://github.com/amian84/cookbooks-chef/pull/2"},"review_comments":{"href":"https://api.github.com/repos/amian84/cookbooks-chef/pulls/2/comments"},"self":{"href":"https://api.github.com/repos/amian84/cookbooks-chef/pulls/2"}},"review_comments":0,"issue_url":"https://github.com/amian84/cookbooks-chef/issues/2","html_url":"https://github.com/amian84/cookbooks-chef/pull/2","number":2,"title":"Get lines shorter and some Ruby idioms","mergeable":null,"id":455018,"patch_url":"https://github.com/amian84/cookbooks-chef/pull/2.patch","changed_files":1,"created_at":"2011-11-02T04:10:20Z"},"action":"closed","number":2}