Encrypt Private Key before writing to disk.
Ask for passphrase when creating the key for a certificate.
Load encrypted private key using ENV['GEM_PRIVATE_KEY_PASSPHRASE'] as passphrase.
Sign built packages with encrypted key.
Change private key cipher to AES 256 by default. Re-order arguments to
Gem::Security.write so cipher is last.
Write the private key to disk only when creating it.
if MAKE or make are in the environment, use those instead of rbconfig's
make. necessary for those who built ruby with something other than
GNU make (gmake is required to build mkmf output)
Use File.join instead of manual path creation.

This prevents issues, when File.join in #new_default_spec removes
superfluous slashes while they are kept in expected paths. E.g. the test
would fail if ruby configuration specifies --with-ruby-version=''.
Do not add last slash to Gem.user_dir if ruby_version string is empty.
Remove check for gem subdirectories.

This check is done later in Installer#pre_install_checks anyway.
Fixed placement of executables with --user-install

Previously executables for --user-install were placed in ~/.gem.  It
seems this broke at some time during the 1.8.x series due to a missing
test.

This caused an attempt to install executables into the default bin
directory which is usually only writable by a super-user.

This was fixed by setting the bin directory to the appropriate path if
the :user_install option was enabled.
Fix gsub for tests on windows

The gsub! inadvertently altered @bin_dir while checking if the user bin
dir was in the user's path.

Now gsub is used instead to isolate the check from the instance variable
it is checking.

Fixes ruby bug #7885
Fixed `gem update --user-install`

In the update command the installer was created before parsing any
options.

This prevented the installer from using any options such as
--user-install if they were given on the command line.

Now the installer is created after option processing in #execute.

Fixes ruby bug #7779
Create extension destination directory

After an extconf.rb extension is built it is installed into the "lib"
directory.  If the "lib" directory was not present in the package this
would cause the shared object to be named "lib" instead of its proper
name.

This patch creates the destination directory before building the
extension to ensure the shared object will be installed with the correct
name.

Ruby Bug #7897, patch by Kenta Murata
Set release version
Cleaned up duplication in push command tests

The push command tests were testing the Gem::GemcutterUtilities#sign_in
instead of any command functionality.  The --host option was not tested
(despite that being the intent of the test).

The duplicate tests were deleted and replaced by a single test for
Gem::Commands::PushCommand#send_gem.

test_execute_host was added to test the --host option.

Discovered by hltbra
Fix #461: Add --host option to owner command
Update History for 2.0 release

Reordered entries for unreleased 2.0.0.rc.2.1
Lazily load RubyGems.arg API credentials

Eagerly loading the credentials causes the .gem/credentials security
check to occur even when the API credentials will not be used.  This can
cause a failure to install when running setup.rb.

Now the credentials file is lazily loaded which will delay the check
until the credentials are used (such as pushing a gem).  This allows
users to install rubygems through automated mechanisms (such as RVM)
with bad permissions on their credentials file.

Fixes #465
Add GeoTrust CA cert for RapidSSL