hiera-http 1.3.0 doesn't support Ruby 1.8.7
Closed this issue · 3 comments
patrobinson commented
I'm sorry to be the one to do this, but the latest release doesn't work with Ruby 1.8.7. I know this version is retired but unfortunately we're running RHEL 6 and that's the version shipped with it.
The error is:
$ hiera notif_custom_packages ::fqdn=aulab-cdm01.rim.au.gsoa
/usr/lib/ruby/gems/1.8/gems/hiera-http-1.3.0/lib/hiera/backend/http_backend.rb:157:in `periodically_clean_cache': undefined method `select!' for {}:Hash (NoMethodError)
from /usr/lib/ruby/gems/1.8/gems/hiera-http-1.3.0/lib/hiera/backend/http_backend.rb:113:in `http_get_and_parse_with_cache'
from /usr/lib/ruby/gems/1.8/gems/hiera-http-1.3.0/lib/hiera/backend/http_backend.rb:51:in `lookup'
from /usr/lib/ruby/gems/1.8/gems/hiera-http-1.3.0/lib/hiera/backend/http_backend.rb:47:in `each'
from /usr/lib/ruby/gems/1.8/gems/hiera-http-1.3.0/lib/hiera/backend/http_backend.rb:47:in `lookup'
from /usr/lib/ruby/site_ruby/1.8/hiera/backend.rb:206:in `lookup'
from /usr/lib/ruby/site_ruby/1.8/hiera/backend.rb:203:in `each'
from /usr/lib/ruby/site_ruby/1.8/hiera/backend.rb:203:in `lookup'
from /usr/lib/ruby/site_ruby/1.8/hiera.rb:60:in `lookup'
from /usr/bin/hiera:225
The code causing this is part of commit 022b64e
The fix is quite simple, use delete_if
instead of select!
and reverse the logic. I will submit a pull request for this.
crayfishx commented
Thanks @Nemski I've merged your PR in and pushed a new forge module 1.3.1 with the fix
patrobinson commented
Can I be a pain again and ask you push a gem? I'm running Puppet 2.7 (I know I know) and I don't think the forge module works with Puppet < 3.0
crayfishx commented
Happy to - and done :)