Sha256: bd13bd3e8e3e6de1cc956e7f8a8d72474ffdc94cc2fbf4d575d6ea5689fb0a89

Contents?: true

Size: 1 KB

Versions: 60

Compression:

Stored size: 1 KB

Contents

Puppet::Type.type(:package).provide :puppet_gem, :parent => :gem do
  desc "Puppet Ruby Gem support. This provider is useful for managing
        gems needed by the ruby provided in the puppet-agent package."

  has_feature :versionable, :install_options, :uninstall_options

  if Puppet::Util::Platform.windows?
    # On windows, we put our ruby ahead of anything that already
    # existed on the system PATH. This means that we do not need to
    # sort out the absolute path.
    commands :gemcmd => "gem"
  else
    commands :gemcmd => "/opt/puppetlabs/puppet/bin/gem"
  end

  def uninstall
    super
    Puppet.debug("Invalidating rubygems cache after uninstalling gem '#{resource[:name]}'")
    Puppet::Util::Autoload.gem_source.clear_paths
  end

  def self.execute_gem_command(command, command_options, custom_environment = {})
    custom_environment['PKG_CONFIG_PATH'] = '/opt/puppetlabs/puppet/lib/pkgconfig' unless Puppet::Util::Platform.windows?
    super(command, command_options, custom_environment)
  end
end

Version data entries

60 entries across 60 versions & 1 rubygems

Version Path
puppet-6.29.0 lib/puppet/provider/package/puppet_gem.rb
puppet-6.29.0-x86-mingw32 lib/puppet/provider/package/puppet_gem.rb
puppet-6.29.0-x64-mingw32 lib/puppet/provider/package/puppet_gem.rb
puppet-6.29.0-universal-darwin lib/puppet/provider/package/puppet_gem.rb
puppet-6.28.0 lib/puppet/provider/package/puppet_gem.rb
puppet-6.28.0-x86-mingw32 lib/puppet/provider/package/puppet_gem.rb
puppet-6.28.0-x64-mingw32 lib/puppet/provider/package/puppet_gem.rb
puppet-6.28.0-universal-darwin lib/puppet/provider/package/puppet_gem.rb
puppet-6.27.0 lib/puppet/provider/package/puppet_gem.rb
puppet-6.27.0-x86-mingw32 lib/puppet/provider/package/puppet_gem.rb
puppet-6.27.0-x64-mingw32 lib/puppet/provider/package/puppet_gem.rb
puppet-6.27.0-universal-darwin lib/puppet/provider/package/puppet_gem.rb
puppet-6.26.0 lib/puppet/provider/package/puppet_gem.rb
puppet-6.26.0-x86-mingw32 lib/puppet/provider/package/puppet_gem.rb
puppet-6.26.0-x64-mingw32 lib/puppet/provider/package/puppet_gem.rb
puppet-6.26.0-universal-darwin lib/puppet/provider/package/puppet_gem.rb
puppet-6.25.1 lib/puppet/provider/package/puppet_gem.rb
puppet-6.25.1-x86-mingw32 lib/puppet/provider/package/puppet_gem.rb
puppet-6.25.1-x64-mingw32 lib/puppet/provider/package/puppet_gem.rb
puppet-6.25.1-universal-darwin lib/puppet/provider/package/puppet_gem.rb