Sha256: d61a5db4048ab15cdb5317807e9519a47e36395f85bd88ffd60a091c4bd5d4e9

Contents?: true

Size: 893 Bytes

Versions: 4

Compression:

Stored size: 893 Bytes

Contents

require 'puppet/provider/package/gem'

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.features.microsoft_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 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

4 entries across 4 versions & 1 rubygems

Version Path
puppet-5.5.22 lib/puppet/provider/package/puppet_gem.rb
puppet-5.5.22-x86-mingw32 lib/puppet/provider/package/puppet_gem.rb
puppet-5.5.22-x64-mingw32 lib/puppet/provider/package/puppet_gem.rb
puppet-5.5.22-universal-darwin lib/puppet/provider/package/puppet_gem.rb