hiera-eyaml gem provider fix for puppet 4
Created by: jaxim
Hi. Fix is to resolve ‘Provider gem is not functional on this host’ when using puppet 4. I hit this issue when trying to install hiera-eyaml against puppet 4.
Due to the changes with this version I believe that rubygems is no longer installed as part of the puppet install.
With puppet 4 it has a version of the gem binary under: /opt/puppetlabs/puppet/bin/gem
and the puppetserver_gem uses this: https://forge.puppetlabs.com/puppetlabs/puppetserver_gem
further reading: https://docs.puppetlabs.com/puppetserver/latest/gems.html#installing-and-removing-gems
I have also updated/added some tests for this fix.