diff options
author | Michael Franz Aigner <mike@ecommerce.com> | 2013-02-28 08:17:37 -0500 |
---|---|---|
committer | Michael Franz Aigner <mike@ecommerce.com> | 2013-02-28 08:17:37 -0500 |
commit | 02bbc22223f53d979c1ab5724e26aa2ac4c22c7a (patch) | |
tree | 1bdcb33b8c40fe5c98f7034f4be6aa32451dd028 /lib/puppet/parser/functions/trocla_set.rb | |
parent | 27775313728aa85d8c127f7d37fccd97054fe965 (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/parser/functions/trocla_set.rb')
-rw-r--r-- | lib/puppet/parser/functions/trocla_set.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/puppet/parser/functions/trocla_set.rb b/lib/puppet/parser/functions/trocla_set.rb index 5b6079a..c3c9b49 100644 --- a/lib/puppet/parser/functions/trocla_set.rb +++ b/lib/puppet/parser/functions/trocla_set.rb @@ -50,9 +50,7 @@ trocla, for example via cli. configfile = File.join(File.dirname(Puppet.settings[:config]), "troclarc.yaml") raise(Puppet::ParseError, "Trocla config file #{configfile} not readable") unless File.exist?(configfile) - raise(Puppet::ParseError, "You need rubygems to use Trocla") unless Puppet.features.rubygems? - - require 'rubygems' + require 'trocla' result = (trocla=Trocla.new(configfile)).set_password(key,format,value) |