Refactor

- use an helper
- use yum cookbook
- use URI to create url
- Fix problem with "name" resource != new_resource.name
- Add a default value for `type`

Based on #2