summaryrefslogtreecommitdiff
path: root/lib/puppet/util/trocla_helper.rb
diff options
context:
space:
mode:
authorMichael Franz Aigner <mike@ecommerce.com>2013-02-28 08:17:37 -0500
committerMichael Franz Aigner <mike@ecommerce.com>2013-02-28 08:17:37 -0500
commit02bbc22223f53d979c1ab5724e26aa2ac4c22c7a (patch)
tree1bdcb33b8c40fe5c98f7034f4be6aa32451dd028 /lib/puppet/util/trocla_helper.rb
parent27775313728aa85d8c127f7d37fccd97054fe965 (diff)
Removing calls to Puppet.features.rubygems?
This makes the Gem usable in the latest Puppet versions. The handling of RubyGems got revised in Puppet 3.0.1-rc1: http://projects.puppetlabs.com/issues/16757 The new policy is that either bundler and/or rubygems are guaranteed to be loaded and initialized when the Puppet manifest is evaluated, making it unnecessary for Puppet modules to load rubygems. This new policy broke the puppet-trocla module. This is because 'Puppet.features.rubygems?' always evaluates to false now, which causes the module to abort the manifest compilation with a message informing about the necessity of RubyGems to be present.
Diffstat (limited to 'lib/puppet/util/trocla_helper.rb')
-rw-r--r--lib/puppet/util/trocla_helper.rb2
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/puppet/util/trocla_helper.rb b/lib/puppet/util/trocla_helper.rb
index 58ccf9c..64ef859 100644
--- a/lib/puppet/util/trocla_helper.rb
+++ b/lib/puppet/util/trocla_helper.rb
@@ -25,9 +25,7 @@ module Puppet::Util::TroclaHelper
configfile = File.join(File.dirname(Puppet.settings[:config]), "troclarc.yaml")
raise(Puppet::ParseError, "Trocla config file #{configfile} is not readable") unless File.exist?(configfile)
- raise(Puppet::ParseError, "You need rubygems to use Trocla") unless Puppet.features.rubygems?
- require 'rubygems'
require 'trocla'
has_options ? Trocla.new(configfile).send(trocla_func, key, format, options) : Trocla.new(configfile).send(trocla_func, key, format)