have you considered using my (admittedly hackish) approach from https://github.com/puppetlabs/puppetlabs-ruby/pull/24#issuecomment-40742830 ?