chef

https://github.com/opscode/chef

Ruby

A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.

Chef::Provider::Package::Rubygems::AlternateGemEnvironment#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.

Source | Google | Stack overflow

Edit

git clone [email protected]:opscode/chef.git

cd chef

open lib/chef/provider/package/rubygems.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Chef--Provider--Package--Rubygems--AlternateGemEnvironment-gem_platforms-for-pr


# Commit to git

git add lib/chef/provider/package/rubygems.rbgit commit -m "better docs for Chef::Provider::Package::Rubygems::AlternateGemEnvironment#gem_platforms"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Chef--Provider--Package--Rubygems--AlternateGemEnvironment-gem_platforms-for-pr

hub pull-request


# Celebrate!