summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2011-04-04 04:50:38 +1000
committerJames Turnbull <james@lovedthanlost.net>2011-04-04 04:50:38 +1000
commitd2bacd308ea214151f5c1f43ec62aad8075da41b (patch)
tree74781165f5f932a36ad50b4b93e3d0c833f51a33 /lib/puppet
parent9d17809e5b240aa80d2c30f4d9625d4812802b8f (diff)
downloadpuppet-d2bacd308ea214151f5c1f43ec62aad8075da41b.tar.gz
puppet-d2bacd308ea214151f5c1f43ec62aad8075da41b.tar.xz
puppet-d2bacd308ea214151f5c1f43ec62aad8075da41b.zip
Fixed #3127 - Fixed gem selection regex
Previously if the gem json_pure was installed and you requested the gem json then the regex matched too soon and falshly indicated that the json gem was already installed. Also updated to add the --no-ri and no-rdoc options and fix tests.
Diffstat (limited to 'lib/puppet')
-rwxr-xr-xlib/puppet/provider/package/gem.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/puppet/provider/package/gem.rb b/lib/puppet/provider/package/gem.rb
index 19414cec4..64544db4e 100755
--- a/lib/puppet/provider/package/gem.rb
+++ b/lib/puppet/provider/package/gem.rb
@@ -1,5 +1,6 @@
require 'puppet/provider/package'
require 'uri'
+require 'pp'
# Ruby gems support.
Puppet::Type.type(:package).provide :gem, :parent => Puppet::Provider::Package do
@@ -22,7 +23,7 @@ Puppet::Type.type(:package).provide :gem, :parent => Puppet::Provider::Package d
end
if name = hash[:justme]
- command << name
+ command << name + "$"
end
begin
@@ -94,7 +95,7 @@ Puppet::Type.type(:package).provide :gem, :parent => Puppet::Provider::Package d
command << "--source" << "#{source}" << resource[:name]
end
else
- command << resource[:name]
+ command << "--no-rdoc" << "--no-ri" << resource[:name]
end
output = execute(command)