~bkerensa/ubuntu/raring/puppet/new-upstream-release

« back to all changes in this revision

Viewing changes to lib/puppet/provider/package/gem.rb

  • Committer: Benjamin Kerensa
  • Date: 2012-11-21 23:50:52 UTC
  • mfrom: (1.1.30)
  • Revision ID: bkerensa@ubuntu.com-20121121235052-ah7nzabp77sh69gb
New Upstream Release

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
    else
21
21
      gem_list_command << "--remote"
22
22
    end
23
 
 
 
23
    if options[:source]
 
24
      gem_list_command << "--source" << options[:source]
 
25
    end
24
26
    if name = options[:justme]
25
27
      gem_list_command << name + "$"
26
28
    end
56
58
        :provider => :gem
57
59
      }
58
60
    else
59
 
      Puppet.warning "Could not match #{desc}"
 
61
      Puppet.warning "Could not match #{desc}" unless desc.chomp.empty?
60
62
      nil
61
63
    end
62
64
  end
104
106
 
105
107
  def latest
106
108
    # This always gets the latest version available.
107
 
    hash = self.class.gemlist(:justme => resource[:name])
 
109
    gemlist_options = {:justme => resource[:name]}
 
110
    gemlist_options.merge!({:source => resource[:source]}) unless resource[:source].nil?
 
111
    hash = self.class.gemlist(gemlist_options)
108
112
 
109
113
    hash[:ensure][0]
110
114
  end