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

### Methods

candidate_version_from_remote gem_paths gem_platforms gem_source_index gempath_cache new platform_cache with_gem_platforms

### Included Modules

Chef::Mixin::ShellOut

### Constants

JRUBY_PLATFORM | = | /(:?universal|x86_64|x86)\-java\-[0-9\.]+/

### Attributes

gem_binary_location | [R] |

### Public Class methods

gempath_cache()
new(gem_binary_location)
platform_cache()

### Public Instance methods

candidate_version_from_remote(gem_dependency, *sources)
gem_paths()
gem_platforms()

Attempt to detect the correct platform settings for the target gem environment.

In practice, this only makes a difference if different versions are available depending on platform, and only if the target gem environment has a radically different platform (i.e., jruby), so we just try to detect jruby and fall back to the current platforms (Gem.platforms) if we don‘t detect it.

### Returns

String|Gem::Platform
  returns an array of Gem::Platform-compatible

objects, i.e., Strings that are valid for Gem::Platform or actual Gem::Platform objects.

gem_source_index()
with_gem_platforms(*alt_gem_platforms) {|| ...}

[Validate]