Skip to content

Commit

Permalink
Fixed #992 -- Puppet is now compatible with gems 1.0.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
lak committed Feb 13, 2008
1 parent 0cfa1d2 commit 9b1bfc1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Fixed #992 -- Puppet is now compatible with gems 1.0.1.

Fixed #968 again, this time with tests -- parseonly works,
including not compiling the configurations, and also storeconfigs
is no longer required during parse-testing.
Expand Down
8 changes: 4 additions & 4 deletions lib/puppet/provider/package/gem.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ def self.gemlist(hash)
end

begin
list = execute(command).split("\n\n").collect do |set|
list = execute(command).split("\n").collect do |set|
if gemhash = gemsplit(set)
gemhash[:provider] = :gem
gemhash
else
nil
end
end.reject { |p| p.nil? }
end.compact
rescue Puppet::ExecutionFailure => detail
raise Puppet::Error, "Could not list gems: %s" % detail
end
Expand All @@ -44,8 +44,8 @@ def self.gemlist(hash)

def self.gemsplit(desc)
case desc
when /^\*\*\*/: return nil
when /^(\S+)\s+\((.+)\)\n/
when /^\*\*\*/, /^\s*$/, /^\s+/; return nil
when /^(\S+)\s+\((.+)\)/
name = $1
version = $2.split(/,\s*/)[0]
return {
Expand Down

0 comments on commit 9b1bfc1

Please sign in to comment.