This reverts commit 5450015.
`gem help install` says "Don't upgrade any dependencies that already meet version requirements" for --minimal-deps. However, the test does not provide an option to upgrade and stops once a direct dependency has been met, even if the set is incomplete. Now we traverse all the dependencies and have a newer version of a dependency available to install. This ensures a complete set is installed.
Previously the current set of installed gems was used. This created incorrect behavior if the gem was already installed. Now we rely on the always_install list and return no dependencies unless the gem already exists in the always_install list. This means the gem will always be installed (as it was listed).
For --development, development dependencies are added when creating the RequestSet so they don't leak into full resolution. For --development-all, development dependencies are looked up for each gem during resolution. I have no recollection of why --development-all exists in Rubygems, but it was probably a bad implementation by me.
Now DependencyInstaller knows about installed gems via Installer set. This allows installed gems that meet a dependency to be preferred over local or remote gems. This minimizes the amount of downloading we do and allows developers to install updated but unreleased versions for testing.
This is a work-in-progress that, at least, doesn't give errors for most tests. Due to incomplete integration many DependencyInstaller tests still fail due to not installing enough gems. A new resolver set was added, Gem::DependencyResolver::InstallerSet, which handles both local and remote gems. This should either be merged with IndexSet or contain an IndexSet for remote operation. Also, a typo in UnsatisfiableDependencyError was corrected.