Class Chef::Provider::Package::Rubygems::GemEnvironment
In: lib/chef/provider/package/rubygems.rb
Parent: Object

Methods

Constants

DEFAULT_UNINSTALLER_OPTS = {:ignore => true, :executables => true}

Public Instance methods

Determines the candidate version for a gem from a .gem file on disk and checks if it matches the version contraints in gem_dependency

Returns

Gem::Version a singular gem version object is returned if the gem

              is available

nil returns nil if the gem on disk doesn‘t match the

              version constraints for +gem_dependency+

Finds the newest version that satisfies the constraints of gem_dependency. The version is determined from the cache or a round-trip to the server as needed. The architecture and gem sources will be set before making the query.

Returns

Gem::Version a singular gem version object is returned if the gem

              is available

nil returns nil if the gem could not be found

Find the newest gem version available from Gem.sources that satisfies the constraints of gem_dependency

The paths where rubygems should search for installed gems. Implemented by subclasses.

A rubygems source index containing the list of gemspecs for all available gems in the gem installation. Implemented by subclasses

Returns

Gem::SourceIndex

Installs a gem via the rubygems ruby API.

Options

:sources rubygems servers to use Other options are passed to Gem::DependencyInstaller.new

Lists the installed versions of gem_name, constrained by the version spec in gem_dep

Arguments

Gem::Dependency gem_dep is a Gem::Dependency object, its version

                  specification constrains which gems are returned.

Returns

Gem::Specification
an array of Gem::Specification objects

Uninstall the gem gem_name via the rubygems ruby API. If gem_version is provided, only that version will be uninstalled. Otherwise, all versions are uninstalled.

Options

Options are passed to Gem::Uninstaller.new

Set rubygems’ user interaction to ConsoleUI or SilentUI depending on our current debug level

Yields to the provided block with rubygems’ source list set to the list provided. Always resets the list when the block returns or raises an exception.

[Validate]