Skip to content

Commit

Permalink
Strip occurrences of default: from gem list output
Browse files Browse the repository at this point in the history
  • Loading branch information
jlindquist-godaddy committed Feb 12, 2020
1 parent ba2b846 commit d101c1c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/puppet/provider/rvm_gem/gem.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,11 @@ def gemlist(hash)
end

def self.gemsplit(desc)
desc = desc.gsub('default: ', '')

case desc
when %r{^\*\*\*}, %r{^\s*$}, %r{^\s+} then return nil
when %r{gem: not found} then nil
# when /^(\S+)\s+\((((((\d+[.]?))+)(,\s)*)+)\)/
when %r{^(\S+)\s+\((\d+.*)\)}
name = Regexp.last_match(1)
version = Regexp.last_match(2).split(%r{,\s*})
Expand Down

0 comments on commit d101c1c

Please sign in to comment.