From b5523ff881224bd6f4eafcf9a489bbb6331d05c2 Mon Sep 17 00:00:00 2001 From: luke Date: Fri, 15 Jun 2007 14:05:10 +0000 Subject: Trying to load ruby gems, in case needed libraries are installed that way, and fixing a warning in the provider git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2588 980ebf18-57e1-0310-9a29-db15c13687c0 --- lib/puppet.rb | 6 ++++++ lib/puppet/provider.rb | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/puppet.rb b/lib/puppet.rb index 527061d9d..740ba1eb2 100644 --- a/lib/puppet.rb +++ b/lib/puppet.rb @@ -1,3 +1,9 @@ +# Try to load rubygems. Hey rubygems, I hate you. +begin + require 'rubygems' +rescue LoadError +end + # see the bottom of the file for further inclusions require 'singleton' require 'facter' diff --git a/lib/puppet/provider.rb b/lib/puppet/provider.rb index 612d8adc6..7ef0bdce9 100644 --- a/lib/puppet/provider.rb +++ b/lib/puppet/provider.rb @@ -16,7 +16,7 @@ class Puppet::Provider # The source parameter exists so that providers using the same # source can specify this, so reading doesn't attempt to read the # same package multiple times. - attr_accessor :source + attr_writer :source # LAK 2007-05-09: Keep the model stuff around for backward compatibility attr_reader :model -- cgit