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
I think the `default` here should be removed because if we add support for any other repository type that doesn't depend on the platform itself, this could select `gem` when a user might actually want some other type of repository.