[DRE-commits] [bundler] 01/01: Imported Upstream version 1.9.9

zeha at debian.org zeha at debian.org
Mon May 25 23:54:12 UTC 2015


This is an automated email from the git hooks/post-receive script.

zeha pushed a commit to annotated tag upstream/1.9.9
in repository bundler.

commit ffdb1c4e1e10b513027a5168e8fe75114a74af8b
Author: Christian Hofstaedtler <zeha at debian.org>
Date:   Tue May 26 01:07:58 2015 +0200

    Imported Upstream version 1.9.9
---
 .gitignore                                         |   19 +-
 .rspec                                             |    1 +
 .travis.yml                                        |   42 +-
 CHANGELOG.md                                       |  322 ++++-
 CODE_OF_CONDUCT.md                                 |   40 +
 CONTRIBUTING.md                                    |   26 +-
 DEVELOPMENT.md                                     |    6 +-
 ISSUES.md                                          |    2 +-
 README.md                                          |   24 +-
 Rakefile                                           |   92 +-
 bin/bundle                                         |    2 +-
 bundler.gemspec                                    |   41 +-
 lib/bundler.rb                                     |   38 +-
 lib/bundler/anonymizable_uri.rb                    |   32 +
 lib/bundler/cli.rb                                 |  167 ++-
 lib/bundler/cli/cache.rb                           |    1 +
 lib/bundler/cli/clean.rb                           |   15 +-
 lib/bundler/cli/common.rb                          |    2 +
 lib/bundler/cli/console.rb                         |   48 +-
 lib/bundler/cli/exec.rb                            |   51 +-
 lib/bundler/cli/gem.rb                             |  197 ++-
 lib/bundler/cli/install.rb                         |   34 +-
 lib/bundler/cli/outdated.rb                        |    2 +-
 lib/bundler/cli/package.rb                         |    9 +-
 lib/bundler/cli/show.rb                            |   32 +-
 lib/bundler/cli/update.rb                          |    4 +-
 lib/bundler/cli/viz.rb                             |    2 +-
 lib/bundler/current_ruby.rb                        |   60 +
 lib/bundler/definition.rb                          |   94 +-
 lib/bundler/dep_proxy.rb                           |    4 +-
 lib/bundler/dependency.rb                          |   15 +-
 lib/bundler/dsl.rb                                 |   47 +-
 lib/bundler/endpoint_specification.rb              |    2 +-
 lib/bundler/env.rb                                 |   69 +-
 lib/bundler/fetcher.rb                             |  119 +-
 lib/bundler/friendly_errors.rb                     |   53 +-
 lib/bundler/gem_helper.rb                          |   35 +-
 lib/bundler/gem_helpers.rb                         |    2 +
 lib/bundler/graph.rb                               |    5 +-
 lib/bundler/index.rb                               |   44 +-
 lib/bundler/installer.rb                           |   49 +-
 lib/bundler/lazy_specification.rb                  |    2 +-
 lib/bundler/lockfile_parser.rb                     |   30 +-
 lib/bundler/man/bundle                             |    5 +-
 lib/bundler/man/bundle-config                      |   73 +-
 lib/bundler/man/bundle-config.txt                  |   83 +-
 lib/bundler/man/bundle-exec                        |    2 +-
 lib/bundler/man/bundle-exec.txt                    |    2 +-
 lib/bundler/man/bundle-install                     |  134 +-
 lib/bundler/man/bundle-install.txt                 |  209 ++--
 lib/bundler/man/bundle-package                     |    5 +-
 lib/bundler/man/bundle-package.txt                 |   36 +-
 lib/bundler/man/bundle-platform                    |    2 +-
 lib/bundler/man/bundle-platform.txt                |    2 +-
 lib/bundler/man/bundle-update                      |   67 +-
 lib/bundler/man/bundle-update.txt                  |   72 +-
 lib/bundler/man/bundle.txt                         |    8 +-
 lib/bundler/man/gemfile.5                          |  147 ++-
 lib/bundler/man/gemfile.5.txt                      |  156 ++-
 lib/bundler/match_platform.rb                      |    2 +-
 lib/bundler/parallel_workers.rb                    |   18 -
 lib/bundler/parallel_workers/thread_worker.rb      |   30 -
 lib/bundler/parallel_workers/unix_worker.rb        |  101 --
 lib/bundler/parallel_workers/worker.rb             |   69 --
 lib/bundler/resolver.rb                            |  532 +++-----
 lib/bundler/ruby_version.rb                        |    2 +-
 lib/bundler/rubygems_ext.rb                        |    5 +-
 lib/bundler/rubygems_integration.rb                |   59 +-
 lib/bundler/runtime.rb                             |   59 +-
 lib/bundler/settings.rb                            |   52 +-
 lib/bundler/setup.rb                               |    3 +-
 lib/bundler/shared_helpers.rb                      |   81 +-
 lib/bundler/source.rb                              |   17 +-
 lib/bundler/source/git.rb                          |    8 +-
 lib/bundler/source/git/git_proxy.rb                |    4 +
 lib/bundler/source/path.rb                         |   37 +-
 lib/bundler/source/path/installer.rb               |   21 +-
 lib/bundler/source/rubygems.rb                     |  147 ++-
 lib/bundler/source_list.rb                         |    8 +-
 .../ssl_certs/AddTrustExternalCARoot-2048.pem      |   25 +
 lib/bundler/ssl_certs/AddTrustExternalCARoot.pem   |   32 +
 lib/bundler/ssl_certs/certificate_manager.rb       |   34 +-
 lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt |   13 +
 lib/bundler/templates/newgem/LICENSE.txt.tt        |   35 +-
 lib/bundler/templates/newgem/README.md.tt          |   10 +-
 lib/bundler/templates/newgem/Rakefile.tt           |    3 +-
 lib/bundler/templates/newgem/bin/console.tt        |   14 +
 lib/bundler/templates/newgem/bin/newgem.tt         |    3 -
 lib/bundler/templates/newgem/bin/setup.tt          |    7 +
 lib/bundler/templates/newgem/exe/newgem.tt         |    3 +
 lib/bundler/templates/newgem/gitignore.tt          |    2 +
 .../templates/newgem/lib/newgem/version.rb.tt      |    2 +-
 lib/bundler/templates/newgem/newgem.gemspec.tt     |   39 +-
 .../templates/newgem/test/test_newgem.rb.tt        |    2 +-
 lib/bundler/ui/shell.rb                            |   10 +-
 lib/bundler/vendored_molinillo.rb                  |    2 +
 lib/bundler/vendored_thor.rb                       |   11 +-
 lib/bundler/version.rb                             |    2 +-
 lib/bundler/worker.rb                              |   73 ++
 man/bundle-config.ronn                             |   40 +-
 man/bundle-install.ronn                            |  197 +--
 man/bundle-package.ronn                            |    7 +
 man/bundle-update.ronn                             |   69 +-
 man/bundle.ronn                                    |    6 +
 man/gemfile.5.ronn                                 |   95 +-
 metadata.yml                                       |  343 ++----
 spec/bundler/bundler_spec.rb                       |   74 --
 spec/bundler/cli_spec.rb                           |   16 -
 spec/bundler/definition_spec.rb                    |   22 -
 spec/bundler/dsl_spec.rb                           |   82 --
 spec/bundler/friendly_errors_spec.rb               |   13 -
 spec/bundler/gem_helper_spec.rb                    |  224 ----
 spec/bundler/psyched_yaml_spec.rb                  |    8 -
 spec/bundler/retry_spec.rb                         |   59 -
 spec/bundler/settings_spec.rb                      |   13 -
 spec/bundler/source/rubygems_spec.rb               |   25 -
 spec/bundler/source_list_spec.rb                   |  361 ------
 spec/cache/gems_spec.rb                            |  284 -----
 spec/cache/git_spec.rb                             |  188 ---
 spec/cache/path_spec.rb                            |  121 --
 spec/cache/platform_spec.rb                        |   57 -
 spec/commands/binstubs_spec.rb                     |  219 ----
 spec/commands/check_spec.rb                        |  278 -----
 spec/commands/clean_spec.rb                        |  592 ---------
 spec/commands/config_spec.rb                       |  227 ----
 spec/commands/console_spec.rb                      |   76 --
 spec/commands/exec_spec.rb                         |  309 -----
 spec/commands/help_spec.rb                         |   39 -
 spec/commands/init_spec.rb                         |   39 -
 spec/commands/inject_spec.rb                       |   78 --
 spec/commands/licenses_spec.rb                     |   18 -
 spec/commands/newgem_spec.rb                       |  423 -------
 spec/commands/open_spec.rb                         |   68 --
 spec/commands/outdated_spec.rb                     |  156 ---
 spec/commands/package_spec.rb                      |  114 --
 spec/commands/show_spec.rb                         |  125 --
 spec/install/binstubs_spec.rb                      |   24 -
 spec/install/bundler_spec.rb                       |  146 ---
 spec/install/deploy_spec.rb                        |  250 ----
 spec/install/gemfile/gemspec_spec.rb               |  170 ---
 spec/install/gemfile/git_spec.rb                   |  967 ---------------
 spec/install/gemfile/path_spec.rb                  |  500 --------
 spec/install/gemfile_spec.rb                       |   44 -
 spec/install/gems/c_ext_spec.rb                    |   48 -
 spec/install/gems/dependency_api_spec.rb           |  582 ---------
 spec/install/gems/env_spec.rb                      |  107 --
 spec/install/gems/flex_spec.rb                     |  314 -----
 spec/install/gems/groups_spec.rb                   |  308 -----
 spec/install/gems/mirror_spec.rb                   |   39 -
 spec/install/gems/platform_spec.rb                 |  195 ---
 spec/install/gems/post_install_spec.rb             |  121 --
 spec/install/gems/resolving_spec.rb                |  124 --
 spec/install/gems/simple_case_spec.rb              |  377 ------
 spec/install/gems/sources_spec.rb                  |  259 ----
 spec/install/gems/standalone_spec.rb               |  260 ----
 spec/install/gems/sudo_spec.rb                     |  136 ---
 spec/install/gems/win32_spec.rb                    |   26 -
 spec/install/gemspecs_spec.rb                      |   50 -
 spec/install/path_spec.rb                          |  150 ---
 spec/install/post_bundle_message_spec.rb           |  142 ---
 spec/install/prereleases_spec.rb                   |   43 -
 spec/install/security_policy_spec.rb               |   77 --
 spec/install/upgrade_spec.rb                       |   26 -
 spec/lock/git_spec.rb                              |   34 -
 spec/lock/lockfile_spec.rb                         |  924 --------------
 spec/other/bundle_ruby_spec.rb                     |  142 ---
 spec/other/cli_dispatch_spec.rb                    |   21 -
 spec/other/ext_spec.rb                             |   60 -
 spec/other/platform_spec.rb                        | 1285 --------------------
 spec/other/ssl_cert_spec.rb                        |   10 -
 spec/quality_spec.rb                               |   88 --
 spec/realworld/dependency_api_spec.rb              |   60 -
 spec/realworld/edgecases_spec.rb                   |  177 ---
 spec/realworld/parallel_spec.rb                    |   69 --
 spec/resolver/basic_spec.rb                        |   66 -
 spec/resolver/platform_spec.rb                     |   88 --
 spec/runtime/executable_spec.rb                    |  149 ---
 spec/runtime/load_spec.rb                          |  107 --
 spec/runtime/platform_spec.rb                      |   90 --
 spec/runtime/require_spec.rb                       |  332 -----
 spec/runtime/setup_spec.rb                         |  853 -------------
 spec/runtime/with_clean_env_spec.rb                |   91 --
 spec/spec_helper.rb                                |  121 --
 .../endopint_marshal_fail_basic_authentication.rb  |   13 -
 spec/support/artifice/endpoint.rb                  |   71 --
 spec/support/artifice/endpoint_500.rb              |   37 -
 spec/support/artifice/endpoint_api_missing.rb      |   16 -
 .../artifice/endpoint_basic_authentication.rb      |   13 -
 spec/support/artifice/endpoint_creds_diff_host.rb  |   38 -
 spec/support/artifice/endpoint_extra.rb            |   31 -
 spec/support/artifice/endpoint_extra_missing.rb    |   15 -
 spec/support/artifice/endpoint_fallback.rb         |   17 -
 spec/support/artifice/endpoint_host_redirect.rb    |   15 -
 spec/support/artifice/endpoint_marshal_fail.rb     |   11 -
 spec/support/artifice/endpoint_redirect.rb         |   15 -
 .../endpoint_strict_basic_authentication.rb        |   18 -
 spec/support/artifice/endpoint_timeout.rb          |   13 -
 spec/support/builders.rb                           |  681 -----------
 spec/support/fakeweb/rack-1.0.0.marshal            |    2 -
 spec/support/fakeweb/windows.rb                    |   23 -
 spec/support/hax.rb                                |   22 -
 spec/support/helpers.rb                            |  359 ------
 spec/support/indexes.rb                            |  280 -----
 spec/support/matchers.rb                           |   77 --
 spec/support/path.rb                               |   81 --
 spec/support/permissions.rb                        |   10 -
 spec/support/platforms.rb                          |   94 --
 spec/support/ruby_ext.rb                           |   20 -
 spec/support/rubygems_ext.rb                       |   39 -
 spec/support/streams.rb                            |   13 -
 spec/support/sudo.rb                               |   16 -
 spec/update/gems_spec.rb                           |  201 ---
 spec/update/git_spec.rb                            |  283 -----
 spec/update/path_spec.rb                           |   18 -
 214 files changed, 3148 insertions(+), 19172 deletions(-)

diff --git a/.gitignore b/.gitignore
index 874a3b8..4f79ffe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,23 +3,14 @@
 # https://help.github.com/articles/ignoring-files and find useful gitignore
 # samples at https://github.com/github/gitignore
 
-# system crap
-.DS_Store
-.*.swp
-
 # files created by running the specs
-tmp/
-
-# built gems
-pkg/
-*.gem
+/tmp/
 
-# rubinius bytecode
-*.rbc
-.rbx/
+# gems built by `rake build`
+/pkg/
 
 # output from ronn
-lib/bundler/man/
+/lib/bundler/man/
 
 # output from ci_reporter
-spec/reports/
+/spec/reports/
diff --git a/.rspec b/.rspec
index 8c18f1a..19a7e9a 100644
--- a/.rspec
+++ b/.rspec
@@ -1,2 +1,3 @@
 --format documentation
 --color
+--warnings
diff --git a/.travis.yml b/.travis.yml
index d931183..ea99cf8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,9 +1,12 @@
 language: ruby
 script: rake spec:travis
 before_script: travis_retry rake spec:travis:deps
+
 branches:
   only:
     - master
+    - 1-9-stable
+    - 1-8-stable
     - 1-7-stable
     - 1-6-stable
     - 1-5-stable
@@ -11,39 +14,52 @@ branches:
     - 1-2-stable
     - 1-1-stable
     - 1-0-stable
+
 notifications:
   email:
     # andre
     - secure: "bCcvqJT7YrBawtkXXwHhT+jOFth7r2Qv/30PkkbhQxk6Jb3xambjCOJ3U6vJ\ngYmiL50exi5lUp3oc3SEbHN5t2CrZqOZDQ6o7P8EAmB5c0oH2RrYaFOkI5Gt\nul/jGH/96A9sj0aMwG7JfdMSfhqj1DUKAm2PnnbXPL853VfmT24="
     # terence
     - secure: "MQ8eA5Jb8YzEpAo58DRGfVJklAPcEbAulpBZnTxp0am6ldneDtJHbQk21w6R\nj5GsDHlzr/lMp/GHIimtUZ7rLohfND8fj/W7fs1Dkd4eN02/ERt98x3pHlqv\nvZgSnZ39uVYv+OcphraE24QaRaGWLhWZAMYQTVe/Yz50NyG8g1U="
-  campfire:
+  slack:
     on_success: change
     on_failure: always
     rooms:
-      # Bundler Ops
-      secure: MNTSGIySYwHia5gIgRiZxXtPMPDIP9KmzQk7Kq2ZoVvP3mIk8W1TMkvcyFkEf6uCasyVZZixzUBfY+E0BlHAz1ycQpTh1jvSpuIpEVYW48ShJldJ+8W8xfzafyOHii3z7VrDaomEffmMDdmHRsbQAfekMjdR4bTpXtT9V+wOXlg=
+      - secure: JxBi7DDJGkIF/7f/FSN/HUHpvV4EKfQccZHTPd1b2pNJn3GXo6u+tNVbAw2WjxYzPyPQI3ZcYBCU9SEXp/i7VmG8uMzh8Kyildw+miSKYKVb90uYqcsXWzbxwyNBgJLvyDkzST45H5lgnyAicee3WkFes/WDZikIajbH7ztdb04=
+
 rvm:
-  - 2.1.1
+  - 2.2
+  - 2.1
   - 2.0.0
   - 1.9.3
   - 1.8.7
+
 # Rubygems versions MUST be available as rake tasks
 # see Rakefile:66 for the list of possible RGV values
 env:
   # We need to know if changes to rubygems will break bundler on release
   - RGV=master
   # Test the latest rubygems release with all of our supported rubies
-  - RGV=v2.2.2
+  - RGV=v2.4.6
+
 matrix:
+  fast_finish: true
   include:
-    # Ruby 2.0.0, Rubygems 2.0 and up
+    # Ruby 2.2, Rubygems 2.4.5 and up (RG 2.4 is included by the matrix above)
+    # Ruby 2.1, Rubygems 2.2.2 and up
+    - rvm: 2.1
+      env: RGV=v2.2.3
+    # Ruby 2.0.0, Rubygems 2.0.0 and up
+    - rvm: 2.0.0
+      env: RGV=v2.2.3
     - rvm: 2.0.0
       env: RGV=v2.1.11
     - rvm: 2.0.0
       env: RGV=v2.0.14
     # Ruby 1.9.3, Rubygems 1.5.3 and up
     - rvm: 1.9.3
+      env: RGV=v2.2.3
+    - rvm: 1.9.3
       env: RGV=v2.1.11
     - rvm: 1.9.3
       env: RGV=v2.0.14
@@ -57,7 +73,7 @@ matrix:
       env: RGV=v1.5.3
     # Ruby 1.8.7, Rubygems 1.3.6 and up
     - rvm: 1.8.7
-      env: RGV=v2.1.11
+      env: RGV=v2.2.3
     - rvm: 1.8.7
       env: RGV=v2.0.14
     - rvm: 1.8.7
@@ -82,20 +98,14 @@ matrix:
     # Ruby 1.9.2 sanity check
     # (but it's just too slow and sometimes goes over the Travis limit)
     - rvm: 1.9.2
-      env: RGV=v2.2.2
+      env: RGV=v2.4.6
     # Ruby-head (we want to know how we're doing, but not fail the build)
     - rvm: ruby-head
       env: RGV=master
-    # JRuby, the latest (not maintained, but good to know)
-    - rvm: jruby
-      env: RGV=v2.2.2
-    # Rubinius, the latest (not maintained, but good to know)
-    - rvm: rbx
-      env: RGV=v2.2.2
   allow_failures:
     - rvm: 1.8.7
-      env: RGV=2.1.11
+      env: RGV=v2.1.11
     - rvm: 1.9.2
     - rvm: ruby-head
     - rvm: jruby
-    - rvm: rbx
+    - rvm: rbx-2
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 804f667..8e9e21d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,8 +1,301 @@
+## 1.9.9 (2015-05-16)
+
+Bugfixes:
+
+  - read mirror and credential settings from older versions (#3557, @Strech)
+
+## 1.9.8 (2015-05-12)
+
+Bugfixes:
+
+  - fix regression in sudo mode introduced by 1.9.7 (#3642, @segiddins)
+
+## 1.9.7 (2015-05-11)
+
+Bugfixes:
+
+  - always clean up tmp dirs (#3277, @hone, @indirect, @segiddins)
+
+## 1.9.6 (2015-05-02)
+
+Bugfixes:
+
+  - use RubyGems spec stubs if available (@segiddins)
+  - allow creating gems with names containing two dashes (#3483, @janlelis)
+  - allow creating gems with names extending constants (#3603, @amatsuda)
+
+## 1.9.5 (2015-04-29)
+
+Bugfixes:
+
+  - respect Gemfile sources when installing a gem present in two sources (#3585, @tmoore)
+
+## 1.9.4 (2015-04-13)
+
+Bugfixes:
+
+  - fix regression in installing x86 and universal gems (#3565, @jdmundrawala)
+  - improve error when gems are missing (#3564, @sealocal)
+
+## 1.9.3 (2015-04-12)
+
+Bugfixes:
+
+  - handle removal of `specs` from rubygems/rubygems at 620910 (#3558, @indirect)
+  - install 'universal' gems on Windows (#3066, @jdmundrawala)
+  - stop passing --local during `rake install` task (#3236, @indirect)
+  - guard against all possible accidental public gem pushes (#3533, @indirect)
+
+## 1.9.2 (2015-03-30)
+
+Bugfixes:
+
+  - ensure gem executables are executable (#3517, #3511, @indirect)
+  - fix warnings in Molinillo (#3516, @segiddins)
+  - ensure duplicate dependencies do not propagate (#3522, @segiddins)
+  - keep gems locked when updating another gem from the same source (#3520, @indirect)
+  - resolve race that could build gems without saved arguments (#3404, @indirect)
+
+## 1.9.1 (2015-03-21)
+
+Bugfixes:
+
+  - avoid exception in 'bundler/gem_tasks' (#3492, @segiddins)
+
+## 1.9.0 (2015-03-20)
+
+## 1.9.0.rc (2015-03-13)
+
+Bugfixes:
+
+  - make Bundler.which stop finding directories (@nohoho)
+  - handle Bundler prereleases correctly (#3470, @segiddins)
+
+## 1.9.0.pre.1 (2015-03-11)
+
+Bugfixes:
+
+  - make `gem` command work again (@arthurnn)
+
+## 1.9.0.pre (2015-03-11)
+
+Features:
+
+  - prefer gemspecs closest to the directory root (#3428, @segiddins)
+  - debug log for API request limits (#3452, @neerfri)
+
+"Features":
+
+  - Molinillo resolver, shared with CocoaPods (@segiddins)
+  - updated Thor to v0.19.1 (@segiddins)
+
+## 1.8.9 (2015-05-02)
+
+Bugfixes:
+
+  - Use RubyGems spec stubs if available (@segiddins)
+
+## 1.8.8 (2015-04-29)
+
+Bugfixes:
+
+  - Respect Gemfile sources when installing a gem present in two sources (#3585, @tmoore)
+
+## 1.8.7 (2015-04-07)
+
+Bugfixes:
+
+  - stop suppressing errors inside gems that get required (#3549, @indirect)
+
+## 1.8.6 (2015-03-30)
+
+Bugfixes:
+
+  - keep gems locked when updating another gem from the same source (#3250, @indirect)
+  - resolve race that could build gems without saved arguments (#3404, @indirect)
+
+## 1.8.5 (2015-03-11)
+
+Bugfixes:
+
+  - remove MIT license from gemspec when removing license file (@indirect)
+  - respect 'no' immediately as well as saving it in `gem` config (@kirs)
+
+## 1.8.4 (2015-03-05)
+
+Bugfixes:
+
+  - document --all-platforms option (#3449, @moeffju)
+  - find gems from all sources on exec after install (#3450, @TimMoore)
+
+## 1.8.3 (2015-02-24)
+
+Bugfixes:
+
+  - handle boolean values for gem settings (@EduardoBautista)
+  - stop always looking for updated `path` gems (#3414, #3417, #3429, @TimMoore)
+
+## 1.8.2 (2015-02-14)
+
+Bugfixes:
+
+  - allow config settings for gems with 'http' in the name again (#3398, @TimMoore)
+
+## 1.8.1 (2015-02-13)
+
+Bugfixes:
+
+  - synchronize building git gem native extensions (#3385, @antifuchs & @indirect)
+  - set gemspec bindir correctly (#3392, @TimMoore)
+  - request lockfile deletion when it is malformed (#3396, @indirect)
+  - explain problem when mirror config is missing (#3386, @indirect)
+  - explain problem when caching causes permission error (#3390, @indirect)
+  - normalize URLs in config keys (#3391, @indirect)
+
+## 1.8.0 (2015-02-10)
+
+Bugfixes:
+
+  - gemfile `github` blocks now work (#3379, @indirect)
+
+Bugfixes from v1.7.13:
+
+  - look up installed gems in remote sources (#3300, #3368, #3377, #3380, #3381, @indirect)
+  - look up gems across all sources to satisfy dependencies (#3365, @keiths-osc)
+  - request dependencies for no more than 100 gems at a time (#3367, @segiddins)
+
+## 1.8.0.rc (2015-01-26)
+
+Features:
+
+  - add `config disable_multisource` option to ensure sources can't compete (@indirect)
+
+Bugfixes:
+
+  - don't add extra quotes around long, quoted config values (@aroben, #3338)
+
+Security:
+
+  - warn when more than one top-level source is present (@indirect)
+
+## 1.8.0.pre (2015-01-26)
+
+Features:
+
+  - add metadata allowed_push_host to new gem template (#3002, @juanitofatas)
+  - adds a `--no-install` flag to `bundle package` (@d-reinhold)
+  - add `bundle config auto_install true` to install automatically (@smashwilson)
+  - add `bundle viz --without` to exclude gem groups from resulting graph (@fnichol)
+  - prevent whitespace in gem declarations with clear messaging (@benlakey)
+  - tries to find a `bundler-<command>` executable on your path for non-bundler commands (@andremedeiros)
+  - tries to find `gems.rb` and it's new counterpart, `gems.locked` (@andremedeiros)
+  - change the initial version of new gems from `0.0.1` to `0.1.0` (@petedmarsh)
+  - add `package --all-platforms` to cache gems for each known platform (@ccutrer)
+  - speed up `exec` when running commands on the $PATH (@kirs)
+  - add gem code of conduct file and option (@kirs)
+  - add config settings for gem license and tests (@kirs)
+  - add `bin/setup` and `bin/console` to new gems (@indirect)
+  - include configured user-agent in network requests (@indirect)
+  - support `github`, `gist`, and `bitbucket` options on git gems (@indirect)
+  - add `package --cache-path` and `config cache_path` for cache location (@jnraine)
+  - allow `config` to work even when a Gemfile is not present (@dholdren)
+  - add `config gemfile /path` for other Gemfile locations (@dholdren)
+  - add `github` method alonside the `git` method (@BenMorganIO)
+
+Bugfixes:
+
+  - reduce memory usage with threaded parallel workers (@Who828)
+  - support read-only git gems (@pmahoney)
+  - various resolver performance improvements (@dubek)
+  - untaint git gem paths for Rubygems compatibility (@tdtds)
+
+Documentation:
+
+  - add missing Gemfile global `path` explanation (@agenteo)
+
+## 1.7.15 (2015-04-29)
+
+Bugfixes:
+
+  - Respect Gemfile sources when installing a gem present in two sources (#3585, @tmoore)
+
+## 1.7.14 (2015-03-30)
+
+Bugfixes:
+
+  - Keep gems locked when updating another gem from the same source (#3250, @indirect)
+  - Don't add extra quotes around long, quoted config values (@aroben, #3338)
+
+## 1.7.13 (2015-02-07)
+
+Bugfixes:
+
+  - Look up installed gems in remote sources (#3300, #3368, #3377, #3380, #3381, @indirect)
+  - Look up gems across all sources to satisfy dependencies (#3365, @keiths-osc)
+  - Request dependencies for no more than 100 gems at a time (#3367, @segiddins)
+
+## 1.7.12 (2015-01-08)
+
+Bugfixes:
+
+  - Always send credentials for sources, fixing private Gemfury gems (#3342, @TimMoore)
+
+## 1.7.11 (2015-01-04)
+
+Bugfixes:
+
+  - Recognize `:mri_22` and `:mingw_22`, rather than just `:ruby_22` (#3328, @myabc)
+
+## 1.7.10 (2014-12-29)
+
+Bugfixes:
+
+  - Fix source blocks sometimes causing deployment mode to fail wrongly (#3298, @TimMoore)
+
+Features(?):
+
+  - Support `platform :mri_22` and related version bits (#3309, @thomasfedb)
+
+## 1.7.9 (2014-12-09)
+
+Bugfixes:
+
+  - Fix an issue where bundler sometime spams one gem in Gemfile.lock (#3216, @Who828)
+  - Ensure bundle update installs the newer version of the gem (#3089, @Who828)
+  - Fix an regression which stopped Bundler from resolving some Gemfiles (#3059, #3248, @Who828)
+
+## 1.7.8 (2014-12-06)
+
+Bugfixes:
+
+  - Hide credentials while warning about gems with ambiguous sources (#3256, @TimMoore)
+
+## 1.7.7 (2014-11-19)
+
+Bugfixes:
+
+  - Ensure server credentials stored in config or ENV will be used (#3180, @arronmabrey)
+  - Fix race condition causing errors while installing git-based gems (#3174, @Who828)
+  - Use single quotes in config so YAML won't add more quotes (#3261, @indirect)
+
+## 1.7.6 (2014-11-11)
+
+Bugfixes:
+
+  - CA certificates that work with all OpenSSLs (@luislavena, @indirect)
+
+## 1.7.5 (2014-11-10)
+
+Bugfixes:
+
+  - Fix --deployment with source blocks and non-alphabetical gems (#3224, @TimMoore)
+  - Vendor CA chain to validate new rubygems.org HTTPS certificate (@indirect)
+
 ## 1.7.4 (2014-10-19)
 
 Bugfixes:
 
-  - Allow --deployment after `pack` while using source blocks (#3167, @tmoore)
+  - Allow --deployment after `pack` while using source blocks (#3167, @TimMoore)
   - Use dependency API even when HTTP credentials are in ENV (#3191, @fvaleur)
   - Silence warnings (including root warning) in --quiet mode (#3186, @indirect)
   - Stop asking gem servers for gems already found locally (#2909, @dubek)
@@ -25,23 +318,39 @@ Bugfixes:
 Bugfixes:
 
   - Install gems from one source needed by gems in another source (@indirect)
-  - Install the same gem versions even after some are installed (@tmoore)
+  - Install the same gem versions even after some are installed (@TimMoore)
   - Download specs only when installing from servers (@indirect)
 
 ## 1.7.0 (2014-08-13)
 
 Security:
 
-  - Fix for CVE-2013-0334, installing gems from an unexpected source (@tmoore)
+  - Fix for CVE-2013-0334, installing gems from an unexpected source (@TimMoore)
 
 Features:
 
-  - Gemfile `source` calls now take a block containing gems from that source (@tmoore)
-  - Added the `:source` option to `gem` to specify a source (@tmoore)
+  - Gemfile `source` calls now take a block containing gems from that source (@TimMoore)
+  - Added the `:source` option to `gem` to specify a source (@TimMoore)
+
+Bugfixes:
+
+  - Warn on ambiguous gems available from more than one source (@TimMoore)
+
+## 1.6.7 (2014-10-19)
+
+Features:
+
+  - warn to upgrade when using useless source blocks (@danfinnie)
+
+Documentation:
+
+  - explain how to use gem server credentials via ENV (@hwartig)
+
+## 1.6.6 (2014-08-23)
 
 Bugfixes:
 
-  - Warn on ambiguous gems available from more than one source (@tmoore)
+  - restore Gemfile credentials to Gemfile.lock (@indirect)
 
 ## 1.6.5 (2014-07-23)
 
@@ -124,6 +433,7 @@ Features:
   - `bundle show --verbose` Add gem summary to the output (@lardcanoe)
   - `bundle gem GEM --ext` now generates a skeleton for a C extension (@superdealloc)
   - Avoid using threequals operator where possible (@as-cii)
+  - Add `bundle update --group` to update specific group (#2731 @banyan)
 
 Documentation:
 
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000..e5e8828
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,40 @@
+# Bundler Code of Conduct
+
+The Bundler project strongly values contributors from anywhere, regardless of gender, sexual orientation, disability, physical appearance, body size, race, or religion. As a result, the Bundler team has agreed to and enforces this code of conduct in order to provide a harassment-free experience for everyone who participates in the development of Bundler.
+
+### Summary
+
+Harassment in code and discussion or violation of physical boundaries is completely unacceptable anywhere in the Bundler project’s codebases, issue trackers, IRC channel, Campfire, mailing lists, meetups, and other events. Violators will be warned and then blocked or banned by the core team at or before the 3rd violation.
+
+### In detail
+
+Harassment includes offensive verbal comments related to gender, sexual orientation, disability, physical appearance, body size, race, religion, sexual images, deliberate intimidation, stalking, sustained disruption, and unwelcome sexual attention.
+
+Individuals asked to stop any harassing behavior are expected to comply immediately.
+
+Maintainers, including the core team, are also subject to the anti-harassment policy.
+
+If anyone engages in harassing behavior, including maintainers, we may take appropriate action, up to and including warning the offender, deletion of comments, removal from the project’s codebase and communication systems, and escalation to Github support.
+
+If you are being harassed, notice that someone else is being harassed, or have any other concerns, please contact a member of [the core team](http://bundler.io/contributors.html) or [email the core team](mailto:team at bundler.io) immediately.
+
+We expect everyone to follow these rules anywhere in the Bundler project’s codebases, issue trackers, IRC channel, group chat, and mailing lists.
+
+Finally, don't forget that it is human to make mistakes! We all do. Let’s work together to help each other, resolve issues, and learn from the mistakes that we will all inevitably make from time to time.
+
+
+### Thanks
+
+Thanks to the [JSConf Code of Conduct](http://jsconf.com/codeofconduct.html) and [Fedora Code of Conduct](http://fedoraproject.org/code-of-conduct) for inspiration and ideas. Additional thanks to [Contributor Covenant](http://contributor-covenant.org) for the [default code of conduct](https://github.com/bundler/bundler/blob/master/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt) included in generated gems.
+
+
+### License
+
+<p class="license" xmlns:dct="http://purl.org/dc/terms/" xmlns:vcard="http://www.w3.org/2001/vcard-rdf/3.0#">
+  To the extent possible under law, <a rel="dct:publisher" href="http://bundler.io">The Bundler Team</a> has waived all copyright and related or neighboring rights to the <span property="dct:title">Bundler Code of Conduct</span>. This work is published from the <span property="vcard:Country" datatype="dct:ISO3166" content="US" about="http://bundler.io">United States.</span>
+  <br>
+  <br>
+  <a rel="license" href="http://creativecommons.org/publicdomain/zero/1.0/">
+    <img src="http://i.creativecommons.org/p/zero/1.0/88x31.png" style="border-style: none;" alt="CC0">
+  </a>
+</p>
\ No newline at end of file
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index a2fc0ce..24e0cda 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -2,18 +2,20 @@
 
 Bundler welcomes contributions from *everyone*. While contributing, please follow the project [code of conduct](http://bundler.io/conduct.html), so that everyone can be included.
 
-Here are some ways you can contribute:
-
-  - by using prerelease versions
-  - by reporting bugs
-  - by suggesting new features
-  - by writing or editing documentation
-  - by closing issues
-  - by reviewing patches
-  - by refactoring code
-  - by writing code (no patch is too small! fix typos or bad whitespace)
-
-If you'd like to help make Bundler better, you totally rock! Please check out the [DEVELOPMENT](https://github.com/bundler/bundler/blob/master/DEVELOPMENT.md) file for an introduction to the project, guidelines for contributing, and details about what would be helpful.
+If you'd like to help make Bundler better, you totally rock! Here are some ways you can contribute:
+
+  - by using prerelease versions (run `gem install bundler --pre`)
+  - by [reporting bugs you encounter](https://github.com/bundler/bundler/issues/new)
+  - by [suggesting new features](https://github.com/bundler/bundler-features/issues/new)
+  - by adding to or editing [the Bundler documentation website](http://bundler.io) and [Bundler man pages](http://bundler.io/man/bundle.1.html)
+  - by [checking issues for completeness](https://github.com/bundler/bundler/blob/master/DEVELOPMENT.md#bug-triage)
+  - by closing issues that are not complete
+  - by adding a failing test for reproducible [reported bugs](https://github.com/bundler/bundler/issues)
+  - by reviewing [pull requests](https://github.com/bundler/bundler/pulls) and suggesting improvements
+  - by improving existing code, including [suggestions from PullReview](https://www.pullreview.com/github/bundler/bundler/reviews/master)
+  - by [writing code](https://github.com/bundler/bundler/blob/master/DEVELOPMENT.md) (no patch is too small! fix typos or bad whitespace)
+
+If you need help getting started, check out the [DEVELOPMENT](https://github.com/bundler/bundler/blob/master/DEVELOPMENT.md) file for steps that will get you up and running.
 
 Thanks for helping us make Bundler better.
 
diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md
index dc52a99..a31c5a3 100644
--- a/DEVELOPMENT.md
+++ b/DEVELOPMENT.md
@@ -2,7 +2,7 @@ Great to have you here! Here are a few ways you can help out with [Bundler](http
 
 # Where should I start?
 
-You can start learning about Bundler by reading [the documentation](http://bundler.io). If you want, you can also read a (lengthy) explanation of [why Bundler exists and what it does](http://bundler.io/v1.5/rationale.html). You can also check out discussions about Bundler on the [Bundler mailing list](https://groups.google.com/group/ruby-bundler) and in the [Bundler IRC channel](http://webchat.freenode.net/?channels=%23bundler), which is #bundler on Freenode.
+You can start learning about Bundler by reading [the documentation](http://bundler.io). If you want, you can also read a (lengthy) explanation of [why Bundler exists and what it does](http://bundler.io/rationale.html). You can also check out discussions about Bundler on the [Bundler mailing list](https://groups.google.com/group/ruby-bundler) and in the [Bundler IRC channel](http://webchat.freenode.net/?channels=%23bundler), which is #bundler on Freenode. Please note that this project is  [...]
 
 ## Your first commits
 
@@ -70,7 +70,7 @@ Finally, the ticket may be a duplicate of another older ticket. If you notice a
 
 If you would like to add a new feature to Bundler, please follow these steps:
 
-  1. [Create an issue](https://github.com/bundler/bundler-features/issues/new) to discuss your feature.
+  1. [Create an issue](https://github.com/bundler/bundler-features/issues/new) in the bundler-features repo to discuss your feature.
   2. Base your commits on the master branch, since we follow [SemVer](http://semver.org) and don't add new features to old releases.
   3. Commit the code and at least one test covering your changes to a feature branch in your fork.
   4. Put a line in the [CHANGELOG](https://github.com/bundler/bundler/blob/master/CHANGELOG.md) summarizing your changes under the next release under the "Features" heading.
@@ -115,3 +115,5 @@ Finally, sharing your experiences and discoveries by writing them up is a valuab
 Examples of how Bundler is used help everyone, and we’ve discovered that people already use it in ways that we never imagined when we were writing it. If you’re still not sure what to write about, there are also several projects doing interesting things based on Bundler. They could probably use publicity too.
 
 If you let someone on the core team know you wrote about Bundler, we will add your post to the list of Bundler resources on the Github project wiki.
+
+Finally, participate carefully in the  all contributors to the Bundler project must agree to the contributor [code of conduct](http://bundler.io/conduct.html). By participating in this project you agree to abide by its terms.
diff --git a/ISSUES.md b/ISSUES.md
index 560f650..221d04d 100644
--- a/ISSUES.md
+++ b/ISSUES.md
@@ -10,7 +10,7 @@ discuss features. The bundler issue tracker is only for bugs.**
 
 Instructions for common Bundler uses can be found on the [Bundler documentation site](http://bundler.io/).
 
-Detailed information about each Bundler command, including help with common problems, can be found in the [Bundler man pages](http://bundler.io/v1.3/man/bundle.1.html).
+Detailed information about each Bundler command, including help with common problems, can be found in the [Bundler man pages](http://bundler.io/man/bundle.1.html).
 
 ## Troubleshooting
 
diff --git a/README.md b/README.md
index ef5a8fe..1719323 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,11 @@
-[![Code Climate](https://img.shields.io/codeclimate/github/bundler/bundler.svg)](https://codeclimate.com/github/bundler/bundler)
-[![Build Status](https://img.shields.io/travis/bundler/bundler/master.svg)](https://travis-ci.org/bundler/bundler)
-[![Version     ](https://img.shields.io/gem/v/bundler.svg)](https://rubygems.org/gems/bundler)
+[![Version     ](https://img.shields.io/gem/v/bundler.svg?style=flat)](https://rubygems.org/gems/bundler)
+[![Build Status](https://img.shields.io/travis/bundler/bundler/master.svg?style=flat)](https://travis-ci.org/bundler/bundler)
+[![Code Climate](https://img.shields.io/codeclimate/github/bundler/bundler.svg?style=flat)](https://codeclimate.com/github/bundler/bundler)
+[![Inline docs ](http://inch-ci.org/github/bundler/bundler.svg?style=flat)](http://inch-ci.org/github/bundler/bundler)
 
 # Bundler: a gem to bundle gems
-Bundler keeps ruby applications running the same code on every machine.
+
+Bundler makes sure Ruby applications run the same code on every machine.
 
 It does this by managing the gems that the application depends on. Given a list of gems, it can automatically download and install those gems, as well as any other gems needed by the gems that are listed. Before installing gems, it checks the versions of every gem to make sure that they are compatible, and can all be loaded at the same time. After the gems have been installed, Bundler can help you update some or all of them when new versions become available. Finally, it records the exac [...]
 
@@ -23,18 +25,12 @@ See [bundler.io](http://bundler.io) for the full documentation.
 
 For help with common problems, see [ISSUES](https://github.com/bundler/bundler/blob/master/ISSUES.md).
 
-### Contributing
-
-If you'd like to contribute to Bundler, that's awesome, and we <3 you. There's a guide to contributing to Bundler (both code and general help) over in [DEVELOPMENT](https://github.com/bundler/bundler/blob/master/DEVELOPMENT.md)
-
-The `master` branch contains our current progress towards version 1.5. Versions 1.0-1.3 each have their own stable branches. Please submit bugfixes as pull requests to the stable branch for the version you would like to fix.
-
-### Core Team
-
-The Bundler core team consists of André Arko ([@indirect](http://github.com/indirect)), Terence Lee ([@hone](http://github.com/hone)), and Jessica Lynn Suttles ([@jlsuttles](http://github.com/jlsuttles)), with support and advice from original Bundler author Yehuda Katz ([@wycats](http://github.com/wycats)).
-
 ### Other questions
 
 To see what has changed in recent versions of Bundler, see the [CHANGELOG](https://github.com/bundler/bundler/blob/master/CHANGELOG.md).
 
 Feel free to chat with the Bundler core team (and many other users) on IRC in the  [#bundler](irc://irc.freenode.net/bundler) channel on Freenode, or via email on the [Bundler mailing list](http://groups.google.com/group/ruby-bundler).
+
+### Contributing
+
+If you'd like to contribute to Bundler, that's awesome, and we <3 you. There's a guide to contributing to Bundler (both code and general help) over in [DEVELOPMENT](https://github.com/bundler/bundler/blob/master/DEVELOPMENT.md)
diff --git a/Rakefile b/Rakefile
index 3775c3d..e272149 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,10 +1,10 @@
 # -*- encoding: utf-8 -*-
 $:.unshift File.expand_path("../lib", __FILE__)
-require 'rubygems'
 require 'shellwords'
 require 'benchmark'
 
 RUBYGEMS_REPO = File.expand_path("tmp/rubygems")
+BUNDLER_SPEC = Gem::Specification.load("bundler.gemspec")
 
 def safe_task(&block)
   yield
@@ -27,11 +27,67 @@ module Rake
   end
 end
 
+def clean_files(files, regex, replacement = '')
+  files.each do |file|
+    contents = File.read(file)
+    contents.gsub!(regex, replacement)
+    File.open(file, 'w') { |f| f << contents }
+  end
+end
+
+namespace :molinillo do
+  task :namespace do
+    files = Dir.glob('lib/bundler/vendor/molinillo*/**/*.rb')
+    clean_files(files, 'Molinillo', 'Bundler::Molinillo')
+    clean_files(files, /require (["'])molinillo/, 'require \1bundler/vendor/molinillo/lib/molinillo')
+  end
+
+  task :clean do
+    files = Dir.glob('lib/bundler/vendor/molinillo*/*', File::FNM_DOTMATCH).reject { |f| %(. .. lib).include? f.split('/').last }
+    rm_r files
+  end
+
+  task :update, [:tag] => [] do |t, args|
+    tag = args[:tag]
+    Dir.chdir 'lib/bundler/vendor' do
+      rm_rf 'molinillo'
+      sh "curl -L https://github.com/CocoaPods/molinillo/archive/#{tag}.tar.gz | tar -xz"
+      sh "mv Molinillo-* molinillo"
+    end
+    Rake::Task['molinillo:namespace'].invoke
+    Rake::Task['molinillo:clean'].invoke
+  end
+end
+
+namespace :thor do
+  task :namespace do
+    files = Dir.glob('lib/bundler/vendor/thor*/**/*.rb')
+    clean_files(files, 'Thor', 'Bundler::Thor')
+    clean_files(files, /require (["'])thor/, 'require \1bundler/vendor/thor/lib/thor')
+    clean_files(files, /(autoload\s+[:\w]+,\s+["'])(thor[\w\/]+["'])/, '\1bundler/vendor/thor/lib/\2')
+  end
+
+  task :clean do
+    files = Dir.glob('lib/bundler/vendor/thor*/*', File::FNM_DOTMATCH).reject { |f| %(. .. lib).include? f.split('/').last }
+    rm_r files
+  end
+
+  task :update, [:tag] => [] do |t, args|
+    tag = args[:tag]
+    Dir.chdir 'lib/bundler/vendor' do
+      rm_rf 'thor'
+      sh "curl -L https://github.com/erikhuda/thor/archive/#{tag}.tar.gz | tar -xz"
+      sh "mv thor-* thor"
+    end
+    Rake::Task['thor:namespace'].invoke
+    Rake::Task['thor:clean'].invoke
+  end
+end
+
 namespace :spec do
   desc "Ensure spec dependencies are installed"
   task :deps do
-    spec = Gem::Specification.load("bundler.gemspec")
-    deps = Hash[spec.development_dependencies.map do |d|
+    deps = Hash[BUNDLER_SPEC.development_dependencies.map do |d|
       [d.name, d.requirement.to_s]
     end]
 
@@ -41,7 +97,7 @@ namespace :spec do
       deps.delete("rdiscount")
     end
 
-    deps.each do |name, version|
+    deps.sort_by{|name, _| name }.each do |name, version|
       sh "#{Gem.ruby} -S gem list -i '^#{name}$' -v '#{version}' || " \
          "#{Gem.ruby} -S gem install #{name} -v '#{version}' --no-ri --no-rdoc"
     end
@@ -65,7 +121,7 @@ namespace :spec do
         # https://github.com/rubygems/rubygems/issues/784
         sh "gem update --system 2.1.11"
       else
-        # Downgrade Rubygems so RSpec 3 can be instaled
+        # Downgrade Rubygems so RSpec 3 can be installed
         # https://github.com/rubygems/rubygems/issues/813
         sh "gem update --system 2.2.0"
       end
@@ -76,13 +132,12 @@ namespace :spec do
 end
 
 begin
+  rspec = BUNDLER_SPEC.development_dependencies.find{|d| d.name == "rspec" }
+  gem 'rspec', rspec.requirement.to_s
   require 'rspec/core/rake_task'
 
   desc "Run specs"
-  RSpec::Core::RakeTask.new do |t|
-    t.rspec_opts = %w(--format documentation --color)
-    t.ruby_opts  = %w(-w)
-  end
+  RSpec::Core::RakeTask.new
   task :spec => "man:build"
 
   namespace :spec do
@@ -113,8 +168,8 @@ begin
     namespace :rubygems do
       rubyopt = ENV["RUBYOPT"]
       # When editing this list, also edit .travis.yml!
-      branches = %w(master 2.2)
-      releases = %w(v1.3.6 v1.3.7 v1.4.2 v1.5.3 v1.6.2 v1.7.2 v1.8.29 v2.0.14 v2.1.11 v2.2.2)
+      branches = %w(master)
+      releases = %w(v1.3.6 v1.3.7 v1.4.2 v1.5.3 v1.6.2 v1.7.2 v1.8.29 v2.0.14 v2.1.11 v2.2.3 v2.4.6)
       (branches + releases).each do |rg|
         desc "Run specs with Rubygems #{rg}"
         RSpec::Core::RakeTask.new(rg) do |t|
@@ -129,7 +184,7 @@ begin
         end
 
         task "clone_rubygems_#{rg}" do
-          unless File.directory?("tmp/rubygems")
+          unless File.directory?(RUBYGEMS_REPO)
             system("git clone https://github.com/rubygems/rubygems.git tmp/rubygems")
           end
           hash = nil
@@ -160,7 +215,9 @@ begin
       end
 
       task "setup_co" do
-        ENV["RUBYOPT"] = "-I#{File.expand_path ENV['RG']} #{rubyopt}"
+        rg = File.expand_path ENV['RG']
+        puts "Running specs against Rubygems in #{rg}..."
+        ENV["RUBYOPT"] = "-I#{rg} #{rubyopt}"
       end
 
       task "co" => "setup_co"
@@ -234,12 +291,15 @@ begin
     task :clean do
       rm_rf "lib/bundler/man"
     end
+
+    task(:require) { }
   end
 
 rescue LoadError
   namespace :man do
-    task(:build) { warn "Install the ronn gem to be able to release!" }
-    task(:clean) { warn "Install the ronn gem to be able to release!" }
+    task(:require) { abort "Install the ronn gem to be able to release!" }
+    task(:build) { warn "Install the ronn gem to build the help pages" }
+    task(:clean) { }
   end
 end
 
@@ -251,6 +311,6 @@ end
 
 require 'bundler/gem_tasks'
 task :build => ["man:clean", "man:build"]
-task :release => ["man:clean", "man:build"]
+task :release => ["man:require", "man:clean", "man:build"]
 
 task :default => :spec
diff --git a/bin/bundle b/bin/bundle
index 63285e9..89c823e 100755
--- a/bin/bundle
+++ b/bin/bundle
@@ -6,7 +6,7 @@ Signal.trap("INT") { exit 1 }
 require 'bundler'
 # Check if an older version of bundler is installed
 $LOAD_PATH.each do |path|
-  if path =~ %r'/bundler-0.(\d+)' && $1.to_i < 9
+  if path =~ %r'/bundler-0\.(\d+)' && $1.to_i < 9
     err = "Looks like you have a version of bundler that's older than 0.9.\n"
     err << "Please remove your old versions.\n"
     err << "An easy way to do this is by running `gem cleanup bundler`."
diff --git a/bundler.gemspec b/bundler.gemspec
index dc8fbc8..c9fafa5 100644
--- a/bundler.gemspec
+++ b/bundler.gemspec
@@ -3,27 +3,30 @@ lib = File.expand_path('../lib/', __FILE__)
 $:.unshift lib unless $:.include?(lib)
 require 'bundler/version'
 
-Gem::Specification.new do |spec|
-  spec.name        = 'bundler'
-  spec.version     = Bundler::VERSION
-  spec.licenses    = ['MIT']
-  spec.authors     = ["André Arko", "Terence Lee", "Carl Lerche", "Yehuda Katz"]
-  spec.email       = ["andre at arko.net"]
-  spec.homepage    = "http://bundler.io"
-  spec.summary     = %q{The best way to manage your application's dependencies}
-  spec.description = %q{Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably}
+Gem::Specification.new do |s|
+  s.name        = 'bundler'
+  s.version     = Bundler::VERSION
+  s.licenses    = ['MIT']
+  s.authors     = ["André Arko", "Terence Lee", "Carl Lerche", "Yehuda Katz"]
+  s.email       = ["andre.arko+terence.lee at gmail.com"]
+  s.homepage    = "http://bundler.io"
+  s.summary     = %q{The best way to manage your application's dependencies}
+  s.description = %q{Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably}
 
-  spec.required_ruby_version     = '>= 1.8.7'
-  spec.required_rubygems_version = '>= 1.3.6'
+  s.required_ruby_version     = '>= 1.8.7'
+  s.required_rubygems_version = '>= 1.3.6'
 
-  spec.add_development_dependency 'rdiscount', '~> 1.6'
-  spec.add_development_dependency 'ronn', '~> 0.7.3'
-  spec.add_development_dependency 'rspec', '~> 3.0'
+  s.add_development_dependency 'mustache',  '0.99.6'
+  s.add_development_dependency 'rdiscount', '~> 1.6'
+  s.add_development_dependency 'ronn',      '~> 0.7.3'
+  s.add_development_dependency 'rspec',     '~> 3.0'
+  s.add_development_dependency 'rake'
 
-  spec.files       = `git ls-files -z`.split("\x0")
-  spec.files      += Dir.glob('lib/bundler/man/**/*') # man/ is ignored by git
-  spec.test_files  = spec.files.grep(%r{^spec/})
+  s.files       = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
+  # we don't check in man pages, but we need to ship them because
+  # we use them to generate the long-form help for each command.
+  s.files      += Dir.glob('lib/bundler/man/**/*')
 
-  spec.executables   = %w(bundle bundler)
-  spec.require_paths = ["lib"]
+  s.executables   = %w(bundle bundler)
+  s.require_paths = ["lib"]
 end
diff --git a/lib/bundler.rb b/lib/bundler.rb
index 1eaf194..22a35aa 100644
--- a/lib/bundler.rb
+++ b/lib/bundler.rb
@@ -12,6 +12,7 @@ module Bundler
   preserve_gem_path
   ORIGINAL_ENV = ENV.to_hash
 
+  autoload :AnonymizableURI,       'bundler/anonymizable_uri'
   autoload :Definition,            'bundler/definition'
   autoload :Dependency,            'bundler/dependency'
   autoload :DepProxy,              'bundler/dep_proxy'
@@ -190,7 +191,13 @@ module Bundler
     end
 
     def root
-      @root ||= default_gemfile.dirname.expand_path
+      @root ||= begin
+                  default_gemfile.dirname.expand_path
+                rescue GemfileNotFound
+                  bundle_dir = default_bundle_dir
+                  raise GemfileNotFound, "Could not locate Gemfile or .bundle/ directory" unless bundle_dir
+                  Pathname.new(File.expand_path("..", bundle_dir))
+                end
     end
 
     def app_config_path
@@ -201,20 +208,22 @@ module Bundler
 
     def app_cache(custom_path = nil)
       path = custom_path || root
-      path.join("vendor/cache")
+      path.join(self.settings.app_cache_path)
     end
 
     def tmp(name = Process.pid.to_s)
-      @tmp ||= Pathname.new Dir.mktmpdir("bundler")
-      @tmp.join(name)
+      Pathname.new(Dir.mktmpdir(["bundler", name]))
+    end
+
+    def rm_rf(path)
+      FileUtils.remove_entry_secure(path) if path && File.exist?(path)
     end
 
     def settings
-      @settings ||= begin
-        Settings.new(app_config_path)
-      rescue GemfileNotFound
-        Settings.new
-      end
+      return @settings if defined?(@settings)
+      @settings = Settings.new(app_config_path)
+    rescue GemfileNotFound
+      @settings = Settings.new(Pathname.new(".bundle").expand_path)
     end
 
     def with_original_env
@@ -253,6 +262,10 @@ module Bundler
       SharedHelpers.default_lockfile
     end
 
+    def default_bundle_dir
+      SharedHelpers.default_bundle_dir
+    end
+
     def system_bindir
       # Gem.bindir doesn't always return the location that Rubygems will install
       # system binaries. If you put '-n foo' in your .gemrc, Rubygems will
@@ -301,7 +314,8 @@ module Bundler
         executable
       elsif ENV['PATH']
         path = ENV['PATH'].split(File::PATH_SEPARATOR).find do |p|
-          File.executable?(File.join(p, executable))
+          abs_path = File.join(p, executable)
+          File.file?(abs_path) && File.executable?(abs_path)
         end
         path && File.expand_path(executable, path)
       end
@@ -369,6 +383,10 @@ module Bundler
       @ruby_version ||= SystemRubyVersion.new
     end
 
+    def reset!
+      @definition = nil
+    end
+
   private
 
     def eval_yaml_gemspec(path, contents)
diff --git a/lib/bundler/anonymizable_uri.rb b/lib/bundler/anonymizable_uri.rb
new file mode 100644
index 0000000..333a568
--- /dev/null
+++ b/lib/bundler/anonymizable_uri.rb
@@ -0,0 +1,32 @@
+module Bundler
+  class AnonymizableURI
+    attr_reader :original_uri,
+                :without_credentials
+
+    def initialize(original_uri, fallback_auth = nil)
+      @original_uri = apply_auth(original_uri, fallback_auth).freeze
+      @without_credentials = remove_auth(@original_uri).freeze
+    end
+
+  private
+
+    def apply_auth(uri, auth = nil)
+      if auth && uri.userinfo.nil?
+        uri = uri.dup
+        uri.userinfo = auth
+      end
+
+      uri
+    end
+
+    def remove_auth(uri)
+      if uri.userinfo
+        uri = uri.dup
+        uri.user = uri.password = nil
+      end
+
+      uri
+    end
+
+  end
+end
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index c3e5d8b..ac193d7 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -4,6 +4,7 @@ require 'bundler/vendored_thor'
 module Bundler
   class CLI < Thor
     include Thor::Actions
+    AUTO_INSTALL_CMDS = %w[show binstubs outdated exec open console licenses clean]
 
     def self.start(*)
       super
@@ -12,11 +13,14 @@ module Bundler
       raise e
     end
 
-    def initialize(*)
+    def initialize(*args)
       super
-      ENV['BUNDLE_GEMFILE']   = File.expand_path(options[:gemfile]) if options[:gemfile]
+      current_cmd = args.last[:current_command].name
+      custom_gemfile = options[:gemfile] || Bundler.settings[:gemfile]
+      ENV['BUNDLE_GEMFILE']   = File.expand_path(custom_gemfile) if custom_gemfile
       Bundler::Retry.attempts = options[:retry] || Bundler.settings[:retry] || Bundler::Retry::DEFAULT_ATTEMPTS
       Bundler.rubygems.ui = UI::RGProxy.new(Bundler.ui)
+      auto_install if AUTO_INSTALL_CMDS.include?(current_cmd)
     rescue UnknownArgumentError => e
       raise InvalidOption, e.message
     ensure
@@ -29,10 +33,10 @@ module Bundler
     stop_on_unknown_option! :exec
 
     default_task :install
-    class_option "no-color", :type => :boolean, :banner => "Disable colorization in output"
-    class_option "verbose",  :type => :boolean, :banner => "Enable verbose output mode", :aliases => "-V"
-    class_option "retry",    :type => :numeric, :aliases => "-r", :banner =>
-      "Specify the number of times you wish to attempt network commands"
+    class_option "no-color", :type => :boolean, :desc => "Disable colorization in output"
+    class_option "retry",    :type => :numeric, :aliases => "-r", :banner => "NUM",
+      :desc => "Specify the number of times you wish to attempt network commands"
+    class_option "verbose",  :type => :boolean, :desc => "Enable verbose output mode", :aliases => "-V"
 
     def help(cli = nil)
       case cli
@@ -64,6 +68,12 @@ module Bundler
       end
     end
 
+    def self.handle_no_command_error(command, has_namespace = $thor_runner)
+      return super unless command_path = Bundler.which("bundler-#{command}")
+
+      Kernel.exec(command_path, *ARGV[1..-1])
+    end
+
     desc "init [OPTIONS]", "Generates a Gemfile into the current working directory"
     long_desc <<-D
       Init generates a default Gemfile in the current working directory. When adding a
@@ -82,12 +92,12 @@ module Bundler
       all gems are found, Bundler prints a success message and exits with a status of 0.
       If not, the first missing gem is listed and Bundler exits status 1.
     D
+    method_option "dry-run", :type => :boolean, :default => false, :banner =>
+      "Lock the Gemfile"
     method_option "gemfile", :type => :string, :banner =>
       "Use the specified gemfile instead of Gemfile"
     method_option "path", :type => :string, :banner =>
       "Specify a different path than the system default ($BUNDLE_PATH or $GEM_HOME). Bundler will remember this value for future installs on this machine"
-    method_option "dry-run", :type => :boolean, :default => false, :banner =>
-      "Lock the Gemfile"
     def check
       require 'bundler/cli/check'
       Check.new(options).run
@@ -104,41 +114,41 @@ module Bundler
 
       If the bundle has already been installed, bundler will tell you so and then exit.
     D
-    method_option "without", :type => :array, :banner =>
-      "Exclude gems that are part of the specified named group."
+    method_option "binstubs", :type => :string, :lazy_default => "bin", :banner =>
+      "Generate bin stubs for bundled gems to ./bin"
+    method_option "clean", :type => :boolean, :banner =>
+      "Run bundle clean automatically after install"
+    method_option "deployment", :type => :boolean, :banner =>
+      "Install using defaults tuned for deployment environments"
+    method_option "frozen", :type => :boolean, :banner =>
+      "Do not allow the Gemfile.lock to be updated after this install"
+    method_option "full-index", :type => :boolean, :banner =>
+      "Use the rubygems modern index instead of the API endpoint"
     method_option "gemfile", :type => :string, :banner =>
       "Use the specified gemfile instead of Gemfile"
-    method_option "no-prune", :type => :boolean, :banner =>
-      "Don't remove stale gems from the cache."
+    method_option "jobs", :aliases => "-j", :type => :numeric, :banner =>
+      "Specify the number of jobs to run in parallel"
+    method_option "local", :type => :boolean, :banner =>
+      "Do not attempt to fetch gems remotely and use the gem cache instead"
     method_option "no-cache", :type => :boolean, :banner =>
       "Don't update the existing gem cache."
+    method_option "no-prune", :type => :boolean, :banner =>
+      "Don't remove stale gems from the cache."
+    method_option "path", :type => :string, :banner =>
+      "Specify a different path than the system default ($BUNDLE_PATH or $GEM_HOME). Bundler will remember this value for future installs on this machine"
     method_option "quiet", :type => :boolean, :banner =>
       "Only output warnings and errors."
-    method_option "local", :type => :boolean, :banner =>
-      "Do not attempt to fetch gems remotely and use the gem cache instead"
-    method_option "binstubs", :type => :string, :lazy_default => "bin", :banner =>
-      "Generate bin stubs for bundled gems to ./bin"
     method_option "shebang", :type => :string, :banner =>
       "Specify a different shebang executable name than the default (usually 'ruby')"
-    method_option "path", :type => :string, :banner =>
-      "Specify a different path than the system default ($BUNDLE_PATH or $GEM_HOME). Bundler will remember this value for future installs on this machine"
-    method_option "system", :type => :boolean, :banner =>
-      "Install to the system location ($BUNDLE_PATH or $GEM_HOME) even if the bundle was previously installed somewhere else for this application"
-    method_option "frozen", :type => :boolean, :banner =>
-      "Do not allow the Gemfile.lock to be updated after this install"
-    method_option "deployment", :type => :boolean, :banner =>
-      "Install using defaults tuned for deployment environments"
     method_option "standalone", :type => :array, :lazy_default => [], :banner =>
       "Make a bundle that can work without the Bundler runtime"
-    method_option "full-index", :type => :boolean, :banner =>
-      "Use the rubygems modern index instead of the API endpoint"
-    method_option "clean", :type => :boolean, :banner =>
-      "Run bundle clean automatically after install"
+    method_option "system", :type => :boolean, :banner =>
+      "Install to the system location ($BUNDLE_PATH or $GEM_HOME) even if the bundle was previously installed somewhere else for this application"
     method_option "trust-policy", :alias => "P", :type => :string, :banner =>
       "Gem trust policy (like gem install -P). Must be one of " +
         Bundler.rubygems.security_policy_keys.join('|')
-    method_option "jobs", :aliases => "-j", :type => :numeric, :banner =>
-      "Specify the number of jobs to run in parallel"
+    method_option "without", :type => :array, :banner =>
+      "Exclude gems that are part of the specified named group."
 
     def install
       require 'bundler/cli/install'
@@ -151,17 +161,18 @@ module Bundler
       update when you have changed the Gemfile, or if you want to get the newest
       possible versions of the gems in the bundle.
     D
-    method_option "source", :type => :array, :banner => "Update a specific source (and all gems associated with it)"
+    method_option "full-index", :type => :boolean, :banner =>
+      "Use the rubygems modern index instead of the API endpoint"
+    method_option "group", :aliases => "-g", :type => :array, :banner =>
+      "Update a specific group"
+    method_option "jobs", :aliases => "-j", :type => :numeric, :banner =>
+      "Specify the number of jobs to run in parallel"
     method_option "local", :type => :boolean, :banner =>
       "Do not attempt to fetch gems remotely and use the gem cache instead"
     method_option "quiet", :type => :boolean, :banner =>
       "Only output warnings and errors."
-    method_option "full-index", :type => :boolean, :banner =>
-        "Use the rubygems modern index instead of the API endpoint"
-    method_option "jobs", :aliases => "-j", :type => :numeric, :banner =>
-      "Specify the number of jobs to run in parallel"
-    method_option "group", :aliases => "-g", :type => :array, :banner =>
-      "Update a specific group"
+    method_option "source", :type => :array, :banner =>
+      "Update a specific source (and all gems associated with it)"
     def update(*gems)
       require 'bundler/cli/update'
       Update.new(options, gems).run
@@ -174,21 +185,23 @@ module Bundler
     D
     method_option "paths", :type => :boolean,
       :banner => "List the paths of all gems that are required by your Gemfile."
+    method_option "outdated", :type => :boolean,
+      :banner => "Show verbose output including whether gems are outdated."
     def show(gem_name = nil)
       require 'bundler/cli/show'
       Show.new(options, gem_name).run
     end
     map %w(list) => "show"
 
-    desc "binstubs GEM [OPTIONS]", "install the binstubs of the listed gem"
+    desc "binstubs GEM [OPTIONS]", "Install the binstubs of the listed gem"
     long_desc <<-D
       Generate binstubs for executables in [GEM]. Binstubs are put into bin,
       or the --binstubs directory if one has been set.
     D
-    method_option "path", :type => :string, :lazy_default => "bin", :banner =>
-      "binstub destination directory (default bin)"
     method_option "force", :type => :boolean, :default => false, :banner =>
-      "overwrite existing binstubs if they exist"
+      "Overwrite existing binstubs if they exist"
+    method_option "path", :type => :string, :lazy_default => "bin", :banner =>
+      "Binstub destination directory (default bin)"
     def binstubs(*gems)
       require 'bundler/cli/binstubs'
       Binstubs.new(options, gems).run
@@ -201,10 +214,10 @@ module Bundler
       versions of the given gems. Prerelease gems are ignored by default. If your gems
       are up to date, Bundler will exit with a status of 0. Otherwise, it will exit 1.
     D
-    method_option "pre", :type => :boolean, :banner => "Check for newer pre-release gems"
-    method_option "source", :type => :array, :banner => "Check against a specific source"
     method_option "local", :type => :boolean, :banner =>
       "Do not attempt to fetch gems remotely and use the gem cache instead"
+    method_option "pre", :type => :boolean, :banner => "Check for newer pre-release gems"
+    method_option "source", :type => :array, :banner => "Check against a specific source"
     method_option "strict", :type => :boolean, :banner =>
       "Only list newer versions allowed by your Gemfile requirements"
     def outdated(*gems)
@@ -213,20 +226,25 @@ module Bundler
     end
 
     desc "cache [OPTIONS]", "Cache all the gems to vendor/cache", :hide => true
-    method_option "no-prune",  :type => :boolean, :banner => "Don't remove stale gems from the cache."
     method_option "all",  :type => :boolean, :banner => "Include all sources (including path and git)."
+    method_option "all-platforms", :type => :boolean, :banner => "Include gems for all platforms, not just the current one"
+    method_option "no-prune",  :type => :boolean, :banner => "Don't remove stale gems from the cache."
     def cache
       require 'bundler/cli/cache'
       Cache.new(options).run
     end
 
     desc "package [OPTIONS]", "Locks and then caches all of the gems into vendor/cache"
-    method_option "no-prune",  :type => :boolean, :banner => "Don't remove stale gems from the cache."
     method_option "all",  :type => :boolean, :banner => "Include all sources (including path and git)."
-    method_option "quiet", :type => :boolean, :banner => "Only output warnings and errors."
+    method_option "all-platforms", :type => :boolean, :banner => "Include gems for all platforms, not just the current one"
+    method_option "cache-path", :type => :string, :banner =>
+      "Specify a different cache path than the default (vendor/cache)."
+    method_option "gemfile", :type => :string, :banner => "Use the specified gemfile instead of Gemfile"
+    method_option "no-install",  :type => :boolean, :banner => "Don't actually install the gems, just package."
+    method_option "no-prune",  :type => :boolean, :banner => "Don't remove stale gems from the cache."
     method_option "path", :type => :string, :banner =>
       "Specify a different path than the system default ($BUNDLE_PATH or $GEM_HOME). Bundler will remember this value for future installs on this machine"
-    method_option "gemfile", :type => :string, :banner => "Use the specified gemfile instead of Gemfile"
+    method_option "quiet", :type => :boolean, :banner => "Only output warnings and errors."
     long_desc <<-D
       The package command will copy the .gem files for every gem in the bundle into the
       directory ./vendor/cache. If you then check that directory into your source
@@ -274,16 +292,10 @@ module Bundler
       Open.new(options, name).run
     end
 
-    CONSOLES = {
-      'pry'  => :Pry,
-      'ripl' => :Ripl,
-      'irb'  => :IRB,
-    }
-
     desc "console [GROUP]", "Opens an IRB session with the bundle pre-loaded"
     def console(group = nil)
       require 'bundler/cli/console'
-      Console.new(options, group, CONSOLES).run
+      Console.new(options, group).run
     end
 
     desc "version", "Prints the bundler's version information"
@@ -313,23 +325,25 @@ module Bundler
       The associated gems must also be installed via 'bundle install'.
     D
     method_option :file, :type => :string, :default => 'gem_graph', :aliases => '-f', :banner => "The name to use for the generated file. see format option"
-    method_option :version, :type => :boolean, :default => false, :aliases => '-v', :banner => "Set to show each gem version."
-    method_option :requirements, :type => :boolean, :default => false, :aliases => '-r', :banner => "Set to show the version of each required dependency."
     method_option :format, :type => :string, :default => "png", :aliases => '-F', :banner => "This is output format option. Supported format is png, jpg, svg, dot ..."
+    method_option :requirements, :type => :boolean, :default => false, :aliases => '-r', :banner => "Set to show the version of each required dependency."
+    method_option :version, :type => :boolean, :default => false, :aliases => '-v', :banner => "Set to show each gem version."
+    method_option :without, :type => :array, :default => [], :banner => "Exclude gems that are part of the specified named group."
     def viz
       require 'bundler/cli/viz'
       Viz.new(options).run
     end
 
     desc "gem GEM [OPTIONS]", "Creates a skeleton for creating a rubygem"
-    method_option :bin, :type => :boolean, :default => false, :aliases => '-b', :banner => "Generate a binary for your library."
-    method_option :test, :type => :string, :lazy_default => 'rspec', :aliases => '-t', :banner => "Generate a test directory for your library: 'rspec' is the default, but 'minitest' is also supported."
-    method_option :edit, :type => :string, :aliases => "-e",
-                  :lazy_default => [ENV['BUNDLER_EDITOR'], ENV['VISUAL'], ENV['EDITOR']].find{|e| !e.nil? && !e.empty? },
-                  :required => false, :banner => "/path/to/your/editor",
-                  :desc => "Open generated gemspec in the specified editor (defaults to $EDITOR or $BUNDLER_EDITOR)"
-    method_option :ext, :type => :boolean, :detailt => false, :banner => "Generate the boilerplate for C extension code"
-
+    method_option :bin, :type => :boolean, :default => false, :aliases => '-b', :desc => "Generate a binary for your library. Set a default with `bundle config gem.mit true`."
+    method_option :coc, :type => :boolean, :desc => "Generate a code of conduct file. Set a default with `bundle config gem.coc true`."
+    method_option :edit, :type => :string, :aliases => "-e", :required => false, :banner => "EDITOR",
+      :lazy_default => [ENV['BUNDLER_EDITOR'], ENV['VISUAL'], ENV['EDITOR']].find{|e| !e.nil? && !e.empty? },
+      :desc => "Open generated gemspec in the specified editor (defaults to $EDITOR or $BUNDLER_EDITOR)"
+    method_option :ext, :type => :boolean, :default => false, :desc => "Generate the boilerplate for C extension code"
+    method_option :mit, :type => :boolean, :desc => "Generate an MIT license file"
+    method_option :test, :type => :string, :lazy_default => 'rspec', :aliases => '-t', :banner => "rspec",
+      :desc => "Generate a test directory for your library, either rspec or minitest. Set a default with `bundle config gem.test rspec`."
     def gem(name)
       require 'bundler/cli/gem'
       Gem.new(options, name, self).run
@@ -341,9 +355,9 @@ module Bundler
 
     desc "clean [OPTIONS]", "Cleans up unused gems in your bundler directory"
     method_option "dry-run", :type => :boolean, :default => false, :banner =>
-      "only print out changes, do not actually clean gems"
+      "Only print out changes, do not actually clean gems"
     method_option "force", :type => :boolean, :default => false, :banner =>
-      "forces clean even if --path is not set"
+      "Forces clean even if --path is not set"
     def clean
       require 'bundler/cli/clean'
       Clean.new(options.dup).run
@@ -368,5 +382,26 @@ module Bundler
       Env.new.write($stdout)
     end
 
+    private
+
+      # Automatically invoke `bundle install` and resume if
+      # Bundler.settings[:auto_install] exists. This is set through config cmd
+      # `bundle config auto_install 1`.
+      #
+      # Note that this method `nil`s out the global Definition object, so it
+      # should be called first, before you instantiate anything like an
+      # `Installer` that'll keep a reference to the old one instead.
+      def auto_install
+        return unless Bundler.settings[:auto_install]
+
+        begin
+          Bundler.definition.specs
+        rescue GemNotFound
+          Bundler.ui.info "Automatically installing missing gems."
+          Bundler.reset!
+          invoke :install, []
+          Bundler.reset!
+        end
+      end
   end
 end
diff --git a/lib/bundler/cli/cache.rb b/lib/bundler/cli/cache.rb
index 653ead7..751cb80 100644
--- a/lib/bundler/cli/cache.rb
+++ b/lib/bundler/cli/cache.rb
@@ -9,6 +9,7 @@ module Bundler
       Bundler.definition.validate_ruby!
       Bundler.definition.resolve_with_cache!
       setup_cache_all
+      Bundler.settings[:cache_all_platforms] = options["all-platforms"] if options.key?("all-platforms")
       Bundler.load.cache
       Bundler.settings[:no_prune] = true if options["no-prune"]
       Bundler.load.lock
diff --git a/lib/bundler/cli/clean.rb b/lib/bundler/cli/clean.rb
index e7a4c01..9950882 100644
--- a/lib/bundler/cli/clean.rb
+++ b/lib/bundler/cli/clean.rb
@@ -7,10 +7,17 @@ module Bundler
     end
 
     def run
-      if Bundler.settings[:path] || options[:force]
-        Bundler.load.clean(options[:"dry-run"])
-      else
-        Bundler.ui.error "Can only use bundle clean when --path is set or --force is set"
+      require_path_or_force
+      Bundler.load.clean(options[:"dry-run"])
+    end
+
+  protected
+
+    def require_path_or_force
+      if !Bundler.settings[:path] && !options[:force]
+        Bundler.ui.error "Cleaning all the gems on your system is dangerous! " \
+          "If you're sure you want to remove every system gem not in this " \
+          "bundle, run `bundle clean --force`."
         exit 1
       end
     end
diff --git a/lib/bundler/cli/common.rb b/lib/bundler/cli/common.rb
index 0548525..83315a2 100644
--- a/lib/bundler/cli/common.rb
+++ b/lib/bundler/cli/common.rb
@@ -25,6 +25,8 @@ module Bundler
       else
         ask_for_spec_from(specs)
       end
+    rescue RegexpError
+      raise GemNotFound, gem_not_found_message(name, Bundler.definition.dependencies)
     end
 
     def self.ask_for_spec_from(specs)
diff --git a/lib/bundler/cli/console.rb b/lib/bundler/cli/console.rb
index bf00093..bc4f377 100644
--- a/lib/bundler/cli/console.rb
+++ b/lib/bundler/cli/console.rb
@@ -1,41 +1,37 @@
 module Bundler
   class CLI::Console
-    attr_reader :options, :group, :consoles
-    def initialize(options, group, consoles)
+    attr_reader :options, :group
+    def initialize(options, group)
       @options = options
       @group = group
-      @consoles = consoles
     end
 
     def run
       group ? Bundler.require(:default, *(group.split.map! {|g| g.to_sym })) : Bundler.require
       ARGV.clear
 
-      preferred = Bundler.settings[:console] || 'irb'
-
-      # See if console is available
-      begin
-        require preferred || true
-      rescue LoadError
-        # Is it in Gemfile?
-        Bundler.ui.error "Could not load the #{preferred} console"
-        Bundler.ui.info "Falling back on IRB..."
-
-        require 'irb'
-        preferred = 'irb'
-      end
-
-      constant = consoles[preferred]
+      console = get_console(Bundler.settings[:console] || 'irb')
+      console.start
+    end
 
-      console = begin
-                  Object.const_get(constant)
-                rescue NameError => e
-                  Bundler.ui.error e.inspect
-                  Bundler.ui.error "Could not load the #{constant} console"
-                  return
-                end
+    def get_console(name)
+      require name
+      get_constant(name)
+    rescue LoadError
+      Bundler.ui.error "Couldn't load console #{name}"
+      get_constant('irb')
+    end
 
-      console.start
+    def get_constant(name)
+      const_name = {
+        'pry'  => :Pry,
+        'ripl' => :Ripl,
+        'irb'  => :IRB,
+      }[name]
+      Object.const_get(const_name)
+    rescue NameError
+      Bundler.ui.error "Could not find constant #{const_name}"
+      exit 1
     end
 
   end
diff --git a/lib/bundler/cli/exec.rb b/lib/bundler/cli/exec.rb
index 1739ab6..7713906 100644
--- a/lib/bundler/cli/exec.rb
+++ b/lib/bundler/cli/exec.rb
@@ -1,36 +1,43 @@
 module Bundler
   class CLI::Exec
-    attr_reader :options, :args
+    attr_reader :options, :args, :cmd
 
     def initialize(options, args)
       @options = options
+      @cmd = args.shift
       @args = args
+
+      if RUBY_VERSION >= "2.0"
+        @args << { :close_others => !options.keep_file_descriptors? }
+      elsif options.keep_file_descriptors?
+        Bundler.ui.warn "Ruby version #{RUBY_VERSION} defaults to keeping non-standard file descriptors on Kernel#exec."
+      end
     end
 
     def run
-      Bundler.definition.validate_ruby!
-      Bundler.load.setup_environment
+      raise ArgumentError if cmd.nil?
 
-      begin
-        if RUBY_VERSION >= "2.0"
-          @args << { :close_others => !options.keep_file_descriptors? }
-        elsif options.keep_file_descriptors?
-          Bundler.ui.warn "Ruby version #{RUBY_VERSION} defaults to keeping non-standard file descriptors on Kernel#exec."
-        end
-
-        # Run
-        Kernel.exec(*args)
-      rescue Errno::EACCES
-        Bundler.ui.error "bundler: not executable: #{args.first}"
-        exit 126
-      rescue Errno::ENOENT
-        Bundler.ui.error "bundler: command not found: #{args.first}"
-        Bundler.ui.warn  "Install missing gem executables with `bundle install`"
-        exit 127
-      rescue ArgumentError
-        Bundler.ui.error "bundler: exec needs a command to run"
-        exit 128
+      # First, try to exec directly to something in PATH
+      SharedHelpers.set_bundle_environment
+      bin_path = Bundler.which(@cmd)
+      if bin_path
+        Kernel.exec(bin_path, *args)
       end
+
+      # If that didn't work, set up the whole bundle
+      Bundler.definition.validate_ruby!
+      Bundler.load.setup_environment
+      Kernel.exec(@cmd, *args)
+    rescue Errno::EACCES
+      Bundler.ui.error "bundler: not executable: #{cmd}"
+      exit 126
+    rescue Errno::ENOENT
+      Bundler.ui.error "bundler: command not found: #{cmd}"
+      Bundler.ui.warn  "Install missing gem executables with `bundle install`"
+      exit 127
+    rescue ArgumentError
+      Bundler.ui.error "bundler: exec needs a command to run"
+      exit 128
     end
 
   end
diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb
index 243f028..1d65f44 100644
--- a/lib/bundler/cli/gem.rb
+++ b/lib/bundler/cli/gem.rb
@@ -1,31 +1,32 @@
+require 'pathname'
+
 module Bundler
   class CLI::Gem
-    attr_reader :options, :gem_name, :thor
+    attr_reader :options, :gem_name, :thor, :name, :target
+
     def initialize(options, gem_name, thor)
       @options = options
-      @gem_name = gem_name
+      @gem_name = resolve_name(gem_name)
       @thor = thor
+
+      @name = @gem_name
+      @target = Pathname.pwd.join(gem_name)
+
+      validate_ext_name if options[:ext]
     end
 
     def run
-      if options[:ext] && gem_name.index('-')
-        Bundler.ui.error "You have specified a gem name which does not conform to the \n" \
-                         "naming guidelines for C extensions. For more information, \n" \
-                         "see the 'Extension Naming' section at the following URL:\n" \
-                         "http://guides.rubygems.org/gems-with-extensions/\n"
-        exit 1
-      end
+      Bundler.ui.confirm "Creating gem '#{name}'..."
 
-      name = gem_name.chomp("/") # remove trailing slash if present
       underscored_name = name.tr('-', '_')
       namespaced_path = name.tr('-', '/')
-      target = File.join(Dir.pwd, name)
-      constant_name = name.split('_').map{|p| p[0..0].upcase + p[1..-1] }.join
-      constant_name = constant_name.split('-').map{|q| q[0..0].upcase + q[1..-1] }.join('::') if constant_name =~ /-/
+      constant_name = name.gsub(/-[_-]*(?![_-]|$)/){ '::' }.gsub(/([_-]+|(::)|^)(.|$)/){ $2.to_s + $3.upcase }
       constant_array = constant_name.split('::')
+
       git_user_name = `git config user.name`.chomp
       git_user_email = `git config user.email`.chomp
-      opts = {
+
+      config = {
         :name             => name,
         :underscored_name => underscored_name,
         :namespaced_path  => namespaced_path,
@@ -35,42 +36,158 @@ module Bundler
         :author           => git_user_name.empty? ? "TODO: Write your name" : git_user_name,
         :email            => git_user_email.empty? ? "TODO: Write your email address" : git_user_email,
         :test             => options[:test],
-        :ext              => options[:ext]
+        :ext              => options[:ext],
+        :bin              => options[:bin],
+        :bundler_version  => bundler_dependency_version
+      }
+      ensure_safe_gem_name(name, constant_array)
+
+      templates = {
+        "Gemfile.tt" => "Gemfile",
+        "gitignore.tt" => ".gitignore",
+        "lib/newgem.rb.tt" => "lib/#{namespaced_path}.rb",
+        "lib/newgem/version.rb.tt" => "lib/#{namespaced_path}/version.rb",
+        "newgem.gemspec.tt" => "#{name}.gemspec",
+        "Rakefile.tt" => "Rakefile",
+        "README.md.tt" => "README.md",
+        "bin/console.tt" => "bin/console",
+        "bin/setup.tt" => "bin/setup"
       }
-      gemspec_dest = File.join(target, "#{name}.gemspec")
-      thor.template(File.join("newgem/Gemfile.tt"),               File.join(target, "Gemfile"),                             opts)
-      thor.template(File.join("newgem/Rakefile.tt"),              File.join(target, "Rakefile"),                            opts)
-      thor.template(File.join("newgem/LICENSE.txt.tt"),           File.join(target, "LICENSE.txt"),                         opts)
-      thor.template(File.join("newgem/README.md.tt"),             File.join(target, "README.md"),                           opts)
-      thor.template(File.join("newgem/gitignore.tt"),             File.join(target, ".gitignore"),                          opts)
-      thor.template(File.join("newgem/newgem.gemspec.tt"),        gemspec_dest,                                             opts)
-      thor.template(File.join("newgem/lib/newgem.rb.tt"),         File.join(target, "lib/#{namespaced_path}.rb"),           opts)
-      thor.template(File.join("newgem/lib/newgem/version.rb.tt"), File.join(target, "lib/#{namespaced_path}/version.rb"),   opts)
-      if options[:bin]
-        thor.template(File.join("newgem/bin/newgem.tt"),          File.join(target, 'bin', name),                           opts)
+
+      executables = %w[
+        bin/console
+        bin/setup
+      ]
+
+      if ask_and_set(:coc, "Do you want to include a code of conduct in gems you generate?",
+          "Codes of conduct can increase contributions to your project by contributors who " \
+          "prefer collaborative, safe spaces. You can read more about the code of conduct at " \
+          "contributor-covenant.org. Having a code of conduct means agreeing to the responsibility " \
+          "of enforcing it, so be sure that you are prepared to do that. For suggestions about " \
+          "how to enforce codes of conduct, see bit.ly/coc-enforcement."
+        )
+        templates.merge!("CODE_OF_CONDUCT.md.tt" => "CODE_OF_CONDUCT.md")
       end
-      case options[:test]
-      when 'rspec'
-        thor.template(File.join("newgem/rspec.tt"),               File.join(target, ".rspec"),                              opts)
-        thor.template(File.join("newgem/spec/spec_helper.rb.tt"), File.join(target, "spec/spec_helper.rb"),                 opts)
-        thor.template(File.join("newgem/spec/newgem_spec.rb.tt"), File.join(target, "spec/#{namespaced_path}_spec.rb"),     opts)
-      when 'minitest'
-        thor.template(File.join("newgem/test/minitest_helper.rb.tt"), File.join(target, "test/minitest_helper.rb"),         opts)
-        thor.template(File.join("newgem/test/test_newgem.rb.tt"),     File.join(target, "test/test_#{namespaced_path}.rb"), opts)
+
+      if ask_and_set(:mit, "Do you want to license your code permissively under the MIT license?",
+          "This means that any other developer or company will be legally allowed to use your code " \
+          "for free as long as they admit you created it. You can read more about the MIT license " \
+          "at choosealicense.com/licenses/mit."
+        )
+        config[:mit] = true
+        templates.merge!("LICENSE.txt.tt" => "LICENSE.txt")
       end
-      if options[:test]
-        thor.template(File.join("newgem/.travis.yml.tt"),         File.join(target, ".travis.yml"),            opts)
+
+      if test_framework = ask_and_set_test_framework
+        templates.merge!(".travis.yml.tt" => ".travis.yml")
+
+        case test_framework
+        when 'rspec'
+          templates.merge!(
+            "rspec.tt" => ".rspec",
+            "spec/spec_helper.rb.tt" => "spec/spec_helper.rb",
+            "spec/newgem_spec.rb.tt" => "spec/#{namespaced_path}_spec.rb"
+          )
+        when 'minitest'
+          templates.merge!(
+            "test/minitest_helper.rb.tt" => "test/minitest_helper.rb",
+            "test/test_newgem.rb.tt" => "test/test_#{namespaced_path}.rb"
+          )
+        end
       end
+
+      templates.merge!("exe/newgem.tt" => "exe/#{name}") if options[:bin]
+
       if options[:ext]
-        thor.template(File.join("newgem/ext/newgem/extconf.rb.tt"), File.join(target, "ext/#{name}/extconf.rb"), opts)
-        thor.template(File.join("newgem/ext/newgem/newgem.h.tt"), File.join(target, "ext/#{name}/#{underscored_name}.h"), opts)
-        thor.template(File.join("newgem/ext/newgem/newgem.c.tt"), File.join(target, "ext/#{name}/#{underscored_name}.c"), opts)
+        templates.merge!(
+          "ext/newgem/extconf.rb.tt" => "ext/#{name}/extconf.rb",
+          "ext/newgem/newgem.h.tt" => "ext/#{name}/#{underscored_name}.h",
+          "ext/newgem/newgem.c.tt" => "ext/#{name}/#{underscored_name}.c"
+        )
+      end
+
+      templates.each do |src, dst|
+        thor.template("newgem/#{src}", target.join(dst), config)
+      end
+
+      executables.each do |file|
+        path = target.join(file)
+        executable = (path.stat.mode | 0111)
+        path.chmod(executable)
       end
+
       Bundler.ui.info "Initializing git repo in #{target}"
       Dir.chdir(target) { `git init`; `git add .` }
 
       if options[:edit]
-        thor.run("#{options["edit"]} \"#{gemspec_dest}\"")  # Open gemspec in editor
+        # Open gemspec in editor
+        thor.run("#{options["edit"]} \"#{target.join("#{name}.gemspec")}\"")
+      end
+    end
+
+    private
+
+    def resolve_name(name)
+      Pathname.pwd.join(name).basename.to_s
+    end
+
+    def ask_and_set(key, header, message)
+      choice = options[key] || Bundler.settings["gem.#{key}"]
+
+      if choice.nil?
+        Bundler.ui.confirm header
+        choice = Bundler.ui.yes? "#{message} y/(n):"
+        Bundler.settings.set_global("gem.#{key}", choice)
+      end
+
+      choice
+    end
+
+    def validate_ext_name
+      return unless gem_name.index('-')
+
+      Bundler.ui.error "You have specified a gem name which does not conform to the \n" \
+                       "naming guidelines for C extensions. For more information, \n" \
+                       "see the 'Extension Naming' section at the following URL:\n" \
+                       "http://guides.rubygems.org/gems-with-extensions/\n"
+      exit 1
+    end
+
+    def ask_and_set_test_framework
+      test_framework = options[:test] || Bundler.settings["gem.test"]
+
+      if test_framework.nil?
+        Bundler.ui.confirm "Do you want to generate tests with your gem?"
+        result = Bundler.ui.ask "Type 'rspec' or 'minitest' to generate those test files now and " \
+          "in the future. rspec/minitest/(none):"
+        if result =~ /rspec|minitest/
+          test_framework = result
+        else
+          test_framework = false
+        end
+      end
+
+      if Bundler.settings["gem.test"].nil?
+        Bundler.settings.set_global("gem.test", test_framework)
+      end
+
+      test_framework
+    end
+
+    def bundler_dependency_version
+      v = Gem::Version.new(Bundler::VERSION)
+      req = v.segments[0..1]
+      req << 'a' if v.prerelease?
+      req.join(".")
+    end
+
+    def ensure_safe_gem_name name, constant_array
+      if name =~ /^\d/
+        Bundler.ui.error "Invalid gem name #{name} Please give a name which does not start with numbers."
+        exit 1
+      elsif constant_array.inject(Object) {|c, s| (c.const_defined?(s) && c.const_get(s)) || break }
+        Bundler.ui.error "Invalid gem name #{name} constant #{constant_array.join("::")} is already in use. Please choose another gem name."
+        exit 1
       end
     end
 
diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb
index 80f9fd5..4d67151 100644
--- a/lib/bundler/cli/install.rb
+++ b/lib/bundler/cli/install.rb
@@ -2,7 +2,7 @@ module Bundler
   class CLI::Install
     attr_reader :options
     def initialize(options)
-      @options = options.dup
+      @options = options
     end
 
     def run
@@ -44,7 +44,7 @@ module Bundler
                                  "before deploying."
         end
 
-        if Bundler.root.join("vendor/cache").exist?
+        if Bundler.app_cache.exist?
           options[:local] = true
         end
 
@@ -66,6 +66,7 @@ module Bundler
       Bundler.settings[:shebang]  = options["shebang"] if options["shebang"]
       Bundler.settings[:jobs]     = options["jobs"] if options["jobs"]
       Bundler.settings[:no_prune] = true if options["no-prune"]
+      Bundler.settings[:no_install] = true if options["no-install"]
       Bundler.settings[:clean]    = options["clean"] if options["clean"]
       Bundler.settings.without    = options[:without]
       Bundler::Fetcher.disable_endpoint = options["full-index"]
@@ -77,23 +78,24 @@ module Bundler
       definition = Bundler.definition
       definition.validate_ruby!
       Installer.install(Bundler.root, definition, options)
-      Bundler.load.cache if Bundler.root.join("vendor/cache").exist? && !options["no-cache"] && !Bundler.settings[:frozen]
+      Bundler.load.cache if Bundler.app_cache.exist? && !options["no-cache"] && !Bundler.settings[:frozen]
+
+      Bundler.ui.confirm "Bundle complete! #{dependencies_count_for(definition)}, #{gems_installed_for(definition)}."
+      confirm_without_groups
 
       if Bundler.settings[:path]
         absolute_path = File.expand_path(Bundler.settings[:path])
         relative_path = absolute_path.sub(File.expand_path('.'), '.')
-        Bundler.ui.confirm "Your bundle is complete!"
-        without_groups_messages
-        Bundler.ui.confirm "It was installed into #{relative_path}"
+        Bundler.ui.confirm "Bundled gems are installed into #{relative_path}."
       else
-        Bundler.ui.confirm "Your bundle is complete!"
-        without_groups_messages
         Bundler.ui.confirm "Use `bundle show [gemname]` to see where a bundled gem is installed."
       end
+
       Installer.post_install_messages.to_a.each do |name, msg|
         Bundler.ui.confirm "Post-install message from #{name}:"
         Bundler.ui.info msg
       end
+
       Installer.ambiguous_gems.to_a.each do |name, installed_from_uri, *also_found_in_uris|
         Bundler.ui.error "Warning: the gem '#{name}' was found in multiple sources."
         Bundler.ui.error "Installed from: #{installed_from_uri}"
@@ -102,6 +104,7 @@ module Bundler
         Bundler.ui.error "You should add a source requirement to restrict this gem to your preferred source."
         Bundler.ui.error "For example:"
         Bundler.ui.error "    gem '#{name}', :source => '#{installed_from_uri}'"
+        Bundler.ui.error "Then uninstall the gem '#{name}' (or delete all bundled gems) and then install again."
       end
 
       if Bundler.settings[:clean] && Bundler.settings[:path]
@@ -110,7 +113,7 @@ module Bundler
       end
     rescue GemNotFound, VersionConflict => e
       if options[:local] && Bundler.app_cache.exist?
-        Bundler.ui.warn "Some gems seem to be missing from your vendor/cache directory."
+        Bundler.ui.warn "Some gems seem to be missing from your #{Bundler.settings.app_cache_path} directory."
       end
 
       unless Bundler.definition.has_rubygems_remotes?
@@ -132,11 +135,22 @@ module Bundler
         "application for all non-root users on this machine.", :wrap => true
     end
 
-    def without_groups_messages
+    def confirm_without_groups
       if Bundler.settings.without.any?
         require "bundler/cli/common"
         Bundler.ui.confirm Bundler::CLI::Common.without_groups_message
       end
     end
+
+    def dependencies_count_for(definition)
+      count = definition.dependencies.count
+      "#{count} Gemfile #{count == 1 ? 'dependency' : 'dependencies'}"
+    end
+
+    def gems_installed_for(definition)
+      count = definition.specs.count
+      "#{count} #{count == 1 ? 'gem' : 'gems'} now installed"
+    end
+
   end
 end
diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb
index ee6387a..f8779d7 100644
--- a/lib/bundler/cli/outdated.rb
+++ b/lib/bundler/cli/outdated.rb
@@ -70,7 +70,7 @@ module Bundler
       end
 
       if out_count.zero?
-        Bundler.ui.info "Your bundle is up to date!\n"
+        Bundler.ui.info "Bundle up to date!\n"
       else
         exit 1
       end
diff --git a/lib/bundler/cli/package.rb b/lib/bundler/cli/package.rb
index 5adad44..f99678c 100644
--- a/lib/bundler/cli/package.rb
+++ b/lib/bundler/cli/package.rb
@@ -9,6 +9,8 @@ module Bundler
     def run
       Bundler.ui.level = "error" if options[:quiet]
       Bundler.settings[:path] = File.expand_path(options[:path]) if options[:path]
+      Bundler.settings[:cache_all_platforms] = options["all-platforms"] if options.key?("all-platforms")
+      Bundler.settings[:cache_path] = options["cache-path"] if options.key?("cache-path")
 
       setup_cache_all
       install
@@ -22,7 +24,12 @@ module Bundler
 
     def install
       require 'bundler/cli/install'
-      Bundler::CLI::Install.new(options.dup).run
+      options = self.options.dup
+      if Bundler.settings[:cache_all_platforms]
+        options["local"] = false
+        options["update"] = true
+      end
+      Bundler::CLI::Install.new(options).run
     end
 
     def setup_cache_all
diff --git a/lib/bundler/cli/show.rb b/lib/bundler/cli/show.rb
index 07ff63d..96c1490 100644
--- a/lib/bundler/cli/show.rb
+++ b/lib/bundler/cli/show.rb
@@ -2,10 +2,12 @@ require 'bundler/cli/common'
 
 module Bundler
   class CLI::Show
-    attr_reader :options, :gem_name
+    attr_reader :options, :gem_name, :latest_specs
     def initialize(options, gem_name)
       @options = options
       @gem_name = gem_name
+      @verbose = options[:verbose] || options[:outdated]
+      @latest_specs = fetch_latest_specs if @verbose
     end
 
     def run
@@ -36,13 +38,37 @@ module Bundler
         Bundler.ui.info "Gems included by the bundle:"
         Bundler.load.specs.sort_by { |s| s.name }.each do |s|
           desc = "  * #{s.name} (#{s.version}#{s.git_version})"
-          if @options[:verbose]
-            Bundler.ui.info "#{desc} - #{s.summary || 'No description available.'}"
+          if @verbose
+            latest = latest_specs.find { |l| l.name == s.name }
+            Bundler.ui.info <<-END.gsub(/^ +/, '')
+              #{desc}
+              \tSummary:  #{s.summary || 'No description available.'}
+              \tHomepage: #{s.homepage || 'No website available.'}
+              \tStatus:   #{outdated?(s, latest) ? "Outdated - #{s.version} < #{latest.version}" : "Up to date"}
+            END
           else
             Bundler.ui.info desc
           end
         end
       end
     end
+
+    private
+
+    def fetch_latest_specs
+      definition = Bundler.definition(true)
+      if options[:outdated]
+        Bundler.ui.info "Fetching remote specs for outdated check...\n\n"
+        Bundler.ui.silence { definition.resolve_remotely! }
+      else
+        definition.resolve_with_cache!
+      end
+      definition.specs
+    end
+
+    def outdated?(current, latest)
+      return false unless latest
+      Gem::Version.new(current.version) < Gem::Version.new(latest.version)
+    end
   end
 end
diff --git a/lib/bundler/cli/update.rb b/lib/bundler/cli/update.rb
index dd15de9..6ed38f2 100644
--- a/lib/bundler/cli/update.rb
+++ b/lib/bundler/cli/update.rb
@@ -49,14 +49,14 @@ module Bundler
 
       Bundler.definition.validate_ruby!
       Installer.install Bundler.root, Bundler.definition, opts
-      Bundler.load.cache if Bundler.root.join("vendor/cache").exist?
+      Bundler.load.cache if Bundler.app_cache.exist?
 
       if Bundler.settings[:clean] && Bundler.settings[:path]
         require "bundler/cli/clean"
         Bundler::CLI::Clean.new(options).run
       end
 
-      Bundler.ui.confirm "Your bundle is updated!"
+      Bundler.ui.confirm "Bundle updated!"
       without_groups_messages
     end
 
diff --git a/lib/bundler/cli/viz.rb b/lib/bundler/cli/viz.rb
index c404ddb..09557e5 100644
--- a/lib/bundler/cli/viz.rb
+++ b/lib/bundler/cli/viz.rb
@@ -8,7 +8,7 @@ module Bundler
     def run
       require 'graphviz'
       output_file = File.expand_path(options[:file])
-      graph = Graph.new(Bundler.load, output_file, options[:version], options[:requirements], options[:format])
+      graph = Graph.new(Bundler.load, output_file, options[:version], options[:requirements], options[:format], options[:without])
       graph.viz
     rescue LoadError => e
       Bundler.ui.error e.inspect
diff --git a/lib/bundler/current_ruby.rb b/lib/bundler/current_ruby.rb
index 8d012a0..ca601d1 100644
--- a/lib/bundler/current_ruby.rb
+++ b/lib/bundler/current_ruby.rb
@@ -23,6 +23,10 @@ module Bundler
       RUBY_VERSION =~ /^2\.1/
     end
 
+    def on_22?
+      RUBY_VERSION =~ /^2\.2/
+    end
+
     def ruby?
       !mswin? && (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby" || RUBY_ENGINE == "rbx" || RUBY_ENGINE == "maglev")
     end
@@ -43,6 +47,10 @@ module Bundler
       ruby? && on_21?
     end
 
+    def ruby_22?
+      ruby? && on_22?
+    end
+
     def mri?
       !mswin? && (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby")
     end
@@ -63,6 +71,10 @@ module Bundler
       mri? && on_21?
     end
 
+    def mri_22?
+      mri? && on_22?
+    end
+
     def rbx?
       ruby? && defined?(RUBY_ENGINE) && RUBY_ENGINE == "rbx"
     end
@@ -87,6 +99,46 @@ module Bundler
       Bundler::WINDOWS
     end
 
+    def mswin_18?
+      mswin? && on_18?
+    end
+
+    def mswin_19?
+      mswin? && on_19?
+    end
+
+    def mswin_20?
+      mswin? && on_20?
+    end
+
+    def mswin_21?
+      mswin? && on_21?
+    end
+
+    def mswin_22?
+      mswin? && on_22?
+    end
+
+    def mswin64?
+      Bundler::WINDOWS && Gem::Platform.local.os == "mswin64" && Gem::Platform.local.cpu == 'x64'
+    end
+
+    def mswin64_19?
+      mswin64? && on_19?
+    end
+
+    def mswin64_20?
+      mswin64? && on_20?
+    end
+
+    def mswin64_21?
+      mswin64? && on_21?
+    end
+
+    def mswin64_22?
+      mswin64? && on_22?
+    end
+
     def mingw?
       Bundler::WINDOWS && Gem::Platform.local.os == "mingw32" && Gem::Platform.local.cpu != 'x64'
     end
@@ -107,6 +159,10 @@ module Bundler
       mingw? && on_21?
     end
 
+    def mingw_22?
+      mingw? && on_22?
+    end
+
     def x64_mingw?
       Bundler::WINDOWS && Gem::Platform.local.os == "mingw32" && Gem::Platform.local.cpu == 'x64'
     end
@@ -119,5 +175,9 @@ module Bundler
       x64_mingw? && on_21?
     end
 
+    def x64_mingw_22?
+      x64_mingw? && on_22?
+    end
+
   end
 end
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index 8e7b4d9..70e2efd 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -129,7 +129,7 @@ module Bundler
     # @return [Bundler::SpecSet]
     def specs
       @specs ||= begin
-        specs = resolve.materialize(requested_dependencies)
+        specs = resolve.materialize(Bundler.settings[:cache_all_platforms] ? dependencies : requested_dependencies)
 
         unless specs["bundler"].any?
           local = Bundler.settings[:frozen] ? rubygems_index : index
@@ -184,11 +184,10 @@ module Bundler
     # @return [SpecSet] resolved dependencies
     def resolve
       @resolve ||= begin
+        last_resolve = converge_locked_specs
         if Bundler.settings[:frozen] || (!@unlocking && nothing_changed?)
-          @locked_specs
+          last_resolve
         else
-          last_resolve = converge_locked_specs
-
           # Run a resolve against the locally available gems
           last_resolve.merge Resolver.resolve(expanded_dependencies, index, source_requirements, last_resolve)
         end
@@ -199,11 +198,11 @@ module Bundler
       @index ||= Index.build do |idx|
         dependency_names = @dependencies.map { |d| d.name }
 
-        sources.all_sources.each do |s|
-          s.dependency_names = dependency_names.dup
-          idx.add_source s.specs
-          s.specs.each { |spec| dependency_names.delete(spec.name) }
-          dependency_names.push(*s.unmet_deps).uniq!
+        sources.all_sources.each do |source|
+          source.dependency_names = dependency_names.dup
+          idx.add_source source.specs
+          dependency_names -= pinned_spec_names(source.specs)
+          dependency_names.push(*source.unmet_deps).uniq!
         end
       end
     end
@@ -272,7 +271,7 @@ module Bundler
           each do |spec|
             next if spec.name == 'bundler'
             out << spec.to_lock
-        end
+          end
         out << "\n"
       end
 
@@ -298,8 +297,6 @@ module Bundler
     end
 
     def ensure_equivalent_gemfile_and_lockfile(explicit_flag = false)
-      changes = false
-
       msg = "You are trying to install in deployment mode after changing\n" \
             "your Gemfile. Run `bundle install` elsewhere and add the\n" \
             "updated Gemfile.lock to version control."
@@ -325,32 +322,29 @@ module Bundler
         if deleted_sources.any?
           deleted.concat deleted_sources.map { |source| "* source: #{source}" }
         end
-
-        changes = true
       end
 
-      both_sources = Hash.new { |h,k| h[k] = ["no specified source", "no specified source"] }
-      @dependencies.each { |d| both_sources[d.name][0] = d.source if d.source }
-      @locked_deps.each  { |d| both_sources[d.name][1] = d.source if d.source }
-      both_sources.delete_if { |k,v| v[0] == v[1] }
+      new_deps = @dependencies - @locked_deps
+      deleted_deps = @locked_deps - @dependencies
 
-      if @dependencies != @locked_deps
-        new_deps = @dependencies - @locked_deps
-        deleted_deps = @locked_deps - @dependencies
+      if new_deps.any?
+        added.concat new_deps.map { |d| "* #{pretty_dep(d)}" }
+      end
 
-        if new_deps.any?
-          added.concat new_deps.map { |d| "* #{pretty_dep(d)}" }
-        end
+      if deleted_deps.any?
+        deleted.concat deleted_deps.map { |d| "* #{pretty_dep(d)}" }
+      end
 
-        if deleted_deps.any?
-          deleted.concat deleted_deps.map { |d| "* #{pretty_dep(d)}" }
-        end
+      both_sources = Hash.new { |h,k| h[k] = [] }
+      @dependencies.each { |d| both_sources[d.name][0] = d }
+      @locked_deps.each  { |d| both_sources[d.name][1] = d.source }
 
-        both_sources.each do |name, sources|
-          changed << "* #{name} from `#{sources[0]}` to `#{sources[1]}`"
+      both_sources.each do |name, (dep, lock_source)|
+        if (dep.nil? && !lock_source.nil?) || (!dep.nil? && !lock_source.nil? && !lock_source.can_lock?(dep))
+          gemfile_source_name = (dep && dep.source) || 'no specified source'
+          lockfile_source_name = lock_source || 'no specified source'
+          changed << "* #{name} from `#{gemfile_source_name}` to `#{lockfile_source_name}`"
         end
-
-        changes = true
       end
 
       msg << "\n\nYou have added to the Gemfile:\n"     << added.join("\n") if added.any?
@@ -411,11 +405,18 @@ module Bundler
 
       if locked
         unlocking = @locked_specs.any? do |locked_spec|
-          locked_spec.source != locked
+          locked_spec.source.class == locked.class && locked_spec.source != locked
         end
       end
 
-      !locked || unlocking || source.specs != locked.specs
+      !locked || unlocking || dependencies_for_source_changed?(locked) || source.specs != locked.specs
+    end
+
+    def dependencies_for_source_changed?(source)
+      deps_for_source = @dependencies.select { |s| s.source == source }
+      locked_deps_for_source = @locked_deps.select { |s| s.source == source }
+
+      deps_for_source != locked_deps_for_source
     end
 
     # Get all locals and override their matching sources.
@@ -519,7 +520,9 @@ module Bundler
 
       converged = []
       @locked_specs.each do |s|
-        s.source = sources.get(s.source)
+        # Replace the locked dependency's source with the equivalent source from the Gemfile
+        dep = @dependencies.find { |d| s.satisfies?(d) }
+        s.source = (dep && dep.source) || sources.get(s.source)
 
         # Don't add a spec to the list if its source is expired. For example,
         # if you change a Git gem to Rubygems.
@@ -559,12 +562,15 @@ module Bundler
       resolve
     end
 
-    def in_locked_deps?(dep, d)
-      d && dep.source == d.source
+    def in_locked_deps?(dep, locked_dep)
+      # Because the lockfile can't link a dep to a specific remote, we need to
+      # treat sources as equivalent anytime the locked dep has all the remotes
+      # that the Gemfile dep does.
+      locked_dep && locked_dep.source && dep.source && locked_dep.source.include?(dep.source)
     end
 
     def satisfies_locked_spec?(dep)
-      @locked_specs.any? { |s| s.satisfies?(dep) && (!dep.source || s.source == dep.source) }
+      @locked_specs.any? { |s| s.satisfies?(dep) && (!dep.source || s.source.include?(dep.source)) }
     end
 
     def expanded_dependencies
@@ -604,5 +610,19 @@ module Bundler
       source_requirements
     end
 
+    def pinned_spec_names(specs)
+      names = []
+      specs.each do |s|
+        # TODO when two sources without blocks is an error, we can change
+        # this check to !s.source.is_a?(Source::LocalRubygems). For now,
+        # we need to ask every Rubygems for every gem name.
+        if s.source.is_a?(Source::Git) || s.source.is_a?(Source::Path)
+          names << s.name
+        end
+      end
+      names.uniq!
+      names
+    end
+
   end
 end
diff --git a/lib/bundler/dep_proxy.rb b/lib/bundler/dep_proxy.rb
index bc810dc..ef98a35 100644
--- a/lib/bundler/dep_proxy.rb
+++ b/lib/bundler/dep_proxy.rb
@@ -1,10 +1,10 @@
 module Bundler
   class DepProxy
 
-    attr_reader :required_by, :__platform, :dep
+    attr_reader :__platform, :dep
 
     def initialize(dep, platform)
-      @dep, @__platform, @required_by = dep, platform, []
+      @dep, @__platform = dep, platform
     end
 
     def hash
diff --git a/lib/bundler/dependency.rb b/lib/bundler/dependency.rb
index c0e8f8b..6a9284f 100644
--- a/lib/bundler/dependency.rb
+++ b/lib/bundler/dependency.rb
@@ -14,24 +14,36 @@ module Bundler
       :ruby_19  => Gem::Platform::RUBY,
       :ruby_20  => Gem::Platform::RUBY,
       :ruby_21  => Gem::Platform::RUBY,
+      :ruby_22  => Gem::Platform::RUBY,
       :mri      => Gem::Platform::RUBY,
       :mri_18   => Gem::Platform::RUBY,
       :mri_19   => Gem::Platform::RUBY,
       :mri_20   => Gem::Platform::RUBY,
       :mri_21   => Gem::Platform::RUBY,
+      :mri_22   => Gem::Platform::RUBY,
       :rbx      => Gem::Platform::RUBY,
       :jruby    => Gem::Platform::JAVA,
       :jruby_18 => Gem::Platform::JAVA,
       :jruby_19 => Gem::Platform::JAVA,
       :mswin    => Gem::Platform::MSWIN,
+      :mswin_18 => Gem::Platform::MSWIN,
+      :mswin_19 => Gem::Platform::MSWIN,
+      :mswin_20 => Gem::Platform::MSWIN,
+      :mswin_21 => Gem::Platform::MSWIN,
+      :mswin64    => Gem::Platform::MSWIN64,
+      :mswin64_19 => Gem::Platform::MSWIN64,
+      :mswin64_20 => Gem::Platform::MSWIN64,
+      :mswin64_21 => Gem::Platform::MSWIN64,
       :mingw    => Gem::Platform::MINGW,
       :mingw_18 => Gem::Platform::MINGW,
       :mingw_19 => Gem::Platform::MINGW,
       :mingw_20 => Gem::Platform::MINGW,
       :mingw_21 => Gem::Platform::MINGW,
+      :mingw_22 => Gem::Platform::MINGW,
       :x64_mingw    => Gem::Platform::X64_MINGW,
       :x64_mingw_20 => Gem::Platform::X64_MINGW,
-      :x64_mingw_21 => Gem::Platform::X64_MINGW
+      :x64_mingw_21 => Gem::Platform::X64_MINGW,
+      :x64_mingw_22 => Gem::Platform::X64_MINGW
     }.freeze
 
     def initialize(name, version, options = {}, &blk)
@@ -89,7 +101,6 @@ module Bundler
       out << "\n"
     end
 
-
     def specific?
       super
     rescue NoMethodError
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb
index ef5c6fb..e6c4b97 100644
--- a/lib/bundler/dsl.rb
+++ b/lib/bundler/dsl.rb
@@ -24,16 +24,16 @@ module Bundler
       @platforms       = []
       @env             = nil
       @ruby_version    = nil
-      add_github_sources
+      add_git_sources
     end
 
     def eval_gemfile(gemfile, contents = nil)
       contents ||= Bundler.read_file(gemfile.to_s)
       instance_eval(contents, gemfile.to_s, 1)
     rescue SyntaxError => e
-      syntax_msg = e.message.gsub("#{gemfile.to_s}:", 'on line ')
+      syntax_msg = e.message.gsub("#{gemfile}:", 'on line ')
       raise GemfileError, "Gemfile syntax error #{syntax_msg}"
-    rescue ScriptError, RegexpError, NameError, ArgumentError => e
+    rescue ScriptError, RegexpError, NameError, ArgumentError, RuntimeError => e
       e.backtrace[0] = "#{e.backtrace[0]}: #{e.message} (#{e.class})"
       Bundler.ui.warn e.backtrace.join("\n       ")
       raise GemfileError, "There was an error in your Gemfile," \
@@ -112,6 +112,7 @@ module Bundler
       if block_given?
         with_source(@sources.add_rubygems_source("remotes" => source), &blk)
       else
+        check_primary_source_safety(@sources)
         @sources.add_rubygems_remote(source)
       end
     end
@@ -148,6 +149,14 @@ module Bundler
       with_source(@sources.add_git_source(normalize_hash(options).merge("uri" => uri)), &blk)
     end
 
+    def github(repo, options = {})
+      raise ArgumentError, "Github sources require a block" unless block_given?
+      github_uri  = @git_sources["github"].call(repo)
+      git_options = normalize_hash(options).merge("uri" => github_uri)
+      git_source  = @sources.add_git_source(git_options)
+      with_source(git_source) { yield }
+    end
+
     def to_definition(lockfile, unlock)
       Definition.new(lockfile, @dependencies, @sources, unlock, @ruby_version)
     end
@@ -182,13 +191,19 @@ module Bundler
 
   private
 
-    def add_github_sources
+    def add_git_sources
       git_source(:github) do |repo_name|
         repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
         "git://github.com/#{repo_name}.git"
       end
 
       git_source(:gist){ |repo_name| "https://gist.github.com/#{repo_name}.git" }
+
+      git_source(:bitbucket) do |repo_name|
+        user_name, repo_name = repo_name.split '/'
+        repo_name ||= user_name
+        "https://#{user_name}@bitbucket.org/#{user_name}/#{repo_name}.git"
+      end
     end
 
     def with_source(source)
@@ -214,7 +229,10 @@ module Bundler
 
     def normalize_options(name, version, opts)
       if name.is_a?(Symbol)
-        raise GemfileError, %{You need to specify gem names as Strings. Use 'gem "#{name.to_s}"' instead.}
+        raise GemfileError, %{You need to specify gem names as Strings. Use 'gem "#{name}"' instead.}
+      end
+      if name =~ /\s/
+        raise GemfileError, %{'#{name}' is not a valid gem name because it contains whitespace.}
       end
 
       normalize_hash(opts)
@@ -290,5 +308,24 @@ module Bundler
         raise GemfileError, "Unknown source '#{source}'"
       end
     end
+
+    def check_primary_source_safety(source)
+      return unless source.rubygems_primary_remotes.any?
+
+      if Bundler.settings[:disable_multisource]
+        raise GemspecError, "Warning: this Gemfile contains multiple primary sources. " \
+          "Each source after the first must include a block to indicate which gems " \
+          "should come from that source. To downgrade this error to a warning, run " \
+          "`bundle config --delete disable_multisource`."
+      else
+        Bundler.ui.warn "Warning: this Gemfile contains multiple primary sources. " \
+          "Using `source` more than once without a block is a security risk, and " \
+          "may result in installing unexpected gems. To resolve this warning, use " \
+          "a block to indicate which gems should come from the secondary source. " \
+          "To upgrade this warning to an error, run `bundle config " \
+          "disable_multisource true`."
+      end
+    end
+
   end
 end
diff --git a/lib/bundler/endpoint_specification.rb b/lib/bundler/endpoint_specification.rb
index 8566f26..71d5e11 100644
--- a/lib/bundler/endpoint_specification.rb
+++ b/lib/bundler/endpoint_specification.rb
@@ -18,7 +18,7 @@ module Bundler
     end
 
     # needed for standalone, load required_paths from local gemspec
-    # after the gem in installed
+    # after the gem is installed
     def require_paths
       if @remote_specification
         @remote_specification.require_paths
diff --git a/lib/bundler/env.rb b/lib/bundler/env.rb
index 0f6f315..031d7fd 100644
--- a/lib/bundler/env.rb
+++ b/lib/bundler/env.rb
@@ -1,43 +1,44 @@
+require 'bundler/rubygems_integration'
+require 'bundler/source/git/git_proxy'
+
 module Bundler
   class Env
 
     def write(io)
-      io.write(report)
+      io.write report(:print_gemfile => true)
     end
 
-    def report
-      out = "Bundler #{Bundler::VERSION}\n"
-
-      out << "Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}"
-      out << " patchlevel #{RUBY_PATCHLEVEL}" if defined? RUBY_PATCHLEVEL
-      out << ") [#{RUBY_PLATFORM}]\n"
-
-      out << "Rubygems #{Gem::VERSION}\n"
-
-      out << "rvm #{ENV['rvm_version']}\n" if ENV['rvm_version']
-
-      out << "GEM_HOME #{ENV['GEM_HOME']}\n"
-
-      out << "GEM_PATH #{ENV['GEM_PATH']}\n" unless ENV['GEM_PATH'] == ENV['GEM_HOME']
+    def report(options = {})
+      print_gemfile = options.delete(:print_gemfile)
 
+      out = "Environment\n\n"
+      out << "    Bundler   #{Bundler::VERSION}\n"
+      out << "    Rubygems  #{Gem::VERSION}\n"
+      out << "    Ruby      #{ruby_version}"
+      out << "    GEM_HOME  #{ENV['GEM_HOME']}\n" unless ENV['GEM_HOME'].nil? || ENV['GEM_HOME'].empty?
+      out << "    GEM_PATH  #{ENV['GEM_PATH']}\n" unless ENV['GEM_PATH'] == ENV['GEM_HOME']
+      out << "    RVM       #{ENV['rvm_version']}\n" if ENV['rvm_version']
+      out << "    Git       #{git_version}\n"
       %w(rubygems-bundler open_gem).each do |name|
-        specs = Gem::Specification.find_all{|s| s.name == name }
-        out << "#{name} (#{specs.map(&:version).join(',')})\n" unless specs.empty?
+        specs = Bundler.rubygems.find_name(name)
+        out << "    #{name} (#{specs.map(&:version).join(',')})\n" unless specs.empty?
       end
 
-      out << "\nBundler settings\n" unless Bundler.settings.all.empty?
+      out << "\nBundler settings\n\n" unless Bundler.settings.all.empty?
       Bundler.settings.all.each do |setting|
-        out << "  #{setting}\n"
+        out << "    " << setting << "\n"
         Bundler.settings.pretty_values_for(setting).each do |line|
-          out << "    " << line << "\n"
+          out << "      " << line << "\n"
         end
       end
 
-      out << "\n\n" << "Gemfile\n"
-      out << read_file("Gemfile") << "\n"
+      if print_gemfile
+        out << "\nGemfile\n\n"
+        out << "    " << read_file(Bundler.default_gemfile).gsub(/\n/, "\n    ") << "\n"
 
-      out << "\n\n" << "Gemfile.lock\n"
-      out << read_file("Gemfile.lock") << "\n"
+        out << "\n" << "Gemfile.lock\n\n"
+        out << "    " << read_file(Bundler.default_lockfile).gsub(/\n/, "\n    ") << "\n"
+      end
 
       out
     end
@@ -45,12 +46,30 @@ module Bundler
   private
 
     def read_file(filename)
-      File.read(filename).strip
+      File.read(filename.to_s).strip
     rescue Errno::ENOENT
       "<No #{filename} found>"
     rescue => e
       "#{e.class}: #{e.message}"
     end
 
+    def ruby_version
+      str = "#{RUBY_VERSION}"
+      if RUBY_VERSION < '1.9'
+        str << " (#{RUBY_RELEASE_DATE}"
+        str << " patchlevel #{RUBY_PATCHLEVEL}" if defined? RUBY_PATCHLEVEL
+        str << ") [#{RUBY_PLATFORM}]\n"
+      else
+        str << "p#{RUBY_PATCHLEVEL}" if defined? RUBY_PATCHLEVEL
+        str << " (#{RUBY_RELEASE_DATE} revision #{RUBY_REVISION}) [#{RUBY_PLATFORM}]\n"
+      end
+    end
+
+    def git_version
+      Bundler::Source::Git::GitProxy.new(nil, nil, nil).version
+    rescue Bundler::Source::Git::GitNotInstalledError
+      "not installed"
+    end
+
   end
 end
diff --git a/lib/bundler/fetcher.rb b/lib/bundler/fetcher.rb
index 48cdf26..9d7cb75 100644
--- a/lib/bundler/fetcher.rb
+++ b/lib/bundler/fetcher.rb
@@ -6,6 +6,8 @@ module Bundler
 
   # Handles all the fetching with the rubygems server
   class Fetcher
+    # This error is raised when it looks like the network is down
+    class NetworkDownError < HTTPError; end
     # This error is raised if the API returns a 413 (only printed in verbose)
     class FallbackError < HTTPError; end
     # This is the error raised if OpenSSL fails the cert verification
@@ -62,10 +64,12 @@ module Bundler
 
         if Bundler.requires_sudo?
           Bundler.mkdir_p "#{Bundler.rubygems.gem_dir}/cache"
-          Bundler.sudo "mv #{Bundler.tmp(spec.full_name)}/cache/#{spec.full_name}.gem #{gem_path}"
+          Bundler.sudo "mv #{download_path}/cache/#{spec.full_name}.gem #{gem_path}"
         end
 
         gem_path
+      ensure
+        Bundler.rm_rf(download_path) if Bundler.requires_sudo?
       end
 
       def user_agent
@@ -73,18 +77,27 @@ module Bundler
           ruby = Bundler.ruby_version
 
           agent = "bundler/#{Bundler::VERSION}"
-          agent += " rubygems/#{Gem::VERSION}"
-          agent += " ruby/#{ruby.version}"
-          agent += " (#{ruby.host})"
-          agent += " command/#{ARGV.first}"
+          agent << " rubygems/#{Gem::VERSION}"
+          agent << " ruby/#{ruby.version}"
+          agent << " (#{ruby.host})"
+          agent << " command/#{ARGV.first}"
 
           if ruby.engine != "ruby"
             # engine_version raises on unknown engines
             engine_version = ruby.engine_version rescue "???"
-            agent += " #{ruby.engine}/#{engine_version}"
+            agent << " #{ruby.engine}/#{engine_version}"
           end
+
+          agent << " options/#{Bundler.settings.all.join(",")}"
+
           # add a random ID so we can consolidate runs server-side
           agent << " " << SecureRandom.hex(8)
+
+          # add any user agent strings set in the config
+          extra_ua = Bundler.settings[:user_agent]
+          agent << " " << extra_ua if extra_ua
+
+          agent
         end
       end
 
@@ -95,9 +108,7 @@ module Bundler
       @api_timeout    = 10 # How long to wait for each API call
       @max_retries    = 3  # How many retries for the API call
 
-      @remote_uri = Bundler::Source.mirror_for(remote_uri)
-      @public_uri = @remote_uri.dup
-      @public_uri.user, @public_uri.password = nil, nil # don't print these
+      @anonymizable_uri = configured_uri_for(remote_uri)
 
       Socket.do_not_reverse_lookup = true
       connection # create persistent connection
@@ -105,14 +116,14 @@ module Bundler
 
     def connection
       @connection ||= begin
-        needs_ssl = @remote_uri.scheme == "https" ||
+        needs_ssl = remote_uri.scheme == "https" ||
           Bundler.settings[:ssl_verify_mode] ||
           Bundler.settings[:ssl_client_cert]
         raise SSLError if needs_ssl && !defined?(OpenSSL::SSL)
 
         con = Net::HTTP::Persistent.new 'bundler', :ENV
 
-        if @remote_uri.scheme == "https"
+        if remote_uri.scheme == "https"
           con.verify_mode = (Bundler.settings[:ssl_verify_mode] ||
             OpenSSL::SSL::VERIFY_PEER)
           con.cert_store = bundler_cert_store
@@ -131,7 +142,7 @@ module Bundler
     end
 
     def uri
-      @public_uri
+      @anonymizable_uri.without_credentials
     end
 
     # fetch a gem specification
@@ -139,7 +150,7 @@ module Bundler
       spec = spec - [nil, 'ruby', '']
       spec_file_name = "#{spec.join '-'}.gemspec"
 
-      uri = URI.parse("#{@remote_uri}#{Gem::MARSHAL_SPEC_DIR}#{spec_file_name}.rz")
+      uri = URI.parse("#{remote_uri}#{Gem::MARSHAL_SPEC_DIR}#{spec_file_name}.rz")
       if uri.scheme == 'file'
         Bundler.load_marshal Gem.inflate(Gem.read_binary(uri.path))
       elsif cached_spec_path = gemspec_cached_path(spec_file_name)
@@ -177,7 +188,7 @@ module Bundler
         end
       end
 
-      specs[@remote_uri].each do |name, version, platform, dependencies|
+      specs[remote_uri].each do |name, version, platform, dependencies|
         next if name == 'bundler'
         spec = nil
         if dependencies
@@ -186,7 +197,7 @@ module Bundler
           spec = RemoteSpecification.new(name, version, platform, self)
         end
         spec.source = source
-        spec.source_uri = @remote_uri
+        spec.source_uri = @anonymizable_uri
         index << spec
       end
 
@@ -209,7 +220,7 @@ module Bundler
         Bundler.ui.info ".", false
       end
 
-      return {@remote_uri => last_spec_list} if query_list.empty?
+      return {remote_uri => last_spec_list} if query_list.empty?
 
       remote_specs = Bundler::Retry.new("dependency api", AUTH_ERRORS).attempts do
         fetch_dependency_remote_specs(query_list)
@@ -226,22 +237,18 @@ module Bundler
     end
 
     def use_api
-      _use_api(true)
-    rescue AuthenticationRequiredError
-      retry_with_auth{_use_api(false)}
-    end
-
-    def _use_api(reraise_auth_error = false)
       return @use_api if defined?(@use_api)
 
-      if @remote_uri.scheme == "file" || Bundler::Fetcher.disable_endpoint
+      if remote_uri.scheme == "file" || Bundler::Fetcher.disable_endpoint
         @use_api = false
       elsif fetch(dependency_api_uri)
         @use_api = true
       end
-    rescue AuthenticationRequiredError => e
-      raise e if reraise_auth_error
-      false
+    rescue NetworkDownError => e
+      raise HTTPError, e.message
+    rescue AuthenticationRequiredError
+      # We got a 401 from the server. Don't fall back to the full index, just fail.
+      raise
     rescue HTTPError
       @use_api = false
     end
@@ -278,7 +285,7 @@ module Bundler
       when Net::HTTPRequestEntityTooLarge
         raise FallbackError, response.body
       when Net::HTTPUnauthorized
-        raise AuthenticationRequiredError, "#{response.class}: #{response.body}"
+        raise AuthenticationRequiredError, remote_uri.host
       else
         raise HTTPError, "#{response.class}: #{response.body}"
       end
@@ -297,7 +304,13 @@ module Bundler
       raise CertificateFailureError.new(uri)
     rescue *HTTP_ERRORS => e
       Bundler.ui.trace e
-      raise HTTPError, "Network error while fetching #{uri}"
+      case e.message
+      when /host down:/, /getaddrinfo: nodename nor servname provided/
+        raise NetworkDownError, "Could not reach host #{uri.host}. Check your network " \
+        "connection and try again."
+      else
+        raise HTTPError, "Network error while fetching #{uri}"
+      end
     end
 
     def dependency_api_uri(gem_names = [])
@@ -309,10 +322,14 @@ module Bundler
     # fetch from Gemcutter Dependency Endpoint API
     def fetch_dependency_remote_specs(gem_names)
       Bundler.ui.debug "Query Gemcutter Dependency Endpoint API: #{gem_names.join(',')}"
-      marshalled_deps = fetch dependency_api_uri(gem_names)
-      gem_list = Bundler.load_marshal(marshalled_deps)
+      gem_list = []
       deps_list = []
 
+      gem_names.each_slice(Source::Rubygems::API_REQUEST_SIZE) do |names|
+        marshalled_deps = fetch dependency_api_uri(names)
+        gem_list += Bundler.load_marshal(marshalled_deps)
+      end
+
       spec_list = gem_list.map do |s|
         dependencies = s[:dependencies].map do |name, requirement|
           dep = well_formed_dependency(name, requirement.split(", "))
@@ -329,16 +346,20 @@ module Bundler
     # fetch from modern index: specs.4.8.gz
     def fetch_all_remote_specs
       old_sources = Bundler.rubygems.sources
-      Bundler.rubygems.sources = [@remote_uri.to_s]
+      Bundler.rubygems.sources = [remote_uri.to_s]
       Bundler.rubygems.fetch_all_remote_specs
     rescue Gem::RemoteFetcher::FetchError, OpenSSL::SSL::SSLError => e
       case e.message
       when /certificate verify failed/
         raise CertificateFailureError.new(uri)
-      when /401|403/
-        # Gemfury uses a 403 for unauthenticated requests instead of a 401, so retry auth
-        # on both.
-        retry_with_auth { fetch_all_remote_specs }
+      when /401/
+        raise AuthenticationRequiredError, remote_uri
+      when /403/
+        if remote_uri.userinfo
+          raise BadAuthenticationError, remote_uri
+        else
+          raise AuthenticationRequiredError, remote_uri
+        end
       else
         Bundler.ui.trace e
         raise HTTPError, "Could not fetch specs from #{uri}"
@@ -375,34 +396,28 @@ module Bundler
       store
     end
 
-    # Attempt to retry with HTTP authentication, if it's appropriate to do so. Yields to a block;
-    # the caller should use this to re-attempt the failing request with the altered `@remote_uri`.
-    def retry_with_auth
-      # Authentication has already been attempted and failed.
-      raise BadAuthenticationError.new(uri) if @remote_uri.user
-
-      auth = Bundler.settings[@remote_uri.to_s]
-
-      # Authentication isn't provided at all, by "bundle config" or in the URI.
-      raise AuthenticationRequiredError.new(uri) if auth.nil?
+  private
 
-      @remote_uri.user, @remote_uri.password = *auth.split(":", 2)
-      yield
+    def configured_uri_for(uri)
+      uri = Bundler::Source.mirror_for(uri)
+      config_auth = Bundler.settings[uri.to_s] || Bundler.settings[uri.host]
+      AnonymizableURI.new(uri, config_auth)
     end
 
-  private
-
     def fetch_uri
       @fetch_uri ||= begin
-        if @remote_uri.host == "rubygems.org"
-          uri = @remote_uri.dup
+        if remote_uri.host == "rubygems.org"
+          uri = remote_uri.dup
           uri.host = "bundler.rubygems.org"
           uri
         else
-          @remote_uri
+          remote_uri
         end
       end
     end
 
+    def remote_uri
+      @anonymizable_uri.original_uri
+    end
   end
 end
diff --git a/lib/bundler/friendly_errors.rb b/lib/bundler/friendly_errors.rb
index 818a6b5..fcd600d 100644
--- a/lib/bundler/friendly_errors.rb
+++ b/lib/bundler/friendly_errors.rb
@@ -1,3 +1,5 @@
+# encoding: utf-8
+require "cgi"
 require "bundler/vendored_thor"
 
 module Bundler
@@ -33,10 +35,51 @@ module Bundler
   rescue SystemExit => e
     exit e.status
   rescue Exception => e
-    Bundler.ui.error <<-ERR, :wrap => true
-      Unfortunately, a fatal error has occurred. Please see the Bundler \
-      troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
-    ERR
-    raise e
+    request_issue_report_for(e)
+    exit 1
+  end
+
+  def self.request_issue_report_for(e)
+    Bundler.ui.info <<-EOS.gsub(/^ {6}/, '')
+      #{'--- ERROR REPORT TEMPLATE -------------------------------------------------------'}
+      - What did you do?
+
+        I ran the command `#{$PROGRAM_NAME} #{ARGV.join(' ')}`
+
+      - What did you expect to happen?
+
+        I expected Bundler to...
+
+      - What happened instead?
+
+        Instead, what actually happened was...
+
+
+      Error details
+
+          #{e.class}: #{e.message}
+            #{e.backtrace.join("\n            ")}
+
+      #{Bundler::Env.new.report(:print_gemfile => false).gsub(/\n/, "\n      ").strip}
+      #{'--- TEMPLATE END ----------------------------------------------------------------'}
+
+    EOS
+
+    Bundler.ui.error "Unfortunately, an unexpected error occurred, and Bundler cannot continue."
+
+    Bundler.ui.warn <<-EOS.gsub(/^ {6}/, '')
+
+      First, try this link to see if there are any existing issue reports for this error:
+      #{issues_url(e)}
+
+      If there aren't any reports for this error yet, please create copy and paste the report template above into a new issue. Don't forget to anonymize any private data! The new issue form is located at:
+      https://github.com/bundler/bundler/issues/new
+    EOS
   end
+
+  def self.issues_url(exception)
+    'https://github.com/bundler/bundler/search?q=' \
+    "#{CGI.escape(exception.message.lines.first.chomp)}&type=Issues"
+  end
+
 end
diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb
index 6b7a176..9aac3e0 100644
--- a/lib/bundler/gem_helper.rb
+++ b/lib/bundler/gem_helper.rb
@@ -44,9 +44,27 @@ module Bundler
         install_gem(built_gem_path)
       end
 
-      desc "Create tag #{version_tag} and build and push #{name}-#{version}.gem to Rubygems"
-      task 'release' => 'build' do
-        release_gem(built_gem_path)
+      desc "Build and install #{name}-#{version}.gem into system gems without network access."
+      task 'install:local' => 'build' do
+        install_gem(built_gem_path, :local)
+      end
+
+      desc "Create tag #{version_tag} and build and push #{name}-#{version}.gem to Rubygems\n" \
+           "To prevent publishing in Rubygems use `gem_push=no rake release`"
+      task 'release' => ['build', 'release:guard_clean',
+                         'release:source_control_push', 'release:rubygem_push'] do
+      end
+
+      task 'release:guard_clean' do
+        guard_clean
+      end
+
+      task 'release:source_control_push' do
+        tag_version { git_push } unless already_tagged?
+      end
+
+      task 'release:rubygem_push' do
+        rubygem_push(built_gem_path) if gem_push?
       end
 
       GemHelper.instance = self
@@ -63,20 +81,13 @@ module Bundler
       File.join(base, 'pkg', file_name)
     end
 
-    def install_gem(built_gem_path=nil)
+    def install_gem(built_gem_path = nil, local = false)
       built_gem_path ||= build_gem
-      out, _ = sh_with_code("gem install '#{built_gem_path}' --local")
+      out, _ = sh_with_code("gem install '#{built_gem_path}'#{' --local' if local}")
       raise "Couldn't install gem, run `gem install #{built_gem_path}' for more detailed output" unless out[/Successfully installed/]
       Bundler.ui.confirm "#{name} (#{version}) installed."
     end
 
-    def release_gem(built_gem_path=nil)
-      guard_clean
-      built_gem_path ||= build_gem
-      tag_version { git_push } unless already_tagged?
-      rubygem_push(built_gem_path) if gem_push?
-    end
-
     protected
     def rubygem_push(path)
       if Pathname.new("~/.gem/credentials").expand_path.exist?
diff --git a/lib/bundler/gem_helpers.rb b/lib/bundler/gem_helpers.rb
index 2040604..2af87c9 100644
--- a/lib/bundler/gem_helpers.rb
+++ b/lib/bundler/gem_helpers.rb
@@ -5,6 +5,8 @@ module Bundler
     GENERICS = [
       [Gem::Platform.new('java'), Gem::Platform.new('java')],
       [Gem::Platform.new('mswin32'), Gem::Platform.new('mswin32')],
+      [Gem::Platform.new('mswin64'), Gem::Platform.new('mswin64')],
+      [Gem::Platform.new('universal-mingw32'), Gem::Platform.new('universal-mingw32')],
       [Gem::Platform.new('x64-mingw32'), Gem::Platform.new('x64-mingw32')],
       [Gem::Platform.new('x86_64-mingw32'), Gem::Platform.new('x64-mingw32')],
       [Gem::Platform.new('mingw32'), Gem::Platform.new('x86-mingw32')]
diff --git a/lib/bundler/graph.rb b/lib/bundler/graph.rb
index 92f538b..0b5c572 100644
--- a/lib/bundler/graph.rb
+++ b/lib/bundler/graph.rb
@@ -3,12 +3,13 @@ module Bundler
   class Graph
     GRAPH_NAME = :Gemfile
 
-    def initialize(env, output_file, show_version = false, show_requirements = false, output_format = "png")
+    def initialize(env, output_file, show_version = false, show_requirements = false, output_format = "png", without = [])
       @env               = env
       @output_file       = output_file
       @show_version      = show_version
       @show_requirements = show_requirements
       @output_format     = output_format
+      @without_groups    = without.map(&:to_sym)
 
       @groups            = []
       @relations         = Hash.new {|h, k| h[k] = Set.new}
@@ -53,6 +54,8 @@ module Bundler
       relations = Hash.new {|h, k| h[k] = Set.new}
       @env.current_dependencies.each do |dependency|
         dependency.groups.each do |group|
+          next if @without_groups.include?(group)
+
           relations[group.to_s].add(dependency)
           @relations[group.to_s].add(dependency.name)
 
diff --git a/lib/bundler/index.rb b/lib/bundler/index.rb
index e9fc09f..ea1edac 100644
--- a/lib/bundler/index.rb
+++ b/lib/bundler/index.rb
@@ -16,7 +16,7 @@ module Bundler
     def initialize
       @sources = []
       @cache = {}
-      @specs = Hash.new { |h,k| h[k] = [] }
+      @specs = Hash.new { |h,k| h[k] = Hash.new }
       @all_specs = Hash.new { |h,k| h[k] = [] }
     end
 
@@ -24,11 +24,11 @@ module Bundler
       super
       @sources = @sources.dup
       @cache = {}
-      @specs = Hash.new { |h,k| h[k] = [] }
+      @specs = Hash.new { |h,k| h[k] = Hash.new }
       @all_specs = Hash.new { |h,k| h[k] = [] }
 
-      o.specs.each do |name, array|
-        @specs[name] = array.dup
+      o.specs.each do |name, hash|
+        @specs[name] = hash.dup
       end
       o.all_specs.each do |name, array|
         @all_specs[name] = array.dup
@@ -81,47 +81,42 @@ module Bundler
       end
     end
 
-    def source_types
-      sources.map{|s| s.class }.uniq
-    end
-
     alias [] search
 
     def <<(spec)
-      arr = specs_by_name(spec.name)
-
-      arr.delete_if do |s|
-        same_version?(s.version, spec.version) && s.platform == spec.platform
-      end
+      @specs[spec.name]["#{spec.version}-#{spec.platform}"] = spec
 
-      arr << spec
       spec
     end
 
     def each(&blk)
-      specs.values.each do |specs|
-        specs.each(&blk)
+      specs.values.each do |spec_sets|
+        spec_sets.values.each(&blk)
       end
     end
 
     # returns a list of the dependencies
     def unmet_dependency_names
-      names = []
-      each{|s| names.push(*s.dependencies.map{|d| d.name }) }
-      names.uniq!
+      names = dependency_names
       names.delete_if{|n| n == "bundler" }
       names.select{|n| search(n).empty? }
     end
 
+    def dependency_names
+      names = []
+      each{|s| names.push(*s.dependencies.map{|d| d.name }) }
+      names.uniq
+    end
+
     def use(other, override_dupes = false)
       return unless other
       other.each do |s|
         if (dupes = search_by_spec(s)) && dupes.any?
           @all_specs[s.name] = [s] + dupes
           next unless override_dupes
-          @specs[s.name] -= dupes
+          self << s
         end
-        @specs[s.name] << s
+        self << s
       end
       self
     end
@@ -151,7 +146,7 @@ module Bundler
   private
 
     def specs_by_name(name)
-      @specs[name]
+      @specs[name].values
     end
 
     def search_by_dependency(dependency, base = nil)
@@ -178,9 +173,8 @@ module Bundler
     end
 
     def search_by_spec(spec)
-      specs_by_name(spec.name).select do |s|
-        same_version?(s.version, spec.version) && Gem::Platform.new(s.platform) == Gem::Platform.new(spec.platform)
-      end
+      spec = @specs[spec.name]["#{spec.version}-#{spec.platform}"]
+      spec ? [spec] : []
     end
 
     if RUBY_VERSION < '1.9'
diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb
index a4747c6..0654d91 100644
--- a/lib/bundler/installer.rb
+++ b/lib/bundler/installer.rb
@@ -1,6 +1,6 @@
 require 'erb'
 require 'rubygems/dependency_installer'
-require 'bundler/parallel_workers'
+require 'bundler/worker'
 
 module Bundler
   class Installer < Environment
@@ -84,7 +84,7 @@ module Bundler
       # that said, it's a rare situation (other than rake), and parallel
       # installation is just SO MUCH FASTER. so we let people opt in.
       jobs = [Bundler.settings[:jobs].to_i-1, 1].max
-      if jobs > 1 && can_install_parallely?
+      if jobs > 1 && can_install_in_parallel?
         install_in_parallel jobs, options[:standalone]
       else
         install_sequentially options[:standalone]
@@ -96,20 +96,26 @@ module Bundler
 
     def install_gem_from_spec(spec, standalone = false, worker = 0)
       # Fetch the build settings, if there are any
-      settings             = Bundler.settings["build.#{spec.name}"]
-      install_message      = nil
-      post_install_message = nil
-      debug_message        = nil
-      Bundler.rubygems.with_build_args [settings] do
-        install_message, post_install_message, debug_message = spec.source.install(spec)
-        if install_message.include? 'Installing'
-          Bundler.ui.confirm install_message
-        else
-          Bundler.ui.info install_message
+      settings = Bundler.settings["build.#{spec.name}"]
+      messages = nil
+
+      if settings
+        Bundler.rubygems.with_build_args [settings] do
+          messages = spec.source.install(spec)
         end
-        Bundler.ui.debug debug_message if debug_message
-        Bundler.ui.debug "#{worker}:  #{spec.name} (#{spec.version}) from #{spec.loaded_from}"
+      else
+        messages = spec.source.install(spec)
+      end
+
+      install_message, post_install_message, debug_message = *messages
+
+      if install_message.include? 'Installing'
+        Bundler.ui.confirm install_message
+      else
+        Bundler.ui.info install_message
       end
+      Bundler.ui.debug debug_message if debug_message
+      Bundler.ui.debug "#{worker}:  #{spec.name} (#{spec.version}) from #{spec.loaded_from}"
 
       if Bundler.settings[:bin] && standalone
         generate_standalone_bundler_executable_stubs(spec)
@@ -194,14 +200,13 @@ module Bundler
 
   private
 
-    def can_install_parallely?
-      min_rubygems = "2.0.7"
-      if Bundler.current_ruby.mri? || Bundler.rubygems.provides?(">= #{min_rubygems}")
+    def can_install_in_parallel?
+      if Bundler.rubygems.provides?(">= 2.1.0")
         true
       else
         Bundler.ui.warn "Rubygems #{Gem::VERSION} is not threadsafe, so your "\
-          "gems must be installed one at a time. Upgrade to Rubygems " \
-          "#{min_rubygems} or higher to enable parallel gem installation."
+          "gems must be installed one at a time. Upgrade to Rubygems 2.1.0 " \
+          "or higher to enable parallel gem installation."
         false
       end
     end
@@ -254,7 +259,7 @@ module Bundler
         file.puts "ruby_version = RbConfig::CONFIG[\"ruby_version\"]"
         file.puts "path = File.expand_path('..', __FILE__)"
         paths.each do |path|
-          file.puts %{$:.unshift File.expand_path("\#{path}/#{path}")}
+          file.puts %{$:.unshift "\#{path}/#{path}"}
         end
       end
     end
@@ -277,9 +282,9 @@ module Bundler
         remains[spec.name] = true
       end
 
-      worker_pool = ParallelWorkers.worker_pool size, lambda { |name, worker|
+      worker_pool = Worker.new size, lambda { |name, worker_num|
         spec = name2spec[name]
-        message = install_gem_from_spec spec, standalone, worker
+        message = install_gem_from_spec spec, standalone, worker_num
         { :name => spec.name, :post_install => message }
       }
 
diff --git a/lib/bundler/lazy_specification.rb b/lib/bundler/lazy_specification.rb
index bdcf2df..8fc0e96 100644
--- a/lib/bundler/lazy_specification.rb
+++ b/lib/bundler/lazy_specification.rb
@@ -41,7 +41,7 @@ module Bundler
         out = "    #{name} (#{version}-#{platform})\n"
       end
 
-      dependencies.sort_by {|d| d.to_s }.each do |dep|
+      dependencies.sort_by {|d| d.to_s }.uniq.each do |dep|
         next if dep.type == :development
         out << "    #{dep.to_lock}\n"
       end
diff --git a/lib/bundler/lockfile_parser.rb b/lib/bundler/lockfile_parser.rb
index 32eb43a..9586763 100644
--- a/lib/bundler/lockfile_parser.rb
+++ b/lib/bundler/lockfile_parser.rb
@@ -21,12 +21,13 @@ module Bundler
     PATH         = "PATH"
     SPECS        = "  specs:"
     OPTIONS      = /^  ([a-z]+): (.*)$/i
+    SOURCE       = [GIT, GEM, PATH]
 
     def initialize(lockfile)
       @platforms    = []
       @sources      = []
       @dependencies = []
-      @state        = :source
+      @state        = nil
       @specs        = {}
 
       @rubygems_aggregate = Source::Rubygems.new
@@ -37,24 +38,33 @@ module Bundler
       end
 
       lockfile.split(/(?:\r?\n)+/).each do |line|
-        if line == DEPENDENCIES
+        if SOURCE.include?(line)
+          @state = :source
+          parse_source(line)
+        elsif line == DEPENDENCIES
           @state = :dependency
         elsif line == PLATFORMS
           @state = :platform
-        else
+        elsif line =~ /^[^\s]/
+          @state = nil
+        elsif @state
           send("parse_#{@state}", line)
         end
       end
       @sources << @rubygems_aggregate
       @specs = @specs.values
+    rescue ArgumentError => e
+      Bundler.ui.debug(e)
+      raise LockfileError, "Your lockfile is unreadable. Run `rm Gemfile.lock` " \
+        "and then `bundle install` to generate a new lockfile."
     end
 
   private
 
     TYPES = {
-      "GIT"  => Bundler::Source::Git,
-      "GEM"  => Bundler::Source::Rubygems,
-      "PATH" => Bundler::Source::Path
+      GIT  => Bundler::Source::Git,
+      GEM  => Bundler::Source::Rubygems,
+      PATH => Bundler::Source::Path,
     }
 
     def parse_source(line)
@@ -64,18 +74,18 @@ module Bundler
         @opts, @type = {}, line
       when SPECS
         case @type
-        when "PATH"
+        when PATH
           @current_source = TYPES[@type].from_lock(@opts)
           @sources << @current_source
-        when "GIT"
+        when GIT
           @current_source = TYPES[@type].from_lock(@opts)
           # Strip out duplicate GIT sections
-          if @type == "GIT" && @sources.include?(@current_source)
+          if @sources.include?(@current_source)
             @current_source = @sources.find { |s| s == @current_source }
           else
             @sources << @current_source
           end
-        when "GEM"
+        when GEM
           Array(@opts["remote"]).each do |url|
             @rubygems_aggregate.add_remote(url)
           end
diff --git a/lib/bundler/man/bundle b/lib/bundler/man/bundle
index 3dbab2e..6c62ddf 100644
--- a/lib/bundler/man/bundle
+++ b/lib/bundler/man/bundle
@@ -1,7 +1,7 @@
 .\" generated with Ronn/v0.7.3
 .\" http://github.com/rtomayko/ronn/tree/0.7.3
 .
-.TH "BUNDLE" "1" "October 2014" "" ""
+.TH "BUNDLE" "1" "May 2015" "" ""
 .
 .SH "NAME"
 \fBbundle\fR \- Ruby Dependency Management
@@ -100,6 +100,9 @@ Displays platform compatibility information
 \fBbundle clean(1)\fR
 Cleans up unused gems in your bundler directory
 .
+.SH "PLUGINS"
+When running a command that isn\'t listed in PRIMARY COMMANDS or UTILITIES, Bundler will try to find an executable on your path named \fBbundler\-<command>\fR and execute it, passing down any extra arguments to it\.
+.
 .SH "OBSOLETE"
 These commands are obsolete and should no longer be used
 .
diff --git a/lib/bundler/man/bundle-config b/lib/bundler/man/bundle-config
index c125fba..dbd364f 100644
--- a/lib/bundler/man/bundle-config
+++ b/lib/bundler/man/bundle-config
@@ -1,7 +1,7 @@
 .\" generated with Ronn/v0.7.3
 .\" http://github.com/rtomayko/ronn/tree/0.7.3
 .
-.TH "BUNDLE\-CONFIG" "1" "October 2014" "" ""
+.TH "BUNDLE\-CONFIG" "1" "May 2015" "" ""
 .
 .SH "NAME"
 \fBbundle\-config\fR \- Set bundler configuration options
@@ -74,48 +74,46 @@ For instance, passing the \fB\-\-without\fR flag to bundle install(1) \fIbundle\
 .P
 The canonical form of this configuration is \fB"without"\fR\. To convert the canonical form to the environment variable form, capitalize it, and prepend \fBBUNDLE_\fR\. The environment variable form of \fB"without"\fR is \fBBUNDLE_WITHOUT\fR\.
 .
+.P
+Any periods in the configuration keys must be replaced with two underscores when setting it via environment variables\. The configuration key \fBlocal\.rack\fR becomes the environment variable \fBBUNDLE_LOCAL__RACK\fR\.
+.
 .SH "LIST OF AVAILABLE KEYS"
 The following is a list of all configuration keys and their purpose\. You can learn more about their operation in bundle install(1) \fIbundle\-install\.1\.html\fR\.
 .
-.TP
-\fBpath\fR (\fBBUNDLE_PATH\fR)
-The location on disk to install gems\. Defaults to \fB$GEM_HOME\fR in development and \fBvendor/bundler\fR when \fB\-\-deployment\fR is used
+.IP "\(bu" 4
+\fBpath\fR (\fBBUNDLE_PATH\fR): The location on disk to install gems\. Defaults to \fB$GEM_HOME\fR in development and \fBvendor/bundle\fR when \fB\-\-deployment\fR is used
 .
-.TP
-\fBfrozen\fR (\fBBUNDLE_FROZEN\fR)
-Disallow changes to the \fBGemfile\fR\. Defaults to \fBtrue\fR when \fB\-\-deployment\fR is used\.
+.IP "\(bu" 4
+\fBfrozen\fR (\fBBUNDLE_FROZEN\fR): Disallow changes to the \fBGemfile\fR\. Defaults to \fBtrue\fR when \fB\-\-deployment\fR is used\.
 .
-.TP
-\fBwithout\fR (\fBBUNDLE_WITHOUT\fR)
-A \fB:\fR\-separated list of groups whose gems bundler should not install
+.IP "\(bu" 4
+\fBwithout\fR (\fBBUNDLE_WITHOUT\fR): A \fB:\fR\-separated list of groups whose gems bundler should not install
 .
-.TP
-\fBbin\fR (\fBBUNDLE_BIN\fR)
-Install executables from gems in the bundle to the specified directory\. Defaults to \fBfalse\fR\.
+.IP "\(bu" 4
+\fBbin\fR (\fBBUNDLE_BIN\fR): Install executables from gems in the bundle to the specified directory\. Defaults to \fBfalse\fR\.
 .
-.TP
-\fBssl_ca_cert\fR (\fBBUNDLE_SSL_CA_CERT\fR)
-Path to a designated CA certificate file or folder containing multiple certificates for trusted CAs in PEM format\.
+.IP "\(bu" 4
+\fBgemfile\fR (\fBBUNDLE_GEMFILE\fR): The name of the file that bundler should use as the \fBGemfile\fR\. This location of this file also sets the root of the project, which is used to resolve relative paths in the \fBGemfile\fR, among other things\. By default, bundler will search up from the current working directory until it finds a \fBGemfile\fR\.
 .
-.TP
-\fBssl_client_cert\fR (\fBBUNDLE_SSL_CLIENT_CERT\fR)
-Path to a designated file containing a X\.509 client certificate and key in PEM format\.
+.IP "\(bu" 4
+\fBssl_ca_cert\fR (\fBBUNDLE_SSL_CA_CERT\fR): Path to a designated CA certificate file or folder containing multiple certificates for trusted CAs in PEM format\.
 .
-.P
-In general, you should set these settings per\-application by using the applicable flag to the bundle install(1) \fIbundle\-install\.1\.html\fR command\.
+.IP "\(bu" 4
+\fBssl_client_cert\fR (\fBBUNDLE_SSL_CLIENT_CERT\fR): Path to a designated file containing a X\.509 client certificate and key in PEM format\.
 .
-.P
-You can set them globally either via environment variables or \fBbundle config\fR, whichever is preferable for your setup\. If you use both, environment variables will take preference over global settings\.
+.IP "\(bu" 4
+\fBcache_path\fR (\fBBUNDLE_CACHE_PATH\fR): The directory that bundler will place cached gems in when running \fBbundle package\fR, and that bundler will look in when installing gems\.
 .
-.P
-An additional setting is available only as an environment variable:
+.IP "\(bu" 4
+\fBdisable_multisource\fR (\fBBUNDLE_DISABLE_MULTISOURCE\fR): When set, Gemfiles containing multiple sources will produce errors instead of warnings\. Use \fBbundle config \-\-delete disable_multisource\fR to unset\.
 .
-.TP
-\fBBUNDLE_GEMFILE\fR
-The name of the file that bundler should use as the \fBGemfile\fR\. This location of this file also sets the root of the project, which is used to resolve relative paths in the \fBGemfile\fR, among other things\. By default, bundler will search up from the current working directory until it finds a \fBGemfile\fR\.
+.IP "" 0
 .
 .P
-Bundler will ignore any \fBBUNDLE_GEMFILE\fR entries in local or global configuration files\.
+In general, you should set these settings per\-application by using the applicable flag to the bundle install(1) \fIbundle\-install\.1\.html\fR or bundle package(1) \fIbundle\-package\.1\.html\fR command\.
+.
+.P
+You can set them globally either via environment variables or \fBbundle config\fR, whichever is preferable for your setup\. If you use both, environment variables will take preference over global settings\.
 .
 .SH "LOCAL GIT REPOS"
 Bundler also allows you to work against a git repository locally instead of using the remote version\. This can be achieved by setting up a local override:
@@ -185,7 +183,7 @@ Bundler allows you to configure credentials for any gem source, which allows you
 .
 .nf
 
-bundle config SOURCE_URL USERNAME:PASSWORD
+bundle config SOURCE_HOSTNAME USERNAME:PASSWORD
 .
 .fi
 .
@@ -198,7 +196,20 @@ For example, to save the credentials of user \fBclaudette\fR for the gem source
 .
 .nf
 
-bundle config https://gems\.longerous\.com/ claudette:s00pers3krit
+bundle config gems\.longerous\.com claudette:s00pers3krit
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Or you can set the credentials as an environment variable like this:
+.
+.IP "" 4
+.
+.nf
+
+export BUNDLE_GEMS__LONGEROUS__COM="claudette:s00pers3krit"
 .
 .fi
 .
diff --git a/lib/bundler/man/bundle-config.txt b/lib/bundler/man/bundle-config.txt
index 2784be4..25c15d3 100644
--- a/lib/bundler/man/bundle-config.txt
+++ b/lib/bundler/man/bundle-config.txt
@@ -83,53 +83,58 @@ CONFIGURATION KEYS
        prepend BUNDLE_. The environment variable form  of  "without"  is  BUN-
        DLE_WITHOUT.
 
+       Any  periods in the configuration keys must be replaced with two under-
+       scores when setting it via environment variables. The configuration key
+       local.rack becomes the environment variable BUNDLE_LOCAL__RACK.
+
 LIST OF AVAILABLE KEYS
        The  following  is  a list of all configuration keys and their purpose.
        You can learn more about their  operation  in  bundle  install(1)  bun-
        dle-install.1.html.
 
-       path (BUNDLE_PATH)
-	      The  location  on disk to install gems. Defaults to $GEM_HOME in
-	      development and vendor/bundler when --deployment is used
+       o   path  (BUNDLE_PATH): The location on disk to install gems. Defaults
+	   to $GEM_HOME in development and vendor/bundle when --deployment  is
+	   used
 
-       frozen (BUNDLE_FROZEN)
-	      Disallow changes to the Gemfile. Defaults to true when --deploy-
-	      ment is used.
+       o   frozen  (BUNDLE_FROZEN):  Disallow changes to the Gemfile. Defaults
+	   to true when --deployment is used.
 
-       without (BUNDLE_WITHOUT)
-	      A  :-separated  list  of	groups	whose  gems bundler should not
-	      install
+       o   without (BUNDLE_WITHOUT): A :-separated list of groups  whose  gems
+	   bundler should not install
 
-       bin (BUNDLE_BIN)
-	      Install executables from gems in the  bundle  to	the  specified
-	      directory. Defaults to false.
+       o   bin	(BUNDLE_BIN):  Install	executables from gems in the bundle to
+	   the specified directory. Defaults to false.
 
-       ssl_ca_cert (BUNDLE_SSL_CA_CERT)
-	      Path  to	a  designated CA certificate file or folder containing
-	      multiple certificates for trusted CAs in PEM format.
+       o   gemfile (BUNDLE_GEMFILE): The name of the file that bundler	should
+	   use	as  the Gemfile. This location of this file also sets the root
+	   of the project, which is used to resolve relative paths in the Gem-
+	   file,  among  other things. By default, bundler will search up from
+	   the current working directory until it finds a Gemfile.
 
-       ssl_client_cert (BUNDLE_SSL_CLIENT_CERT)
-	      Path to a designated file containing a X.509 client  certificate
-	      and key in PEM format.
+       o   ssl_ca_cert (BUNDLE_SSL_CA_CERT): Path to a designated CA  certifi-
+	   cate  file  or  folder containing multiple certificates for trusted
+	   CAs in PEM format.
 
-       In  general, you should set these settings per-application by using the
-       applicable flag to the bundle install(1) bundle-install.1.html command.
+       o   ssl_client_cert (BUNDLE_SSL_CLIENT_CERT): Path to a designated file
+	   containing a X.509 client certificate and key in PEM format.
 
-       You  can  set  them globally either via environment variables or bundle
-       config, whichever is preferable for your setup. If you use both,  envi-
-       ronment variables will take preference over global settings.
+       o   cache_path  (BUNDLE_CACHE_PATH):  The  directory  that bundler will
+	   place cached gems in when running bundle package, and that  bundler
+	   will look in when installing gems.
+
+       o   disable_multisource	(BUNDLE_DISABLE_MULTISOURCE):  When  set, Gem-
+	   files containing multiple sources will produce  errors  instead  of
+	   warnings.  Use bundle config --delete disable_multisource to unset.
 
-       An additional setting is available only as an environment variable:
 
-       BUNDLE_GEMFILE
-	      The  name  of  the  file that bundler should use as the Gemfile.
-	      This location of this file also sets the root  of  the  project,
-	      which  is  used  to resolve relative paths in the Gemfile, among
-	      other things. By default, bundler will search up from  the  cur-
-	      rent working directory until it finds a Gemfile.
 
-       Bundler	will ignore any BUNDLE_GEMFILE entries in local or global con-
-       figuration files.
+       In general, you should set these settings per-application by using  the
+       applicable  flag to the bundle install(1) bundle-install.1.html or bun-
+       dle package(1) bundle-package.1.html command.
+
+       You can set them globally either via environment  variables  or	bundle
+       config,	whichever is preferable for your setup. If you use both, envi-
+       ronment variables will take preference over global settings.
 
 LOCAL GIT REPOS
        Bundler also allows you	to  work  against  a  git  repository  locally
@@ -197,7 +202,7 @@ CREDENTIALS FOR GEM SOURCES
 
 
 
-	   bundle config SOURCE_URL USERNAME:PASSWORD
+	   bundle config SOURCE_HOSTNAME USERNAME:PASSWORD
 
 
 
@@ -206,11 +211,19 @@ CREDENTIALS FOR GEM SOURCES
 
 
 
-	   bundle config https://gems.longerous.com/ claudette:s00pers3krit
+	   bundle config gems.longerous.com claudette:s00pers3krit
+
+
+
+       Or you can set the credentials as an environment variable like this:
+
+
+
+	   export BUNDLE_GEMS__LONGEROUS__COM="claudette:s00pers3krit"
 
 
 
 
 
 
-				 October 2014		      BUNDLE-CONFIG(1)
+				   May 2015		      BUNDLE-CONFIG(1)
diff --git a/lib/bundler/man/bundle-exec b/lib/bundler/man/bundle-exec
index 41a8e5c..8c9d23c 100644
--- a/lib/bundler/man/bundle-exec
+++ b/lib/bundler/man/bundle-exec
@@ -1,7 +1,7 @@
 .\" generated with Ronn/v0.7.3
 .\" http://github.com/rtomayko/ronn/tree/0.7.3
 .
-.TH "BUNDLE\-EXEC" "1" "July 2014" "" ""
+.TH "BUNDLE\-EXEC" "1" "December 2014" "" ""
 .
 .SH "NAME"
 \fBbundle\-exec\fR \- Execute a command in the context of the bundle
diff --git a/lib/bundler/man/bundle-exec.txt b/lib/bundler/man/bundle-exec.txt
index 6fb3533..7592ba8 100644
--- a/lib/bundler/man/bundle-exec.txt
+++ b/lib/bundler/man/bundle-exec.txt
@@ -160,4 +160,4 @@ RUBYGEMS PLUGINS
 
 
 
-				   July 2014			BUNDLE-EXEC(1)
+				 December 2014			BUNDLE-EXEC(1)
diff --git a/lib/bundler/man/bundle-install b/lib/bundler/man/bundle-install
index a1780b6..b02541b 100644
--- a/lib/bundler/man/bundle-install
+++ b/lib/bundler/man/bundle-install
@@ -1,118 +1,120 @@
 .\" generated with Ronn/v0.7.3
 .\" http://github.com/rtomayko/ronn/tree/0.7.3
 .
-.TH "BUNDLE\-INSTALL" "1" "October 2014" "" ""
+.TH "BUNDLE\-INSTALL" "1" "May 2015" "" ""
 .
 .SH "NAME"
 \fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
 .
 .SH "SYNOPSIS"
-\fBbundle install\fR [\-\-gemfile=GEMFILE]
+\fBbundle install\fR [\-\-binstubs[=DIRECTORY]]
 .
 .IP "" 4
 .
 .nf
 
-             [\-\-path PATH] [\-\-system]
-             [\-\-without=GROUP1[ GROUP2\.\.\.]]
-             [\-\-local] [\-\-deployment]
-             [\-\-binstubs[=DIRECTORY]]
-             [\-\-standalone[=GROUP1[ GROUP2\.\.\.]]]
-             [\-\-trust\-policy=POLICY]
-             [\-\-jobs=SIZE]
-             [\-\-retry=TRIES]
-             [\-\-no\-cache]
-             [\-\-quiet]
              [\-\-clean]
              [\-\-full\-index]
+             [\-\-gemfile=GEMFILE]
+             [\-\-jobs=NUMBER]
+             [\-\-local]
+             [\-\-deployment]
+             [\-\-no\-cache]
              [\-\-no\-prune]
+             [\-\-path PATH]
+             [\-\-system]
+             [\-\-quiet]
+             [\-\-retry=NUMBER]
              [\-\-shebang]
+             [\-\-standalone[=GROUP[ GROUP\.\.\.]]]
+             [\-\-trust\-policy=POLICY]
+             [\-\-without=GROUP[ GROUP\.\.\.]]
 .
 .fi
 .
 .IP "" 0
 .
 .SH "DESCRIPTION"
-Install the gems specified in your Gemfile(5)\. If this is the first time you run bundle install (and a \fBGemfile\.lock\fR does not exist), bundler will fetch all remote sources, resolve dependencies and install all needed gems\.
+Install the gems specified in your Gemfile(5)\. If this is the first time you run bundle install (and a \fBGemfile\.lock\fR does not exist), Bundler will fetch all remote sources, resolve dependencies and install all needed gems\.
 .
 .P
-If a \fBGemfile\.lock\fR does exist, and you have not updated your Gemfile(5), bundler will fetch all remote sources, but use the dependencies specified in the \fBGemfile\.lock\fR instead of resolving dependencies\.
+If a \fBGemfile\.lock\fR does exist, and you have not updated your Gemfile(5), Bundler will fetch all remote sources, but use the dependencies specified in the \fBGemfile\.lock\fR instead of resolving dependencies\.
 .
 .P
-If a \fBGemfile\.lock\fR does exist, and you have updated your Gemfile(5), bundler will use the dependencies in the \fBGemfile\.lock\fR for all gems that you did not update, but will re\-resolve the dependencies of gems that you did update\. You can find more information about this update process below under \fICONSERVATIVE UPDATING\fR\.
+If a \fBGemfile\.lock\fR does exist, and you have updated your Gemfile(5), Bundler will use the dependencies in the \fBGemfile\.lock\fR for all gems that you did not update, but will re\-resolve the dependencies of gems that you did update\. You can find more information about this update process below under \fICONSERVATIVE UPDATING\fR\.
 .
 .SH "OPTIONS"
 .
 .TP
-\fB\-\-gemfile=<gemfile>\fR
-The location of the Gemfile(5) that bundler should use\. This defaults to a gemfile in the current working directory\. In general, bundler will assume that the location of the Gemfile(5) is also the project root, and will look for the \fBGemfile\.lock\fR and \fBvendor/cache\fR relative to it\.
+\fB\-\-binstubs[=<directory>]\fR
+Creates a directory (defaults to \fB~/bin\fR) and place any executables from the gem there\. These executables run in Bundler\'s context\. If used, you might add this directory to your environment\'s \fBPATH\fR variable\. For instance, if the \fBrails\fR gem comes with a \fBrails\fR executable, this flag will create a \fBbin/rails\fR executable that ensures that all referred dependencies will be resolved using the bundled gems\.
 .
 .TP
-\fB\-\-path=<path>\fR
-The location to install the gems in the bundle to\. This defaults to Rubygems\' gem home, which is also the default location where \fBgem install\fR installs gems\. This means that, by default, gems installed without a \fB\-\-path\fR setting will show up in \fBgem list\fR\. This setting is a \fIremembered option\fR\.
+\fB\-\-clean\fR
+On finishing the installation Bundler is going to remove any gems not present in the current Gemfile(5)\. Don\'t worry, gems currently in use will not be removed\.
 .
 .TP
-\fB\-\-system\fR
-Installs the gems in the bundle to the system location\. This overrides any previous \fIremembered\fR use of \fB\-\-path\fR\.
+\fB\-\-full\-index\fR
+Bundler will not call Rubygems\' API endpoint (default) but download and cache a (currently big) index file of all gems\. Performance can be improved for large bundles that seldomly change by enabling this option\.
 .
 .TP
-\fB\-\-without=<list>\fR
-A space\-separated list of groups to skip installing\. This is a \fIremembered option\fR\.
+\fB\-\-gemfile=<gemfile>\fR
+The location of the Gemfile(5) which Bundler should use\. This defaults to a Gemfile(5) in the current working directory\. In general, Bundler will assume that the location of the Gemfile(5) is also the project\'s root and will try to find \fBGemfile\.lock\fR and \fBvendor/cache\fR relative to this location\.
 .
 .TP
-\fB\-\-local\fR
-Do not attempt to connect to \fBrubygems\.org\fR, instead using just the gems already present in Rubygems\' cache or in \fBvendor/cache\fR\. Note that if a more appropriate platform\-specific gem exists on \fBrubygems\.org\fR, it will not be found\.
+\fB\-\-jobs=[<number>]\fR
+Install gems by starting \fInumber\fR of workers parallely\.
 .
 .TP
-\fB\-\-deployment\fR
-Switches bundler\'s defaults into \fIdeployment mode\fR\. Do not use this flag on development machines\.
+\fB\-\-local\fR
+Do not attempt to connect to \fBrubygems\.org\fR\. Instead, Bundler will use the gems already present in Rubygems\' cache or in \fBvendor/cache\fR\. Note that if a appropriate platform\-specific gem exists on \fBrubygems\.org\fR it will not be found\.
 .
 .TP
-\fB\-\-binstubs[=<directory>]\fR
-Create a directory (defaults to \fBbin\fR) containing an executable that runs in the context of the bundle\. For instance, if the \fBrails\fR gem comes with a \fBrails\fR executable, this flag will create a \fBbin/rails\fR executable that ensures that all dependencies used come from the bundled gems\.
+\fB\-\-deployment\fR
+In \fIdeployment mode\fR, Bundler will \'roll\-out\' the bundle for \fBproduction\fR use\. Please check carefully if you want to have this option enabled in \fBdevelopment\fR or \fBtest\fR environments\.
 .
 .TP
-\fB\-\-shebang ruby\-install\-name\fR
-Uses the ruby executable (usually \fBruby\fR) provided to execute the scripts created with \-\-binstubs\. For instance, if you use \-\-binstubs with \fB\-\-shebang jruby\fR, all executables will be created to use jruby instead\.
+\fB\-\-system\fR
+Installs the gems specified in the bundle to the system\'s Rubygems location\. This overrides any previous \fIremembered\fR use of \fB\-\-path\fR\.
 .
 .TP
-\fB\-\-standalone[=<list>]\fR
-Make a bundle that can work without Ruby Gems or Bundler at runtime\. It takes a space separated list of groups to install\. It creates a \fBbundle\fR directory and installs the bundle there\. It also generates a \fBbundle/bundler/setup\.rb\fR file to replace Bundler\'s own setup\.
+\fB\-\-no\-cache\fR
+Do not update the cache in \fBvendor/cache\fR with the newly bundled gems\. This does not remove any gems in the cache but keeps the newly bundled gems from being cached during the install\.
 .
 .TP
-\fB\-\-trust\-policy=[<policy>]\fR
-Apply the Rubygems security policy named \fIpolicy\fR, where policy is one of HighSecurity, MediumSecurity, LowSecurity, AlmostNoSecurity, or NoSecurity\. For more detail, see the Rubygems signing documentation, linked below in \fISEE ALSO\fR\.
+\fB\-\-no\-prune\fR
+Don\'t remove stale gems from the cache when the installation finishes\.
 .
 .TP
-\fB\-\-jobs=[<size>]\fR
-Install gems parallely by starting \fIsize\fR number of parallel workers\.
+\fB\-\-path=<path>\fR
+The location to install the specified gems to\. This defaults to Rubygems\' setting\. Bundler shares this location with Rubygems, \fBgem install \.\.\.\fR will have gem installed there, too\. Therefore, gems installed without a \fB\-\-path \.\.\.\fR setting will show up by calling \fBgem list\fR\. Accodingly, gems installed to other locations will not get listed\. This setting is a \fIremembered option\fR\.
 .
 .TP
-\fB\-\-retry[<tries]\fR
-Retries failed network or git requests \fItries\fR times\.
+\fB\-\-quiet\fR
+Do not print progress information to the standard output\. Instead, Bundler will exit using a status code (\fB$?\fR)\.
 .
 .TP
-\fB\-\-no\-cache\fR
-Do not update the cache in \fBvendor/cache\fR with the newly bundled gems\. This does not remove any existing cached gems, only stops the newly bundled gems from being cached during the install\.
+\fB\-\-retry=[<number>]\fR
+Retry failed network or git requests for \fInumber\fR times\.
 .
 .TP
-\fB\-\-quiet\fR
-Do not print progress information to stdout\. Instead, communicate the success of the install operation via exit status code\.
+\fB\-\-shebang=<ruby\-executable>\fR
+Uses the specified ruby executable (usually \fBruby\fR) to execute the scripts created with \fB\-\-binstubs\fR\. In addition, if you use \fB\-\-binstubs\fR together with \fB\-\-shebang jruby\fR these executables will be changed to execute \fBjruby\fR instead\.
 .
 .TP
-\fB\-\-clean\fR
-Run bundle clean automatically after install\.
+\fB\-\-standalone[=<list>]\fR
+Makes a bundle that can work without depending on Rubygems or Bundler at runtime\. A space separated list of groups to install has to be specified\. Bundler creates a directory named \fBbundle\fR and installs the bundle there\. It also generates a \fBbundle/bundler/setup\.rb\fR file to replace Bundler\'s own setup in the manner required\.
 .
 .TP
-\fB\-\-full\-index\fR
-Use the rubygems modern index instead of the API endpoint\.
+\fB\-\-trust\-policy=[<policy>]\fR
+Apply the Rubygems security policy \fIpolicy\fR, where policy is one of \fBHighSecurity\fR, \fBMediumSecurity\fR, \fBLowSecurity\fR, \fBAlmostNoSecurity\fR, or \fBNoSecurity\fR\. For more details, please see the Rubygems signing documentation linked below in \fISEE ALSO\fR\.
 .
 .TP
-\fB\-\-no\-prune\fR
-Don\'t remove stale gems from the cache\.
+\fB\-\-without=<list>\fR
+A space\-separated list of groups referencing gems to skip during installation\. This is a \fIremembered option\fR\.
 .
 .SH "DEPLOYMENT MODE"
-Bundler\'s defaults are optimized for development\. To switch to defaults optimized for deployment, use the \fB\-\-deployment\fR flag\. Do not activate deployment mode on development machines, as it will cause in an error when the Gemfile is modified\.
+Bundler\'s defaults are optimized for development\. To switch to defaults optimized for deployment, use the \fB\-\-deployment\fR flag\. Do not activate deployment mode on development machines, as it will cause an error when the Gemfile(5) is modified\.
 .
 .IP "1." 4
 A \fBGemfile\.lock\fR is required\.
@@ -147,10 +149,10 @@ As a result, \fBbundle install \-\-deployment\fR installs gems to the \fBvendor/
 .IP "" 0
 .
 .SH "SUDO USAGE"
-By default, bundler installs gems to the same location as \fBgem install\fR\.
+By default, Bundler installs gems to the same location as \fBgem install\fR\.
 .
 .P
-In some cases, that location may not be writable by your Unix user\. In that case, bundler will stage everything in a temporary directory, then ask you for your \fBsudo\fR password in order to copy the gems into their system location\.
+In some cases, that location may not be writable by your Unix user\. In that case, Bundler will stage everything in a temporary directory, then ask you for your \fBsudo\fR password in order to copy the gems into their system location\.
 .
 .P
 From your perspective, this is identical to installing them gems directly into the system\.
@@ -173,13 +175,13 @@ Checking out private git repositories using your user\'s SSH keys
 Of these three, the first two could theoretically be performed by \fBchown\fRing the resulting files to \fB$SUDO_USER\fR\. The third, however, can only be performed by actually invoking the \fBgit\fR command as the current user\. Therefore, git gems are downloaded and installed into \fB~/\.bundle\fR rather than $GEM_HOME or $BUNDLE_PATH\.
 .
 .P
-As a result, you should run \fBbundle install\fR as the current user, and bundler will ask for your password if it is needed to put the gems into their final location\.
+As a result, you should run \fBbundle install\fR as the current user, and Bundler will ask for your password if it is needed to put the gems into their final location\.
 .
 .SH "INSTALLING GROUPS"
 By default, \fBbundle install\fR will install all gems in all groups in your Gemfile(5), except those declared for a different platform\.
 .
 .P
-However, you can explicitly tell bundler to skip installing certain groups with the \fB\-\-without\fR option\. This option takes a space\-separated list of groups\.
+However, you can explicitly tell Bundler to skip installing certain groups with the \fB\-\-without\fR option\. This option takes a space\-separated list of groups\.
 .
 .P
 While the \fB\-\-without\fR option will skip \fIinstalling\fR the gems in the specified groups, it will still \fIdownload\fR those gems and use them to resolve the dependencies of every gem in your Gemfile(5)\.
@@ -197,12 +199,12 @@ For a simple illustration, consider the following Gemfile(5):
 .
 .nf
 
-source "https://rubygems\.org"
+source \'https://rubygems\.org\'
 
-gem "sinatra"
+gem \'sinatra\'
 
 group :production do
-  gem "rack\-perftools\-profiler"
+  gem \'rack\-perftools\-profiler\'
 end
 .
 .fi
@@ -210,10 +212,10 @@ end
 .IP "" 0
 .
 .P
-In this case, \fBsinatra\fR depends on any version of Rack (\fB>= 1\.0\fR, while \fBrack\-perftools\-profiler\fR depends on 1\.x (\fB~> 1\.0\fR)\.
+In this case, \fBsinatra\fR depends on any version of Rack (\fB>= 1\.0\fR), while \fBrack\-perftools\-profiler\fR depends on 1\.x (\fB~> 1\.0\fR)\.
 .
 .P
-When you run \fBbundle install \-\-without production\fR in development, we look at the dependencies of \fBrack\-perftools\-profiler\fR as well\. That way, you do not spend all your time developing against Rack 2\.0, using new APIs unavailable in Rack 1\.x, only to have bundler switch to Rack 1\.2 when the \fBproduction\fR group \fIis\fR used\.
+When you run \fBbundle install \-\-without production\fR in development, we look at the dependencies of \fBrack\-perftools\-profiler\fR as well\. That way, you do not spend all your time developing against Rack 2\.0, using new APIs unavailable in Rack 1\.x, only to have Bundler switch to Rack 1\.2 when the \fBproduction\fR group \fIis\fR used\.
 .
 .P
 This should not cause any problems in practice, because we do not attempt to \fBinstall\fR the gems in the excluded groups, and only evaluate as part of the dependency resolution process\.
@@ -274,10 +276,10 @@ Let\'s take a look at an example\. Here\'s your original Gemfile(5):
 .
 .nf
 
-source "https://rubygems\.org"
+source \'https://rubygems\.org\'
 
-gem "actionpack", "2\.3\.8"
-gem "activemerchant"
+gem \'actionpack\', \'2\.3\.8\'
+gem \'activemerchant\'
 .
 .fi
 .
@@ -296,10 +298,10 @@ Next, you modify your Gemfile(5) to:
 .
 .nf
 
-source "https://rubygems\.org"
+source \'https://rubygems\.org\'
 
-gem "actionpack", "3\.0\.0\.rc"
-gem "activemerchant"
+gem \'actionpack\', \'3\.0\.0\.rc\'
+gem \'activemerchant\'
 .
 .fi
 .
@@ -323,7 +325,7 @@ not currently being used to satisfy another dependency
 Because you did not explicitly ask to update \fBactivemerchant\fR, you would not expect it to suddenly stop working after updating \fBactionpack\fR\. However, satisfying the new \fBactivesupport 3\.0\.0\.rc\fR dependency of actionpack requires updating one of its dependencies\.
 .
 .P
-Even though \fBactivemerchant\fR declares a very loose dependency that theoretically matches \fBactivesupport 3\.0\.0\.rc\fR, bundler treats gems in your Gemfile(5) that have not changed as an atomic unit together with their dependencies\. In this case, the \fBactivemerchant\fR dependency is treated as \fBactivemerchant 1\.7\.1 + activesupport 2\.3\.8\fR, so \fBbundle install\fR will report that it cannot update \fBactionpack\fR\.
+Even though \fBactivemerchant\fR declares a very loose dependency that theoretically matches \fBactivesupport 3\.0\.0\.rc\fR, Bundler treats gems in your Gemfile(5) that have not changed as an atomic unit together with their dependencies\. In this case, the \fBactivemerchant\fR dependency is treated as \fBactivemerchant 1\.7\.1 + activesupport 2\.3\.8\fR, so \fBbundle install\fR will report that it cannot update \fBactionpack\fR\.
 .
 .P
 To explicitly update \fBactionpack\fR, including its dependencies which other gems in the Gemfile(5) still depend on, run \fBbundle update actionpack\fR (see \fBbundle update(1)\fR)\.
diff --git a/lib/bundler/man/bundle-install.txt b/lib/bundler/man/bundle-install.txt
index ec576a5..4d4577a 100644
--- a/lib/bundler/man/bundle-install.txt
+++ b/lib/bundler/man/bundle-install.txt
@@ -6,132 +6,145 @@ NAME
        bundle-install - Install the dependencies specified in your Gemfile
 
 SYNOPSIS
-       bundle install [--gemfile=GEMFILE]
+       bundle install [--binstubs[=DIRECTORY]]
 
 
 
-			[--path PATH] [--system]
-			[--without=GROUP1[ GROUP2...]]
-			[--local] [--deployment]
-			[--binstubs[=DIRECTORY]]
-			[--standalone[=GROUP1[ GROUP2...]]]
-			[--trust-policy=POLICY]
-			[--jobs=SIZE]
-			[--retry=TRIES]
-			[--no-cache]
-			[--quiet]
 			[--clean]
 			[--full-index]
+			[--gemfile=GEMFILE]
+			[--jobs=NUMBER]
+			[--local]
+			[--deployment]
+			[--no-cache]
 			[--no-prune]
+			[--path PATH]
+			[--system]
+			[--quiet]
+			[--retry=NUMBER]
 			[--shebang]
+			[--standalone[=GROUP[ GROUP...]]]
+			[--trust-policy=POLICY]
+			[--without=GROUP[ GROUP...]]
 
 
 
 DESCRIPTION
        Install	the  gems  specified  in your Gemfile(5). If this is the first
        time you run bundle  install  (and  a  Gemfile.lock  does  not  exist),
-       bundler will fetch all remote sources, resolve dependencies and install
+       Bundler will fetch all remote sources, resolve dependencies and install
        all needed gems.
 
        If a Gemfile.lock does exist, and you have not updated your Gemfile(5),
-       bundler	will fetch all remote sources, but use the dependencies speci-
+       Bundler	will fetch all remote sources, but use the dependencies speci-
        fied in the Gemfile.lock instead of resolving dependencies.
 
        If a Gemfile.lock does exist, and you  have  updated  your  Gemfile(5),
-       bundler will use the dependencies in the Gemfile.lock for all gems that
+       Bundler will use the dependencies in the Gemfile.lock for all gems that
        you did not update, but will re-resolve the dependencies of  gems  that
        you did update. You can find more information about this update process
        below under CONSERVATIVE UPDATING.
 
 OPTIONS
-       --gemfile=<gemfile>
-	      The location of the Gemfile(5) that  bundler  should  use.  This
-	      defaults	to a gemfile in the current working directory. In gen-
-	      eral, bundler will assume that the location of the Gemfile(5) is
-	      also  the  project  root, and will look for the Gemfile.lock and
-	      vendor/cache relative to it.
+       --binstubs[=<directory>]
+	      Creates a directory (defaults to ~/bin) and place  any  executa-
+	      bles from the gem there. These executables run in Bundler's con-
+	      text. If used, you might add this  directory  to	your  environ-
+	      ment's  PATH variable. For instance, if the rails gem comes with
+	      a rails executable, this flag will create a bin/rails executable
+	      that  ensures  that  all	referred dependencies will be resolved
+	      using the bundled gems.
 
-       --path=<path>
-	      The location to install the gems in the bundle to. This defaults
-	      to  Rubygems' gem home, which is also the default location where
-	      gem install installs gems. This means  that,  by	default,  gems
-	      installed  without  a  --path  setting will show up in gem list.
-	      This setting is a remembered option.
+       --clean
+	      On finishing the installation Bundler is	going  to  remove  any
+	      gems  not  present  in the current Gemfile(5). Don't worry, gems
+	      currently in use will not be removed.
 
-       --system
-	      Installs the gems in the bundle to  the  system  location.  This
-	      overrides any previous remembered use of --path.
+       --full-index
+	      Bundler will not call Rubygems' API endpoint (default) but down-
+	      load and cache a (currently big) index file of all gems. Perfor-
+	      mance can be improved for large bundles that seldomly change  by
+	      enabling this option.
 
-       --without=<list>
-	      A  space-separated  list of groups to skip installing. This is a
-	      remembered option.
+       --gemfile=<gemfile>
+	      The  location  of  the Gemfile(5) which Bundler should use. This
+	      defaults to a Gemfile(5) in the current  working	directory.  In
+	      general, Bundler will assume that the location of the Gemfile(5)
+	      is also the project's root and will try to find Gemfile.lock and
+	      vendor/cache relative to this location.
+
+       --jobs=[<number>]
+	      Install gems by starting number of workers parallely.
 
        --local
-	      Do not attempt to connect to rubygems.org,  instead  using  just
-	      the  gems already present in Rubygems' cache or in vendor/cache.
-	      Note that if a more appropriate platform-specific gem exists  on
-	      rubygems.org, it will not be found.
+	      Do not attempt to connect to rubygems.org. Instead, Bundler will
+	      use the gems already present  in	Rubygems'  cache  or  in  ven-
+	      dor/cache.  Note	that  if  a  appropriate platform-specific gem
+	      exists on rubygems.org it will not be found.
 
        --deployment
-	      Switches	bundler's  defaults  into  deployment mode. Do not use
-	      this flag on development machines.
+	      In deployment mode, Bundler will 'roll-out' the bundle for  pro-
+	      duction  use.  Please  check  carefully if you want to have this
+	      option enabled in development or test environments.
 
-       --binstubs[=<directory>]
-	      Create a directory (defaults to bin)  containing	an  executable
-	      that  runs  in  the  context of the bundle. For instance, if the
-	      rails gem comes with a rails executable, this flag will create a
-	      bin/rails  executable  that  ensures  that all dependencies used
-	      come from the bundled gems.
-
-       --shebang ruby-install-name
-	      Uses the ruby executable (usually ruby) provided to execute  the
-	      scripts created with --binstubs. For instance, if you use --bin-
-	      stubs with --shebang jruby, all executables will be  created  to
-	      use jruby instead.
+       --system
+	      Installs the gems  specified  in	the  bundle  to  the  system's
+	      Rubygems location. This overrides any previous remembered use of
+	      --path.
 
-       --standalone[=<list>]
-	      Make a bundle that can work without Ruby Gems or Bundler at run-
-	      time. It takes a space separated list of groups to  install.  It
-	      creates  a  bundle  directory  and installs the bundle there. It
-	      also  generates  a  bundle/bundler/setup.rb  file   to   replace
-	      Bundler's own setup.
+       --no-cache
+	      Do not update the cache in vendor/cache with the	newly  bundled
+	      gems.  This  does not remove any gems in the cache but keeps the
+	      newly bundled gems from being cached during the install.
 
-       --trust-policy=[<policy>]
-	      Apply the Rubygems security policy named policy, where policy is
-	      one of HighSecurity, MediumSecurity, LowSecurity,  AlmostNoSecu-
-	      rity,  or  NoSecurity. For more detail, see the Rubygems signing
-	      documentation, linked below in SEE ALSO.
+       --no-prune
+	      Don't remove stale gems from the	cache  when  the  installation
+	      finishes.
 
-       --jobs=[<size>]
-	      Install gems parallely by starting size number of parallel work-
-	      ers.
+       --path=<path>
+	      The  location to install the specified gems to. This defaults to
+	      Rubygems' setting. Bundler shares this location  with  Rubygems,
+	      gem  install  ... will have gem installed there, too. Therefore,
+	      gems installed without a --path ...  setting  will  show	up  by
+	      calling  gem list. Accodingly, gems installed to other locations
+	      will not get listed. This setting is a remembered option.
 
-       --retry[<tries]
-	      Retries failed network or git requests tries times.
+       --quiet
+	      Do not  print  progress  information  to	the  standard  output.
+	      Instead, Bundler will exit using a status code ($?).
 
-       --no-cache
-	      Do  not  update the cache in vendor/cache with the newly bundled
-	      gems. This does not remove any existing cached gems, only  stops
-	      the newly bundled gems from being cached during the install.
+       --retry=[<number>]
+	      Retry failed network or git requests for number times.
 
-       --quiet
-	      Do  not  print progress information to stdout. Instead, communi-
-	      cate the success of the install operation via exit status  code.
+       --shebang=<ruby-executable>
+	      Uses the specified ruby executable (usually ruby) to execute the
+	      scripts created with --binstubs. In addition, if you use	--bin-
+	      stubs  together  with  --shebang jruby these executables will be
+	      changed to execute jruby instead.
 
-       --clean
-	      Run bundle clean automatically after install.
+       --standalone[=<list>]
+	      Makes a bundle that can work without depending  on  Rubygems  or
+	      Bundler  at runtime. A space separated list of groups to install
+	      has to be specified. Bundler creates a  directory  named	bundle
+	      and  installs  the  bundle  there.  It  also  generates  a  bun-
+	      dle/bundler/setup.rb file to replace Bundler's own setup in  the
+	      manner required.
 
-       --full-index
-	      Use the rubygems modern index instead of the API endpoint.
+       --trust-policy=[<policy>]
+	      Apply  the  Rubygems security policy policy, where policy is one
+	      of HighSecurity, MediumSecurity, LowSecurity,  AlmostNoSecurity,
+	      or NoSecurity. For more details, please see the Rubygems signing
+	      documentation linked below in SEE ALSO.
 
-       --no-prune
-	      Don't remove stale gems from the cache.
+       --without=<list>
+	      A space-separated list of groups referencing gems to skip during
+	      installation. This is a remembered option.
 
 DEPLOYMENT MODE
        Bundler's defaults are optimized for development. To switch to defaults
        optimized for deployment, use the --deployment flag.  Do  not  activate
-       deployment  mode  on development machines, as it will cause in an error
-       when the Gemfile is modified.
+       deployment mode on development machines, as it will cause an error when
+       the Gemfile(5) is modified.
 
        1.  A Gemfile.lock is required.
 
@@ -169,10 +182,10 @@ DEPLOYMENT MODE
 
 
 SUDO USAGE
-       By  default, bundler installs gems to the same location as gem install.
+       By  default, Bundler installs gems to the same location as gem install.
 
        In some cases, that location may not be writable by your Unix user.  In
-       that case, bundler will stage everything in a temporary directory, then
+       that case, Bundler will stage everything in a temporary directory, then
        ask you for your sudo password in order to copy	the  gems  into  their
        system location.
 
@@ -197,14 +210,14 @@ SUDO USAGE
        rather than $GEM_HOME or $BUNDLE_PATH.
 
        As  a  result,  you  should run bundle install as the current user, and
-       bundler will ask for your password if it is needed to put the gems into
+       Bundler will ask for your password if it is needed to put the gems into
        their final location.
 
 INSTALLING GROUPS
        By  default, bundle install will install all gems in all groups in your
        Gemfile(5), except those declared for a different platform.
 
-       However, you can explicitly tell bundler  to  skip  installing  certain
+       However, you can explicitly tell Bundler  to  skip  installing  certain
        groups  with  the --without option. This option takes a space-separated
        list of groups.
 
@@ -227,23 +240,23 @@ INSTALLING GROUPS
 
 
 
-	   source "https://rubygems.org"
+	   source 'https://rubygems.org'
 
-	   gem "sinatra"
+	   gem 'sinatra'
 
 	   group :production do
-	     gem "rack-perftools-profiler"
+	     gem 'rack-perftools-profiler'
 	   end
 
 
 
-       In  this  case,	sinatra  depends on any version of Rack (>= 1.0, while
+       In  this  case,	sinatra depends on any version of Rack (>= 1.0), while
        rack-perftools-profiler depends on 1.x (~> 1.0).
 
        When you run bundle install --without  production  in  development,  we
        look  at the dependencies of rack-perftools-profiler as well. That way,
        you do not spend all your time developing against Rack 2.0,  using  new
-       APIs  unavailable  in Rack 1.x, only to have bundler switch to Rack 1.2
+       APIs  unavailable  in Rack 1.x, only to have Bundler switch to Rack 1.2
        when the production group is used.
 
        This should not cause any problems  in  practice,  because  we  do  not
@@ -323,10 +336,10 @@ CONSERVATIVE UPDATING
 
 
 
-	   source "https://rubygems.org"
+	   source 'https://rubygems.org'
 
-	   gem "actionpack", "2.3.8"
-	   gem "activemerchant"
+	   gem 'actionpack', '2.3.8'
+	   gem 'activemerchant'
 
 
 
@@ -343,10 +356,10 @@ CONSERVATIVE UPDATING
 
 
 
-	   source "https://rubygems.org"
+	   source 'https://rubygems.org'
 
-	   gem "actionpack", "3.0.0.rc"
-	   gem "activemerchant"
+	   gem 'actionpack', '3.0.0.rc'
+	   gem 'activemerchant'
 
 
 
@@ -371,7 +384,7 @@ CONSERVATIVE UPDATING
        pack requires updating one of its dependencies.
 
        Even though activemerchant declares a very loose dependency that  theo-
-       retically  matches  activesupport 3.0.0.rc, bundler treats gems in your
+       retically  matches  activesupport 3.0.0.rc, Bundler treats gems in your
        Gemfile(5) that have not changed as an atomic unit together with  their
        dependencies. In this case, the activemerchant dependency is treated as
        activemerchant 1.7.1 + activesupport  2.3.8,  so  bundle  install  will
@@ -397,4 +410,4 @@ SEE ALSO
 
 
 
-				 October 2014		     BUNDLE-INSTALL(1)
+				   May 2015		     BUNDLE-INSTALL(1)
diff --git a/lib/bundler/man/bundle-package b/lib/bundler/man/bundle-package
index f84a266..abe55e6 100644
--- a/lib/bundler/man/bundle-package
+++ b/lib/bundler/man/bundle-package
@@ -1,7 +1,7 @@
 .\" generated with Ronn/v0.7.3
 .\" http://github.com/rtomayko/ronn/tree/0.7.3
 .
-.TH "BUNDLE\-PACKAGE" "1" "July 2014" "" ""
+.TH "BUNDLE\-PACKAGE" "1" "May 2015" "" ""
 .
 .SH "NAME"
 \fBbundle\-package\fR \- Package your needed \fB\.gem\fR files into your application
@@ -15,6 +15,9 @@ Copy all of the \fB\.gem\fR files needed to run the application into the \fBvend
 .SH "GIT AND PATH GEMS"
 Since Bundler 1\.2, the \fBbundle package\fR command can also package \fB:git\fR and \fB:path\fR dependencies besides \.gem files\. This needs to be explicitly enabled via the \fB\-\-all\fR option\. Once used, the \fB\-\-all\fR option will be remembered\.
 .
+.SH "SUPPORT FOR MULTIPLE PLATFORMS"
+When using gems that have different packages for different platforms, Bundler 1\.8 and newer support caching of gems for other platforms in \fBvendor/cache\fR\. This needs to be enabled via the \fB\-\-all\-platforms\fR option\. This setting will be remembered in your local bundler configuration\.
+.
 .SH "REMOTE FETCHING"
 By default, if you simply run bundle install(1) \fIbundle\-install\.1\.html\fR after running bundle package(1) \fIbundle\-package\.1\.html\fR, bundler will still connect to \fBrubygems\.org\fR to check whether a platform\-specific gem exists for any of the gems in \fBvendor/cache\fR\.
 .
diff --git a/lib/bundler/man/bundle-package.txt b/lib/bundler/man/bundle-package.txt
index f33d6a6..8894d5e 100644
--- a/lib/bundler/man/bundle-package.txt
+++ b/lib/bundler/man/bundle-package.txt
@@ -20,10 +20,16 @@ GIT AND PATH GEMS
        enabled via the --all option. Once  used,  the  --all  option  will  be
        remembered.
 
+SUPPORT FOR MULTIPLE PLATFORMS
+       When  using  gems that have different packages for different platforms,
+       Bundler 1.8 and newer support caching of gems for  other  platforms  in
+       vendor/cache.  This needs to be enabled via the --all-platforms option.
+       This setting will be remembered in your local bundler configuration.
+
 REMOTE FETCHING
-       By  default,  if you simply run bundle install(1) bundle-install.1.html
-       after running bundle  package(1)  bundle-package.1.html,  bundler  will
-       still  connect to rubygems.org to check whether a platform-specific gem
+       By default, if you simply run bundle  install(1)  bundle-install.1.html
+       after  running  bundle  package(1)  bundle-package.1.html, bundler will
+       still connect to rubygems.org to check whether a platform-specific  gem
        exists for any of the gems in vendor/cache.
 
        For instance, consider this Gemfile(5):
@@ -36,14 +42,14 @@ REMOTE FETCHING
 
 
 
-       If you run bundle package under C Ruby, bundler will retrieve the  ver-
-       sion  of  nokogiri  for the "ruby" platform. If you deploy to JRuby and
-       run bundle install, bundler is forced to check to see whether a	"java"
+       If  you run bundle package under C Ruby, bundler will retrieve the ver-
+       sion of nokogiri for the "ruby" platform. If you deploy	to  JRuby  and
+       run  bundle install, bundler is forced to check to see whether a "java"
        platformed nokogiri exists.
 
-       Even  though  the  nokogiri  gem  for  the Ruby platform is technically
+       Even though the nokogiri gem  for  the  Ruby  platform  is  technically
        acceptable on JRuby, it actually has a C extension that does not run on
-       JRuby.  As  a  result,  bundler	will,  by  default,  still  connect to
+       JRuby. As  a  result,  bundler  will,  by  default,  still  connect  to
        rubygems.org to check whether it has a version of one of your gems more
        specific to your platform.
 
@@ -51,17 +57,17 @@ REMOTE FETCHING
        (common) problem can happen when developing on Windows and deploying to
        Linux, or even when developing on OSX and deploying to Linux.
 
-       If  you know for sure that the gems packaged in vendor/cache are appro-
-       priate for the platform you are on, you can run bundle install  --local
-       to  skip  checking  for more appropriate gems, and just use the ones in
+       If you know for sure that the gems packaged in vendor/cache are	appro-
+       priate  for the platform you are on, you can run bundle install --local
+       to skip checking for more appropriate gems, and just use  the  ones  in
        vendor/cache.
 
-       One way to be sure that you have the right platformed versions  of  all
+       One  way  to be sure that you have the right platformed versions of all
        your gems is to run bundle package on an identical machine and check in
-       the gems. For instance, you can run  bundle  package  on  an  identical
-       staging	box during your staging process, and check in the vendor/cache
+       the  gems.  For	instance,  you	can run bundle package on an identical
+       staging box during your staging process, and check in the  vendor/cache
        before deploying to production.
 
 
 
-				   July 2014		     BUNDLE-PACKAGE(1)
+				   May 2015		     BUNDLE-PACKAGE(1)
diff --git a/lib/bundler/man/bundle-platform b/lib/bundler/man/bundle-platform
index a42b782..34e56da 100644
--- a/lib/bundler/man/bundle-platform
+++ b/lib/bundler/man/bundle-platform
@@ -1,7 +1,7 @@
 .\" generated with Ronn/v0.7.3
 .\" http://github.com/rtomayko/ronn/tree/0.7.3
 .
-.TH "BUNDLE\-PLATFORM" "1" "July 2014" "" ""
+.TH "BUNDLE\-PLATFORM" "1" "December 2014" "" ""
 .
 .SH "NAME"
 \fBbundle\-platform\fR \- Displays platform compatibility information
diff --git a/lib/bundler/man/bundle-platform.txt b/lib/bundler/man/bundle-platform.txt
index 9fd289b..2783302 100644
--- a/lib/bundler/man/bundle-platform.txt
+++ b/lib/bundler/man/bundle-platform.txt
@@ -54,4 +54,4 @@ OPTIONS
 
 
 
-				   July 2014		    BUNDLE-PLATFORM(1)
+				 December 2014		    BUNDLE-PLATFORM(1)
diff --git a/lib/bundler/man/bundle-update b/lib/bundler/man/bundle-update
index 78e8a5a..4fabc21 100644
--- a/lib/bundler/man/bundle-update
+++ b/lib/bundler/man/bundle-update
@@ -1,13 +1,13 @@
 .\" generated with Ronn/v0.7.3
 .\" http://github.com/rtomayko/ronn/tree/0.7.3
 .
-.TH "BUNDLE\-UPDATE" "1" "October 2014" "" ""
+.TH "BUNDLE\-UPDATE" "1" "May 2015" "" ""
 .
 .SH "NAME"
 \fBbundle\-update\fR \- Update your gems to the latest available versions
 .
 .SH "SYNOPSIS"
-\fBbundle update\fR \fI*gems\fR [\-\-source=NAME] [\-\-local]
+\fBbundle update\fR \fI*gems\fR [\-\-group=NAME] [\-\-source=NAME] [\-\-local]
 .
 .SH "DESCRIPTION"
 Update the gems specified (all gems, if none are specified), ignoring the previously installed gems specified in the \fBGemfile\.lock\fR\. In general, you should use bundle install(1) \fIbundle\-install\.1\.html\fR to install the same exact gems and versions across machines\.
@@ -18,6 +18,10 @@ You would use \fBbundle update\fR to explicitly update the version of a gem\.
 .SH "OPTIONS"
 .
 .TP
+\fB\-\-group=<name>\fR
+Only update the gems in the specified group\. For instance, you can update all gems in the development group with \fBbundle update \-\-group development\fR\. You can also call \fBbundle update rails \-\-group test\fR to update the rails gem and all gems in the test group, for example\.
+.
+.TP
 \fB\-\-source=<name>\fR
 The name of a \fB:git\fR or \fB:path\fR source used in the Gemfile(5)\. For instance, with a \fB:git\fR source of \fBhttp://github\.com/rails/rails\.git\fR, you would call \fBbundle update \-\-source rails\fR
 .
@@ -51,41 +55,44 @@ When you run bundle install(1) \fIbundle\-install\.1\.html\fR the first time, bu
 .
 .nf
 
-Fetching source index for https://rubygems\.org/
-Installing rake (10\.0\.2)
-Installing abstract (1\.0\.0)
-Installing activesupport (3\.0\.0\.rc)
-Installing builder (2\.1\.2)
-Installing i18n (0\.4\.1)
-Installing activemodel (3\.0\.0\.rc)
-Installing erubis (2\.6\.6)
-Installing rack (1\.2\.1)
-Installing rack\-mount (0\.6\.9)
-Installing rack\-test (0\.5\.4)
-Installing tzinfo (0\.3\.22)
-Installing actionpack (3\.0\.0\.rc)
-Installing mime\-types (1\.16)
-Installing polyglot (0\.3\.1)
-Installing treetop (1\.4\.8)
-Installing mail (2\.2\.5)
-Installing actionmailer (3\.0\.0\.rc)
-Installing arel (0\.4\.0)
-Installing activerecord (3\.0\.0\.rc)
-Installing activeresource (3\.0\.0\.rc)
-Installing bundler (1\.0\.0\.rc\.3)
-Installing nokogiri (1\.4\.3\.1) with native extensions
-Installing thor (0\.14\.0)
-Installing railties (3\.0\.0\.rc)
-Installing rails (3\.0\.0\.rc)
+Fetching gem metadata from https://rubygems\.org/\.\.\.\.\.\.\.\.\.
+Resolving dependencies\.\.\.
+Installing builder 2\.1\.2
+Installing abstract 1\.0\.0
+Installing rack 1\.2\.8
+Using bundler 1\.7\.6
+Installing rake 10\.4\.0
+Installing polyglot 0\.3\.5
+Installing mime\-types 1\.25\.1
+Installing i18n 0\.4\.2
+Installing mini_portile 0\.6\.1
+Installing tzinfo 0\.3\.42
+Installing rack\-mount 0\.6\.14
+Installing rack\-test 0\.5\.7
+Installing treetop 1\.4\.15
+Installing thor 0\.14\.6
+Installing activesupport 3\.0\.0\.rc
+Installing erubis 2\.6\.6
+Installing activemodel 3\.0\.0\.rc
+Installing arel 0\.4\.0
+Installing mail 2\.2\.20
+Installing activeresource 3\.0\.0\.rc
+Installing actionpack 3\.0\.0\.rc
+Installing activerecord 3\.0\.0\.rc
+Installing actionmailer 3\.0\.0\.rc
+Installing railties 3\.0\.0\.rc
+Installing rails 3\.0\.0\.rc
+Installing nokogiri 1\.6\.5
 
-Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed\.
+Bundle complete! 2 Gemfile dependencies, 26 gems total\.
+Use `bundle show [gemname]` to see where a bundled gem is installed\.
 .
 .fi
 .
 .IP "" 0
 .
 .P
-As you can see, even though you have just two gems in the Gemfile(5), your application actually needs 25 different gems in order to run\. Bundler remembers the exact versions it installed in \fBGemfile\.lock\fR\. The next time you run bundle install(1) \fIbundle\-install\.1\.html\fR, bundler skips the dependency resolution and installs the same gems as it installed last time\.
+As you can see, even though you have just two gems in the Gemfile(5), your application actually needs 26 different gems in order to run\. Bundler remembers the exact versions it installed in \fBGemfile\.lock\fR\. The next time you run bundle install(1) \fIbundle\-install\.1\.html\fR, bundler skips the dependency resolution and installs the same gems as it installed last time\.
 .
 .P
 After checking in the \fBGemfile\.lock\fR into version control and cloning it on another machine, running bundle install(1) \fIbundle\-install\.1\.html\fR will \fIstill\fR install the gems that you installed last time\. You don\'t need to worry that a new release of \fBerubis\fR or \fBmail\fR changes the gems you use\.
diff --git a/lib/bundler/man/bundle-update.txt b/lib/bundler/man/bundle-update.txt
index efc6476..b62cc06 100644
--- a/lib/bundler/man/bundle-update.txt
+++ b/lib/bundler/man/bundle-update.txt
@@ -6,7 +6,7 @@ NAME
        bundle-update - Update your gems to the latest available versions
 
 SYNOPSIS
-       bundle update *gems [--source=NAME] [--local]
+       bundle update *gems [--group=NAME] [--source=NAME] [--local]
 
 DESCRIPTION
        Update  the  gems specified (all gems, if none are specified), ignoring
@@ -17,6 +17,13 @@ DESCRIPTION
        You would use bundle update to explicitly update the version of a  gem.
 
 OPTIONS
+       --group=<name>
+	      Only  update  the gems in the specified group. For instance, you
+	      can update all gems in the development group with bundle	update
+	      --group  development.  You  can  also  call  bundle update rails
+	      --group test to update the rails gem and all gems  in  the  test
+	      group, for example.
+
        --source=<name>
 	      The  name  of a :git or :path source used in the Gemfile(5). For
 	      instance,       with	 a	  :git	      source	    of
@@ -49,39 +56,42 @@ UPDATING ALL GEMS
 
 
 
-	   Fetching source index for https://rubygems.org/
-	   Installing rake (10.0.2)
-	   Installing abstract (1.0.0)
-	   Installing activesupport (3.0.0.rc)
-	   Installing builder (2.1.2)
-	   Installing i18n (0.4.1)
-	   Installing activemodel (3.0.0.rc)
-	   Installing erubis (2.6.6)
-	   Installing rack (1.2.1)
-	   Installing rack-mount (0.6.9)
-	   Installing rack-test (0.5.4)
-	   Installing tzinfo (0.3.22)
-	   Installing actionpack (3.0.0.rc)
-	   Installing mime-types (1.16)
-	   Installing polyglot (0.3.1)
-	   Installing treetop (1.4.8)
-	   Installing mail (2.2.5)
-	   Installing actionmailer (3.0.0.rc)
-	   Installing arel (0.4.0)
-	   Installing activerecord (3.0.0.rc)
-	   Installing activeresource (3.0.0.rc)
-	   Installing bundler (1.0.0.rc.3)
-	   Installing nokogiri (1.4.3.1) with native extensions
-	   Installing thor (0.14.0)
-	   Installing railties (3.0.0.rc)
-	   Installing rails (3.0.0.rc)
-
-	   Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
+	   Fetching gem metadata from https://rubygems.org/.........
+	   Resolving dependencies...
+	   Installing builder 2.1.2
+	   Installing abstract 1.0.0
+	   Installing rack 1.2.8
+	   Using bundler 1.7.6
+	   Installing rake 10.4.0
+	   Installing polyglot 0.3.5
+	   Installing mime-types 1.25.1
+	   Installing i18n 0.4.2
+	   Installing mini_portile 0.6.1
+	   Installing tzinfo 0.3.42
+	   Installing rack-mount 0.6.14
+	   Installing rack-test 0.5.7
+	   Installing treetop 1.4.15
+	   Installing thor 0.14.6
+	   Installing activesupport 3.0.0.rc
+	   Installing erubis 2.6.6
+	   Installing activemodel 3.0.0.rc
+	   Installing arel 0.4.0
+	   Installing mail 2.2.20
+	   Installing activeresource 3.0.0.rc
+	   Installing actionpack 3.0.0.rc
+	   Installing activerecord 3.0.0.rc
+	   Installing actionmailer 3.0.0.rc
+	   Installing railties 3.0.0.rc
+	   Installing rails 3.0.0.rc
+	   Installing nokogiri 1.6.5
+
+	   Bundle complete! 2 Gemfile dependencies, 26 gems total.
+	   Use `bundle show [gemname]` to see where a bundled gem is installed.
 
 
 
        As  you	can see, even though you have just two gems in the Gemfile(5),
-       your application actually needs 25 different  gems  in  order  to  run.
+       your application actually needs 26 different  gems  in  order  to  run.
        Bundler	remembers the exact versions it installed in Gemfile.lock. The
        next time you  run  bundle  install(1)  bundle-install.1.html,  bundler
        skips  the  dependency  resolution  and	installs  the  same gems as it
@@ -208,4 +218,4 @@ RECOMMENDED WORKFLOW
 
 
 
-				 October 2014		      BUNDLE-UPDATE(1)
+				   May 2015		      BUNDLE-UPDATE(1)
diff --git a/lib/bundler/man/bundle.txt b/lib/bundler/man/bundle.txt
index ced1c31..a57c1c9 100644
--- a/lib/bundler/man/bundle.txt
+++ b/lib/bundler/man/bundle.txt
@@ -80,6 +80,12 @@ UTILITIES
        bundle clean(1)
 	      Cleans up unused gems in your bundler directory
 
+PLUGINS
+       When  running a command that isn't listed in PRIMARY COMMANDS or UTILI-
+       TIES, Bundler will try  to  find  an  executable  on  your  path  named
+       bundler-<command>  and  execute it, passing down any extra arguments to
+       it.
+
 OBSOLETE
        These commands are obsolete and should no longer be used
 
@@ -94,4 +100,4 @@ OBSOLETE
 
 
 
-				 October 2014			     BUNDLE(1)
+				   May 2015			     BUNDLE(1)
diff --git a/lib/bundler/man/gemfile.5 b/lib/bundler/man/gemfile.5
index 89710e6..7aed26c 100644
--- a/lib/bundler/man/gemfile.5
+++ b/lib/bundler/man/gemfile.5
@@ -1,7 +1,7 @@
 .\" generated with Ronn/v0.7.3
 .\" http://github.com/rtomayko/ronn/tree/0.7.3
 .
-.TH "GEMFILE" "5" "October 2014" "" ""
+.TH "GEMFILE" "5" "May 2015" "" ""
 .
 .SH "NAME"
 \fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
@@ -41,7 +41,7 @@ Some gem sources require a username and password\. Use \fBbundle config\fR to se
 .
 .nf
 
-bundle config https://gems\.example\.com/ user:password
+bundle config gems\.example\.com user:password
 .
 .fi
 .
@@ -256,6 +256,10 @@ C Ruby (MRI) or Rubinius, but \fBNOT\fR Windows
 \fIruby\fR \fBAND\fR version 2\.1
 .
 .TP
+\fBruby_22\fR
+\fIruby\fR \fBAND\fR version 2\.2
+.
+.TP
 \fBmri\fR
 Same as \fIruby\fR, but not Rubinius
 .
@@ -276,6 +280,10 @@ Same as \fIruby\fR, but not Rubinius
 \fImri\fR \fBAND\fR version 2\.1
 .
 .TP
+\fBmri_22\fR
+\fImri\fR \fBAND\fR version 2\.2
+.
+.TP
 \fBrbx\fR
 Same as \fIruby\fR, but only Rubinius (not MRI)
 .
@@ -308,6 +316,10 @@ Windows 32 bit \'mingw32\' platform (aka RubyInstaller)
 \fImingw\fR \fBAND\fR version 2\.1
 .
 .TP
+\fBmingw_22\fR
+\fImingw\fR \fBAND\fR version 2\.2
+.
+.TP
 \fBx64_mingw\fR
 Windows 64 bit \'mingw32\' platform (aka RubyInstaller x64)
 .
@@ -319,6 +331,10 @@ Windows 64 bit \'mingw32\' platform (aka RubyInstaller x64)
 \fBx64_mingw_21\fR
 \fIx64_mingw\fR \fBAND\fR version 2\.1
 .
+.TP
+\fBx64_mingw_22\fR
+\fIx64_mingw\fR \fBAND\fR version 2\.2
+.
 .P
 As with groups, you can specify one or more platforms:
 .
@@ -360,20 +376,28 @@ Bundler will search for child dependencies of this gem by first looking in the s
 Selecting a specific source repository this way also suppresses the ambiguous gem warning described above in \fIGLOBAL SOURCES (#source)\fR\.
 .
 .SS "GIT (:git)"
-If necessary, you can specify that a gem is located at a particular git repository\. The repository can be public (\fBhttp://github\.com/rails/rails\.git\fR) or private (\fBgit at github\.com:rails/rails\.git\fR)\. If the repository is private, the user that you use to run \fBbundle install\fR \fBMUST\fR have the appropriate keys available in their \fB$HOME/\.ssh\fR\.
+If necessary, you can specify that a gem is located at a particular git repository using the \fB:git\fR parameter\. The repository can be accessed via several protocols:
 .
-.P
-Git repositories are specified using the \fB:git\fR parameter\. The \fBgroup\fR, \fBplatforms\fR, and \fBrequire\fR options are available and behave exactly the same as they would for a normal gem\.
+.TP
+\fBHTTP(S)\fR
+gem "rails", :git => "https://github\.com/rails/rails\.git"
 .
-.IP "" 4
+.TP
+\fBSSH\fR
+gem "rails", :git => "git at github\.com:rails/rails\.git"
 .
-.nf
-
+.TP
+\fBgit\fR
 gem "rails", :git => "git://github\.com/rails/rails\.git"
 .
-.fi
+.P
+If using SSH, the user that you use to run \fBbundle install\fR \fBMUST\fR have the appropriate keys available in their \fB$HOME/\.ssh\fR\.
 .
-.IP "" 0
+.P
+\fBNOTE\fR: \fBhttp://\fR and \fBgit://\fR URLs should be avoided if at all possible\. These protocols are unauthenticated, so a man\-in\-the\-middle attacker can deliver malicious code and compromise your system\. HTTPS and SSH are strongly preferred\.
+.
+.P
+The \fBgroup\fR, \fBplatforms\fR, and \fBrequire\fR options are available and behave exactly the same as they would for a normal gem\.
 .
 .P
 A git repository \fBSHOULD\fR have at least one file, at the root of the directory containing the gem, with the extension \fB\.gemspec\fR\. This file \fBMUST\fR contain a valid gem specification, as expected by the \fBgem build\fR command\.
@@ -388,7 +412,7 @@ If a git repository does have a \fB\.gemspec\fR for the gem you attached it to,
 .
 .nf
 
-gem "rails", "2\.3\.8", :git => "git://github\.com/rails/rails\.git"
+gem "rails", "2\.3\.8", :git => "https://github\.com/rails/rails\.git"
 # bundle install will fail, because the \.gemspec in the rails
 # repository\'s master branch specifies version 3\.0\.0
 .
@@ -432,7 +456,37 @@ If a git repository contains multiple \fB\.gemspecs\fR, each \fB\.gemspec\fR rep
 .P
 To install a gem located in a git repository, bundler changes to the directory containing the gemspec, runs \fBgem build name\.gemspec\fR and then installs the resulting gem\. The \fBgem build\fR command, which comes standard with Rubygems, evaluates the \fB\.gemspec\fR in the context of the directory in which it is located\.
 .
+.SS "GIT SOURCE (:git_source)"
+A custom git source can be defined via the \fBgit_source\fR method\. Provide the source\'s name as an argument, and a block which receives a single argument and interpolates it into a string to return the full repo address:
+.
+.IP "" 4
+.
+.nf
+
+git_source(:stash){ |repo_name| "https://stash\.corp\.acme\.pl/#{repo_name}\.git" }
+gem \'rails\', :stash => \'forks/rails\'
+.
+.fi
+.
+.IP "" 0
+.
+.P
+In addition, if you wish to choose a specific branch:
+.
+.IP "" 4
+.
+.nf
+
+gem "rails", :stash => "forks/rails", :branch => "branch_name"
+.
+.fi
+.
+.IP "" 0
+.
 .SS "GITHUB (:github)"
+\fBNOTE\fR: This shorthand should be avoided until Bundler 2\.0, since it currently expands to an insecure \fBgit://\fR URL\. This allows a man\-in\-the\-middle attacker to compromise your system\.
+.
+.P
 If the git repository you want to use is hosted on GitHub and is public, you can use the :github shorthand to specify just the github username and repository name (without the trailing "\.git"), separated by a slash\. If both the username and repository name are the same, you can omit one\.
 .
 .IP "" 4
@@ -460,18 +514,67 @@ gem "rails", :git => "git://github\.com/rails/rails\.git"
 .IP "" 0
 .
 .P
-In addition, if you wish to choose a specific branch:
+Since the \fBgithub\fR method is a specialization of \fBgit_source\fR, it accepts a \fB:branch\fR named argument\.
+.
+.SS "GIST (:gist)"
+If the git repository you want to use is hosted as a Github Gist and is public, you can use the :gist shorthand to specify just the gist identifier (without the trailing "\.git")\.
+.
+.IP "" 4
+.
+.nf
+
+gem "the_hatch", :gist => "4815162342"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Is equivalent to:
+.
+.IP "" 4
+.
+.nf
+
+gem "the_hatch", :git => "https://gist\.github\.com/4815162342\.git"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Since the \fBgist\fR method is a specialization of \fBgit_source\fR, it accepts a \fB:branch\fR named argument\.
+.
+.SS "BITBUCKET (:bitbucket)"
+If the git repository you want to use is hosted on Bitbucket and is public, you can use the :bitbucket shorthand to specify just the bitbucket username and repository name (without the trailing "\.git"), separated by a slash\. If both the username and repository name are the same, you can omit one\.
+.
+.IP "" 4
+.
+.nf
+
+gem "rails", :bitbucket => "rails/rails"
+gem "rails", :bitbucket => "rails"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Are both equivalent to
 .
 .IP "" 4
 .
 .nf
 
-gem "rails", :github => "rails/rails", :branch => "branch_name"
+gem "rails", :git => "https://rails@bitbucket\.org/rails/rails\.git"
 .
 .fi
 .
 .IP "" 0
 .
+.P
+Since the \fBbitbucket\fR method is a specialization of \fBgit_source\fR, it accepts a \fB:branch\fR named argument\.
+.
 .SS "PATH (:path)"
 You can specify that a gem is located in a particular location on the file system\. Relative paths are resolved relative to the directory containing the \fBGemfile\fR\.
 .
@@ -491,6 +594,22 @@ gem "rails", :path => "vendor/rails"
 .
 .IP "" 0
 .
+.P
+If you would like to use multiple local gems directly from the filesystem, you can set a global \fBpath\fR option to the path containing the gem\'s files\. This will automatically load gemspec files from subdirectories\.
+.
+.IP "" 4
+.
+.nf
+
+path \'components\' do
+  gem \'admin_ui\'
+  gem \'public_ui\'
+end
+.
+.fi
+.
+.IP "" 0
+.
 .SH "BLOCK FORM OF SOURCE, GIT, PATH, GROUP and PLATFORMS"
 The \fB:source\fR, \fB:git\fR, \fB:path\fR, \fB:group\fR, and \fB:platforms\fR options may be applied to a group of gems by using block form\.
 .
@@ -503,7 +622,7 @@ source "https://gems\.example\.com" do
   gem "another_internal_gem"
 end
 
-git "git://github\.com/rails/rails\.git" do
+git "https://github\.com/rails/rails\.git" do
   gem "activesupport"
   gem "actionpack"
 end
diff --git a/lib/bundler/man/gemfile.5.txt b/lib/bundler/man/gemfile.5.txt
index fb428f7..f014877 100644
--- a/lib/bundler/man/gemfile.5.txt
+++ b/lib/bundler/man/gemfile.5.txt
@@ -48,7 +48,7 @@ GLOBAL SOURCES (#source)
 
 
 
-	   bundle config https://gems.example.com/ user:password
+	   bundle config gems.example.com user:password
 
 
 
@@ -234,6 +234,9 @@ GEMS (#gem)
        ruby_21
 	      ruby AND version 2.1
 
+       ruby_22
+	      ruby AND version 2.2
+
        mri    Same as ruby, but not Rubinius
 
        mri_18 mri AND version 1.8
@@ -244,6 +247,8 @@ GEMS (#gem)
 
        mri_21 mri AND version 2.1
 
+       mri_22 mri AND version 2.2
+
        rbx    Same as ruby, but only Rubinius (not MRI)
 
        jruby  JRuby
@@ -264,6 +269,9 @@ GEMS (#gem)
        mingw_21
 	      mingw AND version 2.1
 
+       mingw_22
+	      mingw AND version 2.2
+
        x64_mingw
 	      Windows 64 bit 'mingw32' platform (aka RubyInstaller x64)
 
@@ -273,6 +281,9 @@ GEMS (#gem)
        x64_mingw_21
 	      x64_mingw AND version 2.1
 
+       x64_mingw_22
+	      x64_mingw AND version 2.2
+
        As with groups, you can specify one or more platforms:
 
 
@@ -311,21 +322,26 @@ GEMS (#gem)
 
    GIT (:git)
        If necessary, you can specify that a gem is located at a particular git
-       repository.	  The	    repository	     can       be	public
-       (http://github.com/rails/rails.git)	       or	       private
-       (git at github.com:rails/rails.git).  If  the  repository  is private, the
-       user that you use to run bundle install MUST have the appropriate  keys
-       available in their $HOME/.ssh.
+       repository using the :git parameter. The repository can be accessed via
+       several protocols:
 
-       Git  repositories  are  specified  using the :git parameter. The group,
-       platforms, and require options are available  and  behave  exactly  the
-       same as they would for a normal gem.
+       HTTP(S)
+	      gem "rails", :git => "https://github.com/rails/rails.git"
 
+       SSH    gem "rails", :git => "git at github.com:rails/rails.git"
 
+       git    gem "rails", :git => "git://github.com/rails/rails.git"
 
-	   gem "rails", :git => "git://github.com/rails/rails.git"
+       If using SSH, the user that you use to run bundle install MUST have the
+       appropriate keys available in their $HOME/.ssh.
 
+       NOTE:  http://  and  git://  URLs should be avoided if at all possible.
+       These protocols are unauthenticated, so	a  man-in-the-middle  attacker
+       can  deliver  malicious	code and compromise your system. HTTPS and SSH
+       are strongly preferred.
 
+       The group, platforms, and require  options  are	available  and	behave
+       exactly the same as they would for a normal gem.
 
        A  git  repository  SHOULD  have  at least one file, at the root of the
        directory containing the gem, with the extension  .gemspec.  This  file
@@ -344,7 +360,7 @@ GEMS (#gem)
 
 
 
-	   gem "rails", "2.3.8", :git => "git://github.com/rails/rails.git"
+	   gem "rails", "2.3.8", :git => "https://github.com/rails/rails.git"
 	   # bundle install will fail, because the .gemspec in the rails
 	   # repository's master branch specifies version 3.0.0
 
@@ -386,11 +402,36 @@ GEMS (#gem)
        with  Rubygems,	evaluates the .gemspec in the context of the directory
        in which it is located.
 
+   GIT SOURCE (:git_source)
+       A custom git source can be defined via the git_source  method.  Provide
+       the  source's  name as an argument, and a block which receives a single
+       argument and interpolates it into a string  to  return  the  full  repo
+       address:
+
+
+
+	   git_source(:stash){ |repo_name| "https://stash.corp.acme.pl/#{repo_name}.git" }
+	   gem 'rails', :stash => 'forks/rails'
+
+
+
+       In addition, if you wish to choose a specific branch:
+
+
+
+	   gem "rails", :stash => "forks/rails", :branch => "branch_name"
+
+
+
    GITHUB (:github)
-       If the git repository you want to use is hosted on GitHub and  is  pub-
+       NOTE: This shorthand should be avoided until Bundler 2.0, since it cur-
+       rently expands to an insecure git:// URL. This allows a man-in-the-mid-
+       dle attacker to compromise your system.
+
+       If  the	git repository you want to use is hosted on GitHub and is pub-
        lic, you can use the :github shorthand to specify just the github user-
-       name and repository name (without the trailing ".git"), separated by  a
-       slash.  If  both the username and repository name are the same, you can
+       name  and repository name (without the trailing ".git"), separated by a
+       slash. If both the username and repository name are the same,  you  can
        omit one.
 
 
@@ -408,13 +449,55 @@ GEMS (#gem)
 
 
 
-       In addition, if you wish to choose a specific branch:
+       Since the github method is a specialization of git_source, it accepts a
+       :branch named argument.
+
+   GIST (:gist)
+       If the git repository you want to use is hosted as a Github Gist and is
+       public,	you can use the :gist shorthand to specify just the gist iden-
+       tifier (without the trailing ".git").
+
+
+
+	   gem "the_hatch", :gist => "4815162342"
+
 
 
+       Is equivalent to:
 
-	   gem "rails", :github => "rails/rails", :branch => "branch_name"
 
 
+	   gem "the_hatch", :git => "https://gist.github.com/4815162342.git"
+
+
+
+       Since the gist method is a specialization of git_source, it  accepts  a
+       :branch named argument.
+
+   BITBUCKET (:bitbucket)
+       If  the	git  repository  you want to use is hosted on Bitbucket and is
+       public, you can use the :bitbucket shorthand to specify just  the  bit-
+       bucket username and repository name (without the trailing ".git"), sep-
+       arated by a slash. If both the username and  repository	name  are  the
+       same, you can omit one.
+
+
+
+	   gem "rails", :bitbucket => "rails/rails"
+	   gem "rails", :bitbucket => "rails"
+
+
+
+       Are both equivalent to
+
+
+
+	   gem "rails", :git => "https://rails@bitbucket.org/rails/rails.git"
+
+
+
+       Since  the  bitbucket  method  is  a  specialization  of git_source, it
+       accepts a :branch named argument.
 
    PATH (:path)
        You can specify that a gem is located in a particular location  on  the
@@ -434,6 +517,19 @@ GEMS (#gem)
 
 
 
+       If you would like to use multiple local gems directly from the filesys-
+       tem, you can set a global path option to the path containing the  gem's
+       files.  This will automatically load gemspec files from subdirectories.
+
+
+
+	   path 'components' do
+	     gem 'admin_ui'
+	     gem 'public_ui'
+	   end
+
+
+
 BLOCK FORM OF SOURCE, GIT, PATH, GROUP and PLATFORMS
        The :source, :git, :path, :group, and :platforms options may be applied
        to a group of gems by using block form.
@@ -445,7 +541,7 @@ BLOCK FORM OF SOURCE, GIT, PATH, GROUP and PLATFORMS
 	     gem "another_internal_gem"
 	   end
 
-	   git "git://github.com/rails/rails.git" do
+	   git "https://github.com/rails/rails.git" do
 	     gem "activesupport"
 	     gem "actionpack"
 	   end
@@ -462,41 +558,41 @@ BLOCK FORM OF SOURCE, GIT, PATH, GROUP and PLATFORMS
 
 
 
-       In the case of the git block form, the :ref, :branch, :tag,  and  :sub-
-       modules	options  may  be passed to the git method, and all gems in the
+       In  the	case of the git block form, the :ref, :branch, :tag, and :sub-
+       modules options may be passed to the git method, and all  gems  in  the
        block will inherit those options.
 
 GEMSPEC (#gemspec)
        If you wish to use Bundler to help install dependencies for a gem while
-       it  is being developed, use the gemspec method to pull in the dependen-
+       it is being developed, use the gemspec method to pull in the  dependen-
        cies listed in the .gemspec file.
 
        The gemspec method adds any runtime dependencies as gem requirements in
-       the  default  group.  It  also  adds  development  dependencies	as gem
-       requirements in the development group. Finally, it adds a gem  require-
+       the default  group.  It	also  adds  development  dependencies  as  gem
+       requirements  in the development group. Finally, it adds a gem require-
        ment on your project (:path => '.'). In conjunction with Bundler.setup,
        this allows you to require project files in your test code as you would
-       if  the	project  were  installed as a gem; you need not manipulate the
+       if the project were installed as a gem; you  need  not  manipulate  the
        load path manually or require project files via relative paths.
 
-       The gemspec  method  supports  optional	:path,	:name,	and  :develop-
+       The  gemspec  method  supports  optional  :path,  :name,  and :develop-
        ment_group options, which control where bundler looks for the .gemspec,
-       what named .gemspec it uses (if more than one is  present),  and  which
+       what  named  .gemspec  it uses (if more than one is present), and which
        group development dependencies are included in.
 
 SOURCE PRIORITY
-       When  attempting  to locate a gem to satisfy a gem requirement, bundler
+       When attempting to locate a gem to satisfy a gem  requirement,  bundler
        uses the following priority order:
 
        1.  The source explicitly attached to the gem (using :source, :path, or
 	   :git)
 
        2.  For implicit gems (dependencies of explicit gems), any source, git,
-	   or path repository declared on the parent. This results in  bundler
-	   prioritizing  the  ActiveSupport  gem from the Rails git repository
+	   or  path repository declared on the parent. This results in bundler
+	   prioritizing the ActiveSupport gem from the	Rails  git  repository
 	   over ones from rubygems.org
 
-       3.  The sources specified  via  global  source  lines,  searching  each
+       3.  The	sources  specified  via  global  source  lines, searching each
 	   source in your Gemfile from last added to first added.
 
 
@@ -504,4 +600,4 @@ SOURCE PRIORITY
 
 
 
-				 October 2014			    GEMFILE(5)
+				   May 2015			    GEMFILE(5)
diff --git a/lib/bundler/match_platform.rb b/lib/bundler/match_platform.rb
index 523dafb..e6a33ec 100644
--- a/lib/bundler/match_platform.rb
+++ b/lib/bundler/match_platform.rb
@@ -7,7 +7,7 @@ module Bundler
     def match_platform(p)
       Gem::Platform::RUBY == platform or
       platform.nil? or p == platform or
-      generic(Gem::Platform.new(platform)) == p
+      generic(Gem::Platform.new(platform)) === p
     end
   end
 end
diff --git a/lib/bundler/parallel_workers.rb b/lib/bundler/parallel_workers.rb
deleted file mode 100644
index b28f630..0000000
--- a/lib/bundler/parallel_workers.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-require 'thread'
-
-require "bundler/parallel_workers/worker"
-
-module Bundler
-  module ParallelWorkers
-    autoload :UnixWorker, "bundler/parallel_workers/unix_worker"
-    autoload :ThreadWorker, "bundler/parallel_workers/thread_worker"
-
-    def self.worker_pool(size, job)
-      if Bundler.current_ruby.mswin? || Bundler.current_ruby.jruby? || Bundler.current_ruby.rbx?
-        ThreadWorker.new(size, job)
-      else
-        UnixWorker.new(size, job)
-      end
-    end
-  end
-end
diff --git a/lib/bundler/parallel_workers/thread_worker.rb b/lib/bundler/parallel_workers/thread_worker.rb
deleted file mode 100644
index ef2c9ec..0000000
--- a/lib/bundler/parallel_workers/thread_worker.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-module Bundler
-  module ParallelWorkers
-    class ThreadWorker < Worker
-
-      private
-
-      # On platforms where fork is not available
-      # use Threads for parallely downloading gems
-      #
-      # @param size [Integer] Size of thread worker pool
-      # @param func [Proc] Job to be run inside thread worker pool
-      def prepare_workers(size, func)
-        @threads = size.times.map do |i|
-          Thread.start do
-            loop do
-              obj = @request_queue.deq
-              break if obj.equal? POISON
-              begin
-                @response_queue.enq func.call(obj, i)
-              rescue Exception => e
-                @response_queue.enq(WrappedException.new(e))
-              end
-            end
-          end
-        end
-      end
-
-    end
-  end
-end
diff --git a/lib/bundler/parallel_workers/unix_worker.rb b/lib/bundler/parallel_workers/unix_worker.rb
deleted file mode 100644
index 94a07bf..0000000
--- a/lib/bundler/parallel_workers/unix_worker.rb
+++ /dev/null
@@ -1,101 +0,0 @@
-module Bundler
-  module ParallelWorkers
-    # UnixWorker is used only on platforms where fork is available. The way
-    # this code works is, it forks a preconfigured number of workers and then
-    # It starts preconfigured number of threads that write to the connected pipe.
-    class UnixWorker < Worker
-
-      class JobHandler < Struct.new(:pid, :io_r, :io_w)
-        def work(obj)
-          Marshal.dump obj, io_w
-          Marshal.load io_r
-        rescue IOError, Errno::EPIPE
-          nil
-        end
-      end
-
-      def initialize(size, job)
-        # Close the persistent connections for the main thread before forking
-        Net::HTTP::Persistent.new('bundler', :ENV).shutdown
-        super
-      end
-
-      private
-
-      # Start forked workers for downloading gems. This version of worker
-      # is only used on platforms where fork is available.
-      #
-      # @param size [Integer] Size of worker pool
-      # @param func [Proc] Job that should be executed in the worker
-      def prepare_workers(size, func)
-        @workers = size.times.map do |num|
-          child_read, parent_write = IO.pipe
-          parent_read, child_write = IO.pipe
-
-          pid = Process.fork do
-            begin
-              parent_read.close
-              parent_write.close
-
-              while !child_read.eof?
-                obj = Marshal.load child_read
-                Marshal.dump func.call(obj, num), child_write
-              end
-            rescue Exception => e
-              begin
-                Marshal.dump WrappedException.new(e), child_write
-              rescue Errno::EPIPE
-                nil
-              end
-            ensure
-              child_read.close
-              child_write.close
-            end
-          end
-
-          child_read.close
-          child_write.close
-          JobHandler.new pid, parent_read, parent_write
-        end
-      end
-
-      # Start the threads whose job is basically to wait for incoming messages
-      # on request queue and write that message to the connected pipe. Also retrieve
-      # messages from child worker via connected pipe and write the message to response queue
-      #
-      # @param size [Integer] Number of threads to be started
-      def prepare_threads(size)
-        @threads = size.times.map do |i|
-          Thread.start do
-            worker = @workers[i]
-            loop do
-              obj = @request_queue.deq
-              break if obj.equal? POISON
-              @response_queue.enq worker.work(obj)
-            end
-          end
-        end
-      end
-
-      # Kill the forked workers by sending SIGINT to them
-      def stop_workers
-        @workers.each do |worker|
-          worker.io_r.close unless worker.io_r.closed?
-          worker.io_w.close unless worker.io_w.closed?
-          begin
-            Process.kill :INT, worker.pid
-          rescue Errno::ESRCH
-            nil
-          end
-        end
-        @workers.each do |worker|
-          begin
-            Process.waitpid worker.pid
-          rescue Errno::ECHILD
-            nil
-          end
-        end
-      end
-    end
-  end
-end
diff --git a/lib/bundler/parallel_workers/worker.rb b/lib/bundler/parallel_workers/worker.rb
deleted file mode 100644
index 0e101d1..0000000
--- a/lib/bundler/parallel_workers/worker.rb
+++ /dev/null
@@ -1,69 +0,0 @@
-module Bundler
-  module ParallelWorkers
-    class Worker
-      POISON = Object.new
-
-      class WrappedException < StandardError
-        attr_reader :exception
-        def initialize(exn)
-          @exception = exn
-        end
-      end
-
-      # Creates a worker pool of specified size
-      #
-      # @param size [Integer] Size of pool
-      # @param func [Proc] job to run in inside the worker pool
-      def initialize(size, func)
-        @request_queue = Queue.new
-        @response_queue = Queue.new
-        prepare_workers size, func
-        prepare_threads size
-        trap("INT") { @threads.each {|i| i.exit }; stop_workers; exit 1 }
-      end
-
-      # Enqueue a request to be executed in the worker pool
-      #
-      # @param obj [String] mostly it is name of spec that should be downloaded
-      def enq(obj)
-        @request_queue.enq obj
-      end
-
-      # Retrieves results of job function being executed in worker pool
-      def deq
-        result = @response_queue.deq
-        if result.is_a?(WrappedException)
-          raise result.exception
-        end
-        result
-      end
-
-      # Stop the forked workers and started threads
-      def stop
-        stop_threads
-        stop_workers
-      end
-
-      private
-      # Stop the worker threads by sending a poison object down the request queue
-      # so as worker threads after retrieving it, shut themselves down
-      def stop_threads
-        @threads.each do
-          @request_queue.enq POISON
-        end
-        @threads.each do |thread|
-          thread.join
-        end
-      end
-
-      # To be overridden by child classes
-      def prepare_threads(size)
-      end
-
-      # To be overridden by child classes
-      def stop_workers
-      end
-
-    end
-  end
-end
diff --git a/lib/bundler/resolver.rb b/lib/bundler/resolver.rb
index 7c4a104..5ec46ac 100644
--- a/lib/bundler/resolver.rb
+++ b/lib/bundler/resolver.rb
@@ -1,27 +1,73 @@
 require 'set'
+
 # This is the latest iteration of the gem dependency resolving algorithm. As of now,
 # it can resolve (as a success or failure) any set of gem dependencies we throw at it
 # in a reasonable amount of time. The most iterations I've seen it take is about 150.
 # The actual implementation of the algorithm is not as good as it could be yet, but that
 # can come later.
 
-# Extending Gem classes to add necessary tracking information
-module Gem
-  class Specification
-    def required_by
-      @required_by ||= []
-    end
-  end
-  class Dependency
-    def required_by
-      @required_by ||= []
-    end
-  end
-end
-
 module Bundler
   class Resolver
 
+    require 'bundler/vendored_molinillo'
+
+    class Molinillo::VersionConflict
+      def clean_req(req)
+        if req.to_s.include?(">= 0")
+          req.to_s.gsub(/ \(.*?\)$/, '')
+        else
+          req.to_s.gsub(/\, (runtime|development)\)$/, ')')
+        end
+      end
+
+      def message
+        conflicts.values.flatten.reduce('') do |o, conflict|
+          o << %(Bundler could not find compatible versions for gem "#{conflict.requirement.name}":\n)
+          if conflict.locked_requirement
+            o << %(  In snapshot (Gemfile.lock):\n)
+            o << %(    #{clean_req conflict.locked_requirement}\n)
+            o << %(\n)
+          end
+          o << %(  In Gemfile:\n)
+          o << conflict.requirement_trees.map do |tree|
+            t = ''
+            depth = 2
+            tree.each do |req|
+              t << '  ' * depth << %(#{clean_req req})
+              t << %( depends on) unless tree[-1] == req
+              t << %(\n)
+              depth += 1
+            end
+            t
+          end.join("\n")
+
+          if conflict.requirement.name == 'bundler'
+            o << %(\n  Current Bundler version:\n    bundler (#{Bundler::VERSION}))
+            other_bundler_required = !conflict.requirement.requirement.satisfied_by?(Gem::Version.new Bundler::VERSION)
+          end
+
+          if conflict.requirement.name == "bundler" && other_bundler_required
+            o << "\n"
+            o << "This Gemfile requires a different version of Bundler.\n"
+            o << "Perhaps you need to update Bundler by running `gem install bundler`?\n"
+          end
+          if conflict.locked_requirement
+            o << "\n"
+            o << %(Running `bundle update` will rebuild your snapshot from scratch, using only\n)
+            o << %(the gems in your Gemfile, which may resolve the conflict.\n)
+          elsif !conflict.existing
+            if conflict.requirement_trees.first.size > 1
+              o << "Could not find gem '#{clean_req(conflict.requirement)}', which is required by "
+              o << "gem '#{clean_req(conflict.requirement_trees.first[-2])}', in any of the sources."
+            else
+              o << "Could not find gem '#{clean_req(conflict.requirement)} in any of the sources\n"
+            end
+          end
+          o
+        end
+      end
+    end
+
     ALL = Bundler::Dependency::PLATFORM_MAP.values.uniq.freeze
 
     class SpecGroup < Array
@@ -65,8 +111,10 @@ module Bundler
 
       def activate_platform(platform)
         unless @activated.include?(platform)
-          @activated << platform
-          return __dependencies[platform] || []
+          if for?(platform)
+            @activated << platform
+            return __dependencies[platform] || []
+          end
         end
         []
       end
@@ -91,6 +139,14 @@ module Bundler
         "#{name} (#{version})"
       end
 
+      def dependencies_for_activated_platforms
+        @activated.map { |p| __dependencies[p] }.flatten
+      end
+
+      def platforms_for_dependency_named(dependency)
+        __dependencies.select { |p, deps| deps.map(&:name).include? dependency }.keys
+      end
+
     private
 
       def __dependencies
@@ -110,8 +166,6 @@ module Bundler
       end
     end
 
-    attr_reader :errors, :started_at, :iteration_rate, :iteration_counter
-
     # Figures out the best possible configuration of gems that satisfies
     # the list of passed dependencies and any child dependencies without
     # causing any gem activation errors.
@@ -123,276 +177,85 @@ module Bundler
     # <GemBundle>,nil:: If the list of dependencies can be resolved, a
     #   collection of gemspecs is returned. Otherwise, nil is returned.
     def self.resolve(requirements, index, source_requirements = {}, base = [])
-      Bundler.ui.info "Resolving dependencies...", false
       base = SpecSet.new(base) unless base.is_a?(SpecSet)
       resolver = new(index, source_requirements, base)
       result = resolver.start(requirements)
-      Bundler.ui.info "" # new line now that dots are done
       SpecSet.new(result)
-    rescue => e
-      Bundler.ui.info "" # new line before the error
-      raise e
-    end
-
-    def initialize(index, source_requirements, base)
-      @errors               = {}
-      @base                 = base
-      @index                = index
-      @deps_for             = {}
-      @missing_gems         = Hash.new(0)
-      @source_requirements  = source_requirements
-      @iteration_counter    = 0
-      @started_at           = Time.now
     end
 
-    def debug
-      if ENV['DEBUG_RESOLVER']
-        debug_info = yield
-        debug_info = debug_info.inspect unless debug_info.is_a?(String)
-        $stderr.puts debug_info
-      end
-    end
 
-    def successify(activated)
-      activated.values.map { |s| s.to_specs }.flatten.compact
+    def initialize(index, source_requirements, base)
+      @index = index
+      @source_requirements = source_requirements
+      @base = base
+      @resolver = Molinillo::Resolver.new(self, self)
+      @search_for = {}
+      @prereleases_cache = Hash.new { |h,k| h[k] = k.prerelease? }
+      @base_dg = Molinillo::DependencyGraph.new
+      @base.each { |ls| @base_dg.add_root_vertex ls.name, Dependency.new(ls.name, ls.version) }
     end
 
-    def start(reqs)
-      activated = {}
-      @gems_size = Hash[reqs.map { |r| [r, gems_size(r)] }]
-
-      resolve(reqs, activated)
+    def start(requirements)
+      verify_gemfile_dependencies_are_found!(requirements)
+      dg = @resolver.resolve(requirements, @base_dg)
+      dg.map(&:payload).map(&:to_specs).flatten
+    rescue Molinillo::VersionConflict => e
+      raise VersionConflict.new(e.conflicts.keys.uniq, e.message)
+    rescue Molinillo::CircularDependencyError => e
+      names = e.dependencies.sort_by(&:name).map { |d| "gem '#{d.name}'"}
+      raise CyclicDependencyError, "Your Gemfile requires gems that depend" \
+        " on each other, creating an infinite loop. Please remove" \
+        " #{names.count > 1 ? 'either ' : '' }#{names.join(' or ')}" \
+        " and try again."
     end
 
-    class State < Struct.new(:reqs, :activated, :requirement, :possibles, :depth, :conflicts)
-      def name
-        requirement.name
-      end
-    end
+    include Molinillo::UI
 
-    def handle_conflict(current, states, existing=nil)
-      until current.nil? && existing.nil?
-        current_state = find_state(current, states)
-        existing_state = find_state(existing, states)
-        return current if state_any?(current_state)
-        return existing if state_any?(existing_state)
-        existing = existing.required_by.last if existing
-        current = current.required_by.last if current
+    # Conveys debug information to the user.
+    #
+    # @param [Integer] depth the current depth of the resolution process.
+    # @return [void]
+    def debug(depth = 0)
+      if debug?
+        debug_info = yield
+        debug_info = debug_info.inspect unless debug_info.is_a?(String)
+        STDERR.puts debug_info.split("\n").map { |s| '  ' * depth + s }
       end
     end
 
-    def state_any?(state)
-      state && state.possibles.any?
-    end
-
-    def find_state(current, states)
-      states.detect { |i| current && current.name == i.name }
-    end
-
-    def other_possible?(conflict, states)
-      return unless conflict
-      state = states.detect { |i| i.name == conflict.name }
-      state && state.possibles.any?
+    def debug?
+      ENV['DEBUG_RESOLVER'] || ENV['DEBUG_RESOLVER_TREE']
     end
 
-    def find_conflict_state(conflict, states)
-      return unless conflict
-      until states.empty? do
-        state = states.pop
-        return state if conflict.name == state.name
-      end
+    def before_resolution
+      Bundler.ui.info 'Resolving dependencies...', false
     end
 
-    def activate_gem(reqs, activated, requirement, current)
-      requirement.required_by.replace current.required_by
-      requirement.required_by << current
-      activated[requirement.name] = requirement
-
-      debug { "  Activating: #{requirement.name} (#{requirement.version})" }
-      debug { requirement.required_by.map { |d| "    * #{d.name} (#{d.requirement})" }.join("\n") }
-
-      dependencies = requirement.activate_platform(current.__platform)
-
-      debug { "    Dependencies"}
-      dependencies.each do |dep|
-        next if dep.type == :development
-        dep.required_by.replace(current.required_by)
-        dep.required_by << current
-        @gems_size[dep] ||= gems_size(dep)
-        reqs << dep
-      end
+    def after_resolution
+      Bundler.ui.info ''
     end
 
-    def resolve_for_conflict(state)
-      raise version_conflict if state.nil? || state.possibles.empty?
-      reqs, activated, depth, conflicts = state.reqs.dup, state.activated.dup, state.depth, state.conflicts.dup
-      requirement = state.requirement
-      possible = state.possibles.pop
-
-      activate_gem(reqs, activated, possible, requirement)
-
-      return reqs, activated, depth, conflicts
+    def indicate_progress
+      Bundler.ui.info '.', false
     end
 
-    def resolve_conflict(current, states)
-      # Find the state where the conflict has occurred
-      state = find_conflict_state(current, states)
-
-      debug { "    -> Going to: #{current.name} state" } if current
-
-      # Resolve the conflicts by rewinding the state
-      # when the conflicted gem was activated
-      reqs, activated, depth, conflicts = resolve_for_conflict(state)
+    private
 
-      # Keep the state around if it still has other possibilities
-      states << state unless state.possibles.empty?
-      clear_search_cache
+    include Molinillo::SpecificationProvider
 
-      return reqs, activated, depth, conflicts
+    def dependencies_for(specification)
+      specification.dependencies_for_activated_platforms
     end
 
-    def resolve(reqs, activated)
-      states = []
-      depth = 0
-      conflicts = Set.new
-
-      until reqs.empty?
-
-        indicate_progress
-
-        debug { print "\e[2J\e[f" ; "==== Iterating ====\n\n" }
-
-        reqs = reqs.sort_by do |a|
-          [ activated[a.name] ? 0 : 1,
-            a.requirement.prerelease? ? 0 : 1,
-            @errors[a.name]   ? 0 : 1,
-            activated[a.name] ? 0 : @gems_size[a] ]
+    def search_for(dependency)
+      platform = dependency.__platform
+      dependency = dependency.dep unless dependency.is_a? Gem::Dependency
+      search = @search_for[dependency] ||= begin
+        index = @source_requirements[dependency.name] || @index
+        results = index.search(dependency, @base[dependency.name])
+        if vertex = @base_dg.vertex_named(dependency.name)
+          locked_requirement = vertex.payload.requirement
         end
-
-        debug { "Activated:\n" + activated.values.map {|a| "  #{a}" }.join("\n") }
-        debug { "Requirements:\n" + reqs.map {|r| "  #{r}"}.join("\n") }
-
-        current = reqs.shift
-
-        $stderr.puts "#{' ' * depth}#{current}" if ENV['DEBUG_RESOLVER_TREE']
-
-        debug { "Attempting:\n  #{current}"}
-
-        existing = activated[current.name]
-
-
-        if existing || current.name == 'bundler'
-          # Force the current
-          if current.name == 'bundler' && !existing
-            existing = search(DepProxy.new(Gem::Dependency.new('bundler', VERSION), Gem::Platform::RUBY)).first
-            raise GemNotFound, %Q{Bundler could not find gem "bundler" (#{VERSION})} unless existing
-            existing.required_by << existing
-            activated['bundler'] = existing
-          end
-
-          if current.requirement.satisfied_by?(existing.version)
-            debug { "    * [SUCCESS] Already activated" }
-            @errors.delete(existing.name)
-            dependencies = existing.activate_platform(current.__platform)
-            reqs.concat dependencies
-
-            dependencies.each do |dep|
-              next if dep.type == :development
-              @gems_size[dep] ||= gems_size(dep)
-            end
-
-            depth += 1
-            next
-          else
-            debug { "    * [FAIL] Already activated" }
-            @errors[existing.name] = [existing, current]
-
-            conflicts << current.name
-
-            parent = current.required_by.last
-            if existing.respond_to?(:required_by)
-              parent = handle_conflict(current, states, existing.required_by[-2]) unless other_possible?(parent, states)
-            else
-              parent = handle_conflict(current, states) unless other_possible?(parent, states)
-            end
-
-            if parent.nil? && !conflicts.empty?
-              parent = states.reverse.detect { |i| conflicts.include?(i.name) && state_any?(i)}
-            end
-
-            raise version_conflict if parent.nil? || parent.name == 'bundler'
-
-            reqs, activated, depth, conflicts = resolve_conflict(parent, states)
-          end
-        else
-          matching_versions = search(current)
-
-          # If we found no versions that match the current requirement
-          if matching_versions.empty?
-            # If this is a top-level Gemfile requirement
-            if current.required_by.empty?
-              if base = @base[current.name] and !base.empty?
-                version = base.first.version
-                message = "You have requested:\n" \
-                  "  #{current.name} #{current.requirement}\n\n" \
-                  "The bundle currently has #{current.name} locked at #{version}.\n" \
-                  "Try running `bundle update #{current.name}`"
-              elsif current.source
-                name = current.name
-                versions = @source_requirements[name][name].map { |s| s.version }
-                message  = "Could not find gem '#{current}' in #{current.source}.\n"
-                if versions.any?
-                  message << "Source contains '#{name}' at: #{versions.join(', ')}"
-                else
-                  message << "Source does not contain any versions of '#{current}'"
-                end
-              else
-                message = "Could not find gem '#{current}' "
-                if @index.source_types.include?(Bundler::Source::Rubygems)
-                  message << "in any of the gem sources listed in your Gemfile."
-                else
-                  message << "in the gems available on this machine."
-                end
-              end
-              raise GemNotFound, message
-              # This is not a top-level Gemfile requirement
-            else
-              @errors[current.name] = [nil, current]
-              parent = handle_conflict(current, states)
-              reqs, activated, depth = resolve_conflict(parent, states)
-              next
-            end
-          end
-
-          state = State.new(reqs.dup, activated.dup, current, matching_versions, depth, conflicts)
-          states << state
-          requirement = state.possibles.pop
-          activate_gem(reqs, activated, requirement, current)
-        end
-      end
-      successify(activated)
-    end
-
-    def gems_size(dep)
-      search(dep).size
-    end
-
-    def clear_search_cache
-      @deps_for = {}
-    end
-
-    def search(dep)
-      if base = @base[dep.name] and base.any?
-        reqs = [dep.requirement.as_list, base.first.version.to_s].flatten.compact
-        d = Gem::Dependency.new(base.first.name, *reqs)
-      else
-        d = dep.dep
-      end
-
-      @deps_for[d.hash] ||= begin
-        index = @source_requirements[d.name] || @index
-        results = index.search(d, @base[d.name])
-
         if results.any?
           version = results.first.version
           nested  = [[]]
@@ -403,132 +266,69 @@ module Bundler
             end
             nested.last << spec
           end
-          deps = nested.map{|a| SpecGroup.new(a) }.select{|sg| sg.for?(dep.__platform) }
+          groups = nested.map { |a| SpecGroup.new(a) }
+          !locked_requirement ? groups : groups.select { |sg| locked_requirement.satisfied_by? sg.version }
         else
-          deps = []
+          []
         end
       end
+      search.select { |sg| sg.for?(platform) }.each { |sg| sg.activate_platform(platform) }
     end
 
-    def clean_req(req)
-      if req.to_s.include?(">= 0")
-        req.to_s.gsub(/ \(.*?\)$/, '')
-      else
-        req.to_s.gsub(/\, (runtime|development)\)$/, ')')
-      end
+    def name_for(dependency)
+      dependency.name
     end
 
-    def version_conflict
-      VersionConflict.new(errors.keys, error_message)
+    def name_for_explicit_dependency_source
+      'Gemfile'
     end
 
-    # For a given conflicted requirement, print out what exactly went wrong
-    def gem_message(requirement, required_by=[])
-      m = ""
-
-      # A requirement that is required by itself is actually in the Gemfile, and does
-      # not "depend on" itself
-      if requirement.required_by.first && requirement.required_by.first.name != requirement.name
-        dependency_tree(m, required_by)
-        m << "#{clean_req(requirement)}\n"
-      else
-        m << "    #{clean_req(requirement)}\n"
-      end
-      m << "\n"
+    def name_for_locking_dependency_source
+      'Gemfile.lock'
     end
 
-    def dependency_tree(m, requirements)
-      requirements.each_with_index do |i, j|
-        m << "    " << ("  " * j)
-        m << "#{clean_req(i)}"
-        m << " depends on\n"
-      end
-      m << "    " << ("  " * requirements.size)
+    def requirement_satisfied_by?(requirement, activated, spec)
+      requirement.matches_spec?(spec)
     end
 
-    def error_message
-      errors.inject("") do |o, (conflict, (origin, requirement))|
-
-        # origin is the SpecSet of specs from the Gemfile that is conflicted with
-        if origin
-
-          o << %{Bundler could not find compatible versions for gem "#{origin.name}":\n}
-          o << "  In Gemfile:\n"
-
-          required_by = requirement.required_by
-          o << gem_message(requirement, required_by)
-
-          # If the origin is "bundler", the conflict is us
-          if origin.name == "bundler"
-            o << "  Current Bundler version:\n"
-            other_bundler_required = !requirement.requirement.satisfied_by?(origin.version)
-          # If the origin is a LockfileParser, it does not respond_to :required_by
-          elsif !origin.respond_to?(:required_by) || !(origin.required_by.first)
-            o << "  In snapshot (Gemfile.lock):\n"
-          end
-
-          required_by = origin.required_by[0..-2]
-          o << gem_message(origin, required_by)
-
-          # If the bundle wants a newer bundler than the running bundler, explain
-          if origin.name == "bundler" && other_bundler_required
-            o << "This Gemfile requires a different version of Bundler.\n"
-            o << "Perhaps you need to update Bundler by running `gem install bundler`?"
-          end
-
-        # origin is nil if the required gem and version cannot be found in any of
-        # the specified sources
-        else
-
-          # if the gem cannot be found because of a version conflict between lockfile and gemfile,
-          # print a useful error that suggests running `bundle update`, which may fix things
-          #
-          # @base is a SpecSet of the gems in the lockfile
-          # conflict is the name of the gem that could not be found
-          if locked = @base[conflict].first
-            o << "Bundler could not find compatible versions for gem #{conflict.inspect}:\n"
-            o << "  In snapshot (Gemfile.lock):\n"
-            o << "    #{clean_req(locked)}\n\n"
-
-            o << "  In Gemfile:\n"
-
-            required_by = requirement.required_by
-            o << gem_message(requirement, required_by)
-            o << "Running `bundle update` will rebuild your snapshot from scratch, using only\n"
-            o << "the gems in your Gemfile, which may resolve the conflict.\n"
+    def sort_dependencies(dependencies, activated, conflicts)
+      dependencies.sort_by do |dependency|
+        name = name_for(dependency)
+        [
+          activated.vertex_named(name).payload ? 0 : 1,
+          @prereleases_cache[dependency.requirement] ? 0 : 1,
+          conflicts[name] ? 0 : 1,
+          activated.vertex_named(name).payload ? 0 : search_for(dependency).count,
+        ]
+      end
+    end
 
-          # the rest of the time, the gem cannot be found because it does not exist in the known sources
-          else
-            if requirement.required_by.first
-              o << "Could not find gem '#{clean_req(requirement)}', which is required by "
-              o << "gem '#{clean_req(requirement.required_by.first)}', in any of the sources."
+    def verify_gemfile_dependencies_are_found!(requirements)
+      requirements.each do |requirement|
+        next if requirement.name == 'bundler'
+        if search_for(requirement).empty?
+          if base = @base[requirement.name] and !base.empty?
+            version = base.first.version
+            message = "You have requested:\n" \
+              "  #{requirement.name} #{requirement.requirement}\n\n" \
+              "The bundle currently has #{requirement.name} locked at #{version}.\n" \
+              "Try running `bundle update #{requirement.name}`"
+          elsif requirement.source
+            name = requirement.name
+            versions = @source_requirements[name][name].map { |s| s.version }
+            message  = "Could not find gem '#{requirement}' in #{requirement.source}.\n"
+            if versions.any?
+              message << "Source contains '#{name}' at: #{versions.join(', ')}"
             else
-              o << "Could not find gem '#{clean_req(requirement)} in any of the sources\n"
+              message << "Source does not contain any versions of '#{requirement}'"
             end
+          else
+            message = "Could not find gem '#{requirement}' in any of the gem sources listed in your Gemfile or installed on this machine."
           end
-
+          raise GemNotFound, message
         end
-        o
       end
     end
 
-    private
-
-    # Indicates progress by writing a '.' every iteration_rate time which is
-    # approximately every second. iteration_rate is calculated in the first
-    # second of resolve running.
-    def indicate_progress
-      @iteration_counter += 1
-
-      if iteration_rate.nil?
-        if ((Time.now - started_at) % 3600).round >= 1
-          @iteration_rate = iteration_counter
-        end
-      else
-        if ((iteration_counter % iteration_rate) == 0)
-          Bundler.ui.info ".", false
-        end
-      end
-    end
   end
 end
diff --git a/lib/bundler/ruby_version.rb b/lib/bundler/ruby_version.rb
index 862dd35..da6ebae 100644
--- a/lib/bundler/ruby_version.rb
+++ b/lib/bundler/ruby_version.rb
@@ -38,7 +38,7 @@ module Bundler
         patchlevel     == other.patchlevel
     end
 
-    # Returns a tuple of thsee things:
+    # Returns a tuple of these things:
     #   [diff, this, other]
     #   The priority of attributes are
     #   1. engine
diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb
index e9c9af2..1a9acb5 100644
--- a/lib/bundler/rubygems_ext.rb
+++ b/lib/bundler/rubygems_ext.rb
@@ -23,7 +23,7 @@ module Gem
 
     def full_gem_path
       source.respond_to?(:path) ?
-        Pathname.new(loaded_from).dirname.expand_path(Bundler.root).to_s :
+        Pathname.new(loaded_from).dirname.expand_path(Bundler.root).to_s.untaint :
         rg_full_gem_path
     end
 
@@ -72,7 +72,7 @@ module Gem
     end
 
     def to_gemfile(path = nil)
-      gemfile = "source :gemcutter\n"
+      gemfile = "source 'https://rubygems.org'\n"
       gemfile << dependencies_to_gemfile(nondevelopment_dependencies)
       unless development_dependencies.empty?
         gemfile << "\n"
@@ -149,6 +149,7 @@ module Gem
   class Platform
     JAVA  = Gem::Platform.new('java') unless defined?(JAVA)
     MSWIN = Gem::Platform.new('mswin32') unless defined?(MSWIN)
+    MSWIN64 = Gem::Platform.new('mswin64') unless defined?(MSWIN64)
     MINGW = Gem::Platform.new('x86-mingw32') unless defined?(MINGW)
     X64_MINGW = Gem::Platform.new('x64-mingw32') unless defined?(X64_MINGW)
 
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb
index e73c202..0107663 100644
--- a/lib/bundler/rubygems_integration.rb
+++ b/lib/bundler/rubygems_integration.rb
@@ -1,3 +1,4 @@
+require 'monitor'
 require 'rubygems'
 require 'rubygems/config_file'
 
@@ -134,6 +135,10 @@ module Bundler
       Gem::DefaultUserInteraction.ui = obj
     end
 
+    def ext_lock
+      @ext_lock ||= Monitor.new
+    end
+
     def fetch_specs(all, pre, &blk)
       specs = Gem::SpecFetcher.new.list(all, pre)
       specs.each { yield } if block_given?
@@ -156,12 +161,14 @@ module Bundler
     end
 
     def with_build_args(args)
-      old_args = self.build_args
-      begin
-        self.build_args = args
-        yield
-      ensure
-        self.build_args = old_args
+      ext_lock.synchronize do
+        old_args = self.build_args
+        begin
+          self.build_args = args
+          yield
+        ensure
+          self.build_args = old_args
+        end
       end
     end
 
@@ -193,7 +200,7 @@ module Bundler
     end
 
     def build_gem(gem_dir, spec)
-      SharedHelpers.chdir(gem_dir) { build(spec) }
+       build(spec)
     end
 
     def download_gem(spec, uri, path)
@@ -306,12 +313,12 @@ module Bundler
 
         if exec_name
           spec = specs.find { |s| s.executables.include?(exec_name) }
+          spec or raise Gem::Exception, "can't find executable #{exec_name}"
           unless spec.name == name
             warn "Bundler is using a binstub that was created for a different gem.\n" \
               "This is deprecated, in future versions you may need to `bundle binstub #{name}` " \
               "to work around a system/bundle conflict."
           end
-          spec or raise Gem::Exception, "can't find executable #{exec_name}"
         else
           spec = specs.find  { |s| s.name == name }
           exec_name = spec.default_executable or raise Gem::Exception, "no default executable for #{spec.full_name}"
@@ -554,9 +561,43 @@ module Bundler
       end
     end
 
+    class MoreFuture < Future
+      def initialize
+        super
+        backport_ext_builder_monitor
+      end
+
+      def backport_ext_builder_monitor
+        require 'rubygems/ext'
+
+        Gem::Ext::Builder.class_eval do
+          if !const_defined?(:CHDIR_MONITOR)
+            const_set(:CHDIR_MONITOR, Monitor.new)
+          end
+
+          if const_defined?(:CHDIR_MUTEX)
+            remove_const(:CHDIR_MUTEX)
+            const_set(:CHDIR_MUTEX, const_get(:CHDIR_MONITOR))
+          end
+        end
+      end
+
+      def ext_lock
+        Gem::Ext::Builder::CHDIR_MONITOR
+      end
+
+      def find_name(name)
+        Gem::Specification.stubs.find_all do |spec|
+          spec.name == name
+        end.map(&:to_spec)
+      end
+    end
+
   end
 
-  if RubygemsIntegration.provides?(">= 1.99.99")
+  if RubygemsIntegration.provides?(">= 2.1.0")
+    @rubygems = RubygemsIntegration::MoreFuture.new
+  elsif RubygemsIntegration.provides?(">= 1.99.99")
     @rubygems = RubygemsIntegration::Future.new
   elsif RubygemsIntegration.provides?('>= 1.8.20')
     @rubygems = RubygemsIntegration::MoreModern.new
diff --git a/lib/bundler/runtime.rb b/lib/bundler/runtime.rb
index b09a881..be61c2b 100644
--- a/lib/bundler/runtime.rb
+++ b/lib/bundler/runtime.rb
@@ -46,7 +46,7 @@ module Bundler
       self
     end
 
-    REGEXPS = [
+    REQUIRE_ERRORS = [
       /^no such file to load -- (.+)$/i,
       /^Missing \w+ (?:file\s*)?([^\s]+.rb)$/i,
       /^Missing API definition file in (.+)$/i,
@@ -76,18 +76,16 @@ module Bundler
             Kernel.require file
           end
         rescue LoadError => e
-          REGEXPS.find { |r| r =~ e.message }
+          REQUIRE_ERRORS.find { |r| r =~ e.message }
           raise if dep.autorequire || $1 != required_file
 
           if dep.autorequire.nil? && dep.name.include?('-')
             begin
               namespaced_file = dep.name.gsub('-', '/')
               Kernel.require namespaced_file
-            rescue LoadError
-              REGEXPS.find { |r| r =~ e.message }
-              regex_name = $1
-              raise e if dep.autorequire || (regex_name && regex_name.gsub('-', '/') != namespaced_file)
-              raise e if regex_name.nil?
+            rescue LoadError => e
+              REQUIRE_ERRORS.find { |r| r =~ e.message }
+              raise if $1 != namespaced_file
             end
           end
         end
@@ -105,12 +103,13 @@ module Bundler
     alias gems specs
 
     def cache(custom_path = nil)
-      cache_path = cache_path(custom_path)
+      cache_path = Bundler.app_cache(custom_path)
       FileUtils.mkdir_p(cache_path) unless File.exist?(cache_path)
 
-      Bundler.ui.info "Updating files in vendor/cache"
+      Bundler.ui.info "Updating files in #{Bundler.settings.app_cache_path}"
       specs.each do |spec|
         next if spec.name == 'bundler'
+        spec.source.send(:fetch_gem, spec) if Bundler.settings[:cache_all_platforms] && spec.source.respond_to?(:fetch_gem, true)
         spec.source.cache(spec, custom_path) if spec.source.respond_to?(:cache)
       end
 
@@ -119,15 +118,14 @@ module Bundler
         FileUtils.touch(File.expand_path("../.bundlecache", git_dir))
       end
 
-      prune_cache(custom_path) unless Bundler.settings[:no_prune]
+      prune_cache(cache_path) unless Bundler.settings[:no_prune]
     end
 
-    def prune_cache(custom_path)
-      cache_path = cache_path(custom_path)
+    def prune_cache(cache_path)
       FileUtils.mkdir_p(cache_path) unless File.exist?(cache_path)
       resolve = @definition.resolve
-      prune_gem_cache(resolve, custom_path)
-      prune_git_and_path_cache(resolve, custom_path)
+      prune_gem_cache(resolve, cache_path)
+      prune_git_and_path_cache(resolve, cache_path)
     end
 
     def clean(dry_run = false)
@@ -218,31 +216,16 @@ module Bundler
         ENV["BUNDLE_BIN_PATH"] = File.expand_path("../../../bin/bundle", __FILE__)
       end
 
-      # Set PATH
-      paths = (ENV["PATH"] || "").split(File::PATH_SEPARATOR)
-      paths.unshift "#{Bundler.bundle_path}/bin"
-      ENV["PATH"] = paths.uniq.join(File::PATH_SEPARATOR)
-
       # Set BUNDLE_GEMFILE
       ENV["BUNDLE_GEMFILE"] = default_gemfile.to_s
 
-      # Set RUBYOPT
-      rubyopt = [ENV["RUBYOPT"]].compact
-      if rubyopt.empty? || rubyopt.first !~ /-rbundler\/setup/
-        rubyopt.unshift %|-rbundler/setup|
-        ENV["RUBYOPT"] = rubyopt.join(' ')
-      end
-
-      # Set RUBYLIB
-      rubylib = (ENV["RUBYLIB"] || "").split(File::PATH_SEPARATOR)
-      rubylib.unshift File.expand_path('../..', __FILE__)
-      ENV["RUBYLIB"] = rubylib.uniq.join(File::PATH_SEPARATOR)
+      SharedHelpers.set_bundle_environment
     end
 
   private
 
-    def prune_gem_cache(resolve, custom_path)
-      cached  = Dir["#{cache_path(custom_path)}/*.gem"]
+    def prune_gem_cache(resolve, cache_path)
+      cached  = Dir["#{cache_path}/*.gem"]
 
       cached = cached.delete_if do |path|
         spec = Bundler.rubygems.spec_from_gem path
@@ -253,7 +236,7 @@ module Bundler
       end
 
       if cached.any?
-        Bundler.ui.info "Removing outdated .gem files from vendor/cache"
+        Bundler.ui.info "Removing outdated .gem files from #{Bundler.settings.app_cache_path}"
 
         cached.each do |path|
           Bundler.ui.info "  * #{File.basename(path)}"
@@ -262,8 +245,8 @@ module Bundler
       end
     end
 
-    def prune_git_and_path_cache(resolve, custom_path)
-      cached  = Dir["#{cache_path(custom_path)}/*/.bundlecache"]
+    def prune_git_and_path_cache(resolve, cache_path)
+      cached  = Dir["#{cache_path}/*/.bundlecache"]
 
       cached = cached.delete_if do |path|
         name = File.basename(File.dirname(path))
@@ -275,7 +258,7 @@ module Bundler
       end
 
       if cached.any?
-        Bundler.ui.info "Removing outdated git and path gems from vendor/cache"
+        Bundler.ui.info "Removing outdated git and path gems from #{Bundler.settings.app_cache_path}"
 
         cached.each do |path|
           path = File.dirname(path)
@@ -302,9 +285,5 @@ module Bundler
       end
     end
 
-    def cache_path(custom_path = nil)
-      path = custom_path || root
-      path.join("vendor/cache")
-    end
   end
 end
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb
index ff269c9..88e139c 100644
--- a/lib/bundler/settings.rb
+++ b/lib/bundler/settings.rb
@@ -1,15 +1,24 @@
+require 'uri'
+
 module Bundler
   class Settings
+    BOOL_KEYS = %w(frozen cache_all no_prune disable_local_branch_check gem.mit gem.coc).freeze
+
     def initialize(root = nil)
       @root          = root
       @local_config  = load_config(local_config_file)
       @global_config = load_config(global_config_file)
     end
 
-    def [](key)
-      the_key = key_for(key)
-      value = (@local_config[the_key] || ENV[the_key] || @global_config[the_key])
-      is_bool(key) ? to_bool(value) : value
+    def [](name)
+      key = key_for(name)
+      value = (@local_config[key] || ENV[key] || @global_config[key])
+
+      if !value.nil? && is_bool(name)
+        to_bool(value)
+      else
+        value
+      end
     end
 
     def []=(key, value)
@@ -115,18 +124,29 @@ module Bundler
       ENV['BUNDLE_IGNORE_CONFIG']
     end
 
+    def app_cache_path
+      @app_cache_path ||= begin
+        path = self[:cache_path] || "vendor/cache"
+        raise InvalidOption, "Cache path must be relative to the bundle path" if path.start_with?("/")
+        path
+      end
+    end
+
   private
     def key_for(key)
-      key = key.to_s.sub(".", "__").upcase
+      if key.is_a?(String) && /https?:/ =~ key
+        key = normalize_uri(key).to_s
+      end
+      key = key.to_s.gsub(".", "__").upcase
       "BUNDLE_#{key}"
     end
 
     def is_bool(key)
-      %w(frozen cache_all no_prune disable_local_branch_check).include? key.to_s
+      BOOL_KEYS.include?(key.to_s)
     end
 
     def to_bool(value)
-      !(value.nil? || value == '' || value =~ /^(false|f|no|n|0)$/i)
+      !(value.nil? || value == '' || value =~ /^(false|f|no|n|0)$/i || value == false)
     end
 
     def set_key(key, value, hash, file)
@@ -139,6 +159,7 @@ module Bundler
         require 'bundler/psyched_yaml'
         File.open(file, "w") { |f| f.puts YAML.dump(hash) }
       end
+
       value
     end
 
@@ -154,21 +175,32 @@ module Bundler
     def load_config(config_file)
       valid_file = config_file && config_file.exist? && !config_file.size.zero?
       if !ignore_config? && valid_file
-        config_regex =/^(BUNDLE_.+): (?:['"](.*)['"]|(.+(?:\n(?!BUNDLE).+))|(.+))$/
-        config_pairs = config_file.read.scan(config_regex).map{|m| m.compact.map { |n| n.gsub(/\n\s?/, "") } }
+        config_regex = /^(BUNDLE_.+): (['"]?)(.*(?:\n(?!BUNDLE).+)?)\2$/
+        config_pairs = config_file.read.scan(config_regex).map do |m|
+          key, _, value = m
+          [convert_to_backward_compatible_key(key), value.gsub(/\s+/, " ").tr('"', "'")]
+        end
         Hash[config_pairs]
       else
         {}
       end
     end
 
+    def convert_to_backward_compatible_key(key)
+      key = "#{key}/" if key =~ /https?:/i && key !~ %r[/\Z]
+      key = key.gsub(".", "__") if key.include?(".")
+      key
+    end
+
     # TODO: duplicates Rubygems#normalize_uri
     # TODO: is this the correct place to validate mirror URIs?
     def normalize_uri(uri)
       uri = uri.to_s
       uri = "#{uri}/" unless uri =~ %r[/\Z]
       uri = URI(uri)
-      raise ArgumentError, "Gem mirror sources must be absolute URIs (configured: #{mirror_source})" unless uri.absolute?
+      unless uri.absolute?
+        raise ArgumentError, "Gem sources must be absolute. You provided '#{uri}'."
+      end
       uri
     end
 
diff --git a/lib/bundler/setup.rb b/lib/bundler/setup.rb
index 3059975..6bf5983 100644
--- a/lib/bundler/setup.rb
+++ b/lib/bundler/setup.rb
@@ -2,7 +2,8 @@ require 'bundler/shared_helpers'
 
 if Bundler::SharedHelpers.in_bundle?
   require 'bundler'
-  if STDOUT.tty?
+
+  if STDOUT.tty? || ENV['BUNDLER_FORCE_TTY']
     begin
       Bundler.setup
     rescue Bundler::BundlerError => e
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb
index 7e53518..cd4ad71 100644
--- a/lib/bundler/shared_helpers.rb
+++ b/lib/bundler/shared_helpers.rb
@@ -26,33 +26,36 @@ module Bundler
     end
 
     def default_lockfile
-      Pathname.new("#{default_gemfile}.lock")
+      gemfile = default_gemfile
+
+      case gemfile.basename.to_s
+      when 'gems.rb' then Pathname.new(gemfile.sub(/.rb$/, '.locked'))
+      else Pathname.new("#{gemfile}.lock")
+      end
+    end
+
+    def default_bundle_dir
+      bundle_dir = find_directory(".bundle")
+      return nil unless bundle_dir
+
+      global_bundle_dir = File.join(Bundler.rubygems.user_home, ".bundle")
+      return nil if bundle_dir == global_bundle_dir
+
+      Pathname.new(bundle_dir)
     end
 
     def in_bundle?
       find_gemfile
     end
 
-    if Bundler.current_ruby.mswin? || Bundler.current_ruby.jruby?
-      require 'monitor'
-      @chdir_monitor = Monitor.new
-      def chdir(dir, &blk)
-        @chdir_monitor.synchronize do
-          Dir.chdir dir, &blk
-        end
-      end
-
-      def pwd
-        @chdir_monitor.synchronize do
-          Dir.pwd
-        end
-      end
-    else
-      def chdir(dir, &blk)
+    def chdir(dir, &blk)
+      Bundler.rubygems.ext_lock.synchronize do
         Dir.chdir dir, &blk
       end
+    end
 
-      def pwd
+    def pwd
+      Bundler.rubygems.ext_lock.synchronize do
         Dir.pwd
       end
     end
@@ -70,12 +73,47 @@ module Bundler
       keys.each {|key| ENV[key] = old_env[key] }
     end
 
+    def set_bundle_environment
+      # Set PATH
+      paths = (ENV["PATH"] || "").split(File::PATH_SEPARATOR)
+      paths.unshift "#{Bundler.bundle_path}/bin"
+      ENV["PATH"] = paths.uniq.join(File::PATH_SEPARATOR)
+
+      # Set RUBYOPT
+      rubyopt = [ENV["RUBYOPT"]].compact
+      if rubyopt.empty? || rubyopt.first !~ /-rbundler\/setup/
+        rubyopt.unshift %|-rbundler/setup|
+        ENV["RUBYOPT"] = rubyopt.join(' ')
+      end
+
+      # Set RUBYLIB
+      rubylib = (ENV["RUBYLIB"] || "").split(File::PATH_SEPARATOR)
+      rubylib.unshift File.expand_path('../..', __FILE__)
+      ENV["RUBYLIB"] = rubylib.uniq.join(File::PATH_SEPARATOR)
+    end
+
   private
 
     def find_gemfile
       given = ENV['BUNDLE_GEMFILE']
       return given if given && !given.empty?
 
+      find_file('Gemfile', 'gems.rb')
+    end
+
+    def find_file(*names)
+      search_up(*names) {|filename|
+        return filename if File.file?(filename)
+      }
+    end
+
+    def find_directory(*names)
+      search_up(*names) do |dirname|
+        return dirname if File.directory?(dirname)
+      end
+    end
+
+    def search_up(*names)
       previous = nil
       current  = File.expand_path(SharedHelpers.pwd)
 
@@ -85,9 +123,10 @@ module Bundler
           return nil if File.file?(File.join(current, 'bundler.gemspec'))
         end
 
-        # otherwise return the Gemfile if it's there
-        filename = File.join(current, 'Gemfile')
-        return filename if File.file?(filename)
+        names.each do |name|
+          filename = File.join(current, name)
+          yield filename
+        end
         current, previous = File.expand_path("..", current), current
       end
     end
diff --git a/lib/bundler/source.rb b/lib/bundler/source.rb
index 04643b4..b544451 100644
--- a/lib/bundler/source.rb
+++ b/lib/bundler/source.rb
@@ -21,17 +21,26 @@ module Bundler
     end
 
     def version_message(spec)
-      locked_spec = Bundler.locked_gems.specs.find { |s| s.name == spec.name } if Bundler.locked_gems
-      locked_spec_version = locked_spec.version if locked_spec
       message = "#{spec.name} #{spec.version}"
-      if locked_spec_version && spec.version != locked_spec_version
-        message << " (was #{locked_spec_version})"
+
+      if Bundler.locked_gems
+        locked_spec = Bundler.locked_gems.specs.find { |s| s.name == spec.name }
+        locked_spec_version = locked_spec.version if locked_spec
+        if locked_spec_version && spec.version != locked_spec_version
+          message << " (was #{locked_spec_version})"
+        end
       end
+
       message
     end
 
     def can_lock?(spec)
       spec.source == self
     end
+
+    def include?(other)
+      other == self
+    end
+
   end
 end
diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb
index 1f720f5..62d6150 100644
--- a/lib/bundler/source/git.rb
+++ b/lib/bundler/source/git.rb
@@ -20,7 +20,7 @@ module Bundler
         # Stringify options that could be set as symbols
         %w(ref branch tag revision).each{|k| options[k] = options[k].to_s if options[k] }
 
-        @uri        = options["uri"]
+        @uri        = options["uri"] || ''
         @branch     = options["branch"]
         @ref        = options["ref"] || options["branch"] || options["tag"] || 'master'
         @submodules = options["submodules"]
@@ -46,6 +46,10 @@ module Bundler
         out << "  specs:\n"
       end
 
+      def hash
+        [self.class, uri, ref, branch, name, version, submodules].hash
+      end
+
       def eql?(o)
         o.is_a?(Git)         &&
         uri == o.uri         &&
@@ -216,7 +220,7 @@ module Bundler
         @allow_remote || @allow_cached
       end
 
-    private
+      private
 
       def serialize_gemspecs_in(destination)
         expanded_path = destination.expand_path(Bundler.root)
diff --git a/lib/bundler/source/git/git_proxy.rb b/lib/bundler/source/git/git_proxy.rb
index 29100a1..89c784e 100644
--- a/lib/bundler/source/git/git_proxy.rb
+++ b/lib/bundler/source/git/git_proxy.rb
@@ -60,6 +60,10 @@ module Bundler
           end
         end
 
+        def version
+          git("--version").sub("git version", "").strip
+        end
+
         def checkout
           if path.exist?
             return if has_revision_cached?
diff --git a/lib/bundler/source/path.rb b/lib/bundler/source/path.rb
index 398ed60..2b53bc7 100644
--- a/lib/bundler/source/path.rb
+++ b/lib/bundler/source/path.rb
@@ -54,19 +54,19 @@ module Bundler
       end
 
       def hash
-        self.class.hash
+        [self.class, expanded_path, version].hash
       end
 
       def eql?(o)
         o.instance_of?(Path) &&
-        expand(path) == expand(o.path) &&
+        expanded_path == expand(o.path) &&
         version == o.version
       end
 
       alias == eql?
 
       def name
-        File.basename(expand(path).to_s)
+        File.basename(expanded_path.to_s)
       end
 
       def install(spec)
@@ -95,6 +95,7 @@ module Bundler
       def specs
         if has_app_cache?
           @path = app_cache_path
+          @expanded_path = nil # Invalidate
         end
         local_specs
       end
@@ -105,6 +106,10 @@ module Bundler
 
     private
 
+      def expanded_path
+        @expanded_path ||= expand(path)
+      end
+
       def expand(somepath)
         somepath.expand_path(Bundler.root)
       rescue ArgumentError => e
@@ -123,10 +128,10 @@ module Bundler
 
       def load_spec_files
         index = Index.new
-        expanded_path = expand(path)
 
         if File.directory?(expanded_path)
-          Dir["#{expanded_path}/#{@glob}"].each do |file|
+          # We sort depth-first since `<<` will override the earlier-found specs
+          Dir["#{expanded_path}/#{@glob}"].sort_by { |p| -p.split(File::SEPARATOR).size }.each do |file|
             spec = Bundler.load_gemspec(file)
             if spec
               spec.loaded_from = file.to_s
@@ -168,7 +173,7 @@ module Bundler
       end
 
       def generate_bin(spec, disable_extensions = false)
-        gem_dir  = Pathname.new(spec.full_gem_path)
+        gem_dir = Pathname.new(spec.full_gem_path)
 
         # Some gem authors put absolute paths in their gemspec
         # and we have to save them from themselves
@@ -181,14 +186,14 @@ module Bundler
           end
         end.compact
 
-        gem_file = Bundler.rubygems.build_gem gem_dir, spec
-
-        installer = Path::Installer.new(spec, :env_shebang => false)
-        run_hooks(:pre_install, installer)
-        installer.build_extensions unless disable_extensions
-        run_hooks(:post_build, installer)
-        installer.generate_bin
-        run_hooks(:post_install, installer)
+        SharedHelpers.chdir(gem_dir) do
+          installer = Path::Installer.new(spec, :env_shebang => false)
+          run_hooks(:pre_install, installer)
+          installer.build_extensions unless disable_extensions
+          run_hooks(:post_build, installer)
+          installer.generate_bin
+          run_hooks(:post_install, installer)
+        end
       rescue Gem::InvalidSpecificationException => e
         Bundler.ui.warn "\n#{spec.name} at #{spec.full_gem_path} did not have a valid gemspec.\n" \
                         "This prevents bundler from installing bins or native extensions, but " \
@@ -201,10 +206,6 @@ module Bundler
         end
 
         Bundler.ui.warn "The validation message from Rubygems was:\n  #{e.message}"
-      ensure
-        if gem_dir && gem_file
-          FileUtils.rm_rf(gem_dir.join gem_file)
-        end
       end
 
       def run_hooks(type, installer)
diff --git a/lib/bundler/source/path/installer.rb b/lib/bundler/source/path/installer.rb
index 28e6987..3b36881 100644
--- a/lib/bundler/source/path/installer.rb
+++ b/lib/bundler/source/path/installer.rb
@@ -3,33 +3,38 @@ module Bundler
     class Path
 
       class Installer < Bundler::GemInstaller
+        attr_reader :spec
+
         def initialize(spec, options = {})
           @spec              = spec
-          @tmp_bin_dir       = "#{Bundler.tmp(spec.full_name)}/bin"
-          @gem_bin_dir       = "#{Bundler.rubygems.gem_dir}/bin"
-          @bin_dir           = Bundler.requires_sudo? ? @tmp_bin_dir : @gem_bin_dir
           @gem_dir           = Bundler.rubygems.path(spec.full_gem_path)
           @wrappers          = options[:wrappers] || true
           @env_shebang       = options[:env_shebang] || true
           @format_executable = options[:format_executable] || false
           @build_args        = options[:build_args] || Bundler.rubygems.build_args
+          @gem_bin_dir       = "#{Bundler.rubygems.gem_dir}/bin"
+
+          if Bundler.requires_sudo?
+            @tmp_dir = Bundler.tmp(spec.full_name).to_s
+            @bin_dir = "#{@tmp_dir}/bin"
+          else
+            @bin_dir = @gem_bin_dir
+          end
         end
 
         def generate_bin
           return if spec.executables.nil? || spec.executables.empty?
 
-          if Bundler.requires_sudo?
-            FileUtils.mkdir_p(@tmp_bin_dir) unless File.exist?(@tmp_bin_dir)
-          end
-
           super
 
           if Bundler.requires_sudo?
             Bundler.mkdir_p @gem_bin_dir
             spec.executables.each do |exe|
-              Bundler.sudo "cp -R #{@tmp_bin_dir}/#{exe} #{@gem_bin_dir}"
+              Bundler.sudo "cp -R #{@bin_dir}/#{exe} #{@gem_bin_dir}"
             end
           end
+        ensure
+          Bundler.rm_rf(@tmp_dir) if Bundler.requires_sudo?
         end
       end
 
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb
index 044b363..0112e2b 100644
--- a/lib/bundler/source/rubygems.rb
+++ b/lib/bundler/source/rubygems.rb
@@ -5,7 +5,10 @@ require 'rubygems/spec_fetcher'
 module Bundler
   class Source
     class Rubygems < Source
-      API_REQUEST_LIMIT = 100 # threshold for switching back to the modern index instead of fetching every spec
+      # Use the API when installing less than X gems
+      API_REQUEST_LIMIT = 500
+      # Ask for X gems per API request
+      API_REQUEST_SIZE = 50
 
       attr_reader :remotes, :caches
 
@@ -33,11 +36,15 @@ module Bundler
       end
 
       def eql?(o)
-        o.is_a?(Rubygems) && remotes_equal?(o.remotes)
+        o.is_a?(Rubygems) && o.credless_remotes == credless_remotes
       end
 
       alias == eql?
 
+      def include?(o)
+        o.is_a?(Rubygems) && (o.credless_remotes - credless_remotes).empty?
+      end
+
       def can_lock?(spec)
         spec.source.is_a?(Rubygems)
       end
@@ -83,9 +90,8 @@ module Bundler
         # by rubygems.org are broken and wrong.
         if spec.source_uri
           # Check for this spec from other sources
-          uris = [spec.source_uri]
+          uris = [spec.source_uri.without_credentials]
           uris += source_uris_for_spec(spec)
-          uris.compact!
           uris.uniq!
           Installer.ambiguous_gems << [spec.name, *uris] if uris.length > 1
 
@@ -93,54 +99,53 @@ module Bundler
           spec.__swap__(s)
         end
 
-        path = cached_gem(spec)
-        if Bundler.requires_sudo?
-          install_path = Bundler.tmp(spec.full_name)
-          bin_path     = install_path.join("bin")
-        else
-          install_path = Bundler.rubygems.gem_dir
-          bin_path     = Bundler.system_bindir
-        end
+        unless Bundler.settings[:no_install]
+          path = cached_gem(spec)
+          if Bundler.requires_sudo?
+            install_path = Bundler.tmp(spec.full_name)
+            bin_path     = install_path.join("bin")
+          else
+            install_path = Bundler.rubygems.gem_dir
+            bin_path     = Bundler.system_bindir
+          end
 
-        installed_spec = nil
-        Bundler.rubygems.preserve_paths do
-          installed_spec = Bundler::GemInstaller.new(path,
-            :install_dir         => install_path.to_s,
-            :bin_dir             => bin_path.to_s,
-            :ignore_dependencies => true,
-            :wrappers            => true,
-            :env_shebang         => true
-          ).install
-        end
+          installed_spec = nil
+          Bundler.rubygems.preserve_paths do
+            installed_spec = Bundler::GemInstaller.new(path,
+              :install_dir         => install_path.to_s,
+              :bin_dir             => bin_path.to_s,
+              :ignore_dependencies => true,
+              :wrappers            => true,
+              :env_shebang         => true
+            ).install
+          end
 
-        # SUDO HAX
-        if Bundler.requires_sudo?
-          Bundler.rubygems.repository_subdirectories.each do |name|
-            src = File.join(install_path, name, "*")
-            dst = File.join(Bundler.rubygems.gem_dir, name)
-            if name == "extensions" && Dir.glob(src).any?
-              src = File.join(src, "*/*")
-              ext_src = Dir.glob(src).first
-              ext_src.gsub!(src[0..-6], '')
-              dst = File.dirname(File.join(dst, ext_src))
+          # SUDO HAX
+          if Bundler.requires_sudo?
+            Bundler.rubygems.repository_subdirectories.each do |name|
+              src = File.join(install_path, name, "*")
+              dst = File.join(Bundler.rubygems.gem_dir, name)
+              if name == "extensions" && Dir.glob(src).any?
+                src = File.join(src, "*/*")
+                ext_src = Dir.glob(src).first
+                ext_src.gsub!(src[0..-6], '')
+                dst = File.dirname(File.join(dst, ext_src))
+              end
+              Bundler.mkdir_p dst
+              Bundler.sudo "cp -R #{src} #{dst}" if Dir[src].any?
             end
-            Bundler.mkdir_p dst
-            Bundler.sudo "cp -R #{src} #{dst}" if Dir[src].any?
-          end
 
-          spec.executables.each do |exe|
-            Bundler.mkdir_p Bundler.system_bindir
-            Bundler.sudo "cp -R #{install_path}/bin/#{exe} #{Bundler.system_bindir}/"
+            spec.executables.each do |exe|
+              Bundler.mkdir_p Bundler.system_bindir
+              Bundler.sudo "cp -R #{install_path}/bin/#{exe} #{Bundler.system_bindir}/"
+            end
           end
+          installed_spec.loaded_from = loaded_from(spec)
         end
-
-        spec.loaded_from = "#{Bundler.rubygems.gem_dir}/specifications/#{spec.full_name}.gemspec"
-        installed_spec.loaded_from = spec.loaded_from
+        spec.loaded_from = loaded_from(spec)
         ["Installing #{version_message(spec)}", spec.post_install_message]
       ensure
-        if install_path && Bundler.requires_sudo?
-          FileUtils.remove_entry_secure(install_path)
-        end
+        Bundler.rm_rf(install_path) if Bundler.requires_sudo?
       end
 
       def cache(spec, custom_path = nil)
@@ -153,6 +158,9 @@ module Bundler
         return if File.dirname(cached_path) == Bundler.app_cache.to_s
         Bundler.ui.info "  * #{File.basename(cached_path)}"
         FileUtils.cp(cached_path, Bundler.app_cache(custom_path))
+      rescue Errno::EACCES => e
+        Bundler.ui.debug(e)
+        raise InstallError, e.message
       end
 
       def cached_built_in_gem(spec)
@@ -186,14 +194,31 @@ module Bundler
         end
       end
 
+      def fetchers
+        @fetchers ||= remotes.map do |uri|
+            Bundler::Fetcher.new(uri)
+        end
+      end
+
     protected
 
-      def source_uris_for_spec(spec)
-        specs.search_all(spec.name).map{|s| s.source_uri }
+      def credless_remotes
+        remotes.map(&method(:suppress_configured_credentials))
       end
 
     private
 
+      def source_uris_for_spec(spec)
+        specs.search_all(spec.name).inject([]) do |uris, s|
+          uris << s.source_uri.without_credentials if s.source_uri
+          uris
+        end
+      end
+
+      def loaded_from(spec)
+        "#{Bundler.rubygems.gem_dir}/specifications/#{spec.full_name}.gemspec"
+      end
+
       def cached_gem(spec)
         cached_gem = cached_path(spec)
         unless cached_gem
@@ -270,12 +295,6 @@ module Bundler
         idx
       end
 
-      def fetchers
-        @fetchers ||= remotes.map do |url|
-          Bundler::Fetcher.new(url)
-        end
-      end
-
       def api_fetchers
         fetchers.select{|f| f.use_api }
       end
@@ -294,6 +313,8 @@ module Bundler
           # the gemspecs of those gems, if the non-api sites contain more than
           # about 100 gems, we just treat all sites as non-api for speed.
           allow_api = idx.size < API_REQUEST_LIMIT && dependency_names.size < API_REQUEST_LIMIT
+          Bundler.ui.debug "Need to query more than #{API_REQUEST_LIMIT} gems." \
+            " Downloading full index instead..." unless allow_api
 
           if allow_api
             api_fetchers.each do |f|
@@ -302,6 +323,20 @@ module Bundler
               Bundler.ui.info "" if !Bundler.ui.debug? # new line now that the dots are over
             end
 
+            # Suppose the gem Foo depends on the gem Bar.  Foo exists in Source A.  Bar has some versions that exist in both
+            # sources A and B.  At this point, the API request will have found all the versions of Bar in source A,
+            # but will not have found any versions of Bar from source B, which is a problem if the requested version
+            # of Foo specifically depends on a version of Bar that is only found in source B. This ensures that for
+            # each spec we found, we add all possible versions from all sources to the index.
+            begin
+              idxcount = idx.size
+              api_fetchers.each do |f|
+                Bundler.ui.info "Fetching version metadata from #{f.uri}", Bundler.ui.debug?
+                idx.use f.specs(idx.dependency_names, self), true
+                Bundler.ui.info "" if !Bundler.ui.debug? # new line now that the dots are over
+              end
+            end until idxcount == idx.size
+
             if api_fetchers.any? && api_fetchers.all?{|f| f.use_api }
               # it's possible that gems from one source depend on gems from some
               # other source, so now we download gemspecs and iterate over those
@@ -310,7 +345,7 @@ module Bundler
 
               # if there are any cross-site gems we missed, get them now
               api_fetchers.each do |f|
-                Bundler.ui.info "Fetching additional metadata from #{f.uri}", Bundler.ui.debug?
+                Bundler.ui.info "Fetching dependency metadata from #{f.uri}", Bundler.ui.debug?
                 idx.use f.specs(unmet, self)
                 Bundler.ui.info "" if !Bundler.ui.debug? # new line now that the dots are over
               end if unmet.any?
@@ -330,7 +365,7 @@ module Bundler
 
       def fetch_gem(spec)
         return false unless spec.source_uri
-        Fetcher.download_gem_from_uri(spec, spec.source_uri)
+        Fetcher.download_gem_from_uri(spec, spec.source_uri.original_uri)
       end
 
       def builtin_gem?(spec)
@@ -341,10 +376,6 @@ module Bundler
         spec.loaded_from && spec.loaded_from.include?("specifications/default/")
       end
 
-      def remotes_equal?(other_remotes)
-        remotes.map(&method(:suppress_configured_credentials)) == other_remotes.map(&method(:suppress_configured_credentials))
-      end
-
     end
   end
 end
diff --git a/lib/bundler/source_list.rb b/lib/bundler/source_list.rb
index 05e2251..49efbf7 100644
--- a/lib/bundler/source_list.rb
+++ b/lib/bundler/source_list.rb
@@ -59,10 +59,10 @@ module Bundler
 
       replacement_rubygems =
         replacement_sources.detect { |s| s.is_a?(Source::Rubygems) }
-      @rubygems_aggregate = replacement_rubygems
+      @rubygems_aggregate = replacement_rubygems if replacement_rubygems
 
       # Return true if there were changes
-      all_sources.to_set != replacement_sources.to_set ||
+      lock_sources.to_set != replacement_sources.to_set ||
         rubygems_remotes.to_set != replacement_rubygems.remotes.to_set
     end
 
@@ -74,6 +74,10 @@ module Bundler
       all_sources.each(&:remote!)
     end
 
+    def rubygems_primary_remotes
+      @rubygems_aggregate.remotes
+    end
+
   private
 
     def add_source_to_list(source, list)
diff --git a/lib/bundler/ssl_certs/AddTrustExternalCARoot-2048.pem b/lib/bundler/ssl_certs/AddTrustExternalCARoot-2048.pem
new file mode 100644
index 0000000..20585f1
--- /dev/null
+++ b/lib/bundler/ssl_certs/AddTrustExternalCARoot-2048.pem
@@ -0,0 +1,25 @@
+-----BEGIN CERTIFICATE-----
+MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEU
+MBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFs
+IFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290
+MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFowbzELMAkGA1UEBhMCU0Ux
+FDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRUcnVzdCBFeHRlcm5h
+bCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0EgUm9v
+dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvt
+H7xsD821+iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9
+uMq/NzgtHj6RQa1wVsfwTz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzX
+mk6vBbOmcZSccbNQYArHE504B4YCqOmoaSYYkKtMsE8jqzpPhNjfzp/haW+710LX
+a0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy2xSoRcRdKn23tNbE7qzN
+E0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv77+ldU9U0
+WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYD
+VR0PBAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0
+Jvf6xCZU7wO94CTLVBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRU
+cnVzdCBBQjEmMCQGA1UECxMdQWRkVHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsx
+IjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENBIFJvb3SCAQEwDQYJKoZIhvcN
+AQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZlj7DYd7usQWxH
+YINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5
+6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvC
+Nr4TDea9Y355e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEX
+c4g/VhsxOBi0cQ+azcgOno4uG+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5a
+mnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ=
+-----END CERTIFICATE-----
diff --git a/lib/bundler/ssl_certs/AddTrustExternalCARoot.pem b/lib/bundler/ssl_certs/AddTrustExternalCARoot.pem
new file mode 100644
index 0000000..6fbdf52
--- /dev/null
+++ b/lib/bundler/ssl_certs/AddTrustExternalCARoot.pem
@@ -0,0 +1,32 @@
+-----BEGIN CERTIFICATE-----
+MIIFdDCCBFygAwIBAgIQJ2buVutJ846r13Ci/ITeIjANBgkqhkiG9w0BAQwFADBv
+MQswCQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFk
+ZFRydXN0IEV4dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBF
+eHRlcm5hbCBDQSBSb290MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFow
+gYUxCzAJBgNVBAYTAkdCMRswGQYDVQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAO
+BgNVBAcTB1NhbGZvcmQxGjAYBgNVBAoTEUNPTU9ETyBDQSBMaW1pdGVkMSswKQYD
+VQQDEyJDT01PRE8gUlNBIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkq
+hkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAkehUktIKVrGsDSTdxc9EZ3SZKzejfSNw
+AHG8U9/E+ioSj0t/EFa9n3Byt2F/yUsPF6c947AEYe7/EZfH9IY+Cvo+XPmT5jR6
+2RRr55yzhaCCenavcZDX7P0N+pxs+t+wgvQUfvm+xKYvT3+Zf7X8Z0NyvQwA1onr
+ayzT7Y+YHBSrfuXjbvzYqOSSJNpDa2K4Vf3qwbxstovzDo2a5JtsaZn4eEgwRdWt
+4Q08RWD8MpZRJ7xnw8outmvqRsfHIKCxH2XeSAi6pE6p8oNGN4Tr6MyBSENnTnIq
+m1y9TBsoilwie7SrmNnu4FGDwwlGTm0+mfqVF9p8M1dBPI1R7Qu2XK8sYxrfV8g/
+vOldxJuvRZnio1oktLqpVj3Pb6r/SVi+8Kj/9Lit6Tf7urj0Czr56ENCHonYhMsT
+8dm74YlguIwoVqwUHZwK53Hrzw7dPamWoUi9PPevtQ0iTMARgexWO/bTouJbt7IE
+IlKVgJNp6I5MZfGRAy1wdALqi2cVKWlSArvX31BqVUa/oKMoYX9w0MOiqiwhqkfO
+KJwGRXa/ghgntNWutMtQ5mv0TIZxMOmm3xaG4Nj/QN370EKIf6MzOi5cHkERgWPO
+GHFrK+ymircxXDpqR+DDeVnWIBqv8mqYqnK8V0rSS527EPywTEHl7R09XiidnMy/
+s1Hap0flhFMCAwEAAaOB9DCB8TAfBgNVHSMEGDAWgBStvZh6NLQm9/rEJlTvA73g
+JMtUGjAdBgNVHQ4EFgQUu69+Aj36pvE8hI6t7jiY7NkyMtQwDgYDVR0PAQH/BAQD
+AgGGMA8GA1UdEwEB/wQFMAMBAf8wEQYDVR0gBAowCDAGBgRVHSAAMEQGA1UdHwQ9
+MDswOaA3oDWGM2h0dHA6Ly9jcmwudXNlcnRydXN0LmNvbS9BZGRUcnVzdEV4dGVy
+bmFsQ0FSb290LmNybDA1BggrBgEFBQcBAQQpMCcwJQYIKwYBBQUHMAGGGWh0dHA6
+Ly9vY3NwLnVzZXJ0cnVzdC5jb20wDQYJKoZIhvcNAQEMBQADggEBAGS/g/FfmoXQ
+zbihKVcN6Fr30ek+8nYEbvFScLsePP9NDXRqzIGCJdPDoCpdTPW6i6FtxFQJdcfj
+Jw5dhHk3QBN39bSsHNA7qxcS1u80GH4r6XnTq1dFDK8o+tDb5VCViLvfhVdpfZLY
+Uspzgb8c8+a4bmYRBbMelC1/kZWSWfFMzqORcUx8Rww7Cxn2obFshj5cqsQugsv5
+B5a6SE2Q8pTIqXOi6wZ7I53eovNNVZ96YUWYGGjHXkBrI/V5eu+MtWuLt29G9Hvx
+PUsE2JOAWVrgQSQdso8VYFhH2+9uRv0V9dlfmrPb2LjkQLPNlzmuhbsdjrzch5vR
+pu/xO28QOG8=
+-----END CERTIFICATE-----
diff --git a/lib/bundler/ssl_certs/certificate_manager.rb b/lib/bundler/ssl_certs/certificate_manager.rb
index dea184d..22872cc 100644
--- a/lib/bundler/ssl_certs/certificate_manager.rb
+++ b/lib/bundler/ssl_certs/certificate_manager.rb
@@ -1,4 +1,6 @@
 require 'fileutils'
+require 'net/https'
+require 'openssl'
 
 module Bundler
   module SSLCerts
@@ -9,17 +11,21 @@ module Bundler
         new(rubygems_path).update!
       end
 
-      def initialize(rubygems_path)
-        rubygems_certs = File.join(rubygems_path, 'lib/rubygems/ssl_certs')
-        @rubygems_certs = certificates_in(rubygems_certs)
+      def initialize(rubygems_path = nil)
+        if rubygems_path
+          rubygems_cert_path = File.join(rubygems_path, 'lib/rubygems/ssl_certs')
+          @rubygems_certs = certificates_in(rubygems_cert_path)
+        end
 
         @bundler_cert_path = File.expand_path("..", __FILE__)
         @bundler_certs = certificates_in(bundler_cert_path)
       end
 
       def up_to_date?
-        bundler_certs.zip(rubygems_certs).all? do |bc, rc|
-          File.basename(bc) == File.basename(rc) && FileUtils.compare_file(bc, rc)
+        rubygems_certs.all? do |rc|
+          bundler_certs.find do |bc|
+            File.basename(bc) == File.basename(rc) && FileUtils.compare_file(bc, rc)
+          end
         end
       end
 
@@ -30,12 +36,30 @@ module Bundler
         FileUtils.cp rubygems_certs, bundler_cert_path
       end
 
+      def connect_to(host)
+        http = Net::HTTP.new(host, 443)
+        http.use_ssl = true
+        http.verify_mode = OpenSSL::SSL::VERIFY_PEER
+        http.cert_store = store
+        http.head('/')
+      end
+
     private
 
       def certificates_in(path)
         Dir[File.join(path, "*.pem")].sort
       end
 
+      def store
+        @store ||= begin
+          store = OpenSSL::X509::Store.new
+          bundler_certs.each do |cert|
+            store.add_file cert
+          end
+          store
+        end
+      end
+
     end
   end
 end
diff --git a/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt b/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt
new file mode 100644
index 0000000..c5393d1
--- /dev/null
+++ b/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt
@@ -0,0 +1,13 @@
+# Contributor Code of Conduct
+
+As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
+
+We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
+
+Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
+
+Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
+
+This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
diff --git a/lib/bundler/templates/newgem/LICENSE.txt.tt b/lib/bundler/templates/newgem/LICENSE.txt.tt
index a9f52e6..8fef84c 100644
--- a/lib/bundler/templates/newgem/LICENSE.txt.tt
+++ b/lib/bundler/templates/newgem/LICENSE.txt.tt
@@ -1,22 +1,21 @@
-Copyright (c) <%=Time.now.year%> <%=config[:author]%>
+The MIT License (MIT)
 
-MIT License
+Copyright (c) <%=Time.now.year%> <%=config[:author]%>
 
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
 
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
 
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/lib/bundler/templates/newgem/README.md.tt b/lib/bundler/templates/newgem/README.md.tt
index 8a65988..45d9017 100644
--- a/lib/bundler/templates/newgem/README.md.tt
+++ b/lib/bundler/templates/newgem/README.md.tt
@@ -1,6 +1,8 @@
 # <%=config[:constant_name]%>
 
-TODO: Write a gem description
+Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/<%=config[:namespaced_path]%>`. To experiment with that code, run `bin/console` for an interactive prompt.
+
+TODO: Delete this and the text above, and describe your gem
 
 ## Installation
 
@@ -22,6 +24,12 @@ Or install it yourself as:
 
 TODO: Write usage instructions here
 
+## Development
+
+After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.<% if config[:bin] %> Run `bundle exec <%= config[:name] %>` to use the code located in this directory, ignoring other installed copies of this gem.<% end %>
+
+To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
+
 ## Contributing
 
 1. Fork it ( https://github.com/[my-github-username]/<%=config[:name]%>/fork )
diff --git a/lib/bundler/templates/newgem/Rakefile.tt b/lib/bundler/templates/newgem/Rakefile.tt
index f4fc3c6..e0e87e5 100644
--- a/lib/bundler/templates/newgem/Rakefile.tt
+++ b/lib/bundler/templates/newgem/Rakefile.tt
@@ -14,10 +14,11 @@ RSpec::Core::RakeTask.new(:spec)
 
 task :default => :spec
 <% end -%>
-
 <% if config[:ext] -%>
 require "rake/extensiontask"
 
+task :build => :compile
+
 Rake::ExtensionTask.new("<%=config[:underscored_name]%>") do |ext|
   ext.lib_dir = "lib/<%=config[:namespaced_path]%>"
 end
diff --git a/lib/bundler/templates/newgem/bin/console.tt b/lib/bundler/templates/newgem/bin/console.tt
new file mode 100644
index 0000000..f402bd6
--- /dev/null
+++ b/lib/bundler/templates/newgem/bin/console.tt
@@ -0,0 +1,14 @@
+#!/usr/bin/env ruby
+
+require "bundler/setup"
+require "<%= config[:namespaced_path] %>"
+
+# You can add fixtures and/or initialization code here to make experimenting
+# with your gem easier. You can also use a different console, if you like.
+
+# (If you use this, don't forget to add pry to your Gemfile!)
+# require "pry"
+# Pry.start
+
+require "irb"
+IRB.start
diff --git a/lib/bundler/templates/newgem/bin/newgem.tt b/lib/bundler/templates/newgem/bin/newgem.tt
deleted file mode 100644
index a005298..0000000
--- a/lib/bundler/templates/newgem/bin/newgem.tt
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env ruby
-
-require '<%= config[:namespaced_path] %>'
diff --git a/lib/bundler/templates/newgem/bin/setup.tt b/lib/bundler/templates/newgem/bin/setup.tt
new file mode 100644
index 0000000..b65ed50
--- /dev/null
+++ b/lib/bundler/templates/newgem/bin/setup.tt
@@ -0,0 +1,7 @@
+#!/bin/bash
+set -euo pipefail
+IFS=$'\n\t'
+
+bundle install
+
+# Do any other automated setup that you need to do here
diff --git a/lib/bundler/templates/newgem/exe/newgem.tt b/lib/bundler/templates/newgem/exe/newgem.tt
new file mode 100644
index 0000000..a8339bb
--- /dev/null
+++ b/lib/bundler/templates/newgem/exe/newgem.tt
@@ -0,0 +1,3 @@
+#!/usr/bin/env ruby
+
+require "<%= config[:namespaced_path] %>"
diff --git a/lib/bundler/templates/newgem/gitignore.tt b/lib/bundler/templates/newgem/gitignore.tt
index ae3fdc2..ebff7ac 100644
--- a/lib/bundler/templates/newgem/gitignore.tt
+++ b/lib/bundler/templates/newgem/gitignore.tt
@@ -7,8 +7,10 @@
 /pkg/
 /spec/reports/
 /tmp/
+<%- if config[:ext] -%>
 *.bundle
 *.so
 *.o
 *.a
 mkmf.log
+<%- end -%>
diff --git a/lib/bundler/templates/newgem/lib/newgem/version.rb.tt b/lib/bundler/templates/newgem/lib/newgem/version.rb.tt
index fe9b5fc..5874085 100644
--- a/lib/bundler/templates/newgem/lib/newgem/version.rb.tt
+++ b/lib/bundler/templates/newgem/lib/newgem/version.rb.tt
@@ -1,7 +1,7 @@
 <%- config[:constant_array].each_with_index do |c,i| -%>
 <%= '  '*i %>module <%= c %>
 <%- end -%>
-<%= '  '*config[:constant_array].size %>VERSION = "0.0.1"
+<%= '  '*config[:constant_array].size %>VERSION = "0.1.0"
 <%- (config[:constant_array].size-1).downto(0) do |i| -%>
 <%= '  '*i %>end
 <%- end -%>
diff --git a/lib/bundler/templates/newgem/newgem.gemspec.tt b/lib/bundler/templates/newgem/newgem.gemspec.tt
index 74d253e..e630801 100644
--- a/lib/bundler/templates/newgem/newgem.gemspec.tt
+++ b/lib/bundler/templates/newgem/newgem.gemspec.tt
@@ -8,25 +8,36 @@ Gem::Specification.new do |spec|
   spec.version       = <%=config[:constant_name]%>::VERSION
   spec.authors       = [<%=config[:author].inspect%>]
   spec.email         = [<%=config[:email].inspect%>]
-<% if config[:ext] -%>
-  spec.extensions    = ["ext/<%=config[:underscored_name]%>/extconf.rb"]
-<% end -%>
-  spec.summary       = %q{TODO: Write a short summary. Required.}
-  spec.description   = %q{TODO: Write a longer description. Optional.}
-  spec.homepage      = ""
+
+  spec.summary       = %q{TODO: Write a short summary, because Rubygems requires one.}
+  spec.description   = %q{TODO: Write a longer description or delete this line.}
+  spec.homepage      = "TODO: Put your gem's website or public repo URL here."
+<%- if config[:mit] -%>
   spec.license       = "MIT"
+<%- end -%>
 
-  spec.files         = `git ls-files -z`.split("\x0")
-  spec.executables   = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
-  spec.test_files    = spec.files.grep(%r{^(test|spec|features)/})
+  # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
+  # delete this section to allow pushing this gem to any host.
+  if spec.respond_to?(:metadata)
+    spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
+  else
+    raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
+  end
+
+  spec.files         = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
+  spec.bindir        = "exe"
+  spec.executables   = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
   spec.require_paths = ["lib"]
+<%- if config[:ext] -%>
+  spec.extensions    = ["ext/<%=config[:underscored_name]%>/extconf.rb"]
+<%- end -%>
 
-  spec.add_development_dependency "bundler", "~> <%= Bundler::VERSION.split(".")[0..1].join(".") %>"
+  spec.add_development_dependency "bundler", "~> <%= config[:bundler_version] %>"
   spec.add_development_dependency "rake", "~> 10.0"
-<% if config[:ext] -%>
+<%- if config[:ext] -%>
   spec.add_development_dependency "rake-compiler"
-<% end -%>
-<% if config[:test] -%>
+<%- end -%>
+<%- if config[:test] && config[:test] != "false" -%>
   spec.add_development_dependency "<%=config[:test]%>"
-<% end -%>
+<%- end -%>
 end
diff --git a/lib/bundler/templates/newgem/test/test_newgem.rb.tt b/lib/bundler/templates/newgem/test/test_newgem.rb.tt
index 34cc473..d50f7da 100644
--- a/lib/bundler/templates/newgem/test/test_newgem.rb.tt
+++ b/lib/bundler/templates/newgem/test/test_newgem.rb.tt
@@ -1,6 +1,6 @@
 require 'minitest_helper'
 
-class Test<%= config[:constant_name] %> < MiniTest::Unit::TestCase
+class Test<%= config[:constant_name] %> < Minitest::Test
   def test_that_it_has_a_version_number
     refute_nil ::<%= config[:constant_name] %>::VERSION
   end
diff --git a/lib/bundler/ui/shell.rb b/lib/bundler/ui/shell.rb
index c7054e4..81849c3 100644
--- a/lib/bundler/ui/shell.rb
+++ b/lib/bundler/ui/shell.rb
@@ -46,6 +46,14 @@ module Bundler
         @shell.ask(msg)
       end
 
+      def yes?(msg)
+        @shell.yes?(msg)
+      end
+
+      def no?
+        @shell.no?(msg)
+      end
+
       def level=(level)
         raise ArgumentError unless LEVELS.include?(level.to_s)
         @level = level
@@ -57,7 +65,7 @@ module Bundler
 
       def trace(e, newline = nil)
         return unless debug?
-        msg = ["#{e.class}: #{e.message}", *e.backtrace].join("\n")
+        msg = "#{e.class}: #{e.message}\n#{e.backtrace.join("\n  ")}"
         tell_me(msg, nil, newline)
       end
 
diff --git a/lib/bundler/vendored_molinillo.rb b/lib/bundler/vendored_molinillo.rb
new file mode 100644
index 0000000..4081f3f
--- /dev/null
+++ b/lib/bundler/vendored_molinillo.rb
@@ -0,0 +1,2 @@
+module Bundler; end
+require 'bundler/vendor/molinillo/lib/molinillo'
diff --git a/lib/bundler/vendored_thor.rb b/lib/bundler/vendored_thor.rb
index a643426..1931b5f 100644
--- a/lib/bundler/vendored_thor.rb
+++ b/lib/bundler/vendored_thor.rb
@@ -1,8 +1,3 @@
-if defined?(Thor)
-  Bundler.ui.warn "Thor has already been required. " +
-    "This may cause Bundler to malfunction in unexpected ways."
-end
-vendor = File.expand_path('../vendor', __FILE__)
-$:.unshift(vendor) unless $:.include?(vendor)
-require 'thor'
-require 'thor/actions'
+module Bundler; end
+require 'bundler/vendor/thor/lib/thor'
+require 'bundler/vendor/thor/lib/thor/actions'
diff --git a/lib/bundler/version.rb b/lib/bundler/version.rb
index 9989ef9..7eed086 100644
--- a/lib/bundler/version.rb
+++ b/lib/bundler/version.rb
@@ -2,5 +2,5 @@ module Bundler
   # We're doing this because we might write tests that deal
   # with other versions of bundler and we are unsure how to
   # handle this better.
-  VERSION = "1.7.4" unless defined?(::Bundler::VERSION)
+  VERSION = "1.9.9" unless defined?(::Bundler::VERSION)
 end
diff --git a/lib/bundler/worker.rb b/lib/bundler/worker.rb
new file mode 100644
index 0000000..4961588
--- /dev/null
+++ b/lib/bundler/worker.rb
@@ -0,0 +1,73 @@
+require 'thread'
+
+module Bundler
+  class Worker
+    POISON = Object.new
+
+    class WrappedException < StandardError
+      attr_reader :exception
+      def initialize(exn)
+        @exception = exn
+      end
+    end
+
+    # Creates a worker pool of specified size
+    #
+    # @param size [Integer] Size of pool
+    # @param func [Proc] job to run in inside the worker pool
+    def initialize(size, func)
+      @request_queue = Queue.new
+      @response_queue = Queue.new
+      @func = func
+      @threads = size.times.map { |i| Thread.start { process_queue(i) } }
+      trap("INT") { abort_threads }
+    end
+
+    # Enqueue a request to be executed in the worker pool
+    #
+    # @param obj [String] mostly it is name of spec that should be downloaded
+    def enq(obj)
+      @request_queue.enq obj
+    end
+
+    # Retrieves results of job function being executed in worker pool
+    def deq
+      result = @response_queue.deq
+      raise result.exception if result.is_a?(WrappedException)
+      result
+    end
+
+    def stop
+      stop_threads
+    end
+
+  private
+
+    def process_queue(i)
+      loop do
+        obj = @request_queue.deq
+        break if obj.equal? POISON
+        @response_queue.enq apply_func(obj, i)
+      end
+    end
+
+    def apply_func(obj, i)
+      @func.call(obj, i)
+    rescue Exception => e
+      WrappedException.new(e)
+    end
+
+    # Stop the worker threads by sending a poison object down the request queue
+    # so as worker threads after retrieving it, shut themselves down
+    def stop_threads
+      @threads.each { @request_queue.enq POISON }
+      @threads.each { |thread| thread.join }
+    end
+
+    def abort_threads
+      @threads.each {|i| i.exit }
+      exit 1
+    end
+
+  end
+end
diff --git a/man/bundle-config.ronn b/man/bundle-config.ronn
index d158f5b..201672e 100644
--- a/man/bundle-config.ronn
+++ b/man/bundle-config.ronn
@@ -70,6 +70,10 @@ The canonical form of this configuration is `"without"`. To convert the canonica
 form to the environment variable form, capitalize it, and prepend `BUNDLE_`. The
 environment variable form of `"without"` is `BUNDLE_WITHOUT`.
 
+Any periods in the configuration keys must be replaced with two underscores when
+setting it via environment variables. The configuration key `local.rack` becomes
+the environment variable `BUNDLE_LOCAL__RACK`.
+
 ## LIST OF AVAILABLE KEYS
 
 The following is a list of all configuration keys and their purpose. You can
@@ -77,7 +81,7 @@ learn more about their operation in [bundle install(1)][bundle-install].
 
 * `path` (`BUNDLE_PATH`):
   The location on disk to install gems. Defaults to `$GEM_HOME` in development
-  and `vendor/bundler` when `--deployment` is used
+  and `vendor/bundle` when `--deployment` is used
 * `frozen` (`BUNDLE_FROZEN`):
   Disallow changes to the `Gemfile`. Defaults to `true` when `--deployment`
   is used.
@@ -86,32 +90,32 @@ learn more about their operation in [bundle install(1)][bundle-install].
 * `bin` (`BUNDLE_BIN`):
   Install executables from gems in the bundle to the specified directory.
   Defaults to `false`.
+* `gemfile` (`BUNDLE_GEMFILE`):
+  The name of the file that bundler should use as the `Gemfile`. This location
+  of this file also sets the root of the project, which is used to resolve
+  relative paths in the `Gemfile`, among other things. By default, bundler
+  will search up from the current working directory until it finds a
+  `Gemfile`.
 * `ssl_ca_cert` (`BUNDLE_SSL_CA_CERT`):
   Path to a designated CA certificate file or folder containing multiple
   certificates for trusted CAs in PEM format.
 * `ssl_client_cert` (`BUNDLE_SSL_CLIENT_CERT`):
   Path to a designated file containing a X.509 client certificate
   and key in PEM format.
+* `cache_path` (`BUNDLE_CACHE_PATH`): The directory that bundler will place
+  cached gems in when running <code>bundle package</code>, and that bundler
+  will look in when installing gems.
+* `disable_multisource` (`BUNDLE_DISABLE_MULTISOURCE`): When set, Gemfiles
+  containing multiple sources will produce errors instead of warnings. Use
+  `bundle config --delete disable_multisource` to unset.
 
 In general, you should set these settings per-application by using the applicable
-flag to the [bundle install(1)][bundle-install] command.
+flag to the [bundle install(1)][bundle-install] or [bundle package(1)][bundle-package] command.
 
 You can set them globally either via environment variables or `bundle config`,
 whichever is preferable for your setup. If you use both, environment variables
 will take preference over global settings.
 
-An additional setting is available only as an environment variable:
-
-* `BUNDLE_GEMFILE`:
-  The name of the file that bundler should use as the `Gemfile`. This location
-  of this file also sets the root of the project, which is used to resolve
-  relative paths in the `Gemfile`, among other things. By default, bundler
-  will search up from the current working directory until it finds a
-  `Gemfile`.
-
-Bundler will ignore any `BUNDLE_GEMFILE` entries in local or global
-configuration files.
-
 ## LOCAL GIT REPOS
 
 Bundler also allows you to work against a git repository locally
@@ -162,9 +166,13 @@ For example, to use a mirror of rubygems.org hosted at
 Bundler allows you to configure credentials for any gem source, which allows
 you to avoid putting secrets into your Gemfile.
 
-    bundle config SOURCE_URL USERNAME:PASSWORD
+    bundle config SOURCE_HOSTNAME USERNAME:PASSWORD
 
 For example, to save the credentials of user `claudette` for the gem source at
 `gems.longerous.com`, you would run:
 
-    bundle config https://gems.longerous.com/ claudette:s00pers3krit
+    bundle config gems.longerous.com claudette:s00pers3krit
+
+Or you can set the credentials as an environment variable like this:
+
+    export BUNDLE_GEMS__LONGEROUS__COM="claudette:s00pers3krit"
diff --git a/man/bundle-install.ronn b/man/bundle-install.ronn
index a444833..4909929 100644
--- a/man/bundle-install.ronn
+++ b/man/bundle-install.ronn
@@ -3,128 +3,139 @@ bundle-install(1) -- Install the dependencies specified in your Gemfile
 
 ## SYNOPSIS
 
-`bundle install` [--gemfile=GEMFILE]
-                 [--path PATH] [--system]
-                 [--without=GROUP1[ GROUP2...]]
-                 [--local] [--deployment]
-                 [--binstubs[=DIRECTORY]]
-                 [--standalone[=GROUP1[ GROUP2...]]]
-                 [--trust-policy=POLICY]
-                 [--jobs=SIZE]
-                 [--retry=TRIES]
-                 [--no-cache]
-                 [--quiet]
+`bundle install` [--binstubs[=DIRECTORY]]
                  [--clean]
                  [--full-index]
+                 [--gemfile=GEMFILE]
+                 [--jobs=NUMBER]
+                 [--local]
+                 [--deployment]
+                 [--no-cache]
                  [--no-prune]
+                 [--path PATH]
+                 [--system]
+                 [--quiet]
+                 [--retry=NUMBER]
                  [--shebang]
+                 [--standalone[=GROUP[ GROUP...]]]
+                 [--trust-policy=POLICY]
+                 [--without=GROUP[ GROUP...]]
 
 ## DESCRIPTION
 
 Install the gems specified in your Gemfile(5). If this is the first
 time you run bundle install (and a `Gemfile.lock` does not exist),
-bundler will fetch all remote sources, resolve dependencies and
+Bundler will fetch all remote sources, resolve dependencies and
 install all needed gems.
 
 If a `Gemfile.lock` does exist, and you have not updated your Gemfile(5),
-bundler will fetch all remote sources, but use the dependencies
+Bundler will fetch all remote sources, but use the dependencies
 specified in the `Gemfile.lock` instead of resolving dependencies.
 
 If a `Gemfile.lock` does exist, and you have updated your Gemfile(5),
-bundler will use the dependencies in the `Gemfile.lock` for all gems
+Bundler will use the dependencies in the `Gemfile.lock` for all gems
 that you did not update, but will re-resolve the dependencies of
 gems that you did update. You can find more information about this
 update process below under [CONSERVATIVE UPDATING][].
 
 ## OPTIONS
 
-* `--gemfile=<gemfile>`:
-  The location of the Gemfile(5) that bundler should use. This defaults
-  to a gemfile in the current working directory. In general, bundler
-  will assume that the location of the Gemfile(5) is also the project
-  root, and will look for the `Gemfile.lock` and `vendor/cache` relative
-  to it.
+* `--binstubs[=<directory>]`:
+  Creates a directory (defaults to `~/bin`) and place any executables from the
+  gem there. These executables run in Bundler's context. If used, you might add
+  this directory to your environment's `PATH` variable. For instance, if the
+  `rails` gem comes with a `rails` executable, this flag will create a
+  `bin/rails` executable that ensures that all referred dependencies will be
+  resolved using the bundled gems.
 
-* `--path=<path>`:
-  The location to install the gems in the bundle to. This defaults to
-  Rubygems' gem home, which is also the default location where `gem
-  install` installs gems. This means that, by default, gems installed
-  without a `--path` setting will show up in `gem list`. This setting is
-  a [remembered option][REMEMBERED OPTIONS].
+* `--clean`:
+  On finishing the installation Bundler is going to remove any gems not present
+  in the current Gemfile(5). Don't worry, gems currently in use will not be
+  removed.
 
-* `--system`:
-  Installs the gems in the bundle to the system location. This
-  overrides any previous [remembered][REMEMBERED OPTIONS] use of
-  `--path`.
+* `--full-index`:
+  Bundler will not call Rubygems' API endpoint (default) but download and cache
+  a (currently big) index file of all gems. Performance can be improved for
+  large bundles that seldomly change by enabling this option.
 
-* `--without=<list>`:
-  A space-separated list of groups to skip installing. This is a
-  [remembered option][REMEMBERED OPTIONS].
+* `--gemfile=<gemfile>`:
+  The location of the Gemfile(5) which Bundler should use. This defaults
+  to a Gemfile(5) in the current working directory. In general, Bundler
+  will assume that the location of the Gemfile(5) is also the project's
+  root and will try to find `Gemfile.lock` and `vendor/cache` relative
+  to this location.
+
+* `--jobs=[<number>]`:
+  Install gems by starting <number> of workers parallely.
 
 * `--local`:
-  Do not attempt to connect to `rubygems.org`, instead using just
-  the gems already present in Rubygems' cache or in `vendor/cache`.
-  Note that if a more appropriate platform-specific gem exists on
-  `rubygems.org`, it will not be found.
+  Do not attempt to connect to `rubygems.org`. Instead, Bundler will use the
+  gems already present in Rubygems' cache or in `vendor/cache`. Note that if a
+  appropriate platform-specific gem exists on `rubygems.org` it will not be
+  found.
 
 * `--deployment`:
-  Switches bundler's defaults into [deployment mode][DEPLOYMENT MODE].
-  Do not use this flag on development machines.
+  In [deployment mode][DEPLOYMENT MODE], Bundler will 'roll-out' the bundle for
+  `production` use. Please check carefully if you want to have this option
+  enabled in `development` or `test` environments.
 
-* `--binstubs[=<directory>]`:
-  Create a directory (defaults to `bin`) containing an executable
-  that runs in the context of the bundle. For instance, if the
-  `rails` gem comes with a `rails` executable, this flag will create
-  a `bin/rails` executable that ensures that all dependencies used
-  come from the bundled gems.
+* `--system`:
+  Installs the gems specified in the bundle to the system's Rubygems location.
+  This overrides any previous [remembered][REMEMBERED OPTIONS] use of `--path`.
 
-* `--shebang ruby-install-name`:
-  Uses the ruby executable (usually `ruby`) provided to execute the scripts created
-  with --binstubs. For instance, if you use --binstubs with `--shebang jruby`,
-  all executables will be created to use jruby instead.
+* `--no-cache`:
+  Do not update the cache in `vendor/cache` with the newly bundled gems. This
+  does not remove any gems in the cache but keeps the newly bundled gems from
+  being cached during the install.
 
-* `--standalone[=<list>]`:
-  Make a bundle that can work without Ruby Gems or Bundler at runtime.
-  It takes a space separated list of groups to install. It creates a
-  `bundle` directory and installs the bundle there. It also generates
-  a `bundle/bundler/setup.rb` file to replace Bundler's own setup.
+* `--no-prune`:
+  Don't remove stale gems from the cache when the installation finishes.
 
-* `--trust-policy=[<policy>]`:
-  Apply the Rubygems security policy named <policy>, where policy is one of
-  HighSecurity, MediumSecurity, LowSecurity, AlmostNoSecurity, or NoSecurity.
-  For more detail, see the Rubygems signing documentation, linked below in
-  [SEE ALSO][].
+* `--path=<path>`:
+  The location to install the specified gems to. This defaults to Rubygems'
+  setting. Bundler shares this location with Rubygems, `gem install ...` will
+  have gem installed there, too. Therefore, gems installed without a
+  `--path ...` setting will show up by calling `gem list`. Accodingly, gems
+  installed to other locations will not get listed. This setting is a
+  [remembered option][REMEMBERED OPTIONS].
 
-* `--jobs=[<size>]`:
-  Install gems parallely by starting <size> number of parallel workers.
+* `--quiet`:
+  Do not print progress information to the standard output. Instead, Bundler
+  will exit using a status code (`$?`).
 
-* `--retry[<tries]`:
-  Retries failed network or git requests <tries> times.
+* `--retry=[<number>]`:
+  Retry failed network or git requests for <number> times.
 
-* `--no-cache`:
-  Do not update the cache in `vendor/cache` with the newly bundled gems. This
-  does not remove any existing cached gems, only stops the newly bundled gems
-  from being cached during the install.
+* `--shebang=<ruby-executable>`:
+  Uses the specified ruby executable (usually `ruby`) to execute the scripts
+  created with `--binstubs`. In addition, if you use `--binstubs` together with
+  `--shebang jruby` these executables will be changed to execute `jruby`
+  instead.
 
-* `--quiet`:
-  Do not print progress information to stdout. Instead, communicate the
-  success of the install operation via exit status code.
+* `--standalone[=<list>]`:
+  Makes a bundle that can work without depending on Rubygems or Bundler at
+  runtime. A space separated list of groups to install has to be specified.
+  Bundler creates a directory named `bundle` and installs the bundle there. It
+  also generates a `bundle/bundler/setup.rb` file to replace Bundler's own setup
+  in the manner required.
 
-* `--clean`:
-  Run bundle clean automatically after install.
+* `--trust-policy=[<policy>]`:
+  Apply the Rubygems security policy <policy>, where policy is one of
+  `HighSecurity`, `MediumSecurity`, `LowSecurity`, `AlmostNoSecurity`, or
+  `NoSecurity`. For more details, please see the Rubygems signing documentation
+  linked below in [SEE ALSO][].
 
-* `--full-index`:
-  Use the rubygems modern index instead of the API endpoint.
+* `--without=<list>`:
+  A space-separated list of groups referencing gems to skip during installation.
+  This is a [remembered option][REMEMBERED OPTIONS].
 
-* `--no-prune`:
-  Don't remove stale gems from the cache.
 
 ## DEPLOYMENT MODE
 
 Bundler's defaults are optimized for development. To switch to
 defaults optimized for deployment, use the `--deployment` flag.
 Do not activate deployment mode on development machines, as it
-will cause in an error when the Gemfile is modified.
+will cause an error when the Gemfile(5) is modified.
 
 1. A `Gemfile.lock` is required.
 
@@ -161,10 +172,10 @@ will cause in an error when the Gemfile is modified.
 
 ## SUDO USAGE
 
-By default, bundler installs gems to the same location as `gem install`.
+By default, Bundler installs gems to the same location as `gem install`.
 
 In some cases, that location may not be writable by your Unix user. In
-that case, bundler will stage everything in a temporary directory,
+that case, Bundler will stage everything in a temporary directory,
 then ask you for your `sudo` password in order to copy the gems into
 their system location.
 
@@ -185,7 +196,7 @@ the current user. Therefore, git gems are downloaded and installed
 into `~/.bundle` rather than $GEM_HOME or $BUNDLE_PATH.
 
 As a result, you should run `bundle install` as the current user,
-and bundler will ask for your password if it is needed to put the
+and Bundler will ask for your password if it is needed to put the
 gems into their final location.
 
 ## INSTALLING GROUPS
@@ -193,7 +204,7 @@ gems into their final location.
 By default, `bundle install` will install all gems in all groups
 in your Gemfile(5), except those declared for a different platform.
 
-However, you can explicitly tell bundler to skip installing
+However, you can explicitly tell Bundler to skip installing
 certain groups with the `--without` option. This option takes
 a space-separated list of groups.
 
@@ -214,21 +225,21 @@ third-party code being used in different environments.`
 
 For a simple illustration, consider the following Gemfile(5):
 
-    source "https://rubygems.org"
+    source 'https://rubygems.org'
 
-    gem "sinatra"
+    gem 'sinatra'
 
     group :production do
-      gem "rack-perftools-profiler"
+      gem 'rack-perftools-profiler'
     end
 
-In this case, `sinatra` depends on any version of Rack (`>= 1.0`, while
+In this case, `sinatra` depends on any version of Rack (`>= 1.0`), while
 `rack-perftools-profiler` depends on 1.x (`~> 1.0`).
 
 When you run `bundle install --without production` in development, we
 look at the dependencies of `rack-perftools-profiler` as well. That way,
 you do not spend all your time developing against Rack 2.0, using new
-APIs unavailable in Rack 1.x, only to have bundler switch to Rack 1.2
+APIs unavailable in Rack 1.x, only to have Bundler switch to Rack 1.2
 when the `production` group _is_ used.
 
 This should not cause any problems in practice, because we do not
@@ -310,10 +321,10 @@ same versions of all dependencies as it used before the update.
 
 Let's take a look at an example. Here's your original Gemfile(5):
 
-    source "https://rubygems.org"
+    source 'https://rubygems.org'
 
-    gem "actionpack", "2.3.8"
-    gem "activemerchant"
+    gem 'actionpack', '2.3.8'
+    gem 'activemerchant'
 
 In this case, both `actionpack` and `activemerchant` depend on
 `activesupport`. The `actionpack` gem depends on `activesupport 2.3.8`
@@ -326,10 +337,10 @@ gems in your Gemfile(5).
 
 Next, you modify your Gemfile(5) to:
 
-    source "https://rubygems.org"
+    source 'https://rubygems.org'
 
-    gem "actionpack", "3.0.0.rc"
-    gem "activemerchant"
+    gem 'actionpack', '3.0.0.rc'
+    gem 'activemerchant'
 
 The `actionpack 3.0.0.rc` gem has a number of new dependencies,
 and updates the `activesupport` dependency to `= 3.0.0.rc` and
@@ -351,7 +362,7 @@ you would not expect it to suddenly stop working after updating
 dependency of actionpack requires updating one of its dependencies.
 
 Even though `activemerchant` declares a very loose dependency
-that theoretically matches `activesupport 3.0.0.rc`, bundler treats
+that theoretically matches `activesupport 3.0.0.rc`, Bundler treats
 gems in your Gemfile(5) that have not changed as an atomic unit
 together with their dependencies. In this case, the `activemerchant`
 dependency is treated as `activemerchant 1.7.1 + activesupport 2.3.8`,
diff --git a/man/bundle-package.ronn b/man/bundle-package.ronn
index 610f820..8a6b439 100644
--- a/man/bundle-package.ronn
+++ b/man/bundle-package.ronn
@@ -17,6 +17,13 @@ Since Bundler 1.2, the `bundle package` command can also package `:git` and
 `:path` dependencies besides .gem files. This needs to be explicitly enabled
 via the `--all` option. Once used, the `--all` option will be remembered.
 
+## SUPPORT FOR MULTIPLE PLATFORMS
+
+When using gems that have different packages for different platforms, Bundler
+1.8 and newer support caching of gems for other platforms in `vendor/cache`.
+This needs to be enabled via the `--all-platforms` option. This setting will be
+remembered in your local bundler configuration.
+
 ## REMOTE FETCHING
 
 By default, if you simply run [bundle install(1)][bundle-install] after running
diff --git a/man/bundle-update.ronn b/man/bundle-update.ronn
index 3ac60c5..b9900e3 100644
--- a/man/bundle-update.ronn
+++ b/man/bundle-update.ronn
@@ -3,7 +3,7 @@ bundle-update(1) -- Update your gems to the latest available versions
 
 ## SYNOPSIS
 
-`bundle update` <*gems> [--source=NAME] [--local]
+`bundle update` <*gems> [--group=NAME] [--source=NAME] [--local]
 
 ## DESCRIPTION
 
@@ -17,6 +17,12 @@ gem.
 
 ## OPTIONS
 
+* `--group=<name>`:
+  Only update the gems in the specified group. For instance, you can update all gems
+  in the development group with `bundle update --group development`. You can also
+  call `bundle update rails --group test` to update the rails gem and all gems in
+  the test group, for example.
+
 * `--source=<name>`:
   The name of a `:git` or `:path` source used in the Gemfile(5). For
   instance, with a `:git` source of `http://github.com/rails/rails.git`,
@@ -41,37 +47,40 @@ Consider the following Gemfile(5):
 When you run [bundle install(1)][bundle-install] the first time, bundler will resolve
 all of the dependencies, all the way down, and install what you need:
 
-    Fetching source index for https://rubygems.org/
-    Installing rake (10.0.2)
-    Installing abstract (1.0.0)
-    Installing activesupport (3.0.0.rc)
-    Installing builder (2.1.2)
-    Installing i18n (0.4.1)
-    Installing activemodel (3.0.0.rc)
-    Installing erubis (2.6.6)
-    Installing rack (1.2.1)
-    Installing rack-mount (0.6.9)
-    Installing rack-test (0.5.4)
-    Installing tzinfo (0.3.22)
-    Installing actionpack (3.0.0.rc)
-    Installing mime-types (1.16)
-    Installing polyglot (0.3.1)
-    Installing treetop (1.4.8)
-    Installing mail (2.2.5)
-    Installing actionmailer (3.0.0.rc)
-    Installing arel (0.4.0)
-    Installing activerecord (3.0.0.rc)
-    Installing activeresource (3.0.0.rc)
-    Installing bundler (1.0.0.rc.3)
-    Installing nokogiri (1.4.3.1) with native extensions
-    Installing thor (0.14.0)
-    Installing railties (3.0.0.rc)
-    Installing rails (3.0.0.rc)
-
-    Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
+    Fetching gem metadata from https://rubygems.org/.........
+    Resolving dependencies...
+    Installing builder 2.1.2
+    Installing abstract 1.0.0
+    Installing rack 1.2.8
+    Using bundler 1.7.6
+    Installing rake 10.4.0
+    Installing polyglot 0.3.5
+    Installing mime-types 1.25.1
+    Installing i18n 0.4.2
+    Installing mini_portile 0.6.1
+    Installing tzinfo 0.3.42
+    Installing rack-mount 0.6.14
+    Installing rack-test 0.5.7
+    Installing treetop 1.4.15
+    Installing thor 0.14.6
+    Installing activesupport 3.0.0.rc
+    Installing erubis 2.6.6
+    Installing activemodel 3.0.0.rc
+    Installing arel 0.4.0
+    Installing mail 2.2.20
+    Installing activeresource 3.0.0.rc
+    Installing actionpack 3.0.0.rc
+    Installing activerecord 3.0.0.rc
+    Installing actionmailer 3.0.0.rc
+    Installing railties 3.0.0.rc
+    Installing rails 3.0.0.rc
+    Installing nokogiri 1.6.5
+
+    Bundle complete! 2 Gemfile dependencies, 26 gems total.
+    Use `bundle show [gemname]` to see where a bundled gem is installed.
 
 As you can see, even though you have just two gems in the Gemfile(5), your application
-actually needs 25 different gems in order to run. Bundler remembers the exact versions
+actually needs 26 different gems in order to run. Bundler remembers the exact versions
 it installed in `Gemfile.lock`. The next time you run [bundle install(1)][bundle-install], bundler skips
 the dependency resolution and installs the same gems as it installed last time.
 
diff --git a/man/bundle.ronn b/man/bundle.ronn
index 1167b0b..7b69c67 100644
--- a/man/bundle.ronn
+++ b/man/bundle.ronn
@@ -82,6 +82,12 @@ We divide `bundle` subcommands into primary commands and utilities.
 * `bundle clean(1)`:
   Cleans up unused gems in your bundler directory
 
+## PLUGINS
+
+When running a command that isn't listed in PRIMARY COMMANDS or UTILITIES,
+Bundler will try to find an executable on your path named `bundler-<command>`
+and execute it, passing down any extra arguments to it.
+
 ## OBSOLETE
 
 These commands are obsolete and should no longer be used
diff --git a/man/gemfile.5.ronn b/man/gemfile.5.ronn
index ac49f8c..876c927 100644
--- a/man/gemfile.5.ronn
+++ b/man/gemfile.5.ronn
@@ -40,7 +40,7 @@ the username and password for any sources that need it. The command must be run
 once on each computer that will install the Gemfile, but this keeps the
 credentials from being stored in plain text in version control.
 
-    bundle config https://gems.example.com/ user:password
+    bundle config gems.example.com user:password
 
 For some sources, like a company Gemfury account, it may be easier to simply
 include the credentials in the Gemfile as part of the source URL.
@@ -181,6 +181,8 @@ There are a number of `Gemfile` platforms:
     _ruby_ `AND` version 2.0
   * `ruby_21`:
     _ruby_ `AND` version 2.1
+  * `ruby_22`:
+    _ruby_ `AND` version 2.2
   * `mri`:
     Same as _ruby_, but not Rubinius
   * `mri_18`:
@@ -191,6 +193,8 @@ There are a number of `Gemfile` platforms:
     _mri_ `AND` version 2.0
   * `mri_21`:
     _mri_ `AND` version 2.1
+  * `mri_22`:
+    _mri_ `AND` version 2.2
   * `rbx`:
     Same as _ruby_, but only Rubinius (not MRI)
   * `jruby`:
@@ -207,12 +211,16 @@ There are a number of `Gemfile` platforms:
     _mingw_ `AND` version 2.0
   * `mingw_21`:
     _mingw_ `AND` version 2.1
+  * `mingw_22`:
+    _mingw_ `AND` version 2.2
   * `x64_mingw`:
     Windows 64 bit 'mingw32' platform (aka RubyInstaller x64)
   * `x64_mingw_20`:
     _x64_mingw_ `AND` version 2.0
   * `x64_mingw_21`:
     _x64_mingw_ `AND` version 2.1
+  * `x64_mingw_22`:
+    _x64_mingw_ `AND` version 2.2
 
 As with groups, you can specify one or more platforms:
 
@@ -246,16 +254,26 @@ gem warning described above in
 ### GIT (:git)
 
 If necessary, you can specify that a gem is located at a particular
-git repository. The repository can be public (`http://github.com/rails/rails.git`)
-or private (`git at github.com:rails/rails.git`). If the repository is private,
-the user that you use to run `bundle install` `MUST` have the appropriate
-keys available in their `$HOME/.ssh`.
+git repository using the `:git` parameter. The repository can be accessed via
+several protocols:
+
+  * `HTTP(S)`:
+    gem "rails", :git => "https://github.com/rails/rails.git"
+  * `SSH`:
+    gem "rails", :git => "git at github.com:rails/rails.git"
+  * `git`:
+    gem "rails", :git => "git://github.com/rails/rails.git"
 
-Git repositories are specified using the `:git` parameter. The `group`,
-`platforms`, and `require` options are available and behave exactly the same
-as they would for a normal gem.
+If using SSH, the user that you use to run `bundle install` `MUST` have the
+appropriate keys available in their `$HOME/.ssh`.
 
-    gem "rails", :git => "git://github.com/rails/rails.git"
+`NOTE`: `http://` and `git://` URLs should be avoided if at all possible. These
+protocols are unauthenticated, so a man-in-the-middle attacker can deliver
+malicious code and compromise your system. HTTPS and SSH are strongly
+preferred.
+
+The `group`, `platforms`, and `require` options are available and behave
+exactly the same as they would for a normal gem.
 
 A git repository `SHOULD` have at least one file, at the root of the
 directory containing the gem, with the extension `.gemspec`. This file
@@ -272,7 +290,7 @@ to, a version specifier, if provided, means that the git repository is
 only valid if the `.gemspec` specifies a version matching the version
 specifier. If not, bundler will print a warning.
 
-    gem "rails", "2.3.8", :git => "git://github.com/rails/rails.git"
+    gem "rails", "2.3.8", :git => "https://github.com/rails/rails.git"
     # bundle install will fail, because the .gemspec in the rails
     # repository's master branch specifies version 3.0.0
 
@@ -307,8 +325,25 @@ and then installs the resulting gem. The `gem build` command,
 which comes standard with Rubygems, evaluates the `.gemspec` in
 the context of the directory in which it is located.
 
+### GIT SOURCE (:git_source)
+
+A custom git source can be defined via the `git_source` method. Provide the source's name
+as an argument, and a block which receives a single argument and interpolates it into a
+string to return the full repo address:
+
+    git_source(:stash){ |repo_name| "https://stash.corp.acme.pl/#{repo_name}.git" }
+    gem 'rails', :stash => 'forks/rails'
+
+In addition, if you wish to choose a specific branch:
+
+    gem "rails", :stash => "forks/rails", :branch => "branch_name"
+
 ### GITHUB (:github)
 
+`NOTE`: This shorthand should be avoided until Bundler 2.0, since it
+currently expands to an insecure `git://` URL. This allows a
+man-in-the-middle attacker to compromise your system.
+
 If the git repository you want to use is hosted on GitHub and is public, you can use the
 :github shorthand to specify just the github username and repository name (without the
 trailing ".git"), separated by a slash. If both the username and repository name are the
@@ -321,9 +356,36 @@ Are both equivalent to
 
     gem "rails", :git => "git://github.com/rails/rails.git"
 
-In addition, if you wish to choose a specific branch:
+Since the `github` method is a specialization of `git_source`, it accepts a `:branch` named argument.
+
+### GIST (:gist)
+
+If the git repository you want to use is hosted as a Github Gist and is public, you can use
+the :gist shorthand to specify just the gist identifier (without the trailing ".git").
+
+    gem "the_hatch", :gist => "4815162342"
 
-    gem "rails", :github => "rails/rails", :branch => "branch_name"
+Is equivalent to:
+
+    gem "the_hatch", :git => "https://gist.github.com/4815162342.git"
+
+Since the `gist` method is a specialization of `git_source`, it accepts a `:branch` named argument.
+
+### BITBUCKET (:bitbucket)
+
+If the git repository you want to use is hosted on Bitbucket and is public, you can use the
+:bitbucket shorthand to specify just the bitbucket username and repository name (without the
+trailing ".git"), separated by a slash. If both the username and repository name are the
+same, you can omit one.
+
+    gem "rails", :bitbucket => "rails/rails"
+    gem "rails", :bitbucket => "rails"
+
+Are both equivalent to
+
+    gem "rails", :git => "https://rails@bitbucket.org/rails/rails.git"
+
+Since the `bitbucket` method is a specialization of `git_source`, it accepts a `:branch` named argument.
 
 ### PATH (:path)
 
@@ -341,6 +403,13 @@ gems specified as paths.
 
     gem "rails", :path => "vendor/rails"
 
+If you would like to use multiple local gems directly from the filesystem, you can set a global `path` option to the path containing the gem's files. This will automatically load gemspec files from subdirectories.
+
+    path 'components' do
+      gem 'admin_ui'
+      gem 'public_ui'
+    end
+
 ## BLOCK FORM OF SOURCE, GIT, PATH, GROUP and PLATFORMS
 
 The `:source`, `:git`, `:path`, `:group`, and `:platforms` options may be
@@ -351,7 +420,7 @@ applied to a group of gems by using block form.
       gem "another_internal_gem"
     end
 
-    git "git://github.com/rails/rails.git" do
+    git "https://github.com/rails/rails.git" do
       gem "activesupport"
       gem "actionpack"
     end
diff --git a/metadata.yml b/metadata.yml
index 89f2a7c..8feddbe 100644
--- a/metadata.yml
+++ b/metadata.yml
@@ -1,7 +1,7 @@
 --- !ruby/object:Gem::Specification
 name: bundler
 version: !ruby/object:Gem::Version
-  version: 1.7.4
+  version: 1.9.9
 platform: ruby
 authors:
 - André Arko
@@ -11,9 +11,23 @@ authors:
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2014-10-20 00:00:00.000000000 Z
+date: 2015-05-17 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
+  name: mustache
+  requirement: !ruby/object:Gem::Requirement
+    requirements:
+    - - '='
+      - !ruby/object:Gem::Version
+        version: 0.99.6
+  type: :development
+  prerelease: false
+  version_requirements: !ruby/object:Gem::Requirement
+    requirements:
+    - - '='
+      - !ruby/object:Gem::Version
+        version: 0.99.6
+- !ruby/object:Gem::Dependency
   name: rdiscount
   requirement: !ruby/object:Gem::Requirement
     requirements:
@@ -55,10 +69,24 @@ dependencies:
     - - "~>"
       - !ruby/object:Gem::Version
         version: '3.0'
+- !ruby/object:Gem::Dependency
+  name: rake
+  requirement: !ruby/object:Gem::Requirement
+    requirements:
+    - - ">="
+      - !ruby/object:Gem::Version
+        version: '0'
+  type: :development
+  prerelease: false
+  version_requirements: !ruby/object:Gem::Requirement
+    requirements:
+    - - ">="
+      - !ruby/object:Gem::Version
+        version: '0'
 description: Bundler manages an application's dependencies through its entire life,
   across many machines, systematically and repeatably
 email:
-- andre at arko.net
+- andre.arko+terence.lee at gmail.com
 executables:
 - bundle
 - bundler
@@ -69,6 +97,7 @@ files:
 - ".rspec"
 - ".travis.yml"
 - CHANGELOG.md
+- CODE_OF_CONDUCT.md
 - CONTRIBUTING.md
 - DEVELOPMENT.md
 - ISSUES.md
@@ -81,6 +110,7 @@ files:
 - bin/bundler
 - bundler.gemspec
 - lib/bundler.rb
+- lib/bundler/anonymizable_uri.rb
 - lib/bundler/capistrano.rb
 - lib/bundler/cli.rb
 - lib/bundler/cli/binstubs.rb
@@ -143,10 +173,6 @@ files:
 - lib/bundler/man/gemfile.5
 - lib/bundler/man/gemfile.5.txt
 - lib/bundler/match_platform.rb
-- lib/bundler/parallel_workers.rb
-- lib/bundler/parallel_workers/thread_worker.rb
-- lib/bundler/parallel_workers/unix_worker.rb
-- lib/bundler/parallel_workers/worker.rb
 - lib/bundler/psyched_yaml.rb
 - lib/bundler/remote_specification.rb
 - lib/bundler/resolver.rb
@@ -169,6 +195,8 @@ files:
 - lib/bundler/source_list.rb
 - lib/bundler/spec_set.rb
 - lib/bundler/ssl_certs/.document
+- lib/bundler/ssl_certs/AddTrustExternalCARoot-2048.pem
+- lib/bundler/ssl_certs/AddTrustExternalCARoot.pem
 - lib/bundler/ssl_certs/Class3PublicPrimaryCertificationAuthority.pem
 - lib/bundler/ssl_certs/DigiCertHighAssuranceEVRootCA.pem
 - lib/bundler/ssl_certs/EntrustnetSecureServerCertificationAuthority.pem
@@ -178,11 +206,14 @@ files:
 - lib/bundler/templates/Executable.standalone
 - lib/bundler/templates/Gemfile
 - lib/bundler/templates/newgem/.travis.yml.tt
+- lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt
 - lib/bundler/templates/newgem/Gemfile.tt
 - lib/bundler/templates/newgem/LICENSE.txt.tt
 - lib/bundler/templates/newgem/README.md.tt
 - lib/bundler/templates/newgem/Rakefile.tt
-- lib/bundler/templates/newgem/bin/newgem.tt
+- lib/bundler/templates/newgem/bin/console.tt
+- lib/bundler/templates/newgem/bin/setup.tt
+- lib/bundler/templates/newgem/exe/newgem.tt
 - lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt
 - lib/bundler/templates/newgem/ext/newgem/newgem.c.tt
 - lib/bundler/templates/newgem/ext/newgem/newgem.h.tt
@@ -199,46 +230,56 @@ files:
 - lib/bundler/ui/rg_proxy.rb
 - lib/bundler/ui/shell.rb
 - lib/bundler/ui/silent.rb
-- lib/bundler/vendor/.document
+- lib/bundler/vendor/molinillo/lib/molinillo.rb
+- lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb
+- lib/bundler/vendor/molinillo/lib/molinillo/errors.rb
+- lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb
+- lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb
+- lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb
+- lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb
+- lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb
+- lib/bundler/vendor/molinillo/lib/molinillo/state.rb
 - lib/bundler/vendor/net/http/faster.rb
 - lib/bundler/vendor/net/http/persistent.rb
 - lib/bundler/vendor/net/http/persistent/ssl_reuse.rb
-- lib/bundler/vendor/thor.rb
-- lib/bundler/vendor/thor/actions.rb
-- lib/bundler/vendor/thor/actions/create_file.rb
-- lib/bundler/vendor/thor/actions/create_link.rb
-- lib/bundler/vendor/thor/actions/directory.rb
-- lib/bundler/vendor/thor/actions/empty_directory.rb
-- lib/bundler/vendor/thor/actions/file_manipulation.rb
-- lib/bundler/vendor/thor/actions/inject_into_file.rb
-- lib/bundler/vendor/thor/base.rb
-- lib/bundler/vendor/thor/command.rb
-- lib/bundler/vendor/thor/core_ext/hash_with_indifferent_access.rb
-- lib/bundler/vendor/thor/core_ext/io_binary_read.rb
-- lib/bundler/vendor/thor/core_ext/ordered_hash.rb
-- lib/bundler/vendor/thor/error.rb
-- lib/bundler/vendor/thor/group.rb
-- lib/bundler/vendor/thor/invocation.rb
-- lib/bundler/vendor/thor/line_editor.rb
-- lib/bundler/vendor/thor/line_editor/basic.rb
-- lib/bundler/vendor/thor/line_editor/readline.rb
-- lib/bundler/vendor/thor/parser.rb
-- lib/bundler/vendor/thor/parser/argument.rb
-- lib/bundler/vendor/thor/parser/arguments.rb
-- lib/bundler/vendor/thor/parser/option.rb
-- lib/bundler/vendor/thor/parser/options.rb
-- lib/bundler/vendor/thor/rake_compat.rb
-- lib/bundler/vendor/thor/runner.rb
-- lib/bundler/vendor/thor/shell.rb
-- lib/bundler/vendor/thor/shell/basic.rb
-- lib/bundler/vendor/thor/shell/color.rb
-- lib/bundler/vendor/thor/shell/html.rb
-- lib/bundler/vendor/thor/util.rb
-- lib/bundler/vendor/thor/version.rb
+- lib/bundler/vendor/thor/lib/thor.rb
+- lib/bundler/vendor/thor/lib/thor/actions.rb
+- lib/bundler/vendor/thor/lib/thor/actions/create_file.rb
+- lib/bundler/vendor/thor/lib/thor/actions/create_link.rb
+- lib/bundler/vendor/thor/lib/thor/actions/directory.rb
+- lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb
+- lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb
+- lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb
+- lib/bundler/vendor/thor/lib/thor/base.rb
+- lib/bundler/vendor/thor/lib/thor/command.rb
+- lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb
+- lib/bundler/vendor/thor/lib/thor/core_ext/io_binary_read.rb
+- lib/bundler/vendor/thor/lib/thor/core_ext/ordered_hash.rb
+- lib/bundler/vendor/thor/lib/thor/error.rb
+- lib/bundler/vendor/thor/lib/thor/group.rb
+- lib/bundler/vendor/thor/lib/thor/invocation.rb
+- lib/bundler/vendor/thor/lib/thor/line_editor.rb
+- lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb
+- lib/bundler/vendor/thor/lib/thor/line_editor/readline.rb
+- lib/bundler/vendor/thor/lib/thor/parser.rb
+- lib/bundler/vendor/thor/lib/thor/parser/argument.rb
+- lib/bundler/vendor/thor/lib/thor/parser/arguments.rb
+- lib/bundler/vendor/thor/lib/thor/parser/option.rb
+- lib/bundler/vendor/thor/lib/thor/parser/options.rb
+- lib/bundler/vendor/thor/lib/thor/rake_compat.rb
+- lib/bundler/vendor/thor/lib/thor/runner.rb
+- lib/bundler/vendor/thor/lib/thor/shell.rb
+- lib/bundler/vendor/thor/lib/thor/shell/basic.rb
+- lib/bundler/vendor/thor/lib/thor/shell/color.rb
+- lib/bundler/vendor/thor/lib/thor/shell/html.rb
+- lib/bundler/vendor/thor/lib/thor/util.rb
+- lib/bundler/vendor/thor/lib/thor/version.rb
+- lib/bundler/vendored_molinillo.rb
 - lib/bundler/vendored_persistent.rb
 - lib/bundler/vendored_thor.rb
 - lib/bundler/version.rb
 - lib/bundler/vlad.rb
+- lib/bundler/worker.rb
 - man/bundle-config.ronn
 - man/bundle-exec.ronn
 - man/bundle-install.ronn
@@ -248,114 +289,6 @@ files:
 - man/bundle.ronn
 - man/gemfile.5.ronn
 - man/index.txt
-- spec/bundler/bundler_spec.rb
-- spec/bundler/cli_spec.rb
-- spec/bundler/definition_spec.rb
-- spec/bundler/dsl_spec.rb
-- spec/bundler/friendly_errors_spec.rb
-- spec/bundler/gem_helper_spec.rb
-- spec/bundler/psyched_yaml_spec.rb
-- spec/bundler/retry_spec.rb
-- spec/bundler/settings_spec.rb
-- spec/bundler/source/rubygems_spec.rb
-- spec/bundler/source_list_spec.rb
-- spec/cache/gems_spec.rb
-- spec/cache/git_spec.rb
-- spec/cache/path_spec.rb
-- spec/cache/platform_spec.rb
-- spec/commands/binstubs_spec.rb
-- spec/commands/check_spec.rb
-- spec/commands/clean_spec.rb
-- spec/commands/config_spec.rb
-- spec/commands/console_spec.rb
-- spec/commands/exec_spec.rb
-- spec/commands/help_spec.rb
-- spec/commands/init_spec.rb
-- spec/commands/inject_spec.rb
-- spec/commands/licenses_spec.rb
-- spec/commands/newgem_spec.rb
-- spec/commands/open_spec.rb
-- spec/commands/outdated_spec.rb
-- spec/commands/package_spec.rb
-- spec/commands/show_spec.rb
-- spec/install/binstubs_spec.rb
-- spec/install/bundler_spec.rb
-- spec/install/deploy_spec.rb
-- spec/install/gemfile/gemspec_spec.rb
-- spec/install/gemfile/git_spec.rb
-- spec/install/gemfile/path_spec.rb
-- spec/install/gemfile_spec.rb
-- spec/install/gems/c_ext_spec.rb
-- spec/install/gems/dependency_api_spec.rb
-- spec/install/gems/env_spec.rb
-- spec/install/gems/flex_spec.rb
-- spec/install/gems/groups_spec.rb
-- spec/install/gems/mirror_spec.rb
-- spec/install/gems/platform_spec.rb
-- spec/install/gems/post_install_spec.rb
-- spec/install/gems/resolving_spec.rb
-- spec/install/gems/simple_case_spec.rb
-- spec/install/gems/sources_spec.rb
-- spec/install/gems/standalone_spec.rb
-- spec/install/gems/sudo_spec.rb
-- spec/install/gems/win32_spec.rb
-- spec/install/gemspecs_spec.rb
-- spec/install/path_spec.rb
-- spec/install/post_bundle_message_spec.rb
-- spec/install/prereleases_spec.rb
-- spec/install/security_policy_spec.rb
-- spec/install/upgrade_spec.rb
-- spec/lock/git_spec.rb
-- spec/lock/lockfile_spec.rb
-- spec/other/bundle_ruby_spec.rb
-- spec/other/cli_dispatch_spec.rb
-- spec/other/ext_spec.rb
-- spec/other/platform_spec.rb
-- spec/other/ssl_cert_spec.rb
-- spec/quality_spec.rb
-- spec/realworld/dependency_api_spec.rb
-- spec/realworld/edgecases_spec.rb
-- spec/realworld/parallel_spec.rb
-- spec/resolver/basic_spec.rb
-- spec/resolver/platform_spec.rb
-- spec/runtime/executable_spec.rb
-- spec/runtime/load_spec.rb
-- spec/runtime/platform_spec.rb
-- spec/runtime/require_spec.rb
-- spec/runtime/setup_spec.rb
-- spec/runtime/with_clean_env_spec.rb
-- spec/spec_helper.rb
-- spec/support/artifice/endopint_marshal_fail_basic_authentication.rb
-- spec/support/artifice/endpoint.rb
-- spec/support/artifice/endpoint_500.rb
-- spec/support/artifice/endpoint_api_missing.rb
-- spec/support/artifice/endpoint_basic_authentication.rb
-- spec/support/artifice/endpoint_creds_diff_host.rb
-- spec/support/artifice/endpoint_extra.rb
-- spec/support/artifice/endpoint_extra_missing.rb
-- spec/support/artifice/endpoint_fallback.rb
-- spec/support/artifice/endpoint_host_redirect.rb
-- spec/support/artifice/endpoint_marshal_fail.rb
-- spec/support/artifice/endpoint_redirect.rb
-- spec/support/artifice/endpoint_strict_basic_authentication.rb
-- spec/support/artifice/endpoint_timeout.rb
-- spec/support/builders.rb
-- spec/support/fakeweb/rack-1.0.0.marshal
-- spec/support/fakeweb/windows.rb
-- spec/support/hax.rb
-- spec/support/helpers.rb
-- spec/support/indexes.rb
-- spec/support/matchers.rb
-- spec/support/path.rb
-- spec/support/permissions.rb
-- spec/support/platforms.rb
-- spec/support/ruby_ext.rb
-- spec/support/rubygems_ext.rb
-- spec/support/streams.rb
-- spec/support/sudo.rb
-- spec/update/gems_spec.rb
-- spec/update/git_spec.rb
-- spec/update/path_spec.rb
 homepage: http://bundler.io
 licenses:
 - MIT
@@ -376,116 +309,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
       version: 1.3.6
 requirements: []
 rubyforge_project: 
-rubygems_version: 2.4.1
+rubygems_version: 2.4.5
 signing_key: 
 specification_version: 4
 summary: The best way to manage your application's dependencies
-test_files:
-- spec/bundler/bundler_spec.rb
-- spec/bundler/cli_spec.rb
-- spec/bundler/definition_spec.rb
-- spec/bundler/dsl_spec.rb
-- spec/bundler/friendly_errors_spec.rb
-- spec/bundler/gem_helper_spec.rb
-- spec/bundler/psyched_yaml_spec.rb
-- spec/bundler/retry_spec.rb
-- spec/bundler/settings_spec.rb
-- spec/bundler/source/rubygems_spec.rb
-- spec/bundler/source_list_spec.rb
-- spec/cache/gems_spec.rb
-- spec/cache/git_spec.rb
-- spec/cache/path_spec.rb
-- spec/cache/platform_spec.rb
-- spec/commands/binstubs_spec.rb
-- spec/commands/check_spec.rb
-- spec/commands/clean_spec.rb
-- spec/commands/config_spec.rb
-- spec/commands/console_spec.rb
-- spec/commands/exec_spec.rb
-- spec/commands/help_spec.rb
-- spec/commands/init_spec.rb
-- spec/commands/inject_spec.rb
-- spec/commands/licenses_spec.rb
-- spec/commands/newgem_spec.rb
-- spec/commands/open_spec.rb
-- spec/commands/outdated_spec.rb
-- spec/commands/package_spec.rb
-- spec/commands/show_spec.rb
-- spec/install/binstubs_spec.rb
-- spec/install/bundler_spec.rb
-- spec/install/deploy_spec.rb
-- spec/install/gemfile/gemspec_spec.rb
-- spec/install/gemfile/git_spec.rb
-- spec/install/gemfile/path_spec.rb
-- spec/install/gemfile_spec.rb
-- spec/install/gems/c_ext_spec.rb
-- spec/install/gems/dependency_api_spec.rb
-- spec/install/gems/env_spec.rb
-- spec/install/gems/flex_spec.rb
-- spec/install/gems/groups_spec.rb
-- spec/install/gems/mirror_spec.rb
-- spec/install/gems/platform_spec.rb
-- spec/install/gems/post_install_spec.rb
-- spec/install/gems/resolving_spec.rb
-- spec/install/gems/simple_case_spec.rb
-- spec/install/gems/sources_spec.rb
-- spec/install/gems/standalone_spec.rb
-- spec/install/gems/sudo_spec.rb
-- spec/install/gems/win32_spec.rb
-- spec/install/gemspecs_spec.rb
-- spec/install/path_spec.rb
-- spec/install/post_bundle_message_spec.rb
-- spec/install/prereleases_spec.rb
-- spec/install/security_policy_spec.rb
-- spec/install/upgrade_spec.rb
-- spec/lock/git_spec.rb
-- spec/lock/lockfile_spec.rb
-- spec/other/bundle_ruby_spec.rb
-- spec/other/cli_dispatch_spec.rb
-- spec/other/ext_spec.rb
-- spec/other/platform_spec.rb
-- spec/other/ssl_cert_spec.rb
-- spec/quality_spec.rb
-- spec/realworld/dependency_api_spec.rb
-- spec/realworld/edgecases_spec.rb
-- spec/realworld/parallel_spec.rb
-- spec/resolver/basic_spec.rb
-- spec/resolver/platform_spec.rb
-- spec/runtime/executable_spec.rb
-- spec/runtime/load_spec.rb
-- spec/runtime/platform_spec.rb
-- spec/runtime/require_spec.rb
-- spec/runtime/setup_spec.rb
-- spec/runtime/with_clean_env_spec.rb
-- spec/spec_helper.rb
-- spec/support/artifice/endopint_marshal_fail_basic_authentication.rb
-- spec/support/artifice/endpoint.rb
-- spec/support/artifice/endpoint_500.rb
-- spec/support/artifice/endpoint_api_missing.rb
-- spec/support/artifice/endpoint_basic_authentication.rb
-- spec/support/artifice/endpoint_creds_diff_host.rb
-- spec/support/artifice/endpoint_extra.rb
-- spec/support/artifice/endpoint_extra_missing.rb
-- spec/support/artifice/endpoint_fallback.rb
-- spec/support/artifice/endpoint_host_redirect.rb
-- spec/support/artifice/endpoint_marshal_fail.rb
-- spec/support/artifice/endpoint_redirect.rb
-- spec/support/artifice/endpoint_strict_basic_authentication.rb
-- spec/support/artifice/endpoint_timeout.rb
-- spec/support/builders.rb
-- spec/support/fakeweb/rack-1.0.0.marshal
-- spec/support/fakeweb/windows.rb
-- spec/support/hax.rb
-- spec/support/helpers.rb
-- spec/support/indexes.rb
-- spec/support/matchers.rb
-- spec/support/path.rb
-- spec/support/permissions.rb
-- spec/support/platforms.rb
-- spec/support/ruby_ext.rb
-- spec/support/rubygems_ext.rb
-- spec/support/streams.rb
-- spec/support/sudo.rb
-- spec/update/gems_spec.rb
-- spec/update/git_spec.rb
-- spec/update/path_spec.rb
+test_files: []
diff --git a/spec/bundler/bundler_spec.rb b/spec/bundler/bundler_spec.rb
deleted file mode 100644
index 60168dd..0000000
--- a/spec/bundler/bundler_spec.rb
+++ /dev/null
@@ -1,74 +0,0 @@
-# encoding: utf-8
-require 'spec_helper'
-require 'bundler'
-
-describe Bundler do
-  describe "#load_gemspec_uncached" do
-    let(:app_gemspec_path) { tmp("test.gemspec") }
-    subject { Bundler.load_gemspec_uncached(app_gemspec_path) }
-
-    context "with incorrect YAML file" do
-      before do
-        File.open(app_gemspec_path, "wb") do |f|
-          f.write strip_whitespace(<<-GEMSPEC)
-            ---
-              {:!00 ao=gu\g1= 7~f
-          GEMSPEC
-        end
-      end
-
-      context "on Ruby 1.8", :ruby => "1.8" do
-        it "catches YAML syntax errors" do
-          expect { subject }.to raise_error(Bundler::GemspecError)
-        end
-      end
-
-      context "on Ruby 1.9", :ruby => "1.9" do
-        context "with Syck as YAML::Engine" do
-          it "raises a GemspecError after YAML load throws ArgumentError" do
-            orig_yamler, YAML::ENGINE.yamler = YAML::ENGINE.yamler, 'syck'
-
-            expect { subject }.to raise_error(Bundler::GemspecError)
-
-            YAML::ENGINE.yamler = orig_yamler
-          end
-        end
-
-        context "with Psych as YAML::Engine" do
-          it "raises a GemspecError after YAML load throws Psych::SyntaxError" do
-            orig_yamler, YAML::ENGINE.yamler = YAML::ENGINE.yamler, 'psych'
-
-            expect { subject }.to raise_error(Bundler::GemspecError)
-
-            YAML::ENGINE.yamler = orig_yamler
-          end
-        end
-      end
-    end
-
-    context "with correct YAML file" do
-      it "can load a gemspec with unicode characters with default ruby encoding" do
-        # spec_helper forces the external encoding to UTF-8 but that's not the
-        # ruby default.
-        if defined?(Encoding)
-          encoding = Encoding.default_external
-          Encoding.default_external = "ASCII"
-        end
-
-        File.open(app_gemspec_path, "wb") do |file|
-          file.puts <<-GEMSPEC.gsub(/^\s+/, '')
-            # -*- encoding: utf-8 -*-
-            Gem::Specification.new do |gem|
-              gem.author = "André the Giant"
-            end
-          GEMSPEC
-        end
-
-        expect(subject.author).to eq("André the Giant")
-
-        Encoding.default_external = encoding if defined?(Encoding)
-      end
-    end
-
-  end
-end
diff --git a/spec/bundler/cli_spec.rb b/spec/bundler/cli_spec.rb
deleted file mode 100644
index ef4ec79..0000000
--- a/spec/bundler/cli_spec.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-require 'spec_helper'
-require 'bundler/cli'
-
-describe "bundle executable" do
-  let(:source_uri) { "http://localgemserver.test" }
-
-  it "returns non-zero exit status when passed unrecognized options" do
-    bundle '--invalid_argument', :exitstatus => true
-    expect(exitstatus).to_not be_zero
-  end
-
-  it "returns non-zero exit status when passed unrecognized task" do
-    bundle 'unrecognized-tast', :exitstatus => true
-    expect(exitstatus).to_not be_zero
-  end
-end
diff --git a/spec/bundler/definition_spec.rb b/spec/bundler/definition_spec.rb
deleted file mode 100644
index 0f18416..0000000
--- a/spec/bundler/definition_spec.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-require 'spec_helper'
-require 'bundler/definition'
-
-describe Bundler::Definition do
-  before do
-    allow(Bundler).to receive(:settings){ Bundler::Settings.new(".") }
-    allow(Bundler).to receive(:default_gemfile){ Pathname.new("Gemfile") }
-  end
-
-  describe "#lock" do
-    context "when it's not possible to write to the file" do
-      subject{ Bundler::Definition.new(nil, [], Bundler::SourceList.new, []) }
-
-      it "raises an InstallError with explanation" do
-        expect(File).to receive(:open).with("Gemfile.lock", "wb").
-          and_raise(Errno::EACCES)
-        expect{ subject.lock("Gemfile.lock") }.
-          to raise_error(Bundler::InstallError)
-      end
-    end
-  end
-end
diff --git a/spec/bundler/dsl_spec.rb b/spec/bundler/dsl_spec.rb
deleted file mode 100644
index 03db5d2..0000000
--- a/spec/bundler/dsl_spec.rb
+++ /dev/null
@@ -1,82 +0,0 @@
-require 'spec_helper'
-
-describe Bundler::Dsl do
-  before do
-    @rubygems = double("rubygems")
-    allow(Bundler::Source::Rubygems).to receive(:new){ @rubygems }
-  end
-
-  describe "#register_host" do
-    it "registers custom hosts" do
-      subject.git_source(:example){ |repo_name| "git at git.example.com:#{repo_name}.git" }
-      subject.git_source(:foobar){ |repo_name| "git at foobar.com:#{repo_name}.git" }
-      subject.gem("dobry-pies", :example => "strzalek/dobry-pies")
-      example_uri = "git at git.example.com:strzalek/dobry-pies.git"
-      expect(subject.dependencies.first.source.uri).to eq(example_uri)
-    end
-
-    it "raises expection on invalid hostname" do
-      expect {
-        subject.git_source(:group){ |repo_name| "git at git.example.com:#{repo_name}.git" }
-      }.to raise_error(Bundler::InvalidOption)
-    end
-
-    it "expects block passed" do
-      expect{ subject.git_source(:example) }.to raise_error(Bundler::InvalidOption)
-    end
-
-    context "default hosts (git, gist)" do
-      it "converts :github to :git" do
-        subject.gem("sparks", :github => "indirect/sparks")
-        github_uri = "git://github.com/indirect/sparks.git"
-        expect(subject.dependencies.first.source.uri).to eq(github_uri)
-      end
-
-      it "converts numeric :gist to :git" do
-        subject.gem("not-really-a-gem", :gist => 2859988)
-        github_uri = "https://gist.github.com/2859988.git"
-        expect(subject.dependencies.first.source.uri).to eq(github_uri)
-      end
-
-      it "converts :gist to :git" do
-        subject.gem("not-really-a-gem", :gist => "2859988")
-        github_uri = "https://gist.github.com/2859988.git"
-        expect(subject.dependencies.first.source.uri).to eq(github_uri)
-      end
-
-      it "converts 'rails' to 'rails/rails'" do
-        subject.gem("rails", :github => "rails")
-        github_uri = "git://github.com/rails/rails.git"
-        expect(subject.dependencies.first.source.uri).to eq(github_uri)
-      end
-    end
-  end
-
-  describe "#method_missing" do
-    it "raises an error for unknown DSL methods" do
-      expect(Bundler).to receive(:read_file).with("Gemfile").
-        and_return("unknown")
-
-      error_msg = "Undefined local variable or method `unknown'" \
-        " for Gemfile\\s+from Gemfile:1"
-      expect { subject.eval_gemfile("Gemfile") }.
-        to raise_error(Bundler::GemfileError, Regexp.new(error_msg))
-    end
-  end
-
-  describe "#eval_gemfile" do
-    it "handles syntax errors with a useful message" do
-      expect(Bundler).to receive(:read_file).with("Gemfile").and_return("}")
-      expect { subject.eval_gemfile("Gemfile") }.
-        to raise_error(Bundler::GemfileError, /Gemfile syntax error/)
-    end
-  end
-
-  describe "syntax errors" do
-    it "will raise a Bundler::GemfileError" do
-      gemfile "gem 'foo', :path => /unquoted/string/syntax/error"
-      expect { Bundler::Dsl.evaluate(bundled_app("Gemfile"), nil, true) }.
-        to raise_error(Bundler::GemfileError, /Gemfile syntax error/)
-    end
-  end
-end
diff --git a/spec/bundler/friendly_errors_spec.rb b/spec/bundler/friendly_errors_spec.rb
deleted file mode 100644
index 96c333a..0000000
--- a/spec/bundler/friendly_errors_spec.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-require "spec_helper"
-require "bundler"
-require "bundler/friendly_errors"
-
-describe Bundler, "friendly errors" do
-  it "rescues Thor::AmbiguousTaskError and raises SystemExit" do
-    expect {
-      Bundler.with_friendly_errors do
-        raise Thor::AmbiguousTaskError.new("")
-      end
-    }.to raise_error(SystemExit)
-  end
-end
diff --git a/spec/bundler/gem_helper_spec.rb b/spec/bundler/gem_helper_spec.rb
deleted file mode 100644
index 791a78b..0000000
--- a/spec/bundler/gem_helper_spec.rb
+++ /dev/null
@@ -1,224 +0,0 @@
-require "spec_helper"
-require 'rake'
-require 'bundler/gem_helper'
-
-describe Bundler::GemHelper do
-  let(:app_name) { "test" }
-  let(:app_path) { bundled_app app_name }
-  let(:app_gemspec_path) { app_path.join("#{app_name}.gemspec") }
-
-  before(:each) do
-    bundle "gem #{app_name}"
-  end
-
-  context "determining gemspec" do
-    subject { Bundler::GemHelper.new(app_path) }
-
-    context "fails" do
-      it "when there is no gemspec" do
-        FileUtils.rm app_gemspec_path
-        expect { subject }.to raise_error(/Unable to determine name/)
-      end
-
-      it "when there are two gemspecs and the name isn't specified" do
-        FileUtils.touch app_path.join("#{app_name}-2.gemspec")
-        expect { subject }.to raise_error(/Unable to determine name/)
-      end
-    end
-
-    context "interpolates the name" do
-      it "when there is only one gemspec" do
-        expect(subject.gemspec.name).to eq(app_name)
-      end
-
-      it "for a hidden gemspec" do
-        FileUtils.mv app_gemspec_path, app_path.join(".gemspec")
-        expect(subject.gemspec.name).to eq(app_name)
-      end
-    end
-
-    it "handles namespaces and converts them to CamelCase" do
-      bundle "gem #{app_name}-foo_bar"
-      app_path = bundled_app "#{app_name}-foo_bar"
-
-      lib = app_path.join("lib/#{app_name}/foo_bar.rb").read
-      expect(lib).to include("module #{app_name.capitalize}")
-      expect(lib).to include("module FooBar")
-    end
-  end
-
-  context "gem management" do
-    def mock_confirm_message(message)
-      expect(Bundler.ui).to receive(:confirm).with(message)
-    end
-
-    def mock_build_message(name, version)
-      message = "#{name} #{version} built to pkg/#{name}-#{version}.gem."
-      mock_confirm_message message
-    end
-
-    subject! { Bundler::GemHelper.new(app_path) }
-    let(:app_version) { "0.0.1" }
-    let(:app_gem_dir) { app_path.join("pkg") }
-    let(:app_gem_path) { app_gem_dir.join("#{app_name}-#{app_version}.gem") }
-    let(:app_gemspec_content) { File.read(app_gemspec_path) }
-
-    before(:each) do
-      content = app_gemspec_content.gsub("TODO: ", "")
-      File.open(app_gemspec_path, "w") { |file| file << content }
-    end
-
-    it "uses a shell UI for output" do
-      expect(Bundler.ui).to be_a(Bundler::UI::Shell)
-    end
-
-    describe "#install" do
-      let!(:rake_application) { Rake.application }
-
-      before(:each) do
-        Rake.application = Rake::Application.new
-      end
-
-      after(:each) do
-        Rake.application = rake_application
-      end
-
-      context "defines Rake tasks" do
-        let(:task_names) { %w[build install release] }
-
-        context "before installation" do
-          it "raises an error with appropriate message" do
-            task_names.each do |name|
-              expect { Rake.application[name] }.
-                to raise_error("Don't know how to build task '#{name}'")
-            end
-          end
-        end
-
-        context "after installation" do
-          before do
-            subject.install
-          end
-
-          it "adds Rake tasks successfully" do
-            task_names.each do |name|
-              expect { Rake.application[name] }.not_to raise_error
-              expect(Rake.application[name]).to be_instance_of Rake::Task
-            end
-          end
-
-          it "provides a way to access the gemspec object" do
-            expect(subject.gemspec.name).to eq(app_name)
-          end
-        end
-      end
-    end
-
-    describe "#build_gem" do
-      context "when build failed" do
-        it "raises an error with appropriate message" do
-          # break the gemspec by adding back the TODOs
-          File.open(app_gemspec_path, "w"){ |file| file << app_gemspec_content }
-          expect { subject.build_gem }.to raise_error(/TODO/)
-        end
-      end
-
-      context "when build was successful" do
-        it "creates .gem file" do
-          mock_build_message app_name, app_version
-          subject.build_gem
-          expect(app_gem_path).to exist
-        end
-      end
-    end
-
-    describe "#install_gem" do
-      context "when installation was successful" do
-        it "gem is installed" do
-          mock_build_message app_name, app_version
-          mock_confirm_message "#{app_name} (#{app_version}) installed."
-          subject.install_gem
-          expect(app_gem_path).to exist
-          expect(`gem list`).to include("#{app_name} (#{app_version})")
-        end
-      end
-
-      context "when installation fails" do
-        it "raises an error with appropriate message" do
-          # create empty gem file in order to simulate install failure
-          allow(subject).to receive(:build_gem) do
-            FileUtils.mkdir_p(app_gem_dir)
-            FileUtils.touch app_gem_path
-            app_gem_path
-          end
-          expect { subject.install_gem }.to raise_error(/Couldn't install gem/)
-        end
-      end
-    end
-
-    describe "#release_gem" do
-      before do
-        Dir.chdir(app_path) do
-          `git init`
-          `git config user.email "you at example.com"`
-          `git config user.name "name"`
-        end
-      end
-
-      context "fails" do
-        it "when there are unstaged files" do
-          expect { subject.release_gem }.
-            to raise_error("There are files that need to be committed first.")
-        end
-
-        it "when there are uncommitted files" do
-          Dir.chdir(app_path) { `git add .` }
-          expect { subject.release_gem }.
-            to raise_error("There are files that need to be committed first.")
-        end
-
-        it "when there is no git remote" do
-          # silence messages
-          allow(Bundler.ui).to receive(:confirm)
-          allow(Bundler.ui).to receive(:error)
-
-          Dir.chdir(app_path) { `git commit -a -m "initial commit"` }
-          expect { subject.release_gem }.to raise_error
-        end
-      end
-
-      context "succeeds" do
-        before do
-          Dir.chdir(gem_repo1) { `git init --bare` }
-          Dir.chdir(app_path) do
-            `git remote add origin file://#{gem_repo1}`
-            `git commit -a -m "initial commit"`
-          end
-        end
-
-        it "on releasing" do
-          mock_build_message app_name, app_version
-          mock_confirm_message "Tagged v#{app_version}."
-          mock_confirm_message "Pushed git commits and tags."
-          expect(subject).to receive(:rubygem_push).with(app_gem_path.to_s)
-
-          Dir.chdir(app_path) { sys_exec("git push origin master", true) }
-
-          subject.release_gem
-        end
-
-        it "even if tag already exists" do
-          mock_build_message app_name, app_version
-          mock_confirm_message "Tag v#{app_version} has already been created."
-          expect(subject).to receive(:rubygem_push).with(app_gem_path.to_s)
-
-          Dir.chdir(app_path) do
-            `git tag -a -m \"Version #{app_version}\" v#{app_version}`
-          end
-
-          subject.release_gem
-        end
-      end
-    end
-  end
-end
diff --git a/spec/bundler/psyched_yaml_spec.rb b/spec/bundler/psyched_yaml_spec.rb
deleted file mode 100644
index 5f3c47b..0000000
--- a/spec/bundler/psyched_yaml_spec.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-require 'spec_helper'
-require 'bundler/psyched_yaml'
-
-describe Bundler::YamlSyntaxError do
-  it "is raised on YAML parse errors" do
-    expect{ YAML.parse "{foo" }.to raise_error(Bundler::YamlSyntaxError)
-  end
-end
diff --git a/spec/bundler/retry_spec.rb b/spec/bundler/retry_spec.rb
deleted file mode 100644
index 8e35a10..0000000
--- a/spec/bundler/retry_spec.rb
+++ /dev/null
@@ -1,59 +0,0 @@
-require 'spec_helper'
-
-describe Bundler::Retry do
-  it "return successful result if no errors" do
-    attempts = 0
-    result = Bundler::Retry.new(nil, nil, 3).attempt do
-      attempts += 1
-      :success
-    end
-    expect(result).to eq(:success)
-    expect(attempts).to eq(1)
-  end
-
-  it "defaults to retrying twice" do
-    attempts = 0
-    expect {
-      Bundler::Retry.new(nil).attempt do
-        attempts += 1
-        raise "nope"
-      end
-    }.to raise_error("nope")
-    expect(attempts).to eq(3)
-  end
-
-  it "returns the first valid result" do
-    jobs = [Proc.new{ raise "foo" }, Proc.new{ :bar }, Proc.new{ raise "foo" }]
-    attempts = 0
-    result = Bundler::Retry.new(nil, nil, 3).attempt do
-      attempts += 1
-      jobs.shift.call
-    end
-    expect(result).to eq(:bar)
-    expect(attempts).to eq(2)
-  end
-
-  it "raises the last error" do
-    errors = [StandardError, StandardError, StandardError, Bundler::GemfileNotFound]
-    attempts = 0
-    expect {
-      Bundler::Retry.new(nil, nil, 3).attempt do
-        attempts += 1
-        raise errors.shift
-      end
-    }.to raise_error(Bundler::GemfileNotFound)
-    expect(attempts).to eq(4)
-  end
-
-  it "raises exceptions" do
-    error = Bundler::GemfileNotFound
-    attempts = 0
-    expect {
-      Bundler::Retry.new(nil, error).attempt do
-        attempts += 1
-        raise error
-      end
-    }.to raise_error(error)
-    expect(attempts).to eq(1)
-  end
-end
diff --git a/spec/bundler/settings_spec.rb b/spec/bundler/settings_spec.rb
deleted file mode 100644
index 44f40ce..0000000
--- a/spec/bundler/settings_spec.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-require 'spec_helper'
-require 'bundler/settings'
-
-describe Bundler::Settings do
-  describe "#set_local" do
-    context "when the local config file is not found" do
-      it "raises a GemfileNotFound error with explanation" do
-        expect{ subject.set_local("foo", "bar") }.
-          to raise_error(Bundler::GemfileNotFound, "Could not locate Gemfile")
-      end
-    end
-  end
-end
diff --git a/spec/bundler/source/rubygems_spec.rb b/spec/bundler/source/rubygems_spec.rb
deleted file mode 100644
index 68fc6c6..0000000
--- a/spec/bundler/source/rubygems_spec.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-require 'spec_helper'
-
-describe Bundler::Source::Rubygems do
-  before do
-    allow(Bundler).to receive(:root){ Pathname.new("root") }
-  end
-
-  describe "caches" do
-    it "includes Bundler.app_cache" do
-      expect(subject.caches).to include(Bundler.app_cache)
-    end
-
-    it "includes GEM_PATH entries" do
-      Gem.path.each do |path|
-        expect(subject.caches).to include(File.expand_path("#{path}/cache"))
-      end
-    end
-
-    it "is an array of strings or pathnames" do
-      subject.caches.each do |cache|
-        expect([String, Pathname]).to include(cache.class)
-      end
-    end
-  end
-end
diff --git a/spec/bundler/source_list_spec.rb b/spec/bundler/source_list_spec.rb
deleted file mode 100644
index 4acaa9d..0000000
--- a/spec/bundler/source_list_spec.rb
+++ /dev/null
@@ -1,361 +0,0 @@
-require 'spec_helper'
-
-describe Bundler::SourceList do
-  before do
-    allow(Bundler).to receive(:root) { Pathname.new '/' }
-  end
-
-  subject(:source_list) { Bundler::SourceList.new }
-
-  let(:rubygems_aggregate) { Bundler::Source::Rubygems.new }
-
-  describe "adding sources" do
-    before do
-      source_list.add_path_source('path' => '/existing/path/to/gem')
-      source_list.add_git_source('uri' => 'git://existing-git.org/path.git')
-      source_list.add_rubygems_source('remotes' => ['https://existing-rubygems.org'])
-    end
-
-    describe "#add_path_source" do
-      before do
-        @duplicate = source_list.add_path_source('path' => '/path/to/gem')
-        @new_source = source_list.add_path_source('path' => '/path/to/gem')
-      end
-
-      it "returns the new path source" do
-        expect(@new_source).to be_instance_of(Bundler::Source::Path)
-      end
-
-      it "passes the provided options to the new source" do
-        expect(@new_source.options).to eq('path' => '/path/to/gem')
-      end
-
-      it "adds the source to the beginning of path_sources" do
-        expect(source_list.path_sources.first).to equal(@new_source)
-      end
-
-      it "removes existing duplicates" do
-        expect(source_list.path_sources).not_to include equal(@duplicate)
-      end
-    end
-
-    describe "#add_git_source" do
-      before do
-        @duplicate = source_list.add_git_source('uri' => 'git://host/path.git')
-        @new_source = source_list.add_git_source('uri' => 'git://host/path.git')
-      end
-
-      it "returns the new git source" do
-        expect(@new_source).to be_instance_of(Bundler::Source::Git)
-      end
-
-      it "passes the provided options to the new source" do
-        expect(@new_source.options).to eq('uri' => 'git://host/path.git')
-      end
-
-      it "adds the source to the beginning of git_sources" do
-        expect(source_list.git_sources.first).to equal(@new_source)
-      end
-
-      it "removes existing duplicates" do
-        expect(source_list.git_sources).not_to include equal(@duplicate)
-      end
-    end
-
-    describe "#add_rubygems_source" do
-      before do
-        @duplicate = source_list.add_rubygems_source('remotes' => ['https://rubygems.org/'])
-        @new_source = source_list.add_rubygems_source('remotes' => ['https://rubygems.org/'])
-      end
-
-      it "returns the new rubygems source" do
-        expect(@new_source).to be_instance_of(Bundler::Source::Rubygems)
-      end
-
-      it "passes the provided options to the new source" do
-        expect(@new_source.options).to eq('remotes' => ['https://rubygems.org/'])
-      end
-
-      it "adds the source to the beginning of rubygems_sources" do
-        expect(source_list.rubygems_sources.first).to equal(@new_source)
-      end
-
-      it "removes duplicates" do
-        expect(source_list.rubygems_sources).not_to include equal(@duplicate)
-      end
-    end
-
-    describe "#add_rubygems_remote" do
-      before do
-        @returned_source = source_list.add_rubygems_remote('https://rubygems.org/')
-      end
-
-      it "returns the aggregate rubygems source" do
-        expect(@returned_source).to be_instance_of(Bundler::Source::Rubygems)
-      end
-
-      it "adds the provided remote to the beginning of the aggregate source" do
-        source_list.add_rubygems_remote('https://othersource.org')
-        expect(@returned_source.remotes.first).to eq(URI('https://othersource.org/'))
-      end
-    end
-  end
-
-  describe "#all_sources" do
-    it "includes the aggregate rubygems source when rubygems sources have been added" do
-      source_list.add_git_source('uri' => 'git://host/path.git')
-      source_list.add_rubygems_source('remotes' => ['https://rubygems.org'])
-      source_list.add_path_source('path' => '/path/to/gem')
-
-      expect(source_list.all_sources).to include rubygems_aggregate
-    end
-
-    it "includes the aggregate rubygems source when no rubygems sources have been added" do
-      source_list.add_git_source('uri' => 'git://host/path.git')
-      source_list.add_path_source('path' => '/path/to/gem')
-
-      expect(source_list.all_sources).to include rubygems_aggregate
-    end
-
-    it "returns path sources before git sources before rubygems sources before the aggregate" do
-      source_list.add_git_source('uri' => 'git://host/path.git')
-      source_list.add_rubygems_source('remotes' => ['https://rubygems.org'])
-      source_list.add_path_source('path' => '/path/to/gem')
-
-      expect(source_list.all_sources).to eq [
-        Bundler::Source::Path.new('path' => '/path/to/gem'),
-        Bundler::Source::Git.new('uri' => 'git://host/path.git'),
-        Bundler::Source::Rubygems.new('remotes' => ['https://rubygems.org']),
-        rubygems_aggregate,
-      ]
-    end
-
-    it "returns sources of the same type in the reverse order that they were added" do
-      source_list.add_git_source('uri' => 'git://third-git.org/path.git')
-      source_list.add_rubygems_source('remotes' => ['https://fifth-rubygems.org'])
-      source_list.add_path_source('path' => '/third/path/to/gem')
-      source_list.add_rubygems_source('remotes' => ['https://fourth-rubygems.org'])
-      source_list.add_path_source('path' => '/second/path/to/gem')
-      source_list.add_rubygems_source('remotes' => ['https://third-rubygems.org'])
-      source_list.add_git_source('uri' => 'git://second-git.org/path.git')
-      source_list.add_rubygems_source('remotes' => ['https://second-rubygems.org'])
-      source_list.add_path_source('path' => '/first/path/to/gem')
-      source_list.add_rubygems_source('remotes' => ['https://first-rubygems.org'])
-      source_list.add_git_source('uri' => 'git://first-git.org/path.git')
-
-      expect(source_list.all_sources).to eq [
-        Bundler::Source::Path.new('path' => '/first/path/to/gem'),
-        Bundler::Source::Path.new('path' => '/second/path/to/gem'),
-        Bundler::Source::Path.new('path' => '/third/path/to/gem'),
-        Bundler::Source::Git.new('uri' => 'git://first-git.org/path.git'),
-        Bundler::Source::Git.new('uri' => 'git://second-git.org/path.git'),
-        Bundler::Source::Git.new('uri' => 'git://third-git.org/path.git'),
-        Bundler::Source::Rubygems.new('remotes' => ['https://first-rubygems.org']),
-        Bundler::Source::Rubygems.new('remotes' => ['https://second-rubygems.org']),
-        Bundler::Source::Rubygems.new('remotes' => ['https://third-rubygems.org']),
-        Bundler::Source::Rubygems.new('remotes' => ['https://fourth-rubygems.org']),
-        Bundler::Source::Rubygems.new('remotes' => ['https://fifth-rubygems.org']),
-        rubygems_aggregate,
-      ]
-    end
-  end
-
-  describe "#path_sources" do
-    it "returns an empty array when no path sources have been added" do
-      source_list.add_rubygems_remote('https://rubygems.org')
-      source_list.add_git_source('uri' => 'git://host/path.git')
-      expect(source_list.path_sources).to be_empty
-    end
-
-    it "returns path sources in the reverse order that they were added" do
-      source_list.add_git_source('uri' => 'git://third-git.org/path.git')
-      source_list.add_rubygems_remote('https://fifth-rubygems.org')
-      source_list.add_path_source('path' => '/third/path/to/gem')
-      source_list.add_rubygems_remote('https://fourth-rubygems.org')
-      source_list.add_path_source('path' => '/second/path/to/gem')
-      source_list.add_rubygems_remote('https://third-rubygems.org')
-      source_list.add_git_source('uri' => 'git://second-git.org/path.git')
-      source_list.add_rubygems_remote('https://second-rubygems.org')
-      source_list.add_path_source('path' => '/first/path/to/gem')
-      source_list.add_rubygems_remote('https://first-rubygems.org')
-      source_list.add_git_source('uri' => 'git://first-git.org/path.git')
-
-      expect(source_list.path_sources).to eq [
-        Bundler::Source::Path.new('path' => '/first/path/to/gem'),
-        Bundler::Source::Path.new('path' => '/second/path/to/gem'),
-        Bundler::Source::Path.new('path' => '/third/path/to/gem'),
-      ]
-    end
-  end
-
-  describe "#git_sources" do
-    it "returns an empty array when no git sources have been added" do
-      source_list.add_rubygems_remote('https://rubygems.org')
-      source_list.add_path_source('path' => '/path/to/gem')
-
-      expect(source_list.git_sources).to be_empty
-    end
-
-    it "returns git sources in the reverse order that they were added" do
-      source_list.add_git_source('uri' => 'git://third-git.org/path.git')
-      source_list.add_rubygems_remote('https://fifth-rubygems.org')
-      source_list.add_path_source('path' => '/third/path/to/gem')
-      source_list.add_rubygems_remote('https://fourth-rubygems.org')
-      source_list.add_path_source('path' => '/second/path/to/gem')
-      source_list.add_rubygems_remote('https://third-rubygems.org')
-      source_list.add_git_source('uri' => 'git://second-git.org/path.git')
-      source_list.add_rubygems_remote('https://second-rubygems.org')
-      source_list.add_path_source('path' => '/first/path/to/gem')
-      source_list.add_rubygems_remote('https://first-rubygems.org')
-      source_list.add_git_source('uri' => 'git://first-git.org/path.git')
-
-      expect(source_list.git_sources).to eq [
-        Bundler::Source::Git.new('uri' => 'git://first-git.org/path.git'),
-        Bundler::Source::Git.new('uri' => 'git://second-git.org/path.git'),
-        Bundler::Source::Git.new('uri' => 'git://third-git.org/path.git'),
-      ]
-    end
-  end
-
-  describe "#rubygems_sources" do
-    it "includes the aggregate rubygems source when rubygems sources have been added" do
-      source_list.add_git_source('uri' => 'git://host/path.git')
-      source_list.add_rubygems_source('remotes' => ['https://rubygems.org'])
-      source_list.add_path_source('path' => '/path/to/gem')
-
-      expect(source_list.rubygems_sources).to include rubygems_aggregate
-    end
-
-    it "returns only the aggregate rubygems source when no rubygems sources have been added" do
-      source_list.add_git_source('uri' => 'git://host/path.git')
-      source_list.add_path_source('path' => '/path/to/gem')
-
-      expect(source_list.rubygems_sources).to eq [rubygems_aggregate]
-    end
-
-    it "returns rubygems sources in the reverse order that they were added" do
-      source_list.add_git_source('uri' => 'git://third-git.org/path.git')
-      source_list.add_rubygems_source('remotes' => ['https://fifth-rubygems.org'])
-      source_list.add_path_source('path' => '/third/path/to/gem')
-      source_list.add_rubygems_source('remotes' => ['https://fourth-rubygems.org'])
-      source_list.add_path_source('path' => '/second/path/to/gem')
-      source_list.add_rubygems_source('remotes' => ['https://third-rubygems.org'])
-      source_list.add_git_source('uri' => 'git://second-git.org/path.git')
-      source_list.add_rubygems_source('remotes' => ['https://second-rubygems.org'])
-      source_list.add_path_source('path' => '/first/path/to/gem')
-      source_list.add_rubygems_source('remotes' => ['https://first-rubygems.org'])
-      source_list.add_git_source('uri' => 'git://first-git.org/path.git')
-
-      expect(source_list.rubygems_sources).to eq [
-        Bundler::Source::Rubygems.new('remotes' => ['https://first-rubygems.org']),
-        Bundler::Source::Rubygems.new('remotes' => ['https://second-rubygems.org']),
-        Bundler::Source::Rubygems.new('remotes' => ['https://third-rubygems.org']),
-        Bundler::Source::Rubygems.new('remotes' => ['https://fourth-rubygems.org']),
-        Bundler::Source::Rubygems.new('remotes' => ['https://fifth-rubygems.org']),
-        rubygems_aggregate,
-      ]
-    end
-  end
-
-  describe "#get" do
-    context "when it includes an equal source" do
-      let(:rubygems_source) { Bundler::Source::Rubygems.new('remotes' => ['https://rubygems.org']) }
-      before { @equal_source = source_list.add_rubygems_remote('https://rubygems.org') }
-
-      it "returns the equal source" do
-        expect(source_list.get(rubygems_source)).to be @equal_source
-      end
-    end
-
-    context "when it does not include an equal source" do
-      let(:path_source) { Bundler::Source::Path.new('path' => '/path/to/gem') }
-
-      it "returns nil" do
-        expect(source_list.get(path_source)).to be_nil
-      end
-    end
-  end
-
-  describe "#lock_sources" do
-    it "combines the rubygems sources into a single instance, removing duplicate remotes from the end" do
-      source_list.add_git_source('uri' => 'git://third-git.org/path.git')
-      source_list.add_rubygems_source('remotes' => ['https://duplicate-rubygems.org'])
-      source_list.add_path_source('path' => '/third/path/to/gem')
-      source_list.add_rubygems_source('remotes' => ['https://third-rubygems.org'])
-      source_list.add_path_source('path' => '/second/path/to/gem')
-      source_list.add_rubygems_source('remotes' => ['https://second-rubygems.org'])
-      source_list.add_git_source('uri' => 'git://second-git.org/path.git')
-      source_list.add_rubygems_source('remotes' => ['https://first-rubygems.org'])
-      source_list.add_path_source('path' => '/first/path/to/gem')
-      source_list.add_rubygems_source('remotes' => ['https://duplicate-rubygems.org'])
-      source_list.add_git_source('uri' => 'git://first-git.org/path.git')
-
-      expect(source_list.lock_sources).to eq [
-        Bundler::Source::Git.new('uri' => 'git://first-git.org/path.git'),
-        Bundler::Source::Git.new('uri' => 'git://second-git.org/path.git'),
-        Bundler::Source::Git.new('uri' => 'git://third-git.org/path.git'),
-        Bundler::Source::Path.new('path' => '/first/path/to/gem'),
-        Bundler::Source::Path.new('path' => '/second/path/to/gem'),
-        Bundler::Source::Path.new('path' => '/third/path/to/gem'),
-        Bundler::Source::Rubygems.new('remotes' => [
-          'https://duplicate-rubygems.org',
-          'https://first-rubygems.org',
-          'https://second-rubygems.org',
-          'https://third-rubygems.org',
-        ]),
-      ]
-    end
-  end
-
-  describe "replace_sources!" do
-    let(:existing_locked_source) { Bundler::Source::Path.new('path' => '/existing/path') }
-    let(:removed_locked_source)  { Bundler::Source::Path.new('path' => '/removed/path') }
-
-    let(:locked_sources) { [existing_locked_source, removed_locked_source] }
-
-    before do
-      @existing_source = source_list.add_path_source('path' => '/existing/path')
-      @new_source = source_list.add_path_source('path' => '/new/path')
-      source_list.replace_sources!(locked_sources)
-    end
-
-    it "maintains the order and number of sources" do
-      expect(source_list.path_sources).to eq [@new_source, @existing_source]
-    end
-
-    it "retains the same instance of the new source" do
-      expect(source_list.path_sources[0]).to be @new_source
-    end
-
-    it "replaces the instance of the existing source" do
-      expect(source_list.path_sources[1]).to be existing_locked_source
-    end
-  end
-
-  describe "#cached!" do
-    let(:rubygems_source) { source_list.add_rubygems_remote('https://rubygems.org') }
-    let(:git_source)      { source_list.add_git_source('uri' => 'git://host/path.git') }
-    let(:path_source)     { source_list.add_path_source('path' => '/path/to/gem') }
-
-    it "calls #cached! on all the sources" do
-      expect(rubygems_source).to receive(:cached!)
-      expect(git_source).to receive(:cached!)
-      expect(path_source).to receive(:cached!)
-      source_list.cached!
-    end
-  end
-
-  describe "#remote!" do
-    let(:rubygems_source) { source_list.add_rubygems_remote('https://rubygems.org') }
-    let(:git_source)      { source_list.add_git_source('uri' => 'git://host/path.git') }
-    let(:path_source)     { source_list.add_path_source('path' => '/path/to/gem') }
-
-    it "calls #remote! on all the sources" do
-      expect(rubygems_source).to receive(:remote!)
-      expect(git_source).to receive(:remote!)
-      expect(path_source).to receive(:remote!)
-      source_list.remote!
-    end
-  end
-
-end
diff --git a/spec/cache/gems_spec.rb b/spec/cache/gems_spec.rb
deleted file mode 100644
index b70f627..0000000
--- a/spec/cache/gems_spec.rb
+++ /dev/null
@@ -1,284 +0,0 @@
-require "spec_helper"
-
-describe "bundle cache" do
-
-  describe "when there are only gemsources" do
-    before :each do
-      gemfile <<-G
-        gem 'rack'
-      G
-
-      system_gems "rack-1.0.0"
-      bundle :cache
-    end
-
-    it "copies the .gem file to vendor/cache" do
-      expect(bundled_app("vendor/cache/rack-1.0.0.gem")).to exist
-    end
-
-    it "uses the cache as a source when installing gems" do
-      build_gem "omg", :path => bundled_app('vendor/cache')
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "omg"
-      G
-
-      should_be_installed "omg 1.0.0"
-    end
-
-    it "uses the cache as a source when installing gems with --local" do
-      system_gems []
-      bundle "install --local"
-
-      should_be_installed("rack 1.0.0")
-    end
-
-    it "does not reinstall gems from the cache if they exist on the system" do
-      build_gem "rack", "1.0.0", :path => bundled_app('vendor/cache') do |s|
-        s.write "lib/rack.rb", "RACK = 'FAIL'"
-      end
-
-      install_gemfile <<-G
-        gem "rack"
-      G
-
-      should_be_installed("rack 1.0.0")
-    end
-
-    it "does not reinstall gems from the cache if they exist in the bundle" do
-      system_gems "rack-1.0.0"
-
-      gemfile <<-G
-        gem "rack"
-      G
-
-      build_gem "rack", "1.0.0", :path => bundled_app('vendor/cache') do |s|
-        s.write "lib/rack.rb", "RACK = 'FAIL'"
-      end
-
-      bundle "install --local"
-      should_be_installed("rack 1.0.0")
-    end
-
-    it "creates a lockfile" do
-      cache_gems "rack-1.0.0"
-
-      gemfile <<-G
-        gem "rack"
-      G
-
-      bundle "cache"
-
-      expect(bundled_app("Gemfile.lock")).to exist
-    end
-  end
-
-  describe "when there is a built-in gem", :ruby => "2.0" do
-    before :each do
-      build_repo2 do
-        build_gem "builtin_gem", "1.0.2"
-      end
-
-      build_gem "builtin_gem", "1.0.2", :to_system => true do |s|
-        s.summary = "This builtin_gem is bundled with Ruby"
-      end
-
-      FileUtils.rm("#{system_gem_path}/cache/builtin_gem-1.0.2.gem")
-    end
-
-    it "uses builtin gems" do
-      install_gemfile %|gem 'builtin_gem', '1.0.2'|
-      should_be_installed("builtin_gem 1.0.2")
-    end
-
-    it "caches remote and builtin gems" do
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem 'builtin_gem', '1.0.2'
-        gem 'rack', '1.0.0'
-      G
-
-      bundle :cache
-      expect(bundled_app("vendor/cache/rack-1.0.0.gem")).to exist
-      expect(bundled_app("vendor/cache/builtin_gem-1.0.2.gem")).to exist
-    end
-
-    it "doesn't make remote request after caching the gem" do
-      build_gem "builtin_gem_2", "1.0.2", :path => bundled_app('vendor/cache') do |s|
-        s.summary = "This builtin_gem is bundled with Ruby"
-      end
-
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem 'builtin_gem_2', '1.0.2'
-      G
-
-      bundle "install --local"
-      should_be_installed("builtin_gem_2 1.0.2")
-    end
-  end
-
-  describe "when there are also git sources" do
-    before do
-      build_git "foo"
-      system_gems "rack-1.0.0"
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        git "#{lib_path("foo-1.0")}" do
-          gem 'foo'
-        end
-        gem 'rack'
-      G
-    end
-
-    it "still works" do
-      bundle :cache
-
-      system_gems []
-      bundle "install --local"
-
-      should_be_installed("rack 1.0.0", "foo 1.0")
-    end
-
-    it "should not explode if the lockfile is not present" do
-      FileUtils.rm(bundled_app("Gemfile.lock"))
-
-      bundle :cache
-
-      expect(bundled_app("Gemfile.lock")).to exist
-    end
-  end
-
-  describe "when previously cached" do
-    before :each do
-      build_repo2
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "rack"
-        gem "actionpack"
-      G
-      bundle :cache
-      expect(cached_gem("rack-1.0.0")).to exist
-      expect(cached_gem("actionpack-2.3.2")).to exist
-      expect(cached_gem("activesupport-2.3.2")).to exist
-    end
-
-    it "re-caches during install" do
-      cached_gem("rack-1.0.0").rmtree
-      bundle :install
-      expect(out).to include("Updating files in vendor/cache")
-      expect(cached_gem("rack-1.0.0")).to exist
-    end
-
-    it "adds and removes when gems are updated" do
-      update_repo2
-      bundle 'update'
-      expect(cached_gem("rack-1.2")).to exist
-      expect(cached_gem("rack-1.0.0")).not_to exist
-    end
-
-    it "adds new gems and dependencies" do
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "rails"
-      G
-      expect(cached_gem("rails-2.3.2")).to exist
-      expect(cached_gem("activerecord-2.3.2")).to exist
-    end
-
-    it "removes .gems for removed gems and dependencies" do
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "rack"
-      G
-      expect(cached_gem("rack-1.0.0")).to exist
-      expect(cached_gem("actionpack-2.3.2")).not_to exist
-      expect(cached_gem("activesupport-2.3.2")).not_to exist
-    end
-
-    it "removes .gems when gem changes to git source" do
-      build_git "rack"
-
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "rack", :git => "#{lib_path("rack-1.0")}"
-        gem "actionpack"
-      G
-      expect(cached_gem("rack-1.0.0")).not_to exist
-      expect(cached_gem("actionpack-2.3.2")).to exist
-      expect(cached_gem("activesupport-2.3.2")).to exist
-    end
-
-
-    it "doesn't remove gems that are for another platform" do
-      simulate_platform "java" do
-        install_gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "platform_specific"
-        G
-
-        bundle :cache
-        expect(cached_gem("platform_specific-1.0-java")).to exist
-      end
-
-      simulate_new_machine
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "platform_specific"
-      G
-
-      expect(cached_gem("platform_specific-1.0-#{Gem::Platform.local}")).to exist
-      expect(cached_gem("platform_specific-1.0-java")).to exist
-    end
-
-    it "doesn't remove gems with mismatched :rubygems_version or :date" do
-      cached_gem("rack-1.0.0").rmtree
-      build_gem "rack", "1.0.0",
-        :path => bundled_app('vendor/cache'),
-        :rubygems_version => "1.3.2"
-      simulate_new_machine
-
-      bundle :install
-      expect(cached_gem("rack-1.0.0")).to exist
-    end
-
-    it "handles directories and non .gem files in the cache" do
-      bundled_app("vendor/cache/foo").mkdir
-      File.open(bundled_app("vendor/cache/bar"), 'w'){|f| f.write("not a gem") }
-      bundle :cache
-    end
-
-    it "does not say that it is removing gems when it isn't actually doing so" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-      G
-      bundle "cache"
-      bundle "install"
-      expect(out).not_to match(/removing/i)
-    end
-
-    it "does not warn about all if it doesn't have any git/path dependency" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-      G
-      bundle "cache"
-      expect(out).not_to match(/\-\-all/)
-    end
-
-    it "should install gems with the name bundler in them (that aren't bundler)" do
-      build_gem "foo-bundler", "1.0",
-        :path => bundled_app('vendor/cache')
-
-      install_gemfile <<-G
-        gem "foo-bundler"
-      G
-
-      should_be_installed "foo-bundler 1.0"
-    end
-  end
-
-end
diff --git a/spec/cache/git_spec.rb b/spec/cache/git_spec.rb
deleted file mode 100644
index b369504..0000000
--- a/spec/cache/git_spec.rb
+++ /dev/null
@@ -1,188 +0,0 @@
-require "spec_helper"
-
-describe "git base name" do
-  it "base_name should strip private repo uris" do
-    source  = Bundler::Source::Git.new("uri" => "git at github.com:bundler.git")
-    expect(source.send(:base_name)).to eq("bundler")
-  end
-
-  it "base_name should strip network share paths" do
-    source = Bundler::Source::Git.new("uri" => "//MachineName/ShareFolder")
-    expect(source.send(:base_name)).to eq("ShareFolder")
-  end
-end
-
-%w(cache package).each do |cmd|
-  describe "bundle #{cmd} with git" do
-    it "copies repository to vendor cache and uses it" do
-      git = build_git "foo"
-      ref = git.ref_for("master", 11)
-
-      install_gemfile <<-G
-        gem "foo", :git => '#{lib_path("foo-1.0")}'
-      G
-
-      bundle "#{cmd} --all"
-      expect(bundled_app("vendor/cache/foo-1.0-#{ref}")).to exist
-      expect(bundled_app("vendor/cache/foo-1.0-#{ref}/.git")).not_to exist
-      expect(bundled_app("vendor/cache/foo-1.0-#{ref}/.bundlecache")).to be_file
-
-      FileUtils.rm_rf lib_path("foo-1.0")
-      should_be_installed "foo 1.0"
-    end
-
-    it "copies repository to vendor cache and uses it even when installed with bundle --path" do
-      git = build_git "foo"
-      ref = git.ref_for("master", 11)
-
-      install_gemfile <<-G
-        gem "foo", :git => '#{lib_path("foo-1.0")}'
-      G
-
-      bundle "install --path vendor/bundle"
-      bundle "#{cmd} --all"
-
-      expect(bundled_app("vendor/cache/foo-1.0-#{ref}")).to exist
-      expect(bundled_app("vendor/cache/foo-1.0-#{ref}/.git")).not_to exist
-
-      FileUtils.rm_rf lib_path("foo-1.0")
-      should_be_installed "foo 1.0"
-    end
-
-    it "runs twice without exploding" do
-      build_git "foo"
-
-      install_gemfile <<-G
-        gem "foo", :git => '#{lib_path("foo-1.0")}'
-      G
-
-      bundle "#{cmd} --all"
-      bundle "#{cmd} --all"
-
-      expect(err).to eq("")
-      FileUtils.rm_rf lib_path("foo-1.0")
-      should_be_installed "foo 1.0"
-    end
-
-    it "tracks updates" do
-      git = build_git "foo"
-      old_ref = git.ref_for("master", 11)
-
-      install_gemfile <<-G
-        gem "foo", :git => '#{lib_path("foo-1.0")}'
-      G
-
-      bundle "#{cmd} --all"
-
-      update_git "foo" do |s|
-        s.write "lib/foo.rb", "puts :CACHE"
-      end
-
-      ref = git.ref_for("master", 11)
-      expect(ref).not_to eq(old_ref)
-
-      bundle "update"
-      bundle "#{cmd} --all"
-
-      expect(bundled_app("vendor/cache/foo-1.0-#{ref}")).to exist
-      expect(bundled_app("vendor/cache/foo-1.0-#{old_ref}")).not_to exist
-
-      FileUtils.rm_rf lib_path("foo-1.0")
-      run "require 'foo'"
-      expect(out).to eq("CACHE")
-    end
-
-    it "uses the local repository to generate the cache" do
-      git = build_git "foo"
-      ref = git.ref_for("master", 11)
-
-      gemfile <<-G
-        gem "foo", :git => '#{lib_path("foo-invalid")}', :branch => :master
-      G
-
-      bundle %|config local.foo #{lib_path('foo-1.0')}|
-      bundle "install"
-      bundle "#{cmd} --all"
-
-      expect(bundled_app("vendor/cache/foo-invalid-#{ref}")).to exist
-
-      # Updating the local still uses the local.
-      update_git "foo" do |s|
-        s.write "lib/foo.rb", "puts :LOCAL"
-      end
-
-      run "require 'foo'"
-      expect(out).to eq("LOCAL")
-    end
-
-    it "copies repository to vendor cache, including submodules" do
-      build_git "submodule", "1.0"
-
-      git = build_git "has_submodule", "1.0" do |s|
-        s.add_dependency "submodule"
-      end
-
-      Dir.chdir(lib_path('has_submodule-1.0')) do
-        `git submodule add #{lib_path('submodule-1.0')} submodule-1.0`
-        `git commit -m "submodulator"`
-      end
-
-      install_gemfile <<-G
-        git "#{lib_path('has_submodule-1.0')}", :submodules => true do
-          gem "has_submodule"
-        end
-      G
-
-      ref = git.ref_for("master", 11)
-      bundle "#{cmd} --all"
-
-      expect(bundled_app("vendor/cache/has_submodule-1.0-#{ref}")).to exist
-      expect(bundled_app("vendor/cache/has_submodule-1.0-#{ref}/submodule-1.0")).to exist
-      should_be_installed "has_submodule 1.0"
-    end
-
-    it "displays warning message when detecting git repo in Gemfile" do
-      build_git "foo"
-
-      install_gemfile <<-G
-        gem "foo", :git => '#{lib_path("foo-1.0")}'
-      G
-
-      bundle "#{cmd}"
-
-      expect(out).to include("Your Gemfile contains path and git dependencies.")
-    end
-
-    it "does not display warning message if cache_all is set in bundle config" do
-      build_git "foo"
-
-      install_gemfile <<-G
-        gem "foo", :git => '#{lib_path("foo-1.0")}'
-      G
-
-      bundle "#{cmd} --all"
-      bundle "#{cmd}"
-
-      expect(out).not_to include("Your Gemfile contains path and git dependencies.")
-    end
-
-    it "caches pre-evaluated gemspecs" do
-      git = build_git "foo"
-
-      # Insert a gemspec method that shells out
-      spec_lines = lib_path("foo-1.0/foo.gemspec").read.split("\n")
-      spec_lines.insert(-2, "s.description = `echo bob`")
-      update_git("foo"){ |s| s.write "foo.gemspec", spec_lines.join("\n") }
-
-      install_gemfile <<-G
-        gem "foo", :git => '#{lib_path("foo-1.0")}'
-      G
-      bundle "#{cmd} --all"
-
-      ref = git.ref_for("master", 11)
-      gemspec = bundled_app("vendor/cache/foo-1.0-#{ref}/foo.gemspec").read
-      expect(gemspec).to_not match("`echo bob`")
-    end
-
-  end
-end
diff --git a/spec/cache/path_spec.rb b/spec/cache/path_spec.rb
deleted file mode 100644
index 324e1f1..0000000
--- a/spec/cache/path_spec.rb
+++ /dev/null
@@ -1,121 +0,0 @@
-require "spec_helper"
-
-%w(cache package).each do |cmd|
-  describe "bundle #{cmd} with path" do
-    it "is no-op when the path is within the bundle" do
-      build_lib "foo", :path => bundled_app("lib/foo")
-
-      install_gemfile <<-G
-        gem "foo", :path => '#{bundled_app("lib/foo")}'
-      G
-
-      bundle "#{cmd} --all"
-      expect(bundled_app("vendor/cache/foo-1.0")).not_to exist
-      should_be_installed "foo 1.0"
-    end
-
-    it "copies when the path is outside the bundle " do
-      build_lib "foo"
-
-      install_gemfile <<-G
-        gem "foo", :path => '#{lib_path("foo-1.0")}'
-      G
-
-      bundle "#{cmd} --all"
-      expect(bundled_app("vendor/cache/foo-1.0")).to exist
-      expect(bundled_app("vendor/cache/foo-1.0/.bundlecache")).to be_file
-
-      FileUtils.rm_rf lib_path("foo-1.0")
-      should_be_installed "foo 1.0"
-    end
-
-    it "updates the path on each cache" do
-      build_lib "foo"
-
-      install_gemfile <<-G
-        gem "foo", :path => '#{lib_path("foo-1.0")}'
-      G
-
-      bundle "#{cmd} --all"
-
-      build_lib "foo" do |s|
-        s.write "lib/foo.rb", "puts :CACHE"
-      end
-
-      bundle "#{cmd} --all"
-
-      expect(bundled_app("vendor/cache/foo-1.0")).to exist
-      FileUtils.rm_rf lib_path("foo-1.0")
-
-      run "require 'foo'"
-      expect(out).to eq("CACHE")
-    end
-
-    it "removes stale entries cache" do
-      build_lib "foo"
-
-      install_gemfile <<-G
-        gem "foo", :path => '#{lib_path("foo-1.0")}'
-      G
-
-      bundle "#{cmd} --all"
-
-      install_gemfile <<-G
-        gem "bar", :path => '#{lib_path("bar-1.0")}'
-      G
-
-      bundle "#{cmd} --all"
-      expect(bundled_app("vendor/cache/bar-1.0")).not_to exist
-    end
-
-    it "raises a warning without --all" do
-      build_lib "foo"
-
-      install_gemfile <<-G
-        gem "foo", :path => '#{lib_path("foo-1.0")}'
-      G
-
-      bundle cmd
-      expect(out).to match(/please pass the \-\-all flag/)
-      expect(bundled_app("vendor/cache/foo-1.0")).not_to exist
-    end
-
-    it "stores the given flag" do
-      build_lib "foo"
-
-      install_gemfile <<-G
-        gem "foo", :path => '#{lib_path("foo-1.0")}'
-      G
-
-      bundle "#{cmd} --all"
-      build_lib "bar"
-
-      install_gemfile <<-G
-        gem "foo", :path => '#{lib_path("foo-1.0")}'
-        gem "bar", :path => '#{lib_path("bar-1.0")}'
-      G
-
-      bundle cmd
-      expect(bundled_app("vendor/cache/bar-1.0")).to exist
-    end
-
-    it "can rewind chosen configuration" do
-      build_lib "foo"
-
-      install_gemfile <<-G
-        gem "foo", :path => '#{lib_path("foo-1.0")}'
-      G
-
-      bundle "#{cmd} --all"
-      build_lib "baz"
-
-      gemfile <<-G
-        gem "foo", :path => '#{lib_path("foo-1.0")}'
-        gem "baz", :path => '#{lib_path("baz-1.0")}'
-      G
-
-      bundle "#{cmd} --no-all"
-      expect(bundled_app("vendor/cache/baz-1.0")).not_to exist
-    end
-  end
-end
diff --git a/spec/cache/platform_spec.rb b/spec/cache/platform_spec.rb
deleted file mode 100644
index 0ced663..0000000
--- a/spec/cache/platform_spec.rb
+++ /dev/null
@@ -1,57 +0,0 @@
-require "spec_helper"
-
-describe "bundle cache with multiple platforms" do
-  before :each do
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      platforms :ruby, :ruby_18, :ruby_19, :ruby_20, :ruby_21 do
-        gem "rack", "1.0.0"
-      end
-
-      platforms :jruby do
-        gem "activesupport", "2.3.5"
-      end
-
-      platforms :mri, :mri_18, :mri_19, :mri_20, :mri_21 do
-        gem "activerecord", "2.3.2"
-      end
-    G
-
-    lockfile <<-G
-      GEM
-        remote: file:#{gem_repo1}/
-        specs:
-          rack (1.0.0)
-          activesupport (2.3.5)
-          activerecord (2.3.2)
-
-      PLATFORMS
-        ruby
-        java
-
-      DEPENDENCIES
-        rack (1.0.0)
-        activesupport (2.3.5)
-        activerecord (2.3.2)
-    G
-
-    cache_gems "rack-1.0.0", "activesupport-2.3.5", "activerecord-2.3.2"
-  end
-
-  it "ensures that bundle install does not delete gems for other platforms" do
-    bundle "install"
-
-    expect(bundled_app("vendor/cache/rack-1.0.0.gem")).to exist
-    expect(bundled_app("vendor/cache/activesupport-2.3.5.gem")).to exist
-    expect(bundled_app("vendor/cache/activerecord-2.3.2.gem")).to exist
-  end
-
-  it "ensures that bundle update does not delete gems for other platforms" do
-    bundle "update"
-
-    expect(bundled_app("vendor/cache/rack-1.0.0.gem")).to exist
-    expect(bundled_app("vendor/cache/activesupport-2.3.5.gem")).to exist
-    expect(bundled_app("vendor/cache/activerecord-2.3.2.gem")).to exist
-  end
-end
diff --git a/spec/commands/binstubs_spec.rb b/spec/commands/binstubs_spec.rb
deleted file mode 100644
index e307539..0000000
--- a/spec/commands/binstubs_spec.rb
+++ /dev/null
@@ -1,219 +0,0 @@
-require "spec_helper"
-
-describe "bundle binstubs <gem>" do
-  context "when the gem exists in the lockfile" do
-    it "sets up the binstub" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-      G
-
-      bundle "binstubs rack"
-
-      expect(bundled_app("bin/rackup")).to exist
-    end
-
-    it "does not install other binstubs" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-        gem "rails"
-      G
-
-      bundle "binstubs rails"
-
-      expect(bundled_app("bin/rackup")).not_to exist
-      expect(bundled_app("bin/rails")).to exist
-    end
-
-    it "does install multiple binstubs" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-        gem "rails"
-      G
-
-      bundle "binstubs rails rack"
-
-      expect(bundled_app("bin/rackup")).to exist
-      expect(bundled_app("bin/rails")).to exist
-    end
-
-    it "displays an error when used without any gem" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-      G
-
-      bundle "binstubs", :exitstatus => true
-      expect(exitstatus).to eq(1)
-      expect(out).to eq("`bundle binstubs` needs at least one gem to run.")
-    end
-
-    it "does not bundle the bundler binary" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-      G
-
-      bundle "binstubs bundler"
-
-      expect(bundled_app("bin/bundle")).not_to exist
-      expect(out).to eq("Sorry, Bundler can only be run via Rubygems.")
-    end
-
-    it "installs binstubs from git gems" do
-      FileUtils.mkdir_p(lib_path("foo/bin"))
-      FileUtils.touch(lib_path("foo/bin/foo"))
-      build_git "foo", "1.0", :path => lib_path("foo") do |s|
-        s.executables = %w(foo)
-      end
-      install_gemfile <<-G
-        gem "foo", :git => "#{lib_path('foo')}"
-      G
-
-      bundle "binstubs foo"
-
-      expect(bundled_app("bin/foo")).to exist
-    end
-
-    it "installs binstubs from path gems" do
-      FileUtils.mkdir_p(lib_path("foo/bin"))
-      FileUtils.touch(lib_path("foo/bin/foo"))
-      build_lib "foo" , "1.0", :path => lib_path("foo") do |s|
-        s.executables = %w(foo)
-      end
-      install_gemfile <<-G
-        gem "foo", :path => "#{lib_path('foo')}"
-      G
-
-      bundle "binstubs foo"
-
-      expect(bundled_app("bin/foo")).to exist
-    end
-
-    it "sets correct permissions for binstubs" do
-      with_umask(0002) do
-        install_gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "rack"
-        G
-
-        bundle "binstubs rack"
-        binary = bundled_app("bin/rackup")
-        expect(File.stat(binary).mode.to_s(8)).to eq("100775")
-      end
-    end
-  end
-
-  context "when the gem doesn't exist" do
-    it "displays an error with correct status" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-      G
-
-      bundle "binstubs doesnt_exist", :exitstatus => true
-
-      expect(exitstatus).to eq(7)
-      expect(out).to eq("Could not find gem 'doesnt_exist'.")
-    end
-  end
-
-  context "--path" do
-    it "sets the binstubs dir" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-      G
-
-      bundle "binstubs rack --path exec"
-
-      expect(bundled_app("exec/rackup")).to exist
-    end
-
-    it "setting is saved for bundle install" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-        gem "rails"
-      G
-
-      bundle "binstubs rack --path exec"
-      bundle :install
-
-      expect(bundled_app("exec/rails")).to exist
-    end
-  end
-
-  context "when the bin already exists" do
-    it "doesn't overwrite and warns" do
-      FileUtils.mkdir_p(bundled_app("bin"))
-      File.open(bundled_app("bin/rackup"), 'wb') do |file|
-        file.print "OMG"
-      end
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-      G
-
-      bundle "binstubs rack"
-
-      expect(bundled_app("bin/rackup")).to exist
-      expect(File.read(bundled_app("bin/rackup"))).to eq("OMG")
-      expect(out).to include("Skipped rackup")
-      expect(out).to include("overwrite skipped stubs, use --force")
-    end
-
-    context "when using --force" do
-      it "overwrites the binstub" do
-        FileUtils.mkdir_p(bundled_app("bin"))
-        File.open(bundled_app("bin/rackup"), 'wb') do |file|
-          file.print "OMG"
-        end
-
-        install_gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "rack"
-        G
-
-        bundle "binstubs rack --force"
-
-        expect(bundled_app("bin/rackup")).to exist
-        expect(File.read(bundled_app("bin/rackup"))).not_to eq("OMG")
-      end
-    end
-  end
-
-  context "when the gem has no bins" do
-    it "suggests child gems if they have bins" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack-obama"
-      G
-
-      bundle "binstubs rack-obama"
-      expect(out).to include('rack-obama has no executables')
-      expect(out).to include('rack has: rackup')
-    end
-
-    it "works if child gems don't have bins" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "actionpack"
-      G
-
-      bundle "binstubs actionpack"
-      expect(out).to include('no executables for the gem actionpack')
-    end
-
-    it "works if the gem has development dependencies" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "with_development_dependency"
-      G
-
-      bundle "binstubs with_development_dependency"
-      expect(out).to include('no executables for the gem with_development_dependency')
-    end
-  end
-end
diff --git a/spec/commands/check_spec.rb b/spec/commands/check_spec.rb
deleted file mode 100644
index 248b5c2..0000000
--- a/spec/commands/check_spec.rb
+++ /dev/null
@@ -1,278 +0,0 @@
-require "spec_helper"
-
-describe "bundle check" do
-  it "returns success when the Gemfile is satisfied" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rails"
-    G
-
-    bundle :check, :exitstatus => true
-    expect(@exitstatus).to eq(0)
-    expect(out).to eq("The Gemfile's dependencies are satisfied")
-  end
-
-  it "works with the --gemfile flag when not in the directory" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rails"
-    G
-
-    Dir.chdir tmp
-    bundle "check --gemfile bundled_app/Gemfile"
-    expect(out).to eq("The Gemfile's dependencies are satisfied")
-  end
-
-  it "creates a Gemfile.lock by default if one does not exist" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rails"
-    G
-
-    FileUtils.rm("Gemfile.lock")
-
-    bundle "check"
-
-    expect(bundled_app("Gemfile.lock")).to exist
-  end
-
-  it "does not create a Gemfile.lock if --dry-run was passed" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rails"
-    G
-
-    FileUtils.rm("Gemfile.lock")
-
-    bundle "check --dry-run"
-
-    expect(bundled_app("Gemfile.lock")).not_to exist
-  end
-
-  it "prints a generic error if the missing gems are unresolvable" do
-    system_gems ["rails-2.3.2"]
-
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rails"
-    G
-
-    bundle :check
-    expect(out).to include("Bundler can't satisfy your Gemfile's dependencies.")
-  end
-
-  it "prints a generic error if a Gemfile.lock does not exist and a toplevel dependency does not exist" do
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rails"
-    G
-
-    bundle :check, :exitstatus => true
-    expect(@exitstatus).to be > 0
-    expect(out).to include("Bundler can't satisfy your Gemfile's dependencies.")
-  end
-
-  it "prints a generic message if you changed your lockfile" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem 'rails'
-    G
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem 'rails_fail'
-    G
-
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rails"
-      gem "rails_fail"
-    G
-
-    bundle :check
-    expect(out).to include("Bundler can't satisfy your Gemfile's dependencies.")
-  end
-
-  it "remembers --without option from install" do
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-      group :foo do
-        gem "rack"
-      end
-    G
-
-    bundle "install --without foo"
-    bundle "check", :exitstatus => true
-    expect(@exitstatus).to eq(0)
-    expect(out).to include("The Gemfile's dependencies are satisfied")
-  end
-
-  it "ensures that gems are actually installed and not just cached" do
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack", :group => :foo
-    G
-
-    bundle "install --without foo"
-
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack"
-    G
-
-    bundle "check", :exitstatus => true
-    expect(out).to include("* rack (1.0.0)")
-    expect(@exitstatus).to eq(1)
-  end
-
-  it "ignores missing gems restricted to other platforms" do
-    system_gems "rack-1.0.0"
-
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack"
-      platforms :#{not_local_tag} do
-        gem "activesupport"
-      end
-    G
-
-    lockfile <<-G
-      GEM
-        remote: file:#{gem_repo1}/
-        specs:
-          activesupport (2.3.5)
-          rack (1.0.0)
-
-      PLATFORMS
-        #{local}
-        #{not_local}
-
-      DEPENDENCIES
-        rack
-        activesupport
-    G
-
-    bundle :check
-    expect(out).to eq("The Gemfile's dependencies are satisfied")
-  end
-
-  it "works with env conditionals" do
-    system_gems "rack-1.0.0"
-
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack"
-      env :NOT_GOING_TO_BE_SET do
-        gem "activesupport"
-      end
-    G
-
-    lockfile <<-G
-      GEM
-        remote: file:#{gem_repo1}/
-        specs:
-          activesupport (2.3.5)
-          rack (1.0.0)
-
-      PLATFORMS
-        #{local}
-        #{not_local}
-
-      DEPENDENCIES
-        rack
-        activesupport
-    G
-
-    bundle :check
-    expect(out).to eq("The Gemfile's dependencies are satisfied")
-  end
-
-  it "outputs an error when the default Gemfile is not found" do
-    bundle :check, :exitstatus => true
-    expect(@exitstatus).to eq(10)
-    expect(out).to include("Could not locate Gemfile")
-  end
-
-  it "does not output fatal error message" do
-    bundle :check, :exitstatus => true
-    expect(@exitstatus).to eq(10)
-    expect(out).not_to include("Unfortunately, a fatal error has occurred. ")
-  end
-
-  it "should not crash when called multiple times on a new machine" do
-    gemfile <<-G
-      gem 'rails', '3.0.0.beta3'
-      gem 'paperclip', :git => 'git://github.com/thoughtbot/paperclip.git'
-    G
-
-    simulate_new_machine
-    bundle "check"
-    last_out = out
-    3.times do |i|
-      bundle :check
-      expect(out).to eq(last_out)
-      expect(err).to be_empty
-    end
-  end
-
-  it "fails when there's no lock file and frozen is set" do
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "foo"
-    G
-
-    bundle "install"
-    bundle "install --deployment"
-    FileUtils.rm(bundled_app("Gemfile.lock"))
-
-    bundle :check, :exitstatus => true
-    expect(exitstatus).not_to eq(0)
-  end
-
-  context "--path" do
-    before do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rails"
-      G
-      bundle "install --path vendor/bundle"
-
-      FileUtils.rm_rf(bundled_app(".bundle"))
-    end
-
-    it "returns success" do
-      bundle "check --path vendor/bundle", :exitstatus => true
-      expect(@exitstatus).to eq(0)
-      expect(out).to eq("The Gemfile's dependencies are satisfied")
-    end
-
-    it "should write to .bundle/config" do
-      bundle "check --path vendor/bundle", :exitstatus => true
-      bundle "check", :exitstatus => true
-      expect(@exitstatus).to eq(0)
-    end
-  end
-
-  describe "when locked" do
-    before :each do
-      system_gems "rack-1.0.0"
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", "1.0"
-      G
-    end
-
-    it "returns success when the Gemfile is satisfied" do
-      bundle :install
-      bundle :check, :exitstatus => true
-      expect(@exitstatus).to eq(0)
-      expect(out).to eq("The Gemfile's dependencies are satisfied")
-    end
-
-    it "shows what is missing with the current Gemfile if it is not satisfied" do
-      simulate_new_machine
-      bundle :check
-      expect(out).to match(/The following gems are missing/)
-      expect(out).to include("* rack (1.0")
-    end
-  end
-end
diff --git a/spec/commands/clean_spec.rb b/spec/commands/clean_spec.rb
deleted file mode 100644
index cee1312..0000000
--- a/spec/commands/clean_spec.rb
+++ /dev/null
@@ -1,592 +0,0 @@
-require "spec_helper"
-
-describe "bundle clean" do
-  def should_have_gems(*gems)
-    gems.each do |g|
-      expect(vendored_gems("gems/#{g}")).to exist
-      expect(vendored_gems("specifications/#{g}.gemspec")).to exist
-      expect(vendored_gems("cache/#{g}.gem")).to exist
-    end
-  end
-
-  def should_not_have_gems(*gems)
-    gems.each do |g|
-      expect(vendored_gems("gems/#{g}")).not_to exist
-      expect(vendored_gems("specifications/#{g}.gemspec")).not_to exist
-      expect(vendored_gems("cache/#{g}.gem")).not_to exist
-    end
-  end
-
-  it "removes unused gems that are different" do
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "thin"
-      gem "foo"
-    G
-
-    bundle "install --path vendor/bundle --no-clean"
-
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "thin"
-    G
-    bundle "install"
-
-    bundle :clean
-
-    expect(out).to eq("Removing foo (1.0)")
-
-    should_have_gems 'thin-1.0', 'rack-1.0.0'
-    should_not_have_gems 'foo-1.0'
-
-    expect(vendored_gems("bin/rackup")).to exist
-  end
-
-  it "removes old version of gem if unused" do
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "rack", "0.9.1"
-      gem "foo"
-    G
-
-    bundle "install --path vendor/bundle --no-clean"
-
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "rack", "1.0.0"
-      gem "foo"
-    G
-    bundle "install"
-
-    bundle :clean
-
-    expect(out).to eq("Removing rack (0.9.1)")
-
-    should_have_gems 'foo-1.0', 'rack-1.0.0'
-    should_not_have_gems 'rack-0.9.1'
-
-    expect(vendored_gems("bin/rackup")).to exist
-  end
-
-  it "removes new version of gem if unused" do
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "rack", "1.0.0"
-      gem "foo"
-    G
-
-    bundle "install --path vendor/bundle --no-clean"
-
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "rack", "0.9.1"
-      gem "foo"
-    G
-    bundle "install"
-
-    bundle :clean
-
-    expect(out).to eq("Removing rack (1.0.0)")
-
-    should_have_gems 'foo-1.0', 'rack-0.9.1'
-    should_not_have_gems 'rack-1.0.0'
-
-    expect(vendored_gems("bin/rackup")).to exist
-  end
-
-  it "removes gems in bundle without groups" do
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "foo"
-
-      group :test_group do
-        gem "rack", "1.0.0"
-      end
-    G
-
-    bundle "install --path vendor/bundle"
-    bundle "install --without test_group"
-    bundle :clean
-
-    expect(out).to eq("Removing rack (1.0.0)")
-
-    should_have_gems 'foo-1.0'
-    should_not_have_gems 'rack-1.0.0'
-
-    expect(vendored_gems("bin/rackup")).to_not exist
-  end
-
-  it "does not remove cached git dir if it's being used" do
-    build_git "foo"
-    revision = revision_for(lib_path("foo-1.0"))
-    git_path = lib_path('foo-1.0')
-
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "rack", "1.0.0"
-      git "#{git_path}", :ref => "#{revision}" do
-        gem "foo"
-      end
-    G
-
-    bundle "install --path vendor/bundle"
-
-    bundle :clean
-
-    digest = Digest::SHA1.hexdigest(git_path.to_s)
-    expect(vendored_gems("cache/bundler/git/foo-1.0-#{digest}")).to exist
-  end
-
-  it "removes unused git gems" do
-    build_git "foo", :path => lib_path("foo")
-    git_path = lib_path('foo')
-    revision = revision_for(git_path)
-
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "rack", "1.0.0"
-      git "#{git_path}", :ref => "#{revision}" do
-        gem "foo"
-      end
-    G
-
-    bundle "install --path vendor/bundle"
-
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "rack", "1.0.0"
-    G
-    bundle "install"
-
-    bundle :clean
-
-    expect(out).to eq("Removing foo (#{revision[0..11]})")
-
-    expect(vendored_gems("gems/rack-1.0.0")).to exist
-    expect(vendored_gems("bundler/gems/foo-#{revision[0..11]}")).not_to exist
-    digest = Digest::SHA1.hexdigest(git_path.to_s)
-    expect(vendored_gems("cache/bundler/git/foo-#{digest}")).not_to exist
-
-    expect(vendored_gems("specifications/rack-1.0.0.gemspec")).to exist
-
-    expect(vendored_gems("bin/rackup")).to exist
-  end
-
-  it "removes old git gems" do
-    build_git "foo-bar", :path => lib_path("foo-bar")
-    revision = revision_for(lib_path("foo-bar"))
-
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "rack", "1.0.0"
-      git "#{lib_path('foo-bar')}" do
-        gem "foo-bar"
-      end
-    G
-
-    bundle "install --path vendor/bundle"
-
-    update_git "foo", :path => lib_path("foo-bar")
-    revision2 = revision_for(lib_path("foo-bar"))
-
-    bundle "update"
-    bundle :clean
-
-    expect(out).to eq("Removing foo-bar (#{revision[0..11]})")
-
-    expect(vendored_gems("gems/rack-1.0.0")).to exist
-    expect(vendored_gems("bundler/gems/foo-bar-#{revision[0..11]}")).not_to exist
-    expect(vendored_gems("bundler/gems/foo-bar-#{revision2[0..11]}")).to exist
-
-    expect(vendored_gems("specifications/rack-1.0.0.gemspec")).to exist
-
-    expect(vendored_gems("bin/rackup")).to exist
-  end
-
-  it "does not remove nested gems in a git repo" do
-    build_lib "activesupport", "3.0", :path => lib_path("rails/activesupport")
-    build_git "rails", "3.0", :path => lib_path("rails") do |s|
-      s.add_dependency "activesupport", "= 3.0"
-    end
-    revision = revision_for(lib_path("rails"))
-
-    gemfile <<-G
-      gem "activesupport", :git => "#{lib_path('rails')}", :ref => '#{revision}'
-    G
-
-    bundle "install --path vendor/bundle"
-    bundle :clean
-    expect(out).to eq("")
-
-    expect(vendored_gems("bundler/gems/rails-#{revision[0..11]}")).to exist
-  end
-
-  it "does not remove git sources that are in without groups" do
-    build_git "foo", :path => lib_path("foo")
-    git_path = lib_path('foo')
-    revision = revision_for(git_path)
-
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "rack", "1.0.0"
-      group :test do
-        git "#{git_path}", :ref => "#{revision}" do
-          gem "foo"
-        end
-      end
-    G
-    bundle "install --path vendor/bundle --without test"
-
-    bundle :clean
-
-    expect(out).to eq("")
-    expect(vendored_gems("bundler/gems/foo-#{revision[0..11]}")).to exist
-    digest = Digest::SHA1.hexdigest(git_path.to_s)
-    expect(vendored_gems("cache/bundler/git/foo-#{digest}")).to_not exist
-  end
-
-  it "does not blow up when using without groups" do
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "rack"
-
-      group :development do
-        gem "foo"
-      end
-    G
-
-    bundle "install --path vendor/bundle --without development"
-
-    bundle :clean, :exitstatus => true
-    expect(exitstatus).to eq(0)
-  end
-
-  it "displays an error when used without --path" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "rack", "1.0.0"
-    G
-
-    bundle :clean, :exitstatus => true
-
-    expect(exitstatus).to eq(1)
-    expect(out).to eq("Can only use bundle clean when --path is set or --force is set")
-  end
-
-  # handling bundle clean upgrade path from the pre's
-  it "removes .gem/.gemspec file even if there's no corresponding gem dir" do
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "thin"
-      gem "foo"
-    G
-
-    bundle "install --path vendor/bundle"
-
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "foo"
-    G
-    bundle "install"
-
-    FileUtils.rm(vendored_gems("bin/rackup"))
-    FileUtils.rm_rf(vendored_gems("gems/thin-1.0"))
-    FileUtils.rm_rf(vendored_gems("gems/rack-1.0.0"))
-
-    bundle :clean
-
-    should_not_have_gems 'thin-1.0', 'rack-1.0'
-    should_have_gems 'foo-1.0'
-
-    expect(vendored_gems("bin/rackup")).not_to exist
-  end
-
-  it "does not call clean automatically when using system gems" do
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "thin"
-      gem "rack"
-    G
-    bundle :install
-
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "rack"
-    G
-    bundle :install
-
-    sys_exec "gem list"
-    expect(out).to include("rack (1.0.0)")
-    expect(out).to include("thin (1.0)")
-  end
-
-  it "--clean should override the bundle setting on install" do
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "thin"
-      gem "rack"
-    G
-    bundle "install --path vendor/bundle --clean"
-
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "rack"
-    G
-    bundle "install"
-
-    should_have_gems 'rack-1.0.0'
-    should_not_have_gems 'thin-1.0'
-  end
-
-  it "--clean should override the bundle setting on update" do
-    build_repo2
-
-    gemfile <<-G
-      source "file://#{gem_repo2}"
-
-      gem "foo"
-    G
-    bundle "install --path vendor/bundle --clean"
-
-    update_repo2 do
-      build_gem 'foo', '1.0.1'
-    end
-
-    bundle "update"
-
-    should_have_gems 'foo-1.0.1'
-    should_not_have_gems 'foo-1.0'
-  end
-
-  it "does not clean automatically on --path" do
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "thin"
-      gem "rack"
-    G
-    bundle "install --path vendor/bundle"
-
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "rack"
-    G
-    bundle "install"
-
-    should_have_gems 'rack-1.0.0', 'thin-1.0'
-  end
-
-  it "does not clean on bundle update with --path" do
-    build_repo2
-
-    gemfile <<-G
-      source "file://#{gem_repo2}"
-
-      gem "foo"
-    G
-    bundle "install --path vendor/bundle"
-
-    update_repo2 do
-      build_gem 'foo', '1.0.1'
-    end
-
-    bundle :update
-    should_have_gems 'foo-1.0', 'foo-1.0.1'
-  end
-
-  it "does not clean on bundle update when using --system" do
-    build_repo2
-
-    gemfile <<-G
-      source "file://#{gem_repo2}"
-
-      gem "foo"
-    G
-    bundle "install"
-
-    update_repo2 do
-      build_gem 'foo', '1.0.1'
-    end
-    bundle :update
-
-    sys_exec "gem list"
-    expect(out).to include("foo (1.0.1, 1.0)")
-  end
-
-  it "cleans system gems when --force is used" do
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "foo"
-      gem "rack"
-    G
-    bundle :install
-
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "rack"
-    G
-    bundle :install
-    bundle "clean --force"
-
-    expect(out).to eq("Removing foo (1.0)")
-    sys_exec "gem list"
-    expect(out).not_to include("foo (1.0)")
-    expect(out).to include("rack (1.0.0)")
-  end
-
-  it "cleans git gems with a 7 length git revision" do
-    build_git "foo"
-    revision = revision_for(lib_path("foo-1.0"))
-
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "foo", :git => "#{lib_path('foo-1.0')}"
-    G
-
-    bundle "install --path vendor/bundle"
-
-    # mimic 7 length git revisions in Gemfile.lock
-    gemfile_lock = File.read(bundled_app('Gemfile.lock')).split("\n")
-    gemfile_lock.each_with_index do |line, index|
-      gemfile_lock[index] = line[0..(11 + 7)] if line.include?("  revision:")
-    end
-    File.open(bundled_app('Gemfile.lock'), 'w') do |file|
-      file.print gemfile_lock.join("\n")
-    end
-
-    bundle "install --path vendor/bundle"
-
-    bundle :clean
-
-    expect(out).not_to include("Removing foo (1.0 #{revision[0..6]})")
-
-    expect(vendored_gems("bundler/gems/foo-1.0-#{revision[0..6]}")).to exist
-  end
-
-  it "when using --force on system gems, it doesn't remove binaries" do
-    build_repo2
-    update_repo2 do
-      build_gem 'bindir' do |s|
-        s.bindir = "exe"
-        s.executables = "foo"
-      end
-    end
-
-    gemfile <<-G
-      source "file://#{gem_repo2}"
-
-      gem "bindir"
-    G
-    bundle :install
-
-    bundle "clean --force"
-
-    sys_status "foo"
-
-    expect(exitstatus).to eq(0)
-    expect(out).to eq("1.0")
-  end
-
-  it "doesn't blow up on path gems without a .gempsec" do
-    relative_path = "vendor/private_gems/bar-1.0"
-    absolute_path = bundled_app(relative_path)
-    FileUtils.mkdir_p("#{absolute_path}/lib/bar")
-    File.open("#{absolute_path}/lib/bar/bar.rb", 'wb') do |file|
-      file.puts "module Bar; end"
-    end
-
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "foo"
-      gem "bar", "1.0", :path => "#{relative_path}"
-    G
-
-    bundle "install --path vendor/bundle"
-    bundle :clean, :exitstatus => true
-
-    expect(exitstatus).to eq(0)
-  end
-
-  it "doesn't remove gems in dry-run mode" do
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "thin"
-      gem "foo"
-    G
-
-    bundle "install --path vendor/bundle --no-clean"
-
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "thin"
-    G
-
-    bundle :install
-
-    bundle "clean --dry-run"
-
-    expect(out).not_to eq("Removing foo (1.0)")
-    expect(out).to eq("Would have removed foo (1.0)")
-
-    should_have_gems 'thin-1.0', 'rack-1.0.0', 'foo-1.0'
-
-    expect(vendored_gems("bin/rackup")).to exist
-  end
-
-  it "doesn't store dry run as a config setting" do
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "thin"
-      gem "foo"
-    G
-
-    bundle "install --path vendor/bundle --no-clean"
-    bundle "config dry_run false"
-
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "thin"
-    G
-
-    bundle :install
-
-    bundle "clean"
-
-    expect(out).to eq("Removing foo (1.0)")
-    expect(out).not_to eq("Would have removed foo (1.0)")
-
-    should_have_gems 'thin-1.0', 'rack-1.0.0'
-    should_not_have_gems 'foo-1.0'
-
-    expect(vendored_gems("bin/rackup")).to exist
-  end
-end
diff --git a/spec/commands/config_spec.rb b/spec/commands/config_spec.rb
deleted file mode 100644
index 964e1d8..0000000
--- a/spec/commands/config_spec.rb
+++ /dev/null
@@ -1,227 +0,0 @@
-require "spec_helper"
-
-describe ".bundle/config" do
-  before :each do
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack", "1.0.0"
-    G
-  end
-
-  describe "BUNDLE_APP_CONFIG" do
-    it "can be moved with an environment variable" do
-      ENV['BUNDLE_APP_CONFIG'] = tmp('foo/bar').to_s
-      bundle "install --path vendor/bundle"
-
-      expect(bundled_app('.bundle')).not_to exist
-      expect(tmp('foo/bar/config')).to exist
-      should_be_installed "rack 1.0.0"
-    end
-
-    it "can provide a relative path with the environment variable" do
-      FileUtils.mkdir_p bundled_app('omg')
-      Dir.chdir bundled_app('omg')
-
-      ENV['BUNDLE_APP_CONFIG'] = "../foo"
-      bundle "install --path vendor/bundle"
-
-      expect(bundled_app(".bundle")).not_to exist
-      expect(bundled_app("../foo/config")).to exist
-      should_be_installed "rack 1.0.0"
-    end
-
-    it "removes environment.rb from BUNDLE_APP_CONFIG's path" do
-      FileUtils.mkdir_p(tmp('foo/bar'))
-      ENV['BUNDLE_APP_CONFIG'] = tmp('foo/bar').to_s
-      bundle "install"
-      FileUtils.touch tmp('foo/bar/environment.rb')
-      should_be_installed "rack 1.0.0"
-      expect(tmp('foo/bar/environment.rb')).not_to exist
-    end
-  end
-
-  describe "global" do
-    before(:each) { bundle :install }
-
-    it "is the default" do
-      bundle "config foo global"
-      run "puts Bundler.settings[:foo]"
-      expect(out).to eq("global")
-    end
-
-    it "can also be set explicitly" do
-      bundle "config --global foo global"
-      run "puts Bundler.settings[:foo]"
-      expect(out).to eq("global")
-    end
-
-    it "has lower precedence than local" do
-      bundle "config --local  foo local"
-
-      bundle "config --global foo global"
-      expect(out).to match(/Your application has set foo to "local"/)
-
-      run "puts Bundler.settings[:foo]"
-      expect(out).to eq("local")
-    end
-
-    it "has lower precedence than env" do
-      begin
-        ENV["BUNDLE_FOO"] = "env"
-
-        bundle "config --global foo global"
-        expect(out).to match(/You have a bundler environment variable for foo set to "env"/)
-
-        run "puts Bundler.settings[:foo]"
-        expect(out).to eq("env")
-      ensure
-        ENV.delete("BUNDLE_FOO")
-      end
-    end
-
-    it "can be deleted" do
-      bundle "config --global foo global"
-      bundle "config --delete foo"
-
-      run "puts Bundler.settings[:foo] == nil"
-      expect(out).to eq("true")
-    end
-
-    it "warns when overriding" do
-      bundle "config --global foo previous"
-      bundle "config --global foo global"
-      expect(out).to match(/You are replacing the current global value of foo/)
-
-      run "puts Bundler.settings[:foo]"
-      expect(out).to eq("global")
-    end
-
-    it "expands the path at time of setting" do
-      bundle "config --global local.foo .."
-      run "puts Bundler.settings['local.foo']"
-      expect(out).to eq(File.expand_path(Dir.pwd + "/.."))
-    end
-  end
-
-  describe "local" do
-    before(:each) { bundle :install }
-
-    it "can also be set explicitly" do
-      bundle "config --local foo local"
-      run "puts Bundler.settings[:foo]"
-      expect(out).to eq("local")
-    end
-
-    it "has higher precedence than env" do
-      begin
-        ENV["BUNDLE_FOO"] = "env"
-        bundle "config --local foo local"
-
-        run "puts Bundler.settings[:foo]"
-        expect(out).to eq("local")
-      ensure
-        ENV.delete("BUNDLE_FOO")
-      end
-    end
-
-    it "can be deleted" do
-      bundle "config --local foo local"
-      bundle "config --delete foo"
-
-      run "puts Bundler.settings[:foo] == nil"
-      expect(out).to eq("true")
-    end
-
-    it "warns when overriding" do
-      bundle "config --local foo previous"
-      bundle "config --local foo local"
-      expect(out).to match(/You are replacing the current local value of foo/)
-
-      run "puts Bundler.settings[:foo]"
-      expect(out).to eq("local")
-    end
-
-    it "expands the path at time of setting" do
-      bundle "config --local local.foo .."
-      run "puts Bundler.settings['local.foo']"
-      expect(out).to eq(File.expand_path(Dir.pwd + "/.."))
-    end
-  end
-
-  describe "env" do
-    before(:each) { bundle :install }
-
-    it "can set boolean properties via the environment" do
-      ENV["BUNDLE_FROZEN"] = "true"
-
-      run "if Bundler.settings[:frozen]; puts 'true' else puts 'false' end"
-      expect(out).to eq("true")
-    end
-
-    it "can set negative boolean properties via the environment" do
-      run "if Bundler.settings[:frozen]; puts 'true' else puts 'false' end"
-      expect(out).to eq("false")
-
-      ENV["BUNDLE_FROZEN"] = "false"
-
-      run "if Bundler.settings[:frozen]; puts 'true' else puts 'false' end"
-      expect(out).to eq("false")
-
-      ENV["BUNDLE_FROZEN"] = "0"
-
-      run "if Bundler.settings[:frozen]; puts 'true' else puts 'false' end"
-      expect(out).to eq("false")
-
-      ENV["BUNDLE_FROZEN"] = ""
-
-      run "if Bundler.settings[:frozen]; puts 'true' else puts 'false' end"
-      expect(out).to eq("false")
-    end
-  end
-
-  describe "gem mirrors" do
-    before(:each) { bundle :install }
-
-    it "configures mirrors using keys with `mirror.`" do
-      bundle "config --local mirror.http://gems.example.org http://gem-mirror.example.org"
-      run(<<-E)
-Bundler.settings.gem_mirrors.each do |k, v|
-  puts "\#{k} => \#{v}"
-end
-E
-      expect(out).to eq("http://gems.example.org/ => http://gem-mirror.example.org/")
-    end
-  end
-
-  describe "quoting" do
-    before(:each) { bundle :install }
-
-    it "saves quotes" do
-      bundle "config foo something\\'"
-      run "puts Bundler.settings[:foo]"
-      expect(out).to eq("something'")
-    end
-
-    it "doesn't return quotes around values", :ruby => "1.9" do
-      bundle "config foo '1'"
-      run "puts Bundler.settings.send(:global_config_file).read"
-      expect(out).to include("'1'")
-      run "puts Bundler.settings[:foo]"
-      expect(out).to eq("1")
-    end
-  end
-
-  describe "very long lines" do
-    before(:each) { bundle :install }
-    let(:long_string) do
-      "--with-xml2-include=/usr/pkg/include/libxml2 --with-xml2-lib=/usr/pkg/lib --with-xslt-dir=/usr/pkg"
-    end
-
-    it "doesn't wrap values" do
-      bundle "config foo #{long_string}"
-      run "puts Bundler.settings[:foo]"
-      expect(out).to match(long_string)
-    end
-  end
-
-end
diff --git a/spec/commands/console_spec.rb b/spec/commands/console_spec.rb
deleted file mode 100644
index 75d6796..0000000
--- a/spec/commands/console_spec.rb
+++ /dev/null
@@ -1,76 +0,0 @@
-require "spec_helper"
-
-describe "bundle console" do
-  before :each do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack"
-      gem "activesupport", :group => :test
-      gem "rack_middleware", :group => :development
-    G
-  end
-
-  it "starts IRB with the default group loaded" do
-    bundle "console" do |input|
-      input.puts("puts RACK")
-      input.puts("exit")
-    end
-    expect(out).to include("0.9.1")
-  end
-
-  it "starts another REPL if configured as such" do
-    bundle "config console pry"
-
-    bundle "console" do |input|
-      input.puts("__callee__")
-      input.puts("exit")
-    end
-    expect(out).to include("pry")
-  end
-
-  it "falls back to IRB if the other REPL isn't available" do
-    bundle "config console pry"
-    # make sure pry isn't there
-
-    bundle "console" do |input|
-      input.puts("__callee__")
-      input.puts("exit")
-    end
-    expect(out).to include("irb")
-  end
-
-
-  it "doesn't load any other groups" do
-    bundle "console" do |input|
-      input.puts("puts ACTIVESUPPORT")
-      input.puts("exit")
-    end
-    expect(out).to include("NameError")
-  end
-
-  describe "when given a group" do
-    it "loads the given group" do
-      bundle "console test" do |input|
-        input.puts("puts ACTIVESUPPORT")
-        input.puts("exit")
-      end
-      expect(out).to include("2.3.5")
-    end
-
-    it "loads the default group" do
-      bundle "console test" do |input|
-        input.puts("puts RACK")
-        input.puts("exit")
-      end
-      expect(out).to include("0.9.1")
-    end
-
-    it "doesn't load other groups" do
-      bundle "console test" do |input|
-        input.puts("puts RACK_MIDDLEWARE")
-        input.puts("exit")
-      end
-      expect(out).to include("NameError")
-    end
-  end
-end
diff --git a/spec/commands/exec_spec.rb b/spec/commands/exec_spec.rb
deleted file mode 100644
index 52b9356..0000000
--- a/spec/commands/exec_spec.rb
+++ /dev/null
@@ -1,309 +0,0 @@
-require "spec_helper"
-
-describe "bundle exec" do
-  before :each do
-    system_gems "rack-1.0.0", "rack-0.9.1"
-  end
-
-  it "activates the correct gem" do
-    gemfile <<-G
-      gem "rack", "0.9.1"
-    G
-
-    bundle "exec rackup"
-    expect(out).to eq("0.9.1")
-  end
-
-  it "works when the bins are in ~/.bundle" do
-    install_gemfile <<-G
-      gem "rack"
-    G
-
-    bundle "exec rackup"
-    expect(out).to eq("1.0.0")
-  end
-
-  it "works when running from a random directory" do
-    install_gemfile <<-G
-      gem "rack"
-    G
-
-    bundle "exec 'cd #{tmp('gems')} && rackup'"
-
-    expect(out).to eq("1.0.0")
-  end
-
-  it "works when exec'ing something else" do
-    install_gemfile 'gem "rack"'
-    bundle "exec echo exec"
-    expect(out).to eq("exec")
-  end
-
-  it "works when exec'ing to ruby" do
-    install_gemfile 'gem "rack"'
-    bundle "exec ruby -e 'puts %{hi}'"
-    expect(out).to eq("hi")
-  end
-
-  it "accepts --verbose" do
-    install_gemfile 'gem "rack"'
-    bundle "exec --verbose echo foobar"
-    expect(out).to eq("foobar")
-  end
-
-  it "passes --verbose to command if it is given after the command" do
-    install_gemfile 'gem "rack"'
-    bundle "exec echo --verbose"
-    expect(out).to eq("--verbose")
-  end
-
-  it "handles --keep-file-descriptors" do
-    require 'tempfile'
-
-    bundle_bin = File.expand_path('../../../bin/bundle', __FILE__)
-
-    command = Tempfile.new("io-test")
-    command.sync = true
-    command.write <<-G
-      if ARGV[0]
-        IO.for_fd(ARGV[0].to_i)
-      else
-        require 'tempfile'
-        io = Tempfile.new("io-test-fd")
-        args = %W[#{Gem.ruby} -I#{lib} #{bundle_bin} exec --keep-file-descriptors #{Gem.ruby} #{command.path} \#{io.to_i}]
-        args << { io.to_i => io } if RUBY_VERSION >= "2.0"
-        exec(*args)
-      end
-    G
-
-    install_gemfile ''
-    sys_exec("#{Gem.ruby} #{command.path}")
-
-    if RUBY_VERSION >= "2.0"
-      expect(out).to eq("")
-    else
-      expect(out).to eq("Ruby version #{RUBY_VERSION} defaults to keeping non-standard file descriptors on Kernel#exec.")
-    end
-
-    expect(err).to eq("")
-  end
-
-  it "accepts --keep-file-descriptors" do
-    install_gemfile ''
-    bundle "exec --keep-file-descriptors echo foobar"
-
-    expect(err).to eq("")
-  end
-
-  it "can run a command named --verbose" do
-    install_gemfile 'gem "rack"'
-    File.open("--verbose", 'w') do |f|
-      f.puts "#!/bin/sh"
-      f.puts "echo foobar"
-    end
-    File.chmod(0744, "--verbose")
-    ENV['PATH'] = "."
-    bundle "exec -- --verbose"
-    expect(out).to eq("foobar")
-  end
-
-  it "handles different versions in different bundles" do
-    build_repo2 do
-      build_gem "rack_two", "1.0.0" do |s|
-        s.executables = "rackup"
-      end
-    end
-
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack", "0.9.1"
-    G
-
-    Dir.chdir bundled_app2 do
-      install_gemfile bundled_app2('Gemfile'), <<-G
-        source "file://#{gem_repo2}"
-        gem "rack_two", "1.0.0"
-      G
-    end
-
-    bundle "exec rackup"
-
-    expect(out).to eq("0.9.1")
-    expect(err).to match("deprecated")
-
-    Dir.chdir bundled_app2 do
-      bundle "exec rackup"
-      expect(out).to eq("1.0.0")
-    end
-  end
-
-  it "handles gems installed with --without" do
-    install_gemfile <<-G, :without => :middleware
-      source "file://#{gem_repo1}"
-      gem "rack" # rack 0.9.1 and 1.0 exist
-
-      group :middleware do
-        gem "rack_middleware" # rack_middleware depends on rack 0.9.1
-      end
-    G
-
-    bundle "exec rackup"
-
-    expect(out).to eq("0.9.1")
-    should_not_be_installed "rack_middleware 1.0"
-  end
-
-  it "does not duplicate already exec'ed RUBYOPT" do
-    install_gemfile <<-G
-      gem "rack"
-    G
-
-    rubyopt = ENV['RUBYOPT']
-    rubyopt = "-rbundler/setup #{rubyopt}"
-
-    bundle "exec 'echo $RUBYOPT'"
-    expect(out).to have_rubyopts(rubyopt)
-
-    bundle "exec 'echo $RUBYOPT'", :env => {"RUBYOPT" => rubyopt}
-    expect(out).to have_rubyopts(rubyopt)
-  end
-
-  it "does not duplicate already exec'ed RUBYLIB" do
-    install_gemfile <<-G
-      gem "rack"
-    G
-
-    rubylib = ENV['RUBYLIB']
-    rubylib = "#{rubylib}".split(File::PATH_SEPARATOR).unshift "#{bundler_path}"
-    rubylib = rubylib.uniq.join(File::PATH_SEPARATOR)
-
-    bundle "exec 'echo $RUBYLIB'"
-    expect(out).to eq(rubylib)
-
-    bundle "exec 'echo $RUBYLIB'", :env => {"RUBYLIB" => rubylib}
-    expect(out).to eq(rubylib)
-  end
-
-  it "errors nicely when the argument doesn't exist" do
-    install_gemfile <<-G
-      gem "rack"
-    G
-
-    bundle "exec foobarbaz", :exitstatus => true
-    expect(exitstatus).to eq(127)
-    expect(out).to include("bundler: command not found: foobarbaz")
-    expect(out).to include("Install missing gem executables with `bundle install`")
-  end
-
-  it "errors nicely when the argument is not executable" do
-    install_gemfile <<-G
-      gem "rack"
-    G
-
-    bundle "exec touch foo"
-    bundle "exec ./foo", :exitstatus => true
-    expect(exitstatus).to eq(126)
-    expect(out).to include("bundler: not executable: ./foo")
-  end
-
-  it "errors nicely when no arguments are passed" do
-    install_gemfile <<-G
-      gem "rack"
-    G
-
-    bundle "exec", :exitstatus => true
-    expect(exitstatus).to eq(128)
-    expect(out).to include("bundler: exec needs a command to run")
-  end
-
-  describe "with gem executables" do
-    describe "run from a random directory" do
-      before(:each) do
-        install_gemfile <<-G
-          gem "rack"
-        G
-      end
-
-      it "works when unlocked" do
-        bundle "exec 'cd #{tmp('gems')} && rackup'"
-        expect(out).to eq("1.0.0")
-      end
-
-      it "works when locked" do
-        should_be_locked
-        bundle "exec 'cd #{tmp('gems')} && rackup'"
-        expect(out).to eq("1.0.0")
-      end
-    end
-
-    describe "from gems bundled via :path" do
-      before(:each) do
-        build_lib "fizz", :path => home("fizz") do |s|
-          s.executables = "fizz"
-        end
-
-        install_gemfile <<-G
-          gem "fizz", :path => "#{File.expand_path(home("fizz"))}"
-        G
-      end
-
-      it "works when unlocked" do
-        bundle "exec fizz"
-        expect(out).to eq("1.0")
-      end
-
-      it "works when locked" do
-        should_be_locked
-
-        bundle "exec fizz"
-        expect(out).to eq("1.0")
-      end
-    end
-
-    describe "from gems bundled via :git" do
-      before(:each) do
-        build_git "fizz_git" do |s|
-          s.executables = "fizz_git"
-        end
-
-        install_gemfile <<-G
-          gem "fizz_git", :git => "#{lib_path('fizz_git-1.0')}"
-        G
-      end
-
-      it "works when unlocked" do
-        bundle "exec fizz_git"
-        expect(out).to eq("1.0")
-      end
-
-      it "works when locked" do
-        should_be_locked
-        bundle "exec fizz_git"
-        expect(out).to eq("1.0")
-      end
-    end
-
-    describe "from gems bundled via :git with no gemspec" do
-      before(:each) do
-        build_git "fizz_no_gemspec", :gemspec => false do |s|
-          s.executables = "fizz_no_gemspec"
-        end
-
-        install_gemfile <<-G
-          gem "fizz_no_gemspec", "1.0", :git => "#{lib_path('fizz_no_gemspec-1.0')}"
-        G
-      end
-
-      it "works when unlocked" do
-        bundle "exec fizz_no_gemspec"
-        expect(out).to eq("1.0")
-      end
-
-      it "works when locked" do
-        should_be_locked
-        bundle "exec fizz_no_gemspec"
-        expect(out).to eq("1.0")
-      end
-    end
-  end
-end
diff --git a/spec/commands/help_spec.rb b/spec/commands/help_spec.rb
deleted file mode 100644
index 739f622..0000000
--- a/spec/commands/help_spec.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-require "spec_helper"
-
-describe "bundle help" do
-  # Rubygems 1.4+ no longer load gem plugins so this test is no longer needed
-  rubygems_under_14 = Gem::Requirement.new("< 1.4").satisfied_by?(Gem::Version.new(Gem::VERSION))
-  it "complains if older versions of bundler are installed", :if => rubygems_under_14 do
-    system_gems "bundler-0.8.1"
-
-    bundle "help", :expect_err => true
-    expect(err).to include("older than 0.9")
-    expect(err).to include("running `gem cleanup bundler`.")
-  end
-
-  it "uses mann when available" do
-    fake_man!
-
-    bundle "help gemfile"
-    expect(out).to eq(%|["#{root}/lib/bundler/man/gemfile.5"]|)
-  end
-
-  it "prefixes bundle commands with bundle- when finding the groff files" do
-    fake_man!
-
-    bundle "help install"
-    expect(out).to eq(%|["#{root}/lib/bundler/man/bundle-install"]|)
-  end
-
-  it "simply outputs the txt file when there is no man on the path" do
-    kill_path!
-
-    bundle "help install", :expect_err => true
-    expect(out).to match(/BUNDLE-INSTALL/)
-  end
-
-  it "still outputs the old help for commands that do not have man pages yet" do
-    bundle "help check"
-    expect(out).to include("Check searches the local machine")
-  end
-end
diff --git a/spec/commands/init_spec.rb b/spec/commands/init_spec.rb
deleted file mode 100644
index 8bd566d..0000000
--- a/spec/commands/init_spec.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-require "spec_helper"
-
-describe "bundle init" do
-  it "generates a Gemfile" do
-    bundle :init
-    expect(bundled_app("Gemfile")).to exist
-  end
-
-  it "does not change existing Gemfiles" do
-    gemfile <<-G
-      gem "rails"
-    G
-
-    expect {
-      bundle :init
-    }.not_to change { File.read(bundled_app("Gemfile")) }
-  end
-
-  it "should generate from an existing gemspec" do
-    spec_file = tmp.join('test.gemspec')
-    File.open(spec_file, 'w') do |file|
-      file << <<-S
-        Gem::Specification.new do |s|
-        s.name = 'test'
-        s.add_dependency 'rack', '= 1.0.1'
-        s.add_development_dependency 'rspec', '1.2'
-        end
-      S
-    end
-
-    bundle :init, :gemspec => spec_file
-
-    gemfile = bundled_app("Gemfile").read
-    expect(gemfile).to match(/source :gemcutter/)
-    expect(gemfile.scan(/gem "rack", "= 1.0.1"/).size).to eq(1)
-    expect(gemfile.scan(/gem "rspec", "= 1.2"/).size).to eq(1)
-    expect(gemfile.scan(/group :development/).size).to eq(1)
-  end
-end
diff --git a/spec/commands/inject_spec.rb b/spec/commands/inject_spec.rb
deleted file mode 100644
index 2737b1a..0000000
--- a/spec/commands/inject_spec.rb
+++ /dev/null
@@ -1,78 +0,0 @@
-require 'spec_helper'
-
-describe "bundle inject" do
-  before :each do
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack"
-    G
-  end
-
-  context "without a lockfile" do
-    it "locks with the injected gems" do
-      expect(bundled_app("Gemfile.lock")).not_to exist
-      bundle "inject 'rack-obama' '> 0'"
-      expect(bundled_app("Gemfile.lock").read).to match(/rack-obama/)
-    end
-  end
-
-  context "with a lockfile" do
-    before do
-      bundle "install"
-    end
-
-    it "adds the injected gems to the Gemfile" do
-      expect(bundled_app("Gemfile").read).not_to match(/rack-obama/)
-      bundle "inject 'rack-obama' '> 0'"
-      expect(bundled_app("Gemfile").read).to match(/rack-obama/)
-    end
-
-    it "locks with the injected gems" do
-      expect(bundled_app("Gemfile.lock").read).not_to match(/rack-obama/)
-      bundle "inject 'rack-obama' '> 0'"
-      expect(bundled_app("Gemfile.lock").read).to match(/rack-obama/)
-    end
-  end
-
-  context "with injected gems already in the Gemfile" do
-    it "doesn't add existing gems" do
-      bundle "inject 'rack' '> 0'"
-      expect(out).to match(/cannot specify the same gem twice/i)
-    end
-  end
-
-  context "when frozen" do
-    before do
-      bundle "install"
-      bundle "config --local frozen 1"
-    end
-
-    it "injects anyway" do
-      bundle "inject 'rack-obama' '> 0'"
-      expect(bundled_app("Gemfile").read).to match(/rack-obama/)
-    end
-
-    it "locks with the injected gems" do
-      expect(bundled_app("Gemfile.lock").read).not_to match(/rack-obama/)
-      bundle "inject 'rack-obama' '> 0'"
-      expect(bundled_app("Gemfile.lock").read).to match(/rack-obama/)
-    end
-
-    it "restores frozen afterwards" do
-      bundle "inject 'rack-obama' '> 0'"
-      config = YAML.load(bundled_app(".bundle/config").read)
-      expect(config["BUNDLE_FROZEN"]).to eq("1")
-    end
-
-    it "doesn't allow Gemfile changes" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack-obama"
-      G
-      bundle "inject 'rack' '> 0'"
-      expect(out).to match(/trying to install in deployment mode after changing/)
-
-      expect(bundled_app("Gemfile.lock").read).not_to match(/rack-obama/)
-    end
-  end
-end
diff --git a/spec/commands/licenses_spec.rb b/spec/commands/licenses_spec.rb
deleted file mode 100644
index c8d5ff7..0000000
--- a/spec/commands/licenses_spec.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-require "spec_helper"
-
-describe "bundle licenses" do
-  before :each do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rails"
-      gem "with_license"
-    G
-  end
-
-  it "prints license information for all gems in the bundle" do
-    bundle "licenses"
-
-    expect(out).to include("actionpack: Unknown")
-    expect(out).to include("with_license: MIT")
-  end
-end
diff --git a/spec/commands/newgem_spec.rb b/spec/commands/newgem_spec.rb
deleted file mode 100644
index fc0e782..0000000
--- a/spec/commands/newgem_spec.rb
+++ /dev/null
@@ -1,423 +0,0 @@
-require "spec_helper"
-
-describe "bundle gem" do
-  before do
-    @git_name = `git config --global user.name`.chomp
-    `git config --global user.name "Bundler User"`
-    @git_email = `git config --global user.email`.chomp
-    `git config --global user.email user at example.com`
-  end
-
-  after do
-    `git config --global user.name "#{@git_name}"`
-    `git config --global user.email #{@git_email}`
-  end
-
-  shared_examples_for "git config is present" do
-    context "git config user.{name,email} present" do
-      it "sets gemspec author to git user.name if available" do
-        expect(generated_gem.gemspec.authors.first).to eq("Bundler User")
-      end
-
-      it "sets gemspec email to git user.email if available" do
-        expect(generated_gem.gemspec.email.first).to eq("user at example.com")
-      end
-    end
-  end
-
-  shared_examples_for "git config is absent" do |hoge|
-    it "sets gemspec author to default message if git user.name is not set or empty" do
-      expect(generated_gem.gemspec.authors.first).to eq("TODO: Write your name")
-    end
-
-    it "sets gemspec email to default message if git user.email is not set or empty" do
-      expect(generated_gem.gemspec.email.first).to eq("TODO: Write your email address")
-    end
-  end
-
-  context "gem naming with underscore" do
-    let(:gem_name) { 'test_gem' }
-
-    before do
-      bundle "gem #{gem_name}"
-      # reset gemspec cache for each test because of commit 3d4163a
-      Bundler.clear_gemspec_cache
-    end
-
-    let(:generated_gem) { Bundler::GemHelper.new(bundled_app(gem_name).to_s) }
-
-    it "generates a gem skeleton" do
-      expect(bundled_app("test_gem/test_gem.gemspec")).to exist
-      expect(bundled_app("test_gem/LICENSE.txt")).to exist
-      expect(bundled_app("test_gem/Gemfile")).to exist
-      expect(bundled_app("test_gem/Rakefile")).to exist
-      expect(bundled_app("test_gem/lib/test_gem.rb")).to exist
-      expect(bundled_app("test_gem/lib/test_gem/version.rb")).to exist
-    end
-
-    it "starts with version 0.0.1" do
-      expect(bundled_app("test_gem/lib/test_gem/version.rb").read).to match(/VERSION = "0.0.1"/)
-    end
-
-    it "does not nest constants" do
-      expect(bundled_app("test_gem/lib/test_gem/version.rb").read).to match(/module TestGem/)
-      expect(bundled_app("test_gem/lib/test_gem.rb").read).to match(/module TestGem/)
-    end
-
-    it_should_behave_like "git config is present"
-
-    context "git config user.{name,email} is not set" do
-      before do
-        `git config --global --unset user.name`
-        `git config --global --unset user.email`
-        reset!
-        in_app_root
-        bundle "gem #{gem_name}"
-      end
-
-      it_should_behave_like "git config is absent"
-    end
-
-    it "sets gemspec license to MIT by default" do
-      expect(generated_gem.gemspec.license).to eq("MIT")
-    end
-
-    it "requires the version file" do
-      expect(bundled_app("test_gem/lib/test_gem.rb").read).to match(/require "test_gem\/version"/)
-    end
-
-    it "runs rake without problems" do
-      system_gems ["rake-10.0.2"]
-
-      rakefile = strip_whitespace <<-RAKEFILE
-        task :default do
-          puts 'SUCCESS'
-        end
-      RAKEFILE
-      File.open(bundled_app("test_gem/Rakefile"), 'w') do |file|
-        file.puts rakefile
-      end
-
-      Dir.chdir(bundled_app(gem_name)) do
-        sys_exec("rake")
-        expect(out).to include("SUCCESS")
-      end
-    end
-
-    context "--bin parameter set" do
-      before do
-        reset!
-        in_app_root
-        bundle "gem #{gem_name} --bin"
-      end
-
-      it "builds bin skeleton" do
-        expect(bundled_app("test_gem/bin/test_gem")).to exist
-      end
-
-      it "requires 'test-gem'" do
-        expect(bundled_app("test_gem/bin/test_gem").read).to match(/require 'test_gem'/)
-      end
-    end
-
-    context "no --test parameter" do
-      before do
-        reset!
-        in_app_root
-        bundle "gem #{gem_name}"
-      end
-
-      it "doesn't create any spec/test file" do
-        expect(bundled_app("test_gem/.rspec")).to_not exist
-        expect(bundled_app("test_gem/spec/test_gem_spec.rb")).to_not exist
-        expect(bundled_app("test_gem/spec/spec_helper.rb")).to_not exist
-        expect(bundled_app("test_gem/test/test_test_gem.rb")).to_not exist
-        expect(bundled_app("test_gem/test/minitest_helper.rb")).to_not exist
-      end
-    end
-
-    context "--test parameter set to rspec" do
-      before do
-        reset!
-        in_app_root
-        bundle "gem #{gem_name} --test=rspec"
-      end
-
-      it "builds spec skeleton" do
-        expect(bundled_app("test_gem/.rspec")).to exist
-        expect(bundled_app("test_gem/spec/test_gem_spec.rb")).to exist
-        expect(bundled_app("test_gem/spec/spec_helper.rb")).to exist
-      end
-
-      it "requires 'test-gem'" do
-        expect(bundled_app("test_gem/spec/spec_helper.rb").read).to include("require 'test_gem'")
-      end
-
-      it "creates a default test which fails" do
-        expect(bundled_app("test_gem/spec/test_gem_spec.rb").read).to include("expect(false).to eq(true)")
-      end
-    end
-
-    context "--test parameter set to minitest" do
-      before do
-        reset!
-        in_app_root
-        bundle "gem #{gem_name} --test=minitest"
-      end
-
-      it "builds spec skeleton" do
-        expect(bundled_app("test_gem/test/test_test_gem.rb")).to exist
-        expect(bundled_app("test_gem/test/minitest_helper.rb")).to exist
-      end
-
-      it "requires 'test-gem'" do
-        expect(bundled_app("test_gem/test/minitest_helper.rb").read).to include("require 'test_gem'")
-      end
-
-      it "requires 'minitest_helper'" do
-        expect(bundled_app("test_gem/test/test_test_gem.rb").read).to include("require 'minitest_helper'")
-      end
-
-      it "creates a default test which fails" do
-        expect(bundled_app("test_gem/test/test_test_gem.rb").read).to include("assert false")
-      end
-    end
-
-    context "--test with no arguments" do
-      before do
-        reset!
-        in_app_root
-        bundle "gem #{gem_name} --test"
-      end
-
-      it "defaults to rspec" do
-        expect(bundled_app("test_gem/spec/spec_helper.rb")).to exist
-        expect(bundled_app("test_gem/test/minitest_helper.rb")).to_not exist
-      end
-
-      it "creates a .travis.yml file to test the library against the current Ruby version on Travis CI" do
-        expect(bundled_app("test_gem/.travis.yml").read).to match(%r(- #{RUBY_VERSION}))
-      end
-    end
-
-    context "--edit option" do
-      it "opens the generated gemspec in the user's text editor" do
-        reset!
-        in_app_root
-        output = bundle "gem #{gem_name} --edit=echo"
-        gemspec_path = File.join(Dir.pwd, gem_name, "#{gem_name}.gemspec")
-        expect(output).to include("echo \"#{gemspec_path}\"")
-      end
-    end
-  end
-
-  context "gem naming with dashed" do
-    let(:gem_name) { 'test-gem' }
-
-    before do
-      bundle "gem #{gem_name}"
-      # reset gemspec cache for each test because of commit 3d4163a
-      Bundler.clear_gemspec_cache
-    end
-
-    let(:generated_gem) { Bundler::GemHelper.new(bundled_app(gem_name).to_s) }
-
-    it "generates a gem skeleton" do
-      expect(bundled_app("test-gem/test-gem.gemspec")).to exist
-      expect(bundled_app("test-gem/LICENSE.txt")).to exist
-      expect(bundled_app("test-gem/Gemfile")).to exist
-      expect(bundled_app("test-gem/Rakefile")).to exist
-      expect(bundled_app("test-gem/lib/test/gem.rb")).to exist
-      expect(bundled_app("test-gem/lib/test/gem/version.rb")).to exist
-    end
-
-    it "starts with version 0.0.1" do
-      expect(bundled_app("test-gem/lib/test/gem/version.rb").read).to match(/VERSION = "0.0.1"/)
-    end
-
-    it "nests constants so they work" do
-      expect(bundled_app("test-gem/lib/test/gem/version.rb").read).to match(/module Test\n  module Gem/)
-      expect(bundled_app("test-gem/lib/test/gem.rb").read).to match(/module Test\n  module Gem/)
-    end
-
-    it_should_behave_like "git config is present"
-
-    context "git config user.{name,email} is not set" do
-      before do
-        `git config --global --unset user.name`
-        `git config --global --unset user.email`
-        reset!
-        in_app_root
-        bundle "gem #{gem_name}"
-      end
-
-      it_should_behave_like "git config is absent"
-    end
-
-    it "sets gemspec license to MIT by default" do
-      expect(generated_gem.gemspec.license).to eq("MIT")
-    end
-
-    it "requires the version file" do
-      expect(bundled_app("test-gem/lib/test/gem.rb").read).to match(/require "test\/gem\/version"/)
-    end
-
-    it "runs rake without problems" do
-      system_gems ["rake-10.0.2"]
-
-      rakefile = strip_whitespace <<-RAKEFILE
-        task :default do
-          puts 'SUCCESS'
-        end
-      RAKEFILE
-      File.open(bundled_app("test-gem/Rakefile"), 'w') do |file|
-        file.puts rakefile
-      end
-
-      Dir.chdir(bundled_app(gem_name)) do
-        sys_exec("rake")
-        expect(out).to include("SUCCESS")
-      end
-    end
-
-    context "--bin parameter set" do
-      before do
-        reset!
-        in_app_root
-        bundle "gem #{gem_name} --bin"
-      end
-
-      it "builds bin skeleton" do
-        expect(bundled_app("test-gem/bin/test-gem")).to exist
-      end
-
-      it "requires 'test/gem'" do
-        expect(bundled_app("test-gem/bin/test-gem").read).to match(/require 'test\/gem'/)
-      end
-    end
-
-    context "no --test parameter" do
-      before do
-        reset!
-        in_app_root
-        bundle "gem #{gem_name}"
-      end
-
-      it "doesn't create any spec/test file" do
-        expect(bundled_app("test-gem/.rspec")).to_not exist
-        expect(bundled_app("test-gem/spec/test/gem_spec.rb")).to_not exist
-        expect(bundled_app("test-gem/spec/spec_helper.rb")).to_not exist
-        expect(bundled_app("test-gem/test/test_test/gem.rb")).to_not exist
-        expect(bundled_app("test-gem/test/minitest_helper.rb")).to_not exist
-      end
-    end
-
-    context "--test parameter set to rspec" do
-      before do
-        reset!
-        in_app_root
-        bundle "gem #{gem_name} --test=rspec"
-      end
-
-      it "builds spec skeleton" do
-        expect(bundled_app("test-gem/.rspec")).to exist
-        expect(bundled_app("test-gem/spec/test/gem_spec.rb")).to exist
-        expect(bundled_app("test-gem/spec/spec_helper.rb")).to exist
-      end
-
-      it "requires 'test/gem'" do
-        expect(bundled_app("test-gem/spec/spec_helper.rb").read).to include("require 'test/gem'")
-      end
-
-      it "creates a default test which fails" do
-        expect(bundled_app("test-gem/spec/test/gem_spec.rb").read).to include("expect(false).to eq(true)")
-      end
-
-      it "creates a default rake task to run the specs" do
-        rakefile = strip_whitespace <<-RAKEFILE
-          require "bundler/gem_tasks"
-          require "rspec/core/rake_task"
-
-          RSpec::Core::RakeTask.new(:spec)
-
-          task :default => :spec
-
-        RAKEFILE
-
-        expect(bundled_app("test-gem/Rakefile").read).to eq(rakefile)
-      end
-    end
-
-    context "--test parameter set to minitest" do
-      before do
-        reset!
-        in_app_root
-        bundle "gem #{gem_name} --test=minitest"
-      end
-
-      it "builds spec skeleton" do
-        expect(bundled_app("test-gem/test/test_test/gem.rb")).to exist
-        expect(bundled_app("test-gem/test/minitest_helper.rb")).to exist
-      end
-
-      it "requires 'test/gem'" do
-        expect(bundled_app("test-gem/test/minitest_helper.rb").read).to match(/require 'test\/gem'/)
-      end
-
-      it "requires 'minitest_helper'" do
-        expect(bundled_app("test-gem/test/test_test/gem.rb").read).to match(/require 'minitest_helper'/)
-      end
-
-      it "creates a default test which fails" do
-        expect(bundled_app("test-gem/test/test_test/gem.rb").read).to match(/assert false/)
-      end
-
-      it "creates a default rake task to run the test suite" do
-        rakefile = strip_whitespace <<-RAKEFILE
-          require "bundler/gem_tasks"
-          require "rake/testtask"
-
-          Rake::TestTask.new(:test) do |t|
-            t.libs << "test"
-          end
-
-          task :default => :test
-
-        RAKEFILE
-
-        expect(bundled_app("test-gem/Rakefile").read).to eq(rakefile)
-      end
-    end
-
-    context "--test with no arguments" do
-      before do
-        reset!
-        in_app_root
-        bundle "gem #{gem_name} --test"
-      end
-
-      it "defaults to rspec" do
-        expect(bundled_app("test-gem/spec/spec_helper.rb")).to exist
-        expect(bundled_app("test-gem/test/minitest_helper.rb")).to_not exist
-      end
-    end
-
-    context "--ext parameter set" do
-      before do
-        reset!
-        in_app_root
-        bundle "gem test_gem --ext"
-      end
-
-      it "builds ext skeleton" do
-        expect(bundled_app("test_gem/ext/test_gem/extconf.rb")).to exist
-        expect(bundled_app("test_gem/ext/test_gem/test_gem.h")).to exist
-        expect(bundled_app("test_gem/ext/test_gem/test_gem.c")).to exist
-      end
-
-      it "includes rake-compiler" do
-        expect(bundled_app("test_gem/test_gem.gemspec").read).to include('spec.add_development_dependency "rake-compiler"')
-      end
-    end
-  end
-end
diff --git a/spec/commands/open_spec.rb b/spec/commands/open_spec.rb
deleted file mode 100644
index e3a66ec..0000000
--- a/spec/commands/open_spec.rb
+++ /dev/null
@@ -1,68 +0,0 @@
-require "spec_helper"
-
-describe "bundle open" do
-  before :each do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rails"
-    G
-  end
-
-  it "opens the gem with BUNDLER_EDITOR as highest priority" do
-    bundle "open rails", :env => {"EDITOR" => "echo editor", "VISUAL" => "echo visual", "BUNDLER_EDITOR" => "echo bundler_editor"}
-    expect(out).to eq("bundler_editor #{default_bundle_path('gems', 'rails-2.3.2')}")
-  end
-
-  it "opens the gem with VISUAL as 2nd highest priority" do
-    bundle "open rails", :env => {"EDITOR" => "echo editor", "VISUAL" => "echo visual", "BUNDLER_EDITOR" => ""}
-    expect(out).to eq("visual #{default_bundle_path('gems', 'rails-2.3.2')}")
-  end
-
-  it "opens the gem with EDITOR as 3rd highest priority" do
-    bundle "open rails", :env => {"EDITOR" => "echo editor", "VISUAL" => "", "BUNDLER_EDITOR" => ""}
-    expect(out).to eq("editor #{default_bundle_path('gems', 'rails-2.3.2')}")
-  end
-
-  it "complains if no EDITOR is set" do
-    bundle "open rails", :env => {"EDITOR" => "", "VISUAL" => "", "BUNDLER_EDITOR" => ""}
-    expect(out).to eq("To open a bundled gem, set $EDITOR or $BUNDLER_EDITOR")
-  end
-
-  it "complains if gem not in bundle" do
-    bundle "open missing", :env => {"EDITOR" => "echo editor", "VISUAL" => "", "BUNDLER_EDITOR" => ""}
-    expect(out).to match(/could not find gem 'missing'/i)
-  end
-
-  it "does not blow up if the gem to open does not have a Gemfile" do
-    git = build_git "foo"
-    ref = git.ref_for("master", 11)
-
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem 'foo', :git => "#{lib_path("foo-1.0")}"
-    G
-
-    bundle "open foo", :env => {"EDITOR" => "echo editor", "VISUAL" => "", "BUNDLER_EDITOR" => ""}
-    expect(out).to match("editor #{default_bundle_path.join("bundler/gems/foo-1.0-#{ref}")}")
-  end
-
-  it "suggests alternatives for similar-sounding gems" do
-    bundle "open Rails", :env => {"EDITOR" => "echo editor", "VISUAL" => "", "BUNDLER_EDITOR" => ""}
-    expect(out).to match(/did you mean rails\?/i)
-  end
-
-  it "opens the gem with short words" do
-    bundle "open rec" , :env => {"EDITOR" => "echo editor", "VISUAL" => "echo visual", "BUNDLER_EDITOR" => "echo bundler_editor"}
-
-    expect(out).to eq("bundler_editor #{default_bundle_path('gems', 'activerecord-2.3.2')}")
-  end
-
-  it "select the gem from many match gems" do
-    env = {"EDITOR" => "echo editor", "VISUAL" => "echo visual", "BUNDLER_EDITOR" => "echo bundler_editor"}
-    bundle "open active" , :env => env do |input|
-      input.puts '2'
-    end
-
-    expect(out).to match(/bundler_editor #{default_bundle_path('gems', 'activerecord-2.3.2')}\z/)
-  end
-end
diff --git a/spec/commands/outdated_spec.rb b/spec/commands/outdated_spec.rb
deleted file mode 100644
index da17a2e..0000000
--- a/spec/commands/outdated_spec.rb
+++ /dev/null
@@ -1,156 +0,0 @@
-require "spec_helper"
-
-describe "bundle outdated" do
-  before :each do
-    build_repo2 do
-      build_git "foo", :path => lib_path("foo")
-      build_git "zebra", :path => lib_path("zebra")
-    end
-
-    install_gemfile <<-G
-      source "file://#{gem_repo2}"
-      gem "zebra", :git => "#{lib_path('zebra')}"
-      gem "foo", :git => "#{lib_path('foo')}"
-      gem "activesupport", "2.3.5"
-      gem "weakling", "~> 0.0.1"
-    G
-  end
-
-  describe "with no arguments" do
-    it "returns a sorted list of outdated gems" do
-      update_repo2 do
-        build_gem "activesupport", "3.0"
-        build_gem "weakling", "0.2"
-        update_git "foo", :path => lib_path("foo")
-        update_git "zebra", :path => lib_path("zebra")
-      end
-
-      bundle "outdated"
-
-      expect(out).to include("activesupport (3.0 > 2.3.5) Gemfile specifies \"= 2.3.5\"")
-      expect(out).to include("weakling (0.2 > 0.0.3) Gemfile specifies \"~> 0.0.1\"")
-      expect(out).to include("foo (1.0")
-
-      # Gem names are one per-line, between "*" and their parenthesized version.
-      gem_list = out.split("\n").map { |g| g[ /\* (.*) \(/, 1] }.compact
-      expect(gem_list).to eq(gem_list.sort)
-    end
-
-    it "returns non zero exit status if outdated gems present" do
-      update_repo2 do
-        build_gem "activesupport", "3.0"
-        update_git "foo", :path => lib_path("foo")
-      end
-
-      bundle "outdated", :exitstatus => true
-
-      expect(exitstatus).to_not be_zero
-    end
-
-    it "returns success exit status if no outdated gems present" do
-      bundle "outdated", :exitstatus => true
-
-      expect(exitstatus).to be_zero
-    end
-  end
-
-  describe "with --local option" do
-    it "doesn't hit repo2" do
-      FileUtils.rm_rf(gem_repo2)
-
-      bundle "outdated --local"
-      expect(out).not_to match(/Fetching/)
-    end
-  end
-
-  describe "with specified gems" do
-    it "returns list of outdated gems" do
-      update_repo2 do
-        build_gem "activesupport", "3.0"
-        update_git "foo", :path => lib_path("foo")
-      end
-
-      bundle "outdated foo"
-      expect(out).not_to include("activesupport (3.0 > 2.3.5)")
-      expect(out).to include("foo (1.0")
-    end
-  end
-
-  describe "pre-release gems" do
-    context "without the --pre option" do
-      it "ignores pre-release versions" do
-        update_repo2 do
-          build_gem "activesupport", "3.0.0.beta"
-        end
-
-        bundle "outdated"
-        expect(out).not_to include("activesupport (3.0.0.beta > 2.3.5)")
-      end
-    end
-
-    context "with the --pre option" do
-      it "includes pre-release versions" do
-        update_repo2 do
-          build_gem "activesupport", "3.0.0.beta"
-        end
-
-        bundle "outdated --pre"
-        expect(out).to include("activesupport (3.0.0.beta > 2.3.5) Gemfile specifies \"= 2.3.5\"")
-      end
-    end
-
-    context "when current gem is a pre-release" do
-      it "includes the gem" do
-        update_repo2 do
-          build_gem "activesupport", "3.0.0.beta.1"
-          build_gem "activesupport", "3.0.0.beta.2"
-        end
-
-        install_gemfile <<-G
-          source "file://#{gem_repo2}"
-          gem "activesupport", "3.0.0.beta.1"
-        G
-
-        bundle "outdated"
-        expect(out).to include("activesupport (3.0.0.beta.2 > 3.0.0.beta.1) Gemfile specifies \"= 3.0.0.beta.1\"")
-      end
-    end
-  end
-
-  describe "with --strict option" do
-    it "only reports gems that have a newer version that matches the specified dependency version requirements" do
-      update_repo2 do
-        build_gem "activesupport", "3.0"
-        build_gem "weakling", "0.0.5"
-      end
-
-      bundle "outdated --strict"
-
-      expect(out).to_not include("activesupport (3.0 > 2.3.5) Gemfile specifies \"= 2.3.5\"")
-      expect(out).to include("weakling (0.0.5 > 0.0.3) Gemfile specifies \"~> 0.0.1\"")
-    end
-
-    it "only reports gem dependencies when they can actually be updated" do
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "rack_middleware", "1.0"
-      G
-
-      bundle "outdated --strict"
-
-      expect(out).to_not include("rack (1.2 > 0.9.1)")
-    end
-  end
-
-  describe "with invalid gem name" do
-    it "returns could not find gem name" do
-      bundle "outdated invalid_gem_name"
-      expect(out).to include("Could not find gem 'invalid_gem_name'.")
-    end
-
-    it "returns non-zero exit code" do
-      bundle "outdated invalid_gem_name", :exitstatus => true
-      expect(exitstatus).to_not be_zero
-    end
-  end
-end
diff --git a/spec/commands/package_spec.rb b/spec/commands/package_spec.rb
deleted file mode 100644
index e433b92..0000000
--- a/spec/commands/package_spec.rb
+++ /dev/null
@@ -1,114 +0,0 @@
-require "spec_helper"
-
-describe "bundle package" do
-  context "with --gemfile" do
-    it "finds the gemfile" do
-      gemfile bundled_app("NotGemfile"), <<-G
-        source "file://#{gem_repo1}"
-        gem 'rack'
-      G
-
-      bundle "package --gemfile=NotGemfile"
-
-      ENV['BUNDLE_GEMFILE'] = "NotGemfile"
-      should_be_installed "rack 1.0.0"
-    end
-  end
-
-  context "with --path" do
-    it "sets root directory for gems" do
-      gemfile <<-D
-        source "file://#{gem_repo1}"
-        gem 'rack'
-      D
-
-      bundle "package --path=#{bundled_app('test')}"
-
-      should_be_installed "rack 1.0.0"
-      expect(bundled_app("test/vendor/cache/")).to exist
-    end
-  end
-end
-
-describe "bundle install with gem sources" do
-  describe "when cached and locked" do
-    it "does not hit the remote at all" do
-      build_repo2
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "rack"
-      G
-
-      bundle :pack
-      simulate_new_machine
-      FileUtils.rm_rf gem_repo2
-
-      bundle "install --local"
-      should_be_installed "rack 1.0.0"
-    end
-
-    it "does not hit the remote at all" do
-      build_repo2
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "rack"
-      G
-
-      bundle :pack
-      simulate_new_machine
-      FileUtils.rm_rf gem_repo2
-
-      bundle "install --deployment"
-      should_be_installed "rack 1.0.0"
-    end
-
-    it "does not reinstall already-installed gems" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-      G
-      bundle :pack
-
-      build_gem "rack", "1.0.0", :path => bundled_app('vendor/cache') do |s|
-        s.write "lib/rack.rb", "raise 'omg'"
-      end
-
-      bundle :install
-      expect(err).to be_empty
-      should_be_installed "rack 1.0"
-    end
-
-    it "ignores cached gems for the wrong platform" do
-      simulate_platform "java" do
-        install_gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "platform_specific"
-        G
-        bundle :pack
-      end
-
-      simulate_new_machine
-
-      simulate_platform "ruby" do
-        install_gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "platform_specific"
-        G
-        run "require 'platform_specific' ; puts PLATFORM_SPECIFIC"
-        expect(out).to eq("1.0.0 RUBY")
-      end
-    end
-
-    it "does not update the cache if --no-cache is passed" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-      G
-      bundled_app("vendor/cache").mkpath
-      expect(bundled_app("vendor/cache").children).to be_empty
-
-      bundle "install --no-cache"
-      expect(bundled_app("vendor/cache").children).to be_empty
-    end
-  end
-end
diff --git a/spec/commands/show_spec.rb b/spec/commands/show_spec.rb
deleted file mode 100644
index 01a2c2a..0000000
--- a/spec/commands/show_spec.rb
+++ /dev/null
@@ -1,125 +0,0 @@
-require "spec_helper"
-
-describe "bundle show" do
-  context "with a standard Gemfile" do
-    before :each do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rails"
-      G
-    end
-
-    it "creates a Gemfile.lock if one did not exist" do
-      FileUtils.rm("Gemfile.lock")
-
-      bundle "show"
-
-      expect(bundled_app("Gemfile.lock")).to exist
-    end
-
-    it "creates a Gemfile.lock when invoked with a gem name" do
-      FileUtils.rm("Gemfile.lock")
-
-      bundle "show rails"
-
-      expect(bundled_app("Gemfile.lock")).to exist
-    end
-
-    it "prints path if gem exists in bundle" do
-      bundle "show rails"
-      expect(out).to eq(default_bundle_path('gems', 'rails-2.3.2').to_s)
-    end
-
-    it "warns if path no longer exists on disk" do
-      FileUtils.rm_rf("#{system_gem_path}/gems/rails-2.3.2")
-
-      bundle "show rails"
-
-      expect(out).to match(/has been deleted/i)
-      expect(out).to include(default_bundle_path('gems', 'rails-2.3.2').to_s)
-    end
-
-    it "prints the path to the running bundler" do
-      bundle "show bundler"
-      expect(out).to eq(File.expand_path('../../../', __FILE__))
-    end
-
-    it "complains if gem not in bundle" do
-      bundle "show missing"
-      expect(out).to match(/could not find gem 'missing'/i)
-    end
-
-    it "prints path of all gems in bundle sorted by name" do
-      bundle "show --paths"
-
-      expect(out).to include(default_bundle_path('gems', 'rake-10.0.2').to_s)
-      expect(out).to include(default_bundle_path('gems', 'rails-2.3.2').to_s)
-
-      # Gem names are the last component of their path.
-      gem_list = out.split.map { |p| p.split('/').last }
-      expect(gem_list).to eq(gem_list.sort)
-    end
-
-    it "prints summary of gems" do
-      bundle "show --verbose"
-
-      expect(out).to include(' - This is just a fake gem for testing')
-      expect(out).to include(' - Ruby based make-like utility.')
-    end
-  end
-
-  context "with a git repo in the Gemfile" do
-    before :each do
-      @git = build_git "foo", "1.0"
-    end
-
-    it "prints out git info" do
-      install_gemfile <<-G
-        gem "foo", :git => "#{lib_path('foo-1.0')}"
-      G
-      should_be_installed "foo 1.0"
-
-      bundle :show
-      expect(out).to include("foo (1.0 #{@git.ref_for('master', 6)}")
-    end
-
-    it "prints out branch names other than master" do
-      update_git "foo", :branch => "omg" do |s|
-        s.write "lib/foo.rb", "FOO = '1.0.omg'"
-      end
-      @revision = revision_for(lib_path("foo-1.0"))[0...6]
-
-      install_gemfile <<-G
-        gem "foo", :git => "#{lib_path('foo-1.0')}", :branch => "omg"
-      G
-      should_be_installed "foo 1.0.omg"
-
-      bundle :show
-      expect(out).to include("foo (1.0 #{@git.ref_for('omg', 6)}")
-    end
-
-    it "doesn't print the branch when tied to a ref" do
-      sha = revision_for(lib_path("foo-1.0"))
-      install_gemfile <<-G
-        gem "foo", :git => "#{lib_path('foo-1.0')}", :ref => "#{sha}"
-      G
-
-      bundle :show
-      expect(out).to include("foo (1.0 #{sha[0..6]})")
-    end
-  end
-
-  context "in a fresh gem in a blank git repo" do
-    before :each do
-      build_git "foo", :path => lib_path("foo")
-      in_app_root_custom lib_path("foo")
-      File.open('Gemfile', 'w') {|f| f.puts "gemspec" }
-      sys_exec 'rm -rf .git && git init'
-    end
-
-    it "does not output git errors" do
-      bundle :show
-      expect(err).to be_empty
-    end
-  end
-end
diff --git a/spec/install/binstubs_spec.rb b/spec/install/binstubs_spec.rb
deleted file mode 100644
index 9a76c52..0000000
--- a/spec/install/binstubs_spec.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-require 'spec_helper'
-
-describe "bundle install" do
-
-  describe "when system_bindir is set" do
-    # On OS X, Gem.bindir defaults to /usr/bin, so system_bindir is useful if
-    # you want to avoid sudo installs for system gems with OS X's default ruby
-    it "overrides Gem.bindir" do
-      expect(Pathname.new("/usr/bin")).not_to be_writable unless Process::euid == 0
-      gemfile <<-G
-        require 'rubygems'
-        def Gem.bindir; "/usr/bin"; end
-        source "file://#{gem_repo1}"
-        gem "rack"
-      G
-
-      config "BUNDLE_SYSTEM_BINDIR" => system_gem_path('altbin').to_s
-      bundle :install
-      should_be_installed "rack 1.0.0"
-      expect(system_gem_path("altbin/rackup")).to exist
-    end
-  end
-
-end
diff --git a/spec/install/bundler_spec.rb b/spec/install/bundler_spec.rb
deleted file mode 100644
index b85ddf8..0000000
--- a/spec/install/bundler_spec.rb
+++ /dev/null
@@ -1,146 +0,0 @@
-require 'spec_helper'
-
-describe "bundle install" do
-
-  describe "with bundler dependencies" do
-    before(:each) do
-      build_repo2 do
-        build_gem "rails", "3.0" do |s|
-          s.add_dependency "bundler", ">= 0.9.0.pre"
-        end
-        build_gem "bundler", "0.9.1"
-        build_gem "bundler", Bundler::VERSION
-      end
-    end
-
-    it "are forced to the current bundler version" do
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "rails", "3.0"
-      G
-
-      should_be_installed "bundler #{Bundler::VERSION}"
-    end
-
-    it "are not added if not already present" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-      G
-      should_not_be_installed "bundler #{Bundler::VERSION}"
-    end
-
-    it "causes a conflict if explicitly requesting a different version" do
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "rails", "3.0"
-        gem "bundler", "0.9.2"
-      G
-
-      nice_error = <<-E.strip.gsub(/^ {8}/, '')
-        Fetching source index from file:#{gem_repo2}/
-        Resolving dependencies...
-        Bundler could not find compatible versions for gem "bundler":
-          In Gemfile:
-            bundler (= 0.9.2) ruby
-
-          Current Bundler version:
-            bundler (#{Bundler::VERSION})
-        E
-      expect(out).to include(nice_error)
-    end
-
-    it "works for gems with multiple versions in its dependencies" do
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-
-        gem "multiple_versioned_deps"
-      G
-
-
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-
-        gem "multiple_versioned_deps"
-        gem "rack"
-      G
-
-      should_be_installed "multiple_versioned_deps 1.0.0"
-    end
-
-    it "includes bundler in the bundle when it's a child dependency" do
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "rails", "3.0"
-      G
-
-      run "begin; gem 'bundler'; puts 'WIN'; rescue Gem::LoadError; puts 'FAIL'; end"
-      expect(out).to eq("WIN")
-    end
-
-    it "allows gem 'bundler' when Bundler is not in the Gemfile or its dependencies" do
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "rack"
-      G
-
-      run "begin; gem 'bundler'; puts 'WIN'; rescue Gem::LoadError => e; puts e.backtrace; end"
-      expect(out).to eq("WIN")
-    end
-
-    it "causes a conflict if child dependencies conflict" do
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "activemerchant"
-        gem "rails_fail"
-      G
-
-      nice_error = <<-E.strip.gsub(/^ {8}/, '')
-        Fetching source index from file:#{gem_repo2}/
-        Resolving dependencies...
-        Bundler could not find compatible versions for gem "activesupport":
-          In Gemfile:
-            activemerchant (>= 0) ruby depends on
-              activesupport (>= 2.0.0) ruby
-
-            rails_fail (>= 0) ruby depends on
-              activesupport (1.2.3)
-      E
-      expect(out).to eq(nice_error)
-    end
-
-    it "causes a conflict if a child dependency conflicts with the Gemfile" do
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "rails_fail"
-        gem "activesupport", "2.3.5"
-      G
-
-      nice_error = <<-E.strip.gsub(/^ {8}/, '')
-        Fetching source index from file:#{gem_repo2}/
-        Resolving dependencies...
-        Bundler could not find compatible versions for gem "activesupport":
-          In Gemfile:
-            rails_fail (>= 0) ruby depends on
-              activesupport (= 1.2.3) ruby
-
-            activesupport (2.3.5)
-      E
-      expect(out).to eq(nice_error)
-    end
-
-    it "can install dependencies with newer bundler version" do
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "rails", "3.0"
-      G
-
-      simulate_bundler_version "10.0.0"
-      #simulate_new_machine
-
-      bundle "check"
-      expect(out).to eq("The Gemfile's dependencies are satisfied")
-    end
-  end
-
-end
diff --git a/spec/install/deploy_spec.rb b/spec/install/deploy_spec.rb
deleted file mode 100644
index 25f5c5b..0000000
--- a/spec/install/deploy_spec.rb
+++ /dev/null
@@ -1,250 +0,0 @@
-require "spec_helper"
-
-describe "install with --deployment or --frozen" do
-  before do
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack"
-    G
-  end
-
-  it "fails without a lockfile and says that --deployment requires a lock" do
-    bundle "install --deployment"
-    expect(out).to include("The --deployment flag requires a Gemfile.lock")
-  end
-
-  it "fails without a lockfile and says that --frozen requires a lock" do
-    bundle "install --frozen"
-    expect(out).to include("The --frozen flag requires a Gemfile.lock")
-  end
-
-  it "works after you try to deploy without a lock" do
-    bundle "install --deployment"
-    bundle :install, :exitstatus => true
-    expect(exitstatus).to eq(0)
-    should_be_installed "rack 1.0"
-  end
-
-  it "still works if you are not in the app directory and specify --gemfile" do
-    bundle "install"
-    Dir.chdir tmp
-    simulate_new_machine
-    bundle "install --gemfile #{tmp}/bundled_app/Gemfile --deployment"
-    Dir.chdir bundled_app
-    should_be_installed "rack 1.0"
-  end
-
-  it "works if you exclude a group with a git gem" do
-    build_git "foo"
-    gemfile <<-G
-      group :test do
-        gem "foo", :git => "#{lib_path('foo-1.0')}"
-      end
-    G
-    bundle :install
-    bundle "install --deployment --without test", :exitstatus => true
-    expect(exitstatus).to eq(0)
-  end
-
-  it "works when you bundle exec bundle" do
-    bundle :install
-    bundle "install --deployment"
-    bundle "exec bundle check", :exitstatus => true
-    expect(exitstatus).to eq(0)
-  end
-
-  it "works when using path gems from the same path and the version is specified" do
-    build_lib "foo", :path => lib_path("nested/foo")
-    build_lib "bar", :path => lib_path("nested/bar")
-    gemfile <<-G
-      gem "foo", "1.0", :path => "#{lib_path("nested")}"
-      gem "bar", :path => "#{lib_path("nested")}"
-    G
-
-    bundle :install
-    bundle "install --deployment", :exitstatus => true
-
-    expect(exitstatus).to eq(0)
-  end
-
-  it "works when there are credentials in the source URL" do
-    install_gemfile(<<-G, :artifice => "endpoint_strict_basic_authentication", :quiet => true)
-      source "http://user:pass@localgemserver.test/"
-
-      gem "rack-obama", ">= 1.0"
-    G
-
-    bundle "install --deployment", :exitstatus => true, :artifice => "endpoint_strict_basic_authentication"
-
-    expect(exitstatus).to eq(0)
-  end
-
-  it "works with sources given by a block" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}" do
-        gem "rack"
-      end
-    G
-
-    bundle "install --deployment", :exitstatus => true
-
-    expect(exitstatus).to eq(0)
-    should_be_installed "rack 1.0"
-  end
-
-  describe "with an existing lockfile" do
-    before do
-      bundle "install"
-    end
-
-    it "works with the --deployment flag if you didn't change anything" do
-      bundle "install --deployment", :exitstatus => true
-      expect(exitstatus).to eq(0)
-    end
-
-    it "works with the --frozen flag if you didn't change anything" do
-      bundle "install --frozen", :exitstatus => true
-      expect(exitstatus).to eq(0)
-    end
-
-    it "explodes with the --deployment flag if you make a change and don't check in the lockfile" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-        gem "rack-obama"
-      G
-
-      bundle "install --deployment"
-      expect(out).to include("deployment mode")
-      expect(out).to include("You have added to the Gemfile")
-      expect(out).to include("* rack-obama")
-      expect(out).not_to include("You have deleted from the Gemfile")
-      expect(out).not_to include("You have changed in the Gemfile")
-    end
-
-    it "can have --frozen set via an environment variable" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-        gem "rack-obama"
-      G
-
-      ENV['BUNDLE_FROZEN'] = '1'
-      bundle "install"
-      expect(out).to include("deployment mode")
-      expect(out).to include("You have added to the Gemfile")
-      expect(out).to include("* rack-obama")
-      expect(out).not_to include("You have deleted from the Gemfile")
-      expect(out).not_to include("You have changed in the Gemfile")
-    end
-
-    it "can have --frozen set to false via an environment variable" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-        gem "rack-obama"
-      G
-
-      ENV['BUNDLE_FROZEN'] = "false"
-      bundle "install"
-      expect(out).not_to include("deployment mode")
-      expect(out).not_to include("You have added to the Gemfile")
-      expect(out).not_to include("* rack-obama")
-    end
-
-    it "explodes with the --frozen flag if you make a change and don't check in the lockfile" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-        gem "rack-obama"
-      G
-
-      bundle "install --frozen"
-      expect(out).to include("deployment mode")
-      expect(out).to include("You have added to the Gemfile")
-      expect(out).to include("* rack-obama")
-      expect(out).not_to include("You have deleted from the Gemfile")
-      expect(out).not_to include("You have changed in the Gemfile")
-    end
-
-    it "explodes if you remove a gem and don't check in the lockfile" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "activesupport"
-      G
-
-      bundle "install --deployment"
-      expect(out).to include("deployment mode")
-      expect(out).to include("You have added to the Gemfile:\n* activesupport\n\n")
-      expect(out).to include("You have deleted from the Gemfile:\n* rack")
-      expect(out).not_to include("You have changed in the Gemfile")
-    end
-
-    it "explodes if you add a source" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", :git => "git://hubz.com"
-      G
-
-      bundle "install --deployment"
-      expect(out).to include("deployment mode")
-      expect(out).to include("You have added to the Gemfile:\n* source: git://hubz.com (at master)")
-      expect(out).not_to include("You have changed in the Gemfile")
-    end
-
-    it "explodes if you unpin a source" do
-      build_git "rack"
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", :git => "#{lib_path("rack-1.0")}"
-      G
-
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-      G
-
-      bundle "install --deployment"
-      expect(out).to include("deployment mode")
-      expect(out).to include("You have deleted from the Gemfile:\n* source: #{lib_path("rack-1.0")} (at master)")
-      expect(out).not_to include("You have added to the Gemfile")
-      expect(out).not_to include("You have changed in the Gemfile")
-    end
-
-    it "explodes if you unpin a source, leaving it pinned somewhere else" do
-      build_lib "foo", :path => lib_path("rack/foo")
-      build_git "rack", :path => lib_path("rack")
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", :git => "#{lib_path("rack")}"
-        gem "foo", :git => "#{lib_path("rack")}"
-      G
-
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-        gem "foo", :git => "#{lib_path("rack")}"
-      G
-
-      bundle "install --deployment"
-      expect(out).to include("deployment mode")
-      expect(out).to include("You have changed in the Gemfile:\n* rack from `no specified source` to `#{lib_path("rack")} (at master)`")
-      expect(out).not_to include("You have added to the Gemfile")
-      expect(out).not_to include("You have deleted from the Gemfile")
-    end
-
-    it "remembers that the bundle is frozen at runtime" do
-      bundle "install --deployment"
-
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", "1.0.0"
-        gem "rack-obama"
-      G
-
-      should_be_installed "rack 1.0.0"
-    end
-  end
-end
diff --git a/spec/install/gemfile/gemspec_spec.rb b/spec/install/gemfile/gemspec_spec.rb
deleted file mode 100644
index 7746e45..0000000
--- a/spec/install/gemfile/gemspec_spec.rb
+++ /dev/null
@@ -1,170 +0,0 @@
-require "spec_helper"
-
-describe "bundle install from an existing gemspec" do
-
-  before(:each) do
-    build_gem "bar", :to_system => true
-    build_gem "bar-dev", :to_system => true
-  end
-
-  it "should install runtime and development dependencies" do
-    build_lib("foo", :path => tmp.join("foo")) do |s|
-      s.write("Gemfile", "source :rubygems\ngemspec")
-      s.add_dependency "bar", "=1.0.0"
-      s.add_development_dependency "bar-dev", '=1.0.0'
-    end
-    install_gemfile <<-G
-      source "file://#{gem_repo2}"
-      gemspec :path => '#{tmp.join("foo")}'
-    G
-
-    should_be_installed "bar 1.0.0"
-    should_be_installed "bar-dev 1.0.0", :groups => :development
-  end
-
-  it "that is hidden should install runtime and development dependencies" do
-    build_lib("foo", :path => tmp.join("foo")) do |s|
-      s.write("Gemfile", "source :rubygems\ngemspec")
-      s.add_dependency "bar", "=1.0.0"
-      s.add_development_dependency "bar-dev", '=1.0.0'
-    end
-    FileUtils.mv tmp.join('foo', 'foo.gemspec'), tmp.join('foo', '.gemspec')
-
-    install_gemfile <<-G
-      source "file://#{gem_repo2}"
-      gemspec :path => '#{tmp.join("foo")}'
-    G
-
-    should_be_installed "bar 1.0.0"
-    should_be_installed "bar-dev 1.0.0", :groups => :development
-  end
-
-  it "should handle a list of requirements" do
-    build_gem "baz", "1.0", :to_system => true
-    build_gem "baz", "1.1", :to_system => true
-
-    build_lib("foo", :path => tmp.join("foo")) do |s|
-      s.write("Gemfile", "source :rubygems\ngemspec")
-      s.add_dependency "baz", ">= 1.0", "< 1.1"
-    end
-    install_gemfile <<-G
-      source "file://#{gem_repo2}"
-      gemspec :path => '#{tmp.join("foo")}'
-    G
-
-    should_be_installed "baz 1.0"
-  end
-
-  it "should raise if there are no gemspecs available" do
-    build_lib("foo", :path => tmp.join("foo"), :gemspec => false)
-
-    error = install_gemfile(<<-G, :expect_err => true)
-      source "file://#{gem_repo2}"
-      gemspec :path => '#{tmp.join("foo")}'
-    G
-    expect(error).to match(/There are no gemspecs at #{tmp.join('foo')}/)
-  end
-
-  it "should raise if there are too many gemspecs available" do
-    build_lib("foo", :path => tmp.join("foo")) do |s|
-      s.write("foo2.gemspec", "")
-    end
-
-    error = install_gemfile(<<-G, :expect_err => true)
-      source "file://#{gem_repo2}"
-      gemspec :path => '#{tmp.join("foo")}'
-    G
-    expect(error).to match(/There are multiple gemspecs at #{tmp.join('foo')}/)
-  end
-
-  it "should pick a specific gemspec" do
-    build_lib("foo", :path => tmp.join("foo")) do |s|
-      s.write("foo2.gemspec", "")
-      s.add_dependency "bar", "=1.0.0"
-      s.add_development_dependency "bar-dev", '=1.0.0'
-    end
-
-    install_gemfile(<<-G, :expect_err => true)
-      source "file://#{gem_repo2}"
-      gemspec :path => '#{tmp.join("foo")}', :name => 'foo'
-    G
-
-    should_be_installed "bar 1.0.0"
-    should_be_installed "bar-dev 1.0.0", :groups => :development
-  end
-
-  it "should use a specific group for development dependencies" do
-    build_lib("foo", :path => tmp.join("foo")) do |s|
-      s.write("foo2.gemspec", "")
-      s.add_dependency "bar", "=1.0.0"
-      s.add_development_dependency "bar-dev", '=1.0.0'
-    end
-
-    install_gemfile(<<-G, :expect_err => true)
-      source "file://#{gem_repo2}"
-      gemspec :path => '#{tmp.join("foo")}', :name => 'foo', :development_group => :dev
-    G
-
-    should_be_installed "bar 1.0.0"
-    should_not_be_installed "bar-dev 1.0.0", :groups => :development
-    should_be_installed "bar-dev 1.0.0", :groups => :dev
-  end
-
-  it "should match a lockfile even if the gemspec defines development dependencies" do
-    build_lib("foo", :path => tmp.join("foo")) do |s|
-      s.write("Gemfile", "source 'file://#{gem_repo1}'\ngemspec")
-      s.add_dependency "actionpack", "=2.3.2"
-      s.add_development_dependency "rake", '=10.0.2'
-    end
-
-    Dir.chdir(tmp.join("foo")) do
-      bundle "install"
-      # This should really be able to rely on $stderr, but, it's not written
-      # right, so we can't. In fact, this is a bug negation test, and so it'll
-      # ghost pass in future, and will only catch a regression if the message
-      # doesn't change. Exit codes should be used correctly (they can be more
-      # than just 0 and 1).
-      output = bundle("install --deployment")
-      expect(output).not_to match(/You have added to the Gemfile/)
-      expect(output).not_to match(/You have deleted from the Gemfile/)
-      expect(output).not_to match(/install in deployment mode after changing/)
-    end
-  end
-
-  it "should evaluate the gemspec in its directory" do
-    build_lib("foo", :path => tmp.join("foo"))
-    File.open(tmp.join("foo/foo.gemspec"), "w") do |s|
-      s.write "raise 'ahh' unless Dir.pwd == '#{tmp.join("foo")}'"
-    end
-
-    install_gemfile <<-G, :expect_err => true
-      gemspec :path => '#{tmp.join("foo")}'
-    G
-    expect(@err).not_to match(/ahh/)
-  end
-
-  context "when child gemspecs conflict with a released gemspec" do
-    before do
-      # build the "parent" gem that depends on another gem in the same repo
-      build_lib "source_conflict", :path => bundled_app do |s|
-        s.add_dependency "rack_middleware"
-      end
-
-      # build the "child" gem that is the same version as a released gem, but
-      # has completely different and conflicting dependency requirements
-      build_lib "rack_middleware", "1.0", :path => bundled_app("rack_middleware") do |s|
-        s.add_dependency "rack", "1.0" # anything other than 0.9.1
-      end
-    end
-
-    it "should install the child gemspec's deps" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gemspec
-      G
-
-      should_be_installed "rack 1.0"
-    end
-  end
-
-end
diff --git a/spec/install/gemfile/git_spec.rb b/spec/install/gemfile/git_spec.rb
deleted file mode 100644
index 5d954c4..0000000
--- a/spec/install/gemfile/git_spec.rb
+++ /dev/null
@@ -1,967 +0,0 @@
-require "spec_helper"
-
-describe "bundle install with git sources" do
-  describe "when floating on master" do
-    before :each do
-      build_git "foo" do |s|
-        s.executables = "foobar"
-      end
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        git "#{lib_path('foo-1.0')}" do
-          gem 'foo'
-        end
-      G
-    end
-
-    it "fetches gems" do
-      should_be_installed("foo 1.0")
-
-      run <<-RUBY
-        require 'foo'
-        puts "WIN" unless defined?(FOO_PREV_REF)
-      RUBY
-
-      expect(out).to eq("WIN")
-    end
-
-    it "caches the git repo" do
-      expect(Dir["#{default_bundle_path}/cache/bundler/git/foo-1.0-*"].size).to eq(1)
-    end
-
-    it "caches the evaluated gemspec" do
-      git = update_git "foo" do |s|
-        s.executables = ["foobar"] # we added this the first time, so keep it now
-        s.files = ["bin/foobar"] # updating git nukes the files list
-        foospec = s.to_ruby.gsub(/s\.files.*/, 's.files = `git ls-files -z`.split("\x0")')
-        s.write "foo.gemspec", foospec
-      end
-
-      bundle "update foo"
-
-      sha = git.ref_for("master", 11)
-      spec_file = default_bundle_path.join("bundler/gems/foo-1.0-#{sha}/foo.gemspec").to_s
-      ruby_code = Gem::Specification.load(spec_file).to_ruby
-      file_code = File.read(spec_file)
-      expect(file_code).to eq(ruby_code)
-    end
-
-    it "does not update the git source implicitly" do
-      update_git "foo"
-
-      in_app_root2 do
-        install_gemfile bundled_app2("Gemfile"), <<-G
-          git "#{lib_path('foo-1.0')}" do
-            gem 'foo'
-          end
-        G
-      end
-
-      in_app_root do
-        run <<-RUBY
-          require 'foo'
-          puts "fail" if defined?(FOO_PREV_REF)
-        RUBY
-
-        expect(out).to be_empty
-      end
-    end
-
-    it "sets up git gem executables on the path" do
-      pending_jruby_shebang_fix
-      bundle "exec foobar"
-      expect(out).to eq("1.0")
-    end
-
-    it "complains if pinned specs don't exist in the git repo" do
-      build_git "foo"
-
-      install_gemfile <<-G
-        gem "foo", "1.1", :git => "#{lib_path('foo-1.0')}"
-      G
-
-      expect(out).to include("Source contains 'foo' at: 1.0")
-    end
-
-    it "still works after moving the application directory" do
-      bundle "install --path vendor/bundle"
-      FileUtils.mv bundled_app, tmp('bundled_app.bck')
-
-      Dir.chdir tmp('bundled_app.bck')
-      should_be_installed "foo 1.0"
-    end
-
-    it "can still install after moving the application directory" do
-      bundle "install --path vendor/bundle"
-      FileUtils.mv bundled_app, tmp('bundled_app.bck')
-
-      update_git "foo", "1.1", :path => lib_path("foo-1.0")
-
-      Dir.chdir tmp('bundled_app.bck')
-      gemfile tmp('bundled_app.bck/Gemfile'), <<-G
-        source "file://#{gem_repo1}"
-        git "#{lib_path('foo-1.0')}" do
-          gem 'foo'
-        end
-
-        gem "rack", "1.0"
-      G
-
-      bundle "update foo"
-
-      should_be_installed "foo 1.1", "rack 1.0"
-    end
-
-  end
-
-  describe "with an empty git block" do
-    before do
-      build_git "foo"
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-
-        git "#{lib_path("foo-1.0")}" do
-          # this page left intentionally blank
-        end
-      G
-    end
-
-    it "does not explode" do
-      bundle "install"
-      should_be_installed "rack 1.0"
-    end
-  end
-
-  describe "when specifying a revision" do
-    before(:each) do
-      build_git "foo"
-      @revision = revision_for(lib_path("foo-1.0"))
-      update_git "foo"
-    end
-
-    it "works" do
-      install_gemfile <<-G
-        git "#{lib_path('foo-1.0')}", :ref => "#{@revision}" do
-          gem "foo"
-        end
-      G
-
-      run <<-RUBY
-        require 'foo'
-        puts "WIN" unless defined?(FOO_PREV_REF)
-      RUBY
-
-      expect(out).to eq("WIN")
-    end
-
-    it "works when the revision is a symbol" do
-      install_gemfile <<-G
-        git "#{lib_path('foo-1.0')}", :ref => #{@revision.to_sym.inspect} do
-          gem "foo"
-        end
-      G
-      expect(err).to eq("")
-
-      run <<-RUBY
-        require 'foo'
-        puts "WIN" unless defined?(FOO_PREV_REF)
-      RUBY
-
-      expect(out).to eq("WIN")
-    end
-  end
-
-  describe "when specifying local override" do
-    it "uses the local repository instead of checking a new one out" do
-      # We don't generate it because we actually don't need it
-      # build_git "rack", "0.8"
-
-      build_git "rack", "0.8", :path => lib_path('local-rack') do |s|
-        s.write "lib/rack.rb", "puts :LOCAL"
-      end
-
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "master"
-      G
-
-      bundle %|config local.rack #{lib_path('local-rack')}|
-      bundle :install
-      expect(out).to match(/at #{lib_path('local-rack')}/)
-
-      run "require 'rack'"
-      expect(out).to eq("LOCAL")
-    end
-
-    it "chooses the local repository on runtime" do
-      build_git "rack", "0.8"
-
-      FileUtils.cp_r("#{lib_path('rack-0.8')}/.", lib_path('local-rack'))
-
-      update_git "rack", "0.8", :path => lib_path('local-rack') do |s|
-        s.write "lib/rack.rb", "puts :LOCAL"
-      end
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "master"
-      G
-
-      bundle %|config local.rack #{lib_path('local-rack')}|
-      run "require 'rack'"
-      expect(out).to eq("LOCAL")
-    end
-
-    it "updates specs on runtime" do
-      system_gems "nokogiri-1.4.2"
-
-      build_git "rack", "0.8"
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "master"
-      G
-
-      lockfile0 = File.read(bundled_app("Gemfile.lock"))
-
-      FileUtils.cp_r("#{lib_path('rack-0.8')}/.", lib_path('local-rack'))
-      update_git "rack", "0.8", :path => lib_path('local-rack') do |s|
-        s.add_dependency "nokogiri", "1.4.2"
-      end
-
-      bundle %|config local.rack #{lib_path('local-rack')}|
-      run "require 'rack'"
-
-      lockfile1 = File.read(bundled_app("Gemfile.lock"))
-      expect(lockfile1).not_to eq(lockfile0)
-    end
-
-    it "updates ref on install" do
-      build_git "rack", "0.8"
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "master"
-      G
-
-      lockfile0 = File.read(bundled_app("Gemfile.lock"))
-
-      FileUtils.cp_r("#{lib_path('rack-0.8')}/.", lib_path('local-rack'))
-      update_git "rack", "0.8", :path => lib_path('local-rack')
-
-      bundle %|config local.rack #{lib_path('local-rack')}|
-      bundle :install
-
-      lockfile1 = File.read(bundled_app("Gemfile.lock"))
-      expect(lockfile1).not_to eq(lockfile0)
-    end
-
-    it "explodes if given path does not exist on install" do
-      build_git "rack", "0.8"
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "master"
-      G
-
-      bundle %|config local.rack #{lib_path('local-rack')}|
-      bundle :install
-      expect(out).to match(/Cannot use local override for rack-0.8 because #{Regexp.escape(lib_path('local-rack').to_s)} does not exist/)
-    end
-
-    it "explodes if branch is not given on install" do
-      build_git "rack", "0.8"
-      FileUtils.cp_r("#{lib_path('rack-0.8')}/.", lib_path('local-rack'))
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", :git => "#{lib_path('rack-0.8')}"
-      G
-
-      bundle %|config local.rack #{lib_path('local-rack')}|
-      bundle :install
-      expect(out).to match(/cannot use local override/i)
-    end
-
-    it "does not explode if disable_local_branch_check is given" do
-      build_git "rack", "0.8"
-      FileUtils.cp_r("#{lib_path('rack-0.8')}/.", lib_path('local-rack'))
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", :git => "#{lib_path('rack-0.8')}"
-      G
-
-      bundle %|config local.rack #{lib_path('local-rack')}|
-      bundle %|config disable_local_branch_check true|
-      bundle :install
-      expect(out).to match(/Your bundle is complete!/)
-    end
-
-    it "explodes on different branches on install" do
-      build_git "rack", "0.8"
-
-      FileUtils.cp_r("#{lib_path('rack-0.8')}/.", lib_path('local-rack'))
-
-      update_git "rack", "0.8", :path => lib_path('local-rack'), :branch => "another" do |s|
-        s.write "lib/rack.rb", "puts :LOCAL"
-      end
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "master"
-      G
-
-      bundle %|config local.rack #{lib_path('local-rack')}|
-      bundle :install
-      expect(out).to match(/is using branch another but Gemfile specifies master/)
-    end
-
-    it "explodes on invalid revision on install" do
-      build_git "rack", "0.8"
-
-      build_git "rack", "0.8", :path => lib_path('local-rack') do |s|
-        s.write "lib/rack.rb", "puts :LOCAL"
-      end
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "master"
-      G
-
-      bundle %|config local.rack #{lib_path('local-rack')}|
-      bundle :install
-      expect(out).to match(/The Gemfile lock is pointing to revision \w+/)
-    end
-  end
-
-  describe "specified inline" do
-    # TODO: Figure out how to write this test so that it is not flaky depending
-    #       on the current network situation.
-    # it "supports private git URLs" do
-    #   gemfile <<-G
-    #     gem "thingy", :git => "git at notthere.fallingsnow.net:somebody/thingy.git"
-    #   G
-    #
-    #   bundle :install, :expect_err => true
-    #
-    #   # p out
-    #   # p err
-    #   puts err unless err.empty? # This spec fails randomly every so often
-    #   err.should include("notthere.fallingsnow.net")
-    #   err.should include("ssh")
-    # end
-
-    it "installs from git even if a newer gem is available elsewhere" do
-      build_git "rack", "0.8"
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", :git => "#{lib_path('rack-0.8')}"
-      G
-
-      should_be_installed "rack 0.8"
-    end
-
-    it "installs dependencies from git even if a newer gem is available elsewhere" do
-      system_gems "rack-1.0.0"
-
-      build_lib "rack", "1.0", :path => lib_path('nested/bar') do |s|
-        s.write "lib/rack.rb", "puts 'WIN OVERRIDE'"
-      end
-
-      build_git "foo", :path => lib_path('nested') do |s|
-        s.add_dependency "rack", "= 1.0"
-      end
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "foo", :git => "#{lib_path('nested')}"
-      G
-
-      run "require 'rack'"
-      expect(out).to eq('WIN OVERRIDE')
-    end
-
-    it "correctly unlocks when changing to a git source" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", "0.9.1"
-      G
-
-      build_git "rack", :path => lib_path("rack")
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", "1.0.0", :git => "#{lib_path('rack')}"
-      G
-
-      should_be_installed "rack 1.0.0"
-    end
-
-    it "correctly unlocks when changing to a git source without versions" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-      G
-
-      build_git "rack", "1.2", :path => lib_path("rack")
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", :git => "#{lib_path('rack')}"
-      G
-
-      should_be_installed "rack 1.2"
-    end
-  end
-
-  describe "block syntax" do
-    it "pulls all gems from a git block" do
-      build_lib "omg", :path => lib_path('hi2u/omg')
-      build_lib "hi2u", :path => lib_path('hi2u')
-
-      install_gemfile <<-G
-        path "#{lib_path('hi2u')}" do
-          gem "omg"
-          gem "hi2u"
-        end
-      G
-
-      should_be_installed "omg 1.0", "hi2u 1.0"
-    end
-  end
-
-  it "uses a ref if specified" do
-    build_git "foo"
-    @revision = revision_for(lib_path("foo-1.0"))
-    update_git "foo"
-
-    install_gemfile <<-G
-      gem "foo", :git => "#{lib_path('foo-1.0')}", :ref => "#{@revision}"
-    G
-
-    run <<-RUBY
-      require 'foo'
-      puts "WIN" unless defined?(FOO_PREV_REF)
-    RUBY
-
-    expect(out).to eq("WIN")
-  end
-
-  it "correctly handles cases with invalid gemspecs" do
-    build_git "foo" do |s|
-      s.summary = nil
-    end
-
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "foo", :git => "#{lib_path('foo-1.0')}"
-      gem "rails", "2.3.2"
-    G
-
-    should_be_installed "foo 1.0"
-    should_be_installed "rails 2.3.2"
-  end
-
-  it "runs the gemspec in the context of its parent directory" do
-    build_lib "bar", :path => lib_path("foo/bar"), :gemspec => false do |s|
-      s.write lib_path("foo/bar/lib/version.rb"), %{BAR_VERSION = '1.0'}
-      s.write "bar.gemspec", <<-G
-        $:.unshift Dir.pwd # For 1.9
-        require 'lib/version'
-        Gem::Specification.new do |s|
-          s.name        = 'bar'
-          s.version     = BAR_VERSION
-          s.summary     = 'Bar'
-          s.files       = Dir["lib/**/*.rb"]
-        end
-      G
-    end
-
-    build_git "foo", :path => lib_path("foo") do |s|
-      s.write "bin/foo", ""
-    end
-
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "bar", :git => "#{lib_path("foo")}"
-      gem "rails", "2.3.2"
-    G
-
-    should_be_installed "bar 1.0"
-    should_be_installed "rails 2.3.2"
-  end
-
-  it "installs from git even if a rubygems gem is present" do
-    build_gem "foo", "1.0", :path => lib_path('fake_foo'), :to_system => true do |s|
-      s.write "lib/foo.rb", "raise 'FAIL'"
-    end
-
-    build_git "foo", "1.0"
-
-    install_gemfile <<-G
-      gem "foo", "1.0", :git => "#{lib_path('foo-1.0')}"
-    G
-
-    should_be_installed "foo 1.0"
-  end
-
-  it "fakes the gem out if there is no gemspec" do
-    build_git "foo", :gemspec => false
-
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "foo", "1.0", :git => "#{lib_path('foo-1.0')}"
-      gem "rails", "2.3.2"
-    G
-
-    should_be_installed("foo 1.0")
-    should_be_installed("rails 2.3.2")
-  end
-
-  it "catches git errors and spits out useful output" do
-    gemfile <<-G
-      gem "foo", "1.0", :git => "omgomg"
-    G
-
-    bundle :install, :expect_err => true
-
-    expect(out).to include("Git error:")
-    expect(err).to include("fatal")
-    expect(err).to include("omgomg")
-  end
-
-  it "works when the gem path has spaces in it" do
-    build_git "foo", :path => lib_path('foo space-1.0')
-
-    install_gemfile <<-G
-      gem "foo", :git => "#{lib_path('foo space-1.0')}"
-    G
-
-    should_be_installed "foo 1.0"
-  end
-
-  it "handles repos that have been force-pushed" do
-    build_git "forced", "1.0"
-
-    install_gemfile <<-G
-      git "#{lib_path('forced-1.0')}" do
-        gem 'forced'
-      end
-    G
-    should_be_installed "forced 1.0"
-
-    update_git "forced" do |s|
-      s.write "lib/forced.rb", "FORCED = '1.1'"
-    end
-
-    bundle "update"
-    should_be_installed "forced 1.1"
-
-    Dir.chdir(lib_path('forced-1.0')) do
-      `git reset --hard HEAD^`
-    end
-
-    bundle "update"
-    should_be_installed "forced 1.0"
-  end
-
-  it "ignores submodules if :submodule is not passed" do
-    build_git "submodule", "1.0"
-    build_git "has_submodule", "1.0" do |s|
-      s.add_dependency "submodule"
-    end
-    Dir.chdir(lib_path('has_submodule-1.0')) do
-      `git submodule add #{lib_path('submodule-1.0')} submodule-1.0`
-      `git commit -m "submodulator"`
-    end
-
-    install_gemfile <<-G, :expect_err => true
-      git "#{lib_path('has_submodule-1.0')}" do
-        gem "has_submodule"
-      end
-    G
-    expect(out).to match(/could not find gem 'submodule/i)
-
-    should_not_be_installed "has_submodule 1.0", :expect_err => true
-  end
-
-  it "handles repos with submodules" do
-    build_git "submodule", "1.0"
-    build_git "has_submodule", "1.0" do |s|
-      s.add_dependency "submodule"
-    end
-    Dir.chdir(lib_path('has_submodule-1.0')) do
-      `git submodule add #{lib_path('submodule-1.0')} submodule-1.0`
-      `git commit -m "submodulator"`
-    end
-
-    install_gemfile <<-G
-      git "#{lib_path('has_submodule-1.0')}", :submodules => true do
-        gem "has_submodule"
-      end
-    G
-
-    should_be_installed "has_submodule 1.0"
-  end
-
-  it "handles implicit updates when modifying the source info" do
-    git = build_git "foo"
-
-    install_gemfile <<-G
-      git "#{lib_path('foo-1.0')}" do
-        gem "foo"
-      end
-    G
-
-    update_git "foo"
-    update_git "foo"
-
-    install_gemfile <<-G
-      git "#{lib_path('foo-1.0')}", :ref => "#{git.ref_for('HEAD^')}" do
-        gem "foo"
-      end
-    G
-
-    run <<-RUBY
-      require 'foo'
-      puts "WIN" if FOO_PREV_REF == '#{git.ref_for("HEAD^^")}'
-    RUBY
-
-    expect(out).to eq("WIN")
-  end
-
-  it "does not to a remote fetch if the revision is cached locally" do
-    build_git "foo"
-
-    install_gemfile <<-G
-      gem "foo", :git => "#{lib_path('foo-1.0')}"
-    G
-
-    FileUtils.rm_rf(lib_path('foo-1.0'))
-
-    bundle "install"
-    expect(out).not_to match(/updating/i)
-  end
-
-  it "doesn't blow up if bundle install is run twice in a row" do
-    build_git "foo"
-
-    gemfile <<-G
-      gem "foo", :git => "#{lib_path('foo-1.0')}"
-    G
-
-    bundle "install"
-    bundle "install", :exitstatus => true
-    expect(exitstatus).to eq(0)
-  end
-
-  it "does not duplicate git gem sources" do
-    build_lib "foo", :path => lib_path('nested/foo')
-    build_lib "bar", :path => lib_path('nested/bar')
-
-    build_git "foo", :path => lib_path('nested')
-    build_git "bar", :path => lib_path('nested')
-
-    gemfile <<-G
-      gem "foo", :git => "#{lib_path('nested')}"
-      gem "bar", :git => "#{lib_path('nested')}"
-    G
-
-    bundle "install"
-    expect(File.read(bundled_app("Gemfile.lock")).scan('GIT').size).to eq(1)
-  end
-
-  describe "switching sources" do
-    it "doesn't explode when switching Path to Git sources" do
-      build_gem "foo", "1.0", :to_system => true do |s|
-        s.write "lib/foo.rb", "raise 'fail'"
-      end
-      build_lib "foo", "1.0", :path => lib_path('bar/foo')
-      build_git "bar", "1.0", :path => lib_path('bar') do |s|
-        s.add_dependency 'foo'
-      end
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "bar", :path => "#{lib_path('bar')}"
-      G
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "bar", :git => "#{lib_path('bar')}"
-      G
-
-      should_be_installed "foo 1.0", "bar 1.0"
-    end
-
-    it "doesn't explode when switching Gem to Git source" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack-obama"
-        gem "rack", "1.0.0"
-      G
-
-      build_git "rack", "1.0" do |s|
-        s.write "lib/new_file.rb", "puts 'USING GIT'"
-      end
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack-obama"
-        gem "rack", "1.0.0", :git => "#{lib_path("rack-1.0")}"
-      G
-
-      run "require 'new_file'"
-      expect(out).to eq("USING GIT")
-    end
-  end
-
-  describe "bundle install after the remote has been updated" do
-    it "installs" do
-      build_git "valim"
-
-      install_gemfile <<-G
-        gem "valim", :git => "file://#{lib_path("valim-1.0")}"
-      G
-
-      old_revision = revision_for(lib_path("valim-1.0"))
-      update_git "valim"
-      new_revision = revision_for(lib_path("valim-1.0"))
-
-      lockfile = File.read(bundled_app("Gemfile.lock"))
-      File.open(bundled_app("Gemfile.lock"), "w") do |file|
-        file.puts lockfile.gsub(/revision: #{old_revision}/, "revision: #{new_revision}")
-      end
-
-      bundle "install"
-
-      run <<-R
-        require "valim"
-        puts VALIM_PREV_REF
-      R
-
-      expect(out).to eq(old_revision)
-    end
-  end
-
-  describe "bundle install --deployment with git sources" do
-    it "works" do
-      build_git "valim", :path => lib_path('valim')
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "valim", "= 1.0", :git => "#{lib_path('valim')}"
-      G
-
-      simulate_new_machine
-
-      bundle "install --deployment", :exitstatus => true
-      expect(exitstatus).to eq(0)
-    end
-  end
-
-  describe "gem install hooks" do
-    it "runs pre-install hooks" do
-      build_git "foo"
-      gemfile <<-G
-        gem "foo", :git => "#{lib_path('foo-1.0')}"
-      G
-
-      File.open(lib_path("install_hooks.rb"), "w") do |h|
-        h.write <<-H
-          require 'rubygems'
-          Gem.pre_install_hooks << lambda do |inst|
-            STDERR.puts "Ran pre-install hook: \#{inst.spec.full_name}"
-          end
-        H
-      end
-
-      bundle :install, :expect_err => true,
-        :requires => [lib_path('install_hooks.rb')]
-      expect(err).to eq("Ran pre-install hook: foo-1.0")
-    end
-
-    it "runs post-install hooks" do
-      build_git "foo"
-      gemfile <<-G
-        gem "foo", :git => "#{lib_path('foo-1.0')}"
-      G
-
-      File.open(lib_path("install_hooks.rb"), "w") do |h|
-        h.write <<-H
-          require 'rubygems'
-          Gem.post_install_hooks << lambda do |inst|
-            STDERR.puts "Ran post-install hook: \#{inst.spec.full_name}"
-          end
-        H
-      end
-
-      bundle :install, :expect_err => true,
-        :requires => [lib_path('install_hooks.rb')]
-      expect(err).to eq("Ran post-install hook: foo-1.0")
-    end
-
-    it "complains if the install hook fails" do
-      build_git "foo"
-      gemfile <<-G
-        gem "foo", :git => "#{lib_path('foo-1.0')}"
-      G
-
-      File.open(lib_path("install_hooks.rb"), "w") do |h|
-        h.write <<-H
-          require 'rubygems'
-          Gem.pre_install_hooks << lambda do |inst|
-            false
-          end
-        H
-      end
-
-      bundle :install, :expect_err => true,
-        :requires => [lib_path('install_hooks.rb')]
-      expect(out).to include("failed for foo-1.0")
-    end
-  end
-
-  context "with an extension" do
-    it "installs the extension" do
-      build_git "foo" do |s|
-        s.add_dependency "rake"
-        s.extensions << "Rakefile"
-        s.write "Rakefile", <<-RUBY
-          task :default do
-            path = File.expand_path("../lib", __FILE__)
-            FileUtils.mkdir_p(path)
-            File.open("\#{path}/foo.rb", "w") do |f|
-              f.puts "FOO = 'YES'"
-            end
-          end
-        RUBY
-      end
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "foo", :git => "#{lib_path('foo-1.0')}"
-      G
-
-      run <<-R
-        require 'foo'
-        puts FOO
-      R
-      expect(out).to eq("YES")
-    end
-
-    it "does not use old extension after ref changes" do
-      git_reader = build_git "foo", :no_default => true do |s|
-        s.extensions = ["ext/extconf.rb"]
-        s.write "ext/extconf.rb", <<-RUBY
-          require "mkmf"
-          create_makefile("foo")
-        RUBY
-        s.write "ext/foo.c", "void Init_foo() {}"
-      end
-
-      2.times do |i|
-        Dir.chdir(git_reader.path) do
-          File.open("ext/foo.c", "w") do |file|
-            file.write <<-C
-              #include "ruby.h"
-              VALUE foo() { return INT2FIX(#{i}); }
-              void Init_foo() { rb_define_global_function("foo", &foo, 0); }
-            C
-          end
-          `git commit -m 'commit for iteration #{i}' ext/foo.c`
-        end
-        git_sha = git_reader.ref_for("HEAD")
-
-        install_gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "foo", :git => "#{lib_path('foo-1.0')}", :ref => "#{git_sha}"
-        G
-
-        run <<-R
-          require 'foo'
-          puts foo
-        R
-
-        expect(out).to eq(i.to_s)
-      end
-    end
-
-    it "does not prompt to gem install if extension fails" do
-      build_git "foo" do |s|
-        s.add_dependency "rake"
-        s.extensions << "Rakefile"
-        s.write "Rakefile", <<-RUBY
-          task :default do
-            raise
-          end
-        RUBY
-      end
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "foo", :git => "#{lib_path('foo-1.0')}"
-      G
-
-      expect(out).to include("An error occurred while installing foo (1.0)")
-      expect(out).not_to include("gem install foo")
-    end
-  end
-
-  it "ignores git environment variables" do
-    build_git "xxxxxx" do |s|
-      s.executables = "xxxxxxbar"
-    end
-
-    Bundler::SharedHelpers.with_clean_git_env do
-      ENV['GIT_DIR']       = 'bar'
-      ENV['GIT_WORK_TREE'] = 'bar'
-
-      install_gemfile <<-G, :exitstatus => true
-        source "file://#{gem_repo1}"
-        git "#{lib_path('xxxxxx-1.0')}" do
-          gem 'xxxxxx'
-        end
-      G
-
-      expect(exitstatus).to eq(0)
-      expect(ENV['GIT_DIR']).to eq('bar')
-      expect(ENV['GIT_WORK_TREE']).to eq('bar')
-    end
-  end
-
-  describe "without git installed" do
-    it "prints a better error message" do
-      build_git "foo"
-
-      install_gemfile <<-G
-        git "#{lib_path('foo-1.0')}" do
-          gem 'foo'
-        end
-      G
-
-      bundle "update", :env => {"PATH" => ""}
-      expect(out).to include("You need to install git to be able to use gems from git repositories. For help installing git, please refer to GitHub's tutorial at https://help.github.com/articles/set-up-git")
-    end
-
-    it "installs a packaged git gem successfully" do
-      build_git "foo"
-
-      install_gemfile <<-G
-        git "#{lib_path('foo-1.0')}" do
-          gem 'foo'
-        end
-      G
-      bundle "package --all"
-      simulate_new_machine
-
-      bundle "install", :env => {"PATH" => ""}, :exitstatus => true
-      expect(out).to_not include("You need to install git to be able to use gems from git repositories.")
-      expect(exitstatus).to be_zero
-    end
-  end
-end
diff --git a/spec/install/gemfile/path_spec.rb b/spec/install/gemfile/path_spec.rb
deleted file mode 100644
index f88b6aa..0000000
--- a/spec/install/gemfile/path_spec.rb
+++ /dev/null
@@ -1,500 +0,0 @@
-require "spec_helper"
-
-describe "bundle install with explicit source paths" do
-  it "fetches gems" do
-    build_lib "foo"
-
-    install_gemfile <<-G
-      path "#{lib_path('foo-1.0')}"
-      gem 'foo'
-    G
-
-    should_be_installed("foo 1.0")
-  end
-
-  it "supports pinned paths" do
-    build_lib "foo"
-
-    install_gemfile <<-G
-      gem 'foo', :path => "#{lib_path('foo-1.0')}"
-    G
-
-    should_be_installed("foo 1.0")
-  end
-
-  it "supports relative paths" do
-    build_lib "foo"
-
-    relative_path = lib_path('foo-1.0').relative_path_from(Pathname.new(Dir.pwd))
-
-    install_gemfile <<-G
-      gem 'foo', :path => "#{relative_path}"
-    G
-
-    should_be_installed("foo 1.0")
-  end
-
-  it "expands paths" do
-    build_lib "foo"
-
-    relative_path = lib_path('foo-1.0').relative_path_from(Pathname.new('~').expand_path)
-
-    install_gemfile <<-G
-      gem 'foo', :path => "~/#{relative_path}"
-    G
-
-    should_be_installed("foo 1.0")
-  end
-
-  it "expands paths raise error with not existing user's home dir" do
-    build_lib "foo"
-    username = 'some_unexisting_user'
-    relative_path = lib_path('foo-1.0').relative_path_from(Pathname.new("/home/#{username}").expand_path)
-
-    install_gemfile <<-G
-      gem 'foo', :path => "~#{username}/#{relative_path}"
-    G
-    expect(out).to match("There was an error while trying to use the path `~#{username}/#{relative_path}`.")
-    expect(out).to match("user #{username} doesn't exist")
-  end
-
-  it "expands paths relative to Bundler.root" do
-    build_lib "foo", :path => bundled_app("foo-1.0")
-
-    install_gemfile <<-G
-      gem 'foo', :path => "./foo-1.0"
-    G
-
-    bundled_app("subdir").mkpath
-    Dir.chdir(bundled_app("subdir")) do
-      should_be_installed("foo 1.0")
-    end
-  end
-
-  it "expands paths when comparing locked paths to Gemfile paths" do
-    build_lib "foo", :path => bundled_app("foo-1.0")
-
-    install_gemfile <<-G
-      gem 'foo', :path => File.expand_path("../foo-1.0", __FILE__)
-    G
-
-    bundle "install --frozen", :exitstatus => true
-    expect(exitstatus).to eq(0)
-  end
-
-  it "installs dependencies from the path even if a newer gem is available elsewhere" do
-    system_gems "rack-1.0.0"
-
-    build_lib "rack", "1.0", :path => lib_path('nested/bar') do |s|
-      s.write "lib/rack.rb", "puts 'WIN OVERRIDE'"
-    end
-
-    build_lib "foo", :path => lib_path('nested') do |s|
-      s.add_dependency "rack", "= 1.0"
-    end
-
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "foo", :path => "#{lib_path('nested')}"
-    G
-
-    run "require 'rack'"
-    expect(out).to eq('WIN OVERRIDE')
-  end
-
-  it "works" do
-    build_gem "foo", "1.0.0", :to_system => true do |s|
-      s.write "lib/foo.rb", "puts 'FAIL'"
-    end
-
-    build_lib "omg", "1.0", :path => lib_path("omg") do |s|
-      s.add_dependency "foo"
-    end
-
-    build_lib "foo", "1.0.0", :path => lib_path("omg/foo")
-
-    install_gemfile <<-G
-      gem "omg", :path => "#{lib_path('omg')}"
-    G
-
-    should_be_installed "foo 1.0"
-  end
-
-  it "supports gemspec syntax" do
-    build_lib "foo", "1.0", :path => lib_path("foo") do |s|
-      s.add_dependency "rack", "1.0"
-    end
-
-    gemfile = <<-G
-      source "file://#{gem_repo1}"
-      gemspec
-    G
-
-    File.open(lib_path("foo/Gemfile"), "w") {|f| f.puts gemfile }
-
-    Dir.chdir(lib_path("foo")) do
-      bundle "install"
-      should_be_installed "foo 1.0"
-      should_be_installed "rack 1.0"
-    end
-  end
-
-  it "supports gemspec syntax with an alternative path" do
-    build_lib "foo", "1.0", :path => lib_path("foo") do |s|
-      s.add_dependency "rack", "1.0"
-    end
-
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gemspec :path => "#{lib_path("foo")}"
-    G
-
-    should_be_installed "foo 1.0"
-    should_be_installed "rack 1.0"
-  end
-
-  it "doesn't automatically unlock dependencies when using the gemspec syntax" do
-    build_lib "foo", "1.0", :path => lib_path("foo") do |s|
-      s.add_dependency "rack", ">= 1.0"
-    end
-
-    Dir.chdir lib_path("foo")
-
-    install_gemfile lib_path("foo/Gemfile"), <<-G
-      source "file://#{gem_repo1}"
-      gemspec
-    G
-
-    build_gem "rack", "1.0.1", :to_system => true
-
-    bundle "install"
-
-    should_be_installed "foo 1.0"
-    should_be_installed "rack 1.0"
-  end
-
-  it "doesn't automatically unlock dependencies when using the gemspec syntax and the gem has development dependencies" do
-    build_lib "foo", "1.0", :path => lib_path("foo") do |s|
-      s.add_dependency "rack", ">= 1.0"
-      s.add_development_dependency "activesupport"
-    end
-
-    Dir.chdir lib_path("foo")
-
-    install_gemfile lib_path("foo/Gemfile"), <<-G
-      source "file://#{gem_repo1}"
-      gemspec
-    G
-
-    build_gem "rack", "1.0.1", :to_system => true
-
-    bundle "install"
-
-    should_be_installed "foo 1.0"
-    should_be_installed "rack 1.0"
-  end
-
-  it "raises if there are multiple gemspecs" do
-    build_lib "foo", "1.0", :path => lib_path("foo") do |s|
-      s.write "bar.gemspec"
-    end
-
-    install_gemfile <<-G, :exitstatus => true
-      gemspec :path => "#{lib_path("foo")}"
-    G
-
-    expect(exitstatus).to eq(15)
-    expect(out).to match(/There are multiple gemspecs/)
-  end
-
-  it "allows :name to be specified to resolve ambiguity" do
-    build_lib "foo", "1.0", :path => lib_path("foo") do |s|
-      s.write "bar.gemspec"
-    end
-
-    install_gemfile <<-G, :exitstatus => true
-      gemspec :path => "#{lib_path("foo")}", :name => "foo"
-    G
-
-    should_be_installed "foo 1.0"
-  end
-
-  it "sets up executables" do
-    pending_jruby_shebang_fix
-
-    build_lib "foo" do |s|
-      s.executables = "foobar"
-    end
-
-    install_gemfile <<-G
-      path "#{lib_path('foo-1.0')}"
-      gem 'foo'
-    G
-
-    bundle "exec foobar"
-    expect(out).to eq("1.0")
-  end
-
-  it "handles directories in bin/" do
-    build_lib "foo"
-    lib_path("foo-1.0").join("foo.gemspec").rmtree
-    lib_path("foo-1.0").join("bin/performance").mkpath
-
-    install_gemfile <<-G
-      gem 'foo', '1.0', :path => "#{lib_path('foo-1.0')}"
-    G
-    expect(err).to eq("")
-  end
-
-  it "removes the .gem file after installing" do
-    build_lib "foo"
-
-    install_gemfile <<-G
-      gem 'foo', :path => "#{lib_path('foo-1.0')}"
-    G
-
-    expect(lib_path('foo-1.0').join('foo-1.0.gem')).not_to exist
-  end
-
-  describe "block syntax" do
-    it "pulls all gems from a path block" do
-      build_lib "omg"
-      build_lib "hi2u"
-
-      install_gemfile <<-G
-        path "#{lib_path}" do
-          gem "omg"
-          gem "hi2u"
-        end
-      G
-
-      should_be_installed "omg 1.0", "hi2u 1.0"
-    end
-  end
-
-  it "keeps source pinning" do
-    build_lib "foo", "1.0", :path => lib_path('foo')
-    build_lib "omg", "1.0", :path => lib_path('omg')
-    build_lib "foo", "1.0", :path => lib_path('omg/foo') do |s|
-      s.write "lib/foo.rb", "puts 'FAIL'"
-    end
-
-    install_gemfile <<-G
-      gem "foo", :path => "#{lib_path('foo')}"
-      gem "omg", :path => "#{lib_path('omg')}"
-    G
-
-    should_be_installed "foo 1.0"
-  end
-
-  it "works when the path does not have a gemspec" do
-    build_lib "foo", :gemspec => false
-
-    gemfile <<-G
-      gem "foo", "1.0", :path => "#{lib_path('foo-1.0')}"
-    G
-
-    should_be_installed "foo 1.0"
-
-    should_be_installed "foo 1.0"
-  end
-
-  it "installs executable stubs" do
-    build_lib "foo" do |s|
-      s.executables = ['foo']
-    end
-
-    install_gemfile <<-G
-      gem "foo", :path => "#{lib_path('foo-1.0')}"
-    G
-
-    bundle "exec foo"
-    expect(out).to eq("1.0")
-  end
-
-  describe "when the gem version in the path is updated" do
-    before :each do
-      build_lib "foo", "1.0", :path => lib_path("foo") do |s|
-        s.add_dependency "bar"
-      end
-      build_lib "bar", "1.0", :path => lib_path("foo/bar")
-
-      install_gemfile <<-G
-        gem "foo", :path => "#{lib_path('foo')}"
-      G
-    end
-
-    it "unlocks all gems when the top level gem is updated" do
-      build_lib "foo", "2.0", :path => lib_path("foo") do |s|
-        s.add_dependency "bar"
-      end
-
-      bundle "install"
-
-      should_be_installed "foo 2.0", "bar 1.0"
-    end
-
-    it "unlocks all gems when a child dependency gem is updated" do
-      build_lib "bar", "2.0", :path => lib_path("foo/bar")
-
-      bundle "install"
-
-      should_be_installed "foo 1.0", "bar 2.0"
-    end
-  end
-
-  describe "when dependencies in the path are updated" do
-    before :each do
-      build_lib "foo", "1.0", :path => lib_path("foo")
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "foo", :path => "#{lib_path('foo')}"
-      G
-    end
-
-    it "gets dependencies that are updated in the path" do
-      build_lib "foo", "1.0", :path => lib_path("foo") do |s|
-        s.add_dependency "rack"
-      end
-
-      bundle "install"
-
-      should_be_installed "rack 1.0.0"
-    end
-  end
-
-  describe "switching sources" do
-    it "doesn't switch pinned git sources to rubygems when pinning the parent gem to a path source" do
-      build_gem "foo", "1.0", :to_system => true do |s|
-        s.write "lib/foo.rb", "raise 'fail'"
-      end
-      build_lib "foo", "1.0", :path => lib_path('bar/foo')
-      build_git "bar", "1.0", :path => lib_path('bar') do |s|
-        s.add_dependency 'foo'
-      end
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "bar", :git => "#{lib_path('bar')}"
-      G
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "bar", :path => "#{lib_path('bar')}"
-      G
-
-      should_be_installed "foo 1.0", "bar 1.0"
-    end
-
-    it "switches the source when the gem existed in rubygems and the path was already being used for another gem" do
-      build_lib "foo", "1.0", :path => lib_path("foo")
-      build_gem "bar", "1.0", :to_system => true do |s|
-        s.write "lib/bar.rb", "raise 'fail'"
-      end
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "bar"
-        path "#{lib_path('foo')}" do
-          gem "foo"
-        end
-      G
-
-      build_lib "bar", "1.0", :path => lib_path("foo/bar")
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        path "#{lib_path('foo')}" do
-          gem "foo"
-          gem "bar"
-        end
-      G
-
-      should_be_installed "bar 1.0"
-    end
-  end
-
-  describe "when there are both a gemspec and remote gems" do
-    it "doesn't query rubygems for local gemspec name" do
-      build_lib "private_lib", "2.2", :path => lib_path("private_lib")
-      gemfile = <<-G
-        source "http://localgemserver.test"
-        gemspec
-        gem 'rack'
-      G
-      File.open(lib_path("private_lib/Gemfile"), "w") {|f| f.puts gemfile }
-
-      Dir.chdir(lib_path("private_lib")) do
-        bundle :install, :env => {"DEBUG" => 1}, :artifice => "endpoint"
-        expect(out).to match(/^HTTP GET http:\/\/localgemserver\.test\/api\/v1\/dependencies\?gems=rack$/)
-        expect(out).not_to match(/^HTTP GET.*private_lib/)
-        should_be_installed "private_lib 2.2"
-        should_be_installed "rack 1.0"
-      end
-    end
-  end
-
-  describe "gem install hooks" do
-    it "runs pre-install hooks" do
-      build_git "foo"
-      gemfile <<-G
-        gem "foo", :git => "#{lib_path('foo-1.0')}"
-      G
-
-      File.open(lib_path("install_hooks.rb"), "w") do |h|
-        h.write <<-H
-          require 'rubygems'
-          Gem.pre_install_hooks << lambda do |inst|
-            STDERR.puts "Ran pre-install hook: \#{inst.spec.full_name}"
-          end
-        H
-      end
-
-      bundle :install, :expect_err => true,
-        :requires => [lib_path('install_hooks.rb')]
-      expect(err).to eq("Ran pre-install hook: foo-1.0")
-    end
-
-    it "runs post-install hooks" do
-      build_git "foo"
-      gemfile <<-G
-        gem "foo", :git => "#{lib_path('foo-1.0')}"
-      G
-
-      File.open(lib_path("install_hooks.rb"), "w") do |h|
-        h.write <<-H
-          require 'rubygems'
-          Gem.post_install_hooks << lambda do |inst|
-            STDERR.puts "Ran post-install hook: \#{inst.spec.full_name}"
-          end
-        H
-      end
-
-      bundle :install, :expect_err => true,
-        :requires => [lib_path('install_hooks.rb')]
-      expect(err).to eq("Ran post-install hook: foo-1.0")
-    end
-
-    it "complains if the install hook fails" do
-      build_git "foo"
-      gemfile <<-G
-        gem "foo", :git => "#{lib_path('foo-1.0')}"
-      G
-
-      File.open(lib_path("install_hooks.rb"), "w") do |h|
-        h.write <<-H
-          require 'rubygems'
-          Gem.pre_install_hooks << lambda do |inst|
-            false
-          end
-        H
-      end
-
-      bundle :install, :expect_err => true,
-        :requires => [lib_path('install_hooks.rb')]
-      expect(out).to include("failed for foo-1.0")
-    end
-  end
-
-end
diff --git a/spec/install/gemfile_spec.rb b/spec/install/gemfile_spec.rb
deleted file mode 100644
index 267a7f5..0000000
--- a/spec/install/gemfile_spec.rb
+++ /dev/null
@@ -1,44 +0,0 @@
-require "spec_helper"
-
-describe "bundle install" do
-
-  context "with duplicated gems" do
-    it "will display a warning" do
-      install_gemfile <<-G
-        gem 'rails', '~> 4.0.0'
-        gem 'rails', '~> 4.0.0'
-      G
-      expect(out).to include("more than once")
-    end
-  end
-
-  context "with --gemfile" do
-    it "finds the gemfile" do
-      gemfile bundled_app("NotGemfile"), <<-G
-        source "file://#{gem_repo1}"
-        gem 'rack'
-      G
-
-      bundle :install, :gemfile => bundled_app("NotGemfile")
-
-      ENV['BUNDLE_GEMFILE'] = "NotGemfile"
-      should_be_installed "rack 1.0.0"
-    end
-  end
-
-  context "with deprecated features" do
-    before :each do
-      in_app_root
-    end
-
-    it "reports that lib is an invalid option" do
-      gemfile <<-G
-        gem "rack", :lib => "rack"
-      G
-
-      bundle :install
-      expect(out).to match(/You passed :lib as an option for gem 'rack', but it is invalid/)
-    end
-  end
-
-end
diff --git a/spec/install/gems/c_ext_spec.rb b/spec/install/gems/c_ext_spec.rb
deleted file mode 100644
index 6f9fe22..0000000
--- a/spec/install/gems/c_ext_spec.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-require "spec_helper"
-
-describe "installing a gem with C extensions" do
-  it "installs" do
-    build_repo2 do
-      build_gem "c_extension" do |s|
-        s.extensions = ["ext/extconf.rb"]
-        s.write "ext/extconf.rb", <<-E
-          require "mkmf"
-          name = "c_extension_bundle"
-          dir_config(name)
-          raise "OMG" unless with_config("c_extension") == "hello"
-          create_makefile(name)
-        E
-
-        s.write "ext/c_extension.c", <<-C
-          #include "ruby.h"
-
-          VALUE c_extension_true(VALUE self) {
-            return Qtrue;
-          }
-
-          void Init_c_extension_bundle() {
-            VALUE c_Extension = rb_define_class("CExtension", rb_cObject);
-            rb_define_method(c_Extension, "its_true", c_extension_true, 0);
-          }
-        C
-
-        s.write "lib/c_extension.rb", <<-C
-          require "c_extension_bundle"
-        C
-      end
-    end
-
-    gemfile <<-G
-      source "file://#{gem_repo2}"
-      gem "c_extension"
-    G
-
-    bundle "config build.c_extension --with-c_extension=hello"
-    bundle "install"
-
-    expect(out).not_to include("extconf.rb failed")
-
-    run "Bundler.require; puts CExtension.new.its_true"
-    expect(out).to eq("true")
-  end
-end
diff --git a/spec/install/gems/dependency_api_spec.rb b/spec/install/gems/dependency_api_spec.rb
deleted file mode 100644
index b8f8011..0000000
--- a/spec/install/gems/dependency_api_spec.rb
+++ /dev/null
@@ -1,582 +0,0 @@
-require "spec_helper"
-
-describe "gemcutter's dependency API" do
-  let(:source_uri) { "http://localgemserver.test" }
-
-  it "should use the API" do
-    gemfile <<-G
-      source "#{source_uri}"
-      gem "rack"
-    G
-
-    bundle :install, :artifice => "endpoint"
-    expect(out).to include("Fetching gem metadata from #{source_uri}")
-    should_be_installed "rack 1.0.0"
-  end
-
-  it "should URI encode gem names" do
-    gemfile <<-G
-      source "#{source_uri}"
-      gem " sinatra"
-    G
-
-    bundle :install, :artifice => "endpoint"
-    expect(out).to include("Could not find gem ' sinatra")
-  end
-
-  it "should handle nested dependencies" do
-    gemfile <<-G
-      source "#{source_uri}"
-      gem "rails"
-    G
-
-    bundle :install, :artifice => "endpoint"
-    expect(out).to include("Fetching gem metadata from #{source_uri}/...")
-    should_be_installed(
-      "rails 2.3.2",
-      "actionpack 2.3.2",
-      "activerecord 2.3.2",
-      "actionmailer 2.3.2",
-      "activeresource 2.3.2",
-      "activesupport 2.3.2")
-  end
-
-  it "should handle multiple gem dependencies on the same gem" do
-    gemfile <<-G
-      source "#{source_uri}"
-      gem "net-sftp"
-    G
-
-    bundle :install, :artifice => "endpoint"
-    should_be_installed "net-sftp 1.1.1"
-  end
-
-  it "should use the endpoint when using --deployment" do
-    gemfile <<-G
-      source "#{source_uri}"
-      gem "rack"
-    G
-    bundle :install, :artifice => "endpoint"
-
-    bundle "install --deployment", :artifice => "endpoint"
-    expect(out).to include("Fetching gem metadata from #{source_uri}")
-    should_be_installed "rack 1.0.0"
-  end
-
-  it "handles git dependencies that are in rubygems" do
-    build_git "foo" do |s|
-      s.executables = "foobar"
-      s.add_dependency "rails", "2.3.2"
-    end
-
-    gemfile <<-G
-      source "#{source_uri}"
-      git "file:///#{lib_path('foo-1.0')}" do
-        gem 'foo'
-      end
-    G
-
-    bundle :install, :artifice => "endpoint"
-
-    should_be_installed("rails 2.3.2")
-  end
-
-  it "handles git dependencies that are in rubygems using --deployment" do
-    build_git "foo" do |s|
-      s.executables = "foobar"
-      s.add_dependency "rails", "2.3.2"
-    end
-
-    gemfile <<-G
-      source "#{source_uri}"
-      gem 'foo', :git => "file:///#{lib_path('foo-1.0')}"
-    G
-
-    bundle :install, :artifice => "endpoint"
-
-    bundle "install --deployment", :artifice => "endpoint"
-
-    should_be_installed("rails 2.3.2")
-  end
-
-  it "doesn't fail if you only have a git gem with no deps when using --deployment" do
-    build_git "foo"
-    gemfile <<-G
-      source "#{source_uri}"
-      gem 'foo', :git => "file:///#{lib_path('foo-1.0')}"
-    G
-
-    bundle "install", :artifice => "endpoint"
-    bundle "install --deployment", :artifice => "endpoint", :exitstatus => true
-
-    expect(exitstatus).to eq(0)
-    should_be_installed("foo 1.0")
-  end
-
-  it "falls back when the API errors out" do
-    simulate_platform mswin
-
-    gemfile <<-G
-      source "#{source_uri}"
-      gem "rcov"
-    G
-
-    bundle :install, :fakeweb => "windows"
-    expect(out).to include("Fetching source index from #{source_uri}")
-    should_be_installed "rcov 1.0.0"
-  end
-
-  it "falls back when hitting the Gemcutter Dependency Limit" do
-    gemfile <<-G
-      source "#{source_uri}"
-      gem "activesupport"
-      gem "actionpack"
-      gem "actionmailer"
-      gem "activeresource"
-      gem "thin"
-      gem "rack"
-      gem "rails"
-    G
-    bundle :install, :artifice => "endpoint_fallback"
-    expect(out).to include("Fetching source index from #{source_uri}")
-
-    should_be_installed(
-      "activesupport 2.3.2",
-      "actionpack 2.3.2",
-      "actionmailer 2.3.2",
-      "activeresource 2.3.2",
-      "activesupport 2.3.2",
-      "thin 1.0.0",
-      "rack 1.0.0",
-      "rails 2.3.2")
-  end
-
-  it "falls back when Gemcutter API doesn't return proper Marshal format" do
-    gemfile <<-G
-      source "#{source_uri}"
-      gem "rack"
-    G
-
-    bundle :install, :verbose => true, :artifice => "endpoint_marshal_fail"
-    expect(out).to include("could not fetch from the dependency API, trying the full index")
-    should_be_installed "rack 1.0.0"
-  end
-
-  it "handles host redirects" do
-    gemfile <<-G
-      source "#{source_uri}"
-      gem "rack"
-    G
-
-    bundle :install, :artifice => "endpoint_host_redirect"
-    should_be_installed "rack 1.0.0"
-  end
-
-  it "handles host redirects without Net::HTTP::Persistent" do
-    gemfile <<-G
-      source "#{source_uri}"
-      gem "rack"
-    G
-
-    FileUtils.mkdir_p lib_path
-    File.open(lib_path("disable_net_http_persistent.rb"), "w") do |h|
-      h.write <<-H
-        module Kernel
-          alias require_without_disabled_net_http require
-          def require(*args)
-            raise LoadError, 'simulated' if args.first == 'openssl' && !caller.grep(/vendored_persistent/).empty?
-            require_without_disabled_net_http(*args)
-          end
-        end
-      H
-    end
-
-    bundle :install, :artifice => "endpoint_host_redirect", :requires => [lib_path("disable_net_http_persistent.rb")]
-    expect(out).to_not match(/Too many redirects/)
-    should_be_installed "rack 1.0.0"
-  end
-
-  it "timeouts when Bundler::Fetcher redirects too much" do
-    gemfile <<-G
-      source "#{source_uri}"
-      gem "rack"
-    G
-
-    bundle :install, :artifice => "endpoint_redirect"
-    expect(out).to match(/Too many redirects/)
-  end
-
-  context "when --full-index is specified" do
-    it "should use the modern index for install" do
-      gemfile <<-G
-        source "#{source_uri}"
-        gem "rack"
-      G
-
-      bundle "install --full-index", :artifice => "endpoint"
-      expect(out).to include("Fetching source index from #{source_uri}")
-      should_be_installed "rack 1.0.0"
-    end
-
-    it "should use the modern index for update" do
-      gemfile <<-G
-        source "#{source_uri}"
-        gem "rack"
-      G
-
-      bundle "update --full-index", :artifice => "endpoint"
-      expect(out).to include("Fetching source index from #{source_uri}")
-      should_be_installed "rack 1.0.0"
-    end
-  end
-
-  it "fetches again when more dependencies are found in subsequent sources" do
-    build_repo2 do
-      build_gem "back_deps" do |s|
-        s.add_dependency "foo"
-      end
-      FileUtils.rm_rf Dir[gem_repo2("gems/foo-*.gem")]
-    end
-
-    gemfile <<-G
-      source "#{source_uri}"
-      source "#{source_uri}/extra"
-      gem "back_deps"
-    G
-
-    bundle :install, :artifice => "endpoint_extra"
-    should_be_installed "back_deps 1.0"
-  end
-
-  it "prints API output properly with back deps" do
-    build_repo2 do
-      build_gem "back_deps" do |s|
-        s.add_dependency "foo"
-      end
-      FileUtils.rm_rf Dir[gem_repo2("gems/foo-*.gem")]
-    end
-
-    gemfile <<-G
-      source "#{source_uri}"
-      source "#{source_uri}/extra"
-      gem "back_deps"
-    G
-
-    bundle :install, :artifice => "endpoint_extra"
-
-    expect(out).to include("Fetching gem metadata from http://localgemserver.test/..")
-    expect(out).to include("Fetching source index from http://localgemserver.test/extra")
-  end
-
-  it "does not fetch every specs if the index of gems is large when doing back deps" do
-    build_repo2 do
-      build_gem "back_deps" do |s|
-        s.add_dependency "foo"
-      end
-      build_gem "missing"
-      # need to hit the limit
-      1.upto(Bundler::Source::Rubygems::API_REQUEST_LIMIT) do |i|
-        build_gem "gem#{i}"
-      end
-
-      FileUtils.rm_rf Dir[gem_repo2("gems/foo-*.gem")]
-    end
-
-    gemfile <<-G
-      source "#{source_uri}"
-      source "#{source_uri}/extra"
-      gem "back_deps"
-    G
-
-    bundle :install, :artifice => "endpoint_extra_missing"
-    should_be_installed "back_deps 1.0"
-  end
-
-  it "uses the endpoint if all sources support it" do
-    gemfile <<-G
-      source "#{source_uri}"
-
-      gem 'foo'
-    G
-
-    bundle :install, :artifice => "endpoint_api_missing"
-    should_be_installed "foo 1.0"
-  end
-
-  it "fetches again when more dependencies are found in subsequent sources using --deployment" do
-    build_repo2 do
-      build_gem "back_deps" do |s|
-        s.add_dependency "foo"
-      end
-      FileUtils.rm_rf Dir[gem_repo2("gems/foo-*.gem")]
-    end
-
-    gemfile <<-G
-      source "#{source_uri}"
-      source "#{source_uri}/extra"
-      gem "back_deps"
-    G
-
-    bundle :install, :artifice => "endpoint_extra"
-
-    bundle "install --deployment", :artifice => "endpoint_extra"
-    should_be_installed "back_deps 1.0"
-  end
-
-  it "does not refetch if the only unmet dependency is bundler" do
-    gemfile <<-G
-      source "#{source_uri}"
-
-      gem "bundler_dep"
-    G
-
-    bundle :install, :artifice => "endpoint"
-    expect(out).to include("Fetching gem metadata from #{source_uri}")
-  end
-
-  it "should install when EndpointSpecification has a bin dir owned by root", :sudo => true do
-    sudo "mkdir -p #{system_gem_path("bin")}"
-    sudo "chown -R root #{system_gem_path("bin")}"
-
-    gemfile <<-G
-      source "#{source_uri}"
-      gem "rails"
-    G
-    bundle :install, :artifice => "endpoint"
-    should_be_installed "rails 2.3.2"
-  end
-
-  it "installs the binstubs" do
-    gemfile <<-G
-      source "#{source_uri}"
-      gem "rack"
-    G
-
-    bundle "install --binstubs", :artifice => "endpoint"
-
-    gembin "rackup"
-    expect(out).to eq("1.0.0")
-  end
-
-  it "installs the bins when using --path and uses autoclean" do
-    gemfile <<-G
-      source "#{source_uri}"
-      gem "rack"
-    G
-
-    bundle "install --path vendor/bundle", :artifice => "endpoint"
-
-    expect(vendored_gems("bin/rackup")).to exist
-  end
-
-  it "installs the bins when using --path and uses bundle clean" do
-    gemfile <<-G
-      source "#{source_uri}"
-      gem "rack"
-    G
-
-    bundle "install --path vendor/bundle --no-clean", :artifice => "endpoint"
-
-    expect(vendored_gems("bin/rackup")).to exist
-  end
-
-  it "prints post_install_messages" do
-    gemfile <<-G
-      source "#{source_uri}"
-      gem 'rack-obama'
-    G
-
-    bundle :install, :artifice => "endpoint"
-    expect(out).to include("Post-install message from rack:")
-  end
-
-  it "should display the post install message for a dependency" do
-    gemfile <<-G
-      source "#{source_uri}"
-      gem 'rack_middleware'
-    G
-
-    bundle :install, :artifice => "endpoint"
-    expect(out).to include("Post-install message from rack:")
-    expect(out).to include("Rack's post install message")
-  end
-
-  context "when using basic authentication" do
-    let(:user)     { "user" }
-    let(:password) { "pass" }
-    let(:basic_auth_source_uri) do
-      uri          = URI.parse(source_uri)
-      uri.user     = user
-      uri.password = password
-
-      uri
-    end
-
-    it "passes basic authentication details and strips out creds" do
-      gemfile <<-G
-        source "#{basic_auth_source_uri}"
-        gem "rack"
-      G
-
-      bundle :install, :artifice => "endpoint_basic_authentication"
-      expect(out).not_to include("#{user}:#{password}")
-      should_be_installed "rack 1.0.0"
-    end
-
-    it "strips http basic authentication creds for modern index" do
-      gemfile <<-G
-        source "#{basic_auth_source_uri}"
-        gem "rack"
-      G
-
-      bundle :install, :artifice => "endopint_marshal_fail_basic_authentication"
-      expect(out).not_to include("#{user}:#{password}")
-      should_be_installed "rack 1.0.0"
-    end
-
-    it "strips http basic auth creds when it can't reach the server" do
-      gemfile <<-G
-        source "#{basic_auth_source_uri}"
-        gem "rack"
-      G
-
-      bundle :install, :artifice => "endpoint_500"
-      expect(out).not_to include("#{user}:#{password}")
-    end
-
-    it "does not pass the user / password to different hosts on redirect" do
-      gemfile <<-G
-        source "#{basic_auth_source_uri}"
-        gem "rack"
-      G
-
-      bundle :install, :artifice => "endpoint_creds_diff_host"
-      should_be_installed "rack 1.0.0"
-    end
-
-    describe "with authentication details in bundle config" do
-      before do
-        gemfile <<-G
-          source "#{source_uri}"
-          gem "rack"
-        G
-      end
-
-      it "reads authentication details from bundle config" do
-        # The trailing slash is necessary here; Fetcher canonicalizes the URI.
-        bundle "config #{source_uri}/ #{user}:#{password}"
-
-        bundle :install, :artifice => "endpoint_strict_basic_authentication"
-
-        expect(out).to include("Fetching gem metadata from #{source_uri}")
-        should_be_installed "rack 1.0.0"
-      end
-
-      it "prefers auth supplied in the source uri" do
-        gemfile <<-G
-          source "#{basic_auth_source_uri}"
-          gem "rack"
-        G
-
-        bundle "config #{source_uri}/ otheruser:wrong"
-
-        bundle :install, :artifice => "endpoint_strict_basic_authentication"
-        should_be_installed "rack 1.0.0"
-      end
-
-      it "shows instructions if auth is not provided for the source" do
-        bundle :install, :artifice => "endpoint_strict_basic_authentication"
-        expect(out).to include("bundle config #{source_uri}/ username:password")
-      end
-
-      it "fails if authentication has already been provided, but failed" do
-        bundle "config #{source_uri}/ #{user}:wrong"
-
-        bundle :install, :artifice => "endpoint_strict_basic_authentication"
-        expect(out).to include("Bad username or password")
-      end
-    end
-
-    describe "with no password" do
-      let(:password) { nil }
-
-      it "passes basic authentication details" do
-        gemfile <<-G
-          source "#{basic_auth_source_uri}"
-          gem "rack"
-        G
-
-        bundle :install, :artifice => "endpoint_basic_authentication"
-        should_be_installed "rack 1.0.0"
-      end
-    end
-  end
-
-  context "when ruby is compiled without openssl" do
-    before do
-      # Install a monkeypatch that reproduces the effects of openssl being
-      # missing when the fetcher runs, as happens in real life. The reason
-      # we can't just overwrite openssl.rb is that Artifice uses it.
-      bundled_app("broken_ssl").mkpath
-      bundled_app("broken_ssl/openssl.rb").open("w") do |f|
-        f.write <<-RUBY
-          raise LoadError, "cannot load such file -- openssl"
-        RUBY
-      end
-    end
-
-    it "explains what to do to get it" do
-      gemfile <<-G
-        source "#{source_uri.gsub(/http/, 'https')}"
-        gem "rack"
-      G
-
-      bundle :install, :env => {"RUBYOPT" => "-I#{bundled_app("broken_ssl")}"}
-      expect(out).to include("OpenSSL")
-    end
-  end
-
-  context "when SSL certificate verification fails" do
-    it "explains what happened" do
-      # Install a monkeypatch that reproduces the effects of openssl raising
-      # a certificate validation error when Rubygems tries to connect.
-      gemfile <<-G
-        class Net::HTTP
-          def start
-            raise OpenSSL::SSL::SSLError, "certificate verify failed"
-          end
-        end
-
-        source "#{source_uri.gsub(/http/, 'https')}"
-        gem "rack"
-      G
-
-      bundle :install
-      expect(out).to match(/could not verify the SSL certificate/i)
-    end
-  end
-
-  context ".gemrc with sources is present" do
-    before do
-      File.open(home('.gemrc'), 'w') do |file|
-        file.puts({:sources => ["https://rubygems.org"]}.to_yaml)
-      end
-    end
-
-    after do
-      home('.gemrc').rmtree
-    end
-
-    it "uses other sources declared in the Gemfile" do
-      gemfile <<-G
-        source "#{source_uri}"
-        gem 'rack'
-      G
-
-      bundle "install", :exitstatus => true, :artifice => "endpoint_marshal_fail"
-
-      expect(exitstatus).to eq(0)
-    end
-  end
-
-end
diff --git a/spec/install/gems/env_spec.rb b/spec/install/gems/env_spec.rb
deleted file mode 100644
index 235a1ce..0000000
--- a/spec/install/gems/env_spec.rb
+++ /dev/null
@@ -1,107 +0,0 @@
-require "spec_helper"
-
-describe "bundle install with ENV conditionals" do
-  describe "when just setting an ENV key as a string" do
-    before :each do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-
-        env "BUNDLER_TEST" do
-          gem "rack"
-        end
-      G
-    end
-
-    it "excludes the gems when the ENV variable is not set" do
-      bundle :install
-      should_not_be_installed "rack"
-    end
-
-    it "includes the gems when the ENV variable is set" do
-      ENV['BUNDLER_TEST'] = '1'
-      bundle :install
-      should_be_installed "rack 1.0"
-    end
-  end
-
-  describe "when just setting an ENV key as a symbol" do
-    before :each do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-
-        env :BUNDLER_TEST do
-          gem "rack"
-        end
-      G
-    end
-
-    it "excludes the gems when the ENV variable is not set" do
-      bundle :install
-      should_not_be_installed "rack"
-    end
-
-    it "includes the gems when the ENV variable is set" do
-      ENV['BUNDLER_TEST'] = '1'
-      bundle :install
-      should_be_installed "rack 1.0"
-    end
-  end
-
-  describe "when setting a string to match the env" do
-    before :each do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-
-        env "BUNDLER_TEST" => "foo" do
-          gem "rack"
-        end
-      G
-    end
-
-    it "excludes the gems when the ENV variable is not set" do
-      bundle :install
-      should_not_be_installed "rack"
-    end
-
-    it "excludes the gems when the ENV variable is set but does not match the condition" do
-      ENV['BUNDLER_TEST'] = '1'
-      bundle :install
-      should_not_be_installed "rack"
-    end
-
-    it "includes the gems when the ENV variable is set and matches the condition" do
-      ENV['BUNDLER_TEST'] = 'foo'
-      bundle :install
-      should_be_installed "rack 1.0"
-    end
-  end
-
-  describe "when setting a regex to match the env" do
-    before :each do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-
-        env "BUNDLER_TEST" => /foo/ do
-          gem "rack"
-        end
-      G
-    end
-
-    it "excludes the gems when the ENV variable is not set" do
-      bundle :install
-      should_not_be_installed "rack"
-    end
-
-    it "excludes the gems when the ENV variable is set but does not match the condition" do
-      ENV['BUNDLER_TEST'] = 'fo'
-      bundle :install
-      should_not_be_installed "rack"
-    end
-
-    it "includes the gems when the ENV variable is set and matches the condition" do
-      ENV['BUNDLER_TEST'] = 'foobar'
-      bundle :install
-      should_be_installed "rack 1.0"
-    end
-  end
-end
diff --git a/spec/install/gems/flex_spec.rb b/spec/install/gems/flex_spec.rb
deleted file mode 100644
index dbf9278..0000000
--- a/spec/install/gems/flex_spec.rb
+++ /dev/null
@@ -1,314 +0,0 @@
-require "spec_helper"
-
-describe "bundle flex_install" do
-  it "installs the gems as expected" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem 'rack'
-    G
-
-    should_be_installed "rack 1.0.0"
-    should_be_locked
-  end
-
-  it "installs even when the lockfile is invalid" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem 'rack'
-    G
-
-    should_be_installed "rack 1.0.0"
-    should_be_locked
-
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem 'rack', '1.0'
-    G
-
-    bundle :install
-    should_be_installed "rack 1.0.0"
-    should_be_locked
-  end
-
-  it "keeps child dependencies at the same version" do
-    build_repo2
-
-    install_gemfile <<-G
-      source "file://#{gem_repo2}"
-      gem "rack-obama"
-    G
-
-    should_be_installed "rack 1.0.0", "rack-obama 1.0.0"
-
-    update_repo2
-    install_gemfile <<-G
-      source "file://#{gem_repo2}"
-      gem "rack-obama", "1.0"
-    G
-
-    should_be_installed "rack 1.0.0", "rack-obama 1.0.0"
-  end
-
-  describe "adding new gems" do
-    it "installs added gems without updating previously installed gems" do
-      build_repo2
-
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem 'rack'
-      G
-
-      update_repo2
-
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem 'rack'
-        gem 'activesupport', '2.3.5'
-      G
-
-      should_be_installed "rack 1.0.0", 'activesupport 2.3.5'
-    end
-
-    it "keeps child dependencies pinned" do
-      build_repo2
-
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "rack-obama"
-      G
-
-      update_repo2
-
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "rack-obama"
-        gem "thin"
-      G
-
-      should_be_installed "rack 1.0.0", 'rack-obama 1.0', 'thin 1.0'
-    end
-  end
-
-  describe "removing gems" do
-    it "removes gems without changing the versions of remaining gems" do
-      build_repo2
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem 'rack'
-        gem 'activesupport', '2.3.5'
-      G
-
-      update_repo2
-
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem 'rack'
-      G
-
-      should_be_installed "rack 1.0.0"
-      should_not_be_installed "activesupport 2.3.5"
-
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem 'rack'
-        gem 'activesupport', '2.3.2'
-      G
-
-      should_be_installed "rack 1.0.0", 'activesupport 2.3.2'
-    end
-
-    it "removes top level dependencies when removed from the Gemfile while leaving other dependencies intact" do
-      build_repo2
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem 'rack'
-        gem 'activesupport', '2.3.5'
-      G
-
-      update_repo2
-
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem 'rack'
-      G
-
-      should_not_be_installed "activesupport 2.3.5"
-    end
-
-    it "removes child dependencies" do
-      build_repo2
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem 'rack-obama'
-        gem 'activesupport'
-      G
-
-      should_be_installed "rack 1.0.0", "rack-obama 1.0.0", "activesupport 2.3.5"
-
-      update_repo2
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem 'activesupport'
-      G
-
-      should_be_installed 'activesupport 2.3.5'
-      should_not_be_installed "rack-obama", "rack"
-    end
-  end
-
-  describe "when Gemfile conflicts with lockfile" do
-    before(:each) do
-      build_repo2
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "rack_middleware"
-      G
-
-      should_be_installed "rack_middleware 1.0", "rack 0.9.1"
-
-      build_repo2
-      update_repo2 do
-        build_gem "rack-obama", "2.0" do |s|
-          s.add_dependency "rack", "=1.2"
-        end
-        build_gem "rack_middleware", "2.0" do |s|
-          s.add_dependency "rack", ">=1.0"
-        end
-      end
-
-      gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "rack-obama", "2.0"
-        gem "rack_middleware"
-      G
-    end
-
-    it "does not install gems whose dependencies are not met" do
-      bundle :install
-      ruby <<-RUBY, :expect_err => true
-        require 'bundler/setup'
-      RUBY
-      expect(err).to match(/could not find gem 'rack-obama/i)
-    end
-
-    it "suggests bundle update when the Gemfile requires different versions than the lock" do
-      nice_error = <<-E.strip.gsub(/^ {8}/, '')
-        Fetching source index from file:#{gem_repo2}/
-        Resolving dependencies...
-        Bundler could not find compatible versions for gem "rack":
-          In snapshot (Gemfile.lock):
-            rack (0.9.1)
-
-          In Gemfile:
-            rack-obama (= 2.0) ruby depends on
-              rack (= 1.2) ruby
-
-        Running `bundle update` will rebuild your snapshot from scratch, using only
-        the gems in your Gemfile, which may resolve the conflict.
-      E
-
-      bundle :install, :retry => 0
-      expect(out).to eq(nice_error)
-    end
-  end
-
-  describe "subtler cases" do
-    before :each do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-        gem "rack-obama"
-      G
-
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", "0.9.1"
-        gem "rack-obama"
-      G
-    end
-
-    it "does something" do
-      expect {
-        bundle "install"
-      }.not_to change { File.read(bundled_app('Gemfile.lock')) }
-
-      expect(out).to include('rack = 0.9.1')
-      expect(out).to include('locked at 1.0.0')
-      expect(out).to include('bundle update rack')
-    end
-
-    it "should work when you update" do
-      bundle "update rack"
-    end
-  end
-
-  describe "when adding a new source" do
-    it "updates the lockfile" do
-      build_repo2
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-      G
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        source "file://#{gem_repo2}"
-        gem "rack"
-      G
-
-      lockfile_should_be <<-L
-      GEM
-        remote: file:#{gem_repo1}/
-        remote: file:#{gem_repo2}/
-        specs:
-          rack (1.0.0)
-
-      PLATFORMS
-        ruby
-
-      DEPENDENCIES
-        rack
-      L
-    end
-  end
-
-  # This was written to test github issue #636, but it passed.
-  # It's insanoly slow (3.36s) so I'm not going to run it
-  # describe "when a locked child dependency conflicts" do
-  #   before(:each) do
-  #     build_repo2 do
-  #       build_gem "capybara", "0.3.9" do |s|
-  #         s.add_dependency "rack", ">= 1.0.0"
-  #       end
-  #
-  #       build_gem "rack", "1.1.0"
-  #       build_gem "rails", "3.0.0.rc4" do |s|
-  #         s.add_dependency "rack", "~> 1.1.0"
-  #       end
-  #
-  #       build_gem "rack", "1.2.1"
-  #       build_gem "rails", "3.0.0" do |s|
-  #         s.add_dependency "rack", "~> 1.2.1"
-  #       end
-  #     end
-  #   end
-  #
-  #   it "prints the correct error message" do
-  #     # install Rails 3.0.0.rc
-  #     install_gemfile <<-G
-  #       source "file://#{gem_repo2}"
-  #       gem "rails", "3.0.0.rc4"
-  #       gem "capybara", "0.3.9"
-  #     G
-  #
-  #     # upgrade Rails to 3.0.0 and then install again
-  #     install_gemfile <<-G
-  #       source "file://#{gem_repo2}"
-  #       gem "rails", "3.0.0"
-  #       gem "capybara", "0.3.9"
-  #     G
-  #
-  #     out.should match(/Gemfile.lock/)
-  #   end
-  # end
-
-end
diff --git a/spec/install/gems/groups_spec.rb b/spec/install/gems/groups_spec.rb
deleted file mode 100644
index afce362..0000000
--- a/spec/install/gems/groups_spec.rb
+++ /dev/null
@@ -1,308 +0,0 @@
-require "spec_helper"
-
-describe "bundle install with groups" do
-
-  describe "installing with no options" do
-    before :each do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-        group :emo do
-          gem "activesupport", "2.3.5"
-        end
-        gem "thin", :groups => [:emo]
-      G
-    end
-
-    it "installs gems in the default group" do
-      should_be_installed "rack 1.0.0"
-    end
-
-    it "installs gems in a group block into that group" do
-      should_be_installed "activesupport 2.3.5"
-
-      load_error_run <<-R, 'activesupport', :default
-        require 'activesupport'
-        puts ACTIVESUPPORT
-      R
-
-      expect(err).to eq("ZOMG LOAD ERROR")
-    end
-
-    it "installs gems with inline :groups into those groups" do
-      should_be_installed "thin 1.0"
-
-      load_error_run <<-R, 'thin', :default
-        require 'thin'
-        puts THIN
-      R
-
-      expect(err).to eq("ZOMG LOAD ERROR")
-    end
-
-    it "sets up everything if Bundler.setup is used with no groups" do
-      out = run("require 'rack'; puts RACK")
-      expect(out).to eq('1.0.0')
-
-      out = run("require 'activesupport'; puts ACTIVESUPPORT")
-      expect(out).to eq('2.3.5')
-
-      out = run("require 'thin'; puts THIN")
-      expect(out).to eq('1.0')
-    end
-
-    it "removes old groups when new groups are set up" do
-      load_error_run <<-RUBY, 'thin', :emo
-        Bundler.setup(:default)
-        require 'thin'
-        puts THIN
-      RUBY
-
-      expect(err).to eq("ZOMG LOAD ERROR")
-    end
-
-    it "sets up old groups when they have previously been removed" do
-      out = run <<-RUBY, :emo
-        Bundler.setup(:default)
-        Bundler.setup(:default, :emo)
-        require 'thin'; puts THIN
-      RUBY
-      expect(out).to eq('1.0')
-    end
-  end
-
-  describe "installing --without" do
-    describe "with gems assigned to a single group" do
-      before :each do
-        gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "rack"
-          group :emo do
-            gem "activesupport", "2.3.5"
-          end
-        G
-      end
-
-      it "installs gems in the default group" do
-        bundle :install, :without => "emo"
-        should_be_installed "rack 1.0.0", :groups => [:default]
-      end
-
-      it "does not install gems from the excluded group" do
-        bundle :install, :without => "emo"
-        should_not_be_installed "activesupport 2.3.5", :groups => [:default]
-      end
-
-      it "does not install gems from the previously excluded group" do
-        bundle :install, :without => "emo"
-        should_not_be_installed "activesupport 2.3.5"
-        bundle :install
-        should_not_be_installed "activesupport 2.3.5"
-      end
-
-      it "does not say it installed gems from the excluded group" do
-        bundle :install, :without => "emo"
-        expect(out).not_to include("activesupport")
-      end
-
-      it "allows Bundler.setup for specific groups" do
-        bundle :install, :without => "emo"
-        run("require 'rack'; puts RACK", :default)
-        expect(out).to eq('1.0.0')
-      end
-
-      it "does not effect the resolve" do
-        gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "activesupport"
-          group :emo do
-            gem "rails", "2.3.2"
-          end
-        G
-
-        bundle :install, :without => "emo"
-        should_be_installed "activesupport 2.3.2", :groups => [:default]
-      end
-
-      it "still works on a different machine and excludes gems" do
-        bundle :install, :without => "emo"
-
-        simulate_new_machine
-        bundle :install, :without => "emo"
-
-        should_be_installed "rack 1.0.0", :groups => [:default]
-        should_not_be_installed "activesupport 2.3.5", :groups => [:default]
-      end
-
-      it "still works when BUNDLE_WITHOUT is set" do
-        ENV["BUNDLE_WITHOUT"] = "emo"
-
-        bundle :install
-        expect(out).not_to include("activesupport")
-
-        should_be_installed "rack 1.0.0", :groups => [:default]
-        should_not_be_installed "activesupport 2.3.5", :groups => [:default]
-
-        ENV["BUNDLE_WITHOUT"] = nil
-      end
-
-      it "clears without when passed an empty list" do
-        bundle :install, :without => "emo"
-
-        bundle 'install --without ""'
-        should_be_installed "activesupport 2.3.5"
-      end
-
-      it "doesn't clear without when nothing is passed" do
-        bundle :install, :without => "emo"
-
-        bundle :install
-        should_not_be_installed "activesupport 2.3.5"
-      end
-    end
-
-    describe "with gems assigned to multiple groups" do
-      before :each do
-        gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "rack"
-          group :emo, :lolercoaster do
-            gem "activesupport", "2.3.5"
-          end
-        G
-      end
-
-      it "installs gems in the default group" do
-        bundle :install, :without => "emo lolercoaster"
-        should_be_installed "rack 1.0.0"
-      end
-
-      it "installs the gem if any of its groups are installed" do
-        bundle "install --without emo"
-        should_be_installed "rack 1.0.0", "activesupport 2.3.5"
-      end
-
-      describe "with a gem defined multiple times in different groups" do
-        before :each do
-          gemfile <<-G
-            source "file://#{gem_repo1}"
-            gem "rack"
-
-            group :emo do
-              gem "activesupport", "2.3.5"
-            end
-
-            group :lolercoaster do
-              gem "activesupport", "2.3.5"
-            end
-          G
-        end
-
-        it "installs the gem w/ option --without emo" do
-          bundle "install --without emo"
-          should_be_installed "activesupport 2.3.5"
-        end
-
-        it "installs the gem w/ option --without lolercoaster" do
-          bundle "install --without lolercoaster"
-          should_be_installed "activesupport 2.3.5"
-        end
-
-        it "does not install the gem w/ option --without emo lolercoaster" do
-          bundle "install --without emo lolercoaster"
-          should_not_be_installed "activesupport 2.3.5"
-        end
-
-        it "does not install the gem w/ option --without 'emo lolercoaster'" do
-          bundle "install --without 'emo lolercoaster'"
-          should_not_be_installed "activesupport 2.3.5"
-        end
-      end
-    end
-
-    describe "nesting groups" do
-      before :each do
-        gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "rack"
-          group :emo do
-            group :lolercoaster do
-              gem "activesupport", "2.3.5"
-            end
-          end
-        G
-      end
-
-      it "installs gems in the default group" do
-        bundle :install, :without => "emo lolercoaster"
-        should_be_installed "rack 1.0.0"
-      end
-
-      it "installs the gem if any of its groups are installed" do
-        bundle "install --without emo"
-        should_be_installed "rack 1.0.0", "activesupport 2.3.5"
-      end
-
-    end
-  end
-
-  describe "when loading only the default group" do
-    it "should not load all groups" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-        gem "activesupport", :groups => :development
-      G
-
-      ruby <<-R
-        require "bundler"
-        Bundler.setup :default
-        Bundler.require :default
-        puts RACK
-        begin
-          require "activesupport"
-        rescue LoadError
-          puts "no activesupport"
-        end
-      R
-
-      expect(out).to include("1.0")
-      expect(out).to include("no activesupport")
-    end
-  end
-
-
-  describe "when locked and installed with --without" do
-    before(:each) do
-      build_repo2
-      system_gems "rack-0.9.1" do
-        install_gemfile <<-G, :without => :rack
-          source "file://#{gem_repo2}"
-          gem "rack"
-
-          group :rack do
-            gem "rack_middleware"
-          end
-        G
-      end
-    end
-
-    it "uses the correct versions even if --without was used on the original" do
-      should_be_installed "rack 0.9.1"
-      should_not_be_installed "rack_middleware 1.0"
-      simulate_new_machine
-
-      bundle :install
-
-      should_be_installed "rack 0.9.1"
-      should_be_installed "rack_middleware 1.0"
-    end
-
-    it "does not hit the remote a second time" do
-      FileUtils.rm_rf gem_repo2
-      bundle "install --without rack"
-      expect(err).to be_empty
-    end
-  end
-
-end
diff --git a/spec/install/gems/mirror_spec.rb b/spec/install/gems/mirror_spec.rb
deleted file mode 100644
index 48b97de..0000000
--- a/spec/install/gems/mirror_spec.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-require "spec_helper"
-
-describe "bundle install with a mirror configured" do
-  describe "when the mirror does not match the gem source" do
-    before :each do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-
-        gem "rack"
-      G
-      bundle "config --local mirror.http://gems.example.org http://gem-mirror.example.org"
-    end
-
-    it "installs from the normal location" do
-      bundle :install
-      expect(out).to include("Fetching source index from file:#{gem_repo1}")
-      should_be_installed "rack 1.0"
-    end
-  end
-
-  describe "when the gem source matches a configured mirror" do
-    before :each do
-      gemfile <<-G
-        # This source is bogus and doesn't have the gem we're looking for
-        source "file://#{gem_repo2}"
-
-        gem "rack"
-      G
-      bundle "config --local mirror.file://#{gem_repo2} file://#{gem_repo1}"
-    end
-
-    it "installs the gem from the mirror" do
-      bundle :install
-      expect(out).to include("Fetching source index from file:#{gem_repo1}")
-      expect(out).not_to include("Fetching source index from file:#{gem_repo2}")
-      should_be_installed "rack 1.0"
-    end
-  end
-end
diff --git a/spec/install/gems/platform_spec.rb b/spec/install/gems/platform_spec.rb
deleted file mode 100644
index 71603e1..0000000
--- a/spec/install/gems/platform_spec.rb
+++ /dev/null
@@ -1,195 +0,0 @@
-require "spec_helper"
-
-describe "bundle install across platforms" do
-  it "maintains the same lockfile if all gems are compatible across platforms" do
-    lockfile <<-G
-      GEM
-        remote: file:#{gem_repo1}/
-        specs:
-          rack (0.9.1)
-
-      PLATFORMS
-        #{not_local}
-
-      DEPENDENCIES
-        rack
-    G
-
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "rack"
-    G
-
-    should_be_installed "rack 0.9.1"
-  end
-
-  it "pulls in the correct platform specific gem" do
-    lockfile <<-G
-      GEM
-        remote: file:#{gem_repo1}
-        specs:
-          platform_specific (1.0)
-          platform_specific (1.0-java)
-          platform_specific (1.0-x86-mswin32)
-
-      PLATFORMS
-        ruby
-
-      DEPENDENCIES
-        platform_specific
-    G
-
-    simulate_platform "java"
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "platform_specific"
-    G
-
-    should_be_installed "platform_specific 1.0 JAVA"
-  end
-
-  it "works with gems that have different dependencies" do
-    simulate_platform "java"
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "nokogiri"
-    G
-
-    should_be_installed "nokogiri 1.4.2 JAVA", "weakling 0.0.3"
-
-    simulate_new_machine
-
-    simulate_platform "ruby"
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "nokogiri"
-    G
-
-    should_be_installed "nokogiri 1.4.2"
-    should_not_be_installed "weakling"
-  end
-
-  it "works the other way with gems that have different dependencies" do
-    simulate_platform "ruby"
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "nokogiri"
-    G
-
-    simulate_platform "java"
-    bundle "install"
-
-    should_be_installed "nokogiri 1.4.2 JAVA", "weakling 0.0.3"
-  end
-
-  it "fetches gems again after changing the version of Ruby" do
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "rack", "1.0.0"
-    G
-
-    bundle "install --path vendor/bundle"
-
-    new_version = Gem::ConfigMap[:ruby_version] == "1.8" ? "1.9.1" : "1.8"
-    FileUtils.mv(vendored_gems, bundled_app("vendor/bundle", Gem.ruby_engine, new_version))
-
-    bundle "install --path vendor/bundle"
-    expect(vendored_gems("gems/rack-1.0.0")).to exist
-  end
-end
-
-describe "bundle install with platform conditionals" do
-  it "installs gems tagged w/ the current platforms" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      platforms :#{local_tag} do
-        gem "nokogiri"
-      end
-    G
-
-    should_be_installed "nokogiri 1.4.2"
-  end
-
-  it "does not install gems tagged w/ another platforms" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack"
-      platforms :#{not_local_tag} do
-        gem "nokogiri"
-      end
-    G
-
-    should_be_installed     "rack 1.0"
-    should_not_be_installed "nokogiri 1.4.2"
-  end
-
-  it "installs gems tagged w/ the current platforms inline" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "nokogiri", :platforms => :#{local_tag}
-    G
-    should_be_installed "nokogiri 1.4.2"
-  end
-
-  it "does not install gems tagged w/ another platforms inline" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack"
-      gem "nokogiri", :platforms => :#{not_local_tag}
-    G
-    should_be_installed     "rack 1.0"
-    should_not_be_installed "nokogiri 1.4.2"
-  end
-
-  it "installs gems tagged w/ the current platform inline" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "nokogiri", :platform => :#{local_tag}
-    G
-    should_be_installed "nokogiri 1.4.2"
-  end
-
-  it "doesn't install gems tagged w/ another platform inline" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "nokogiri", :platform => :#{not_local_tag}
-    G
-    should_not_be_installed "nokogiri 1.4.2"
-  end
-
-  it "does not blow up on sources with all platform-excluded specs" do
-    build_git "foo"
-
-    install_gemfile <<-G
-      platform :#{not_local_tag} do
-        gem "foo", :git => "#{lib_path('foo-1.0')}"
-      end
-    G
-
-    bundle :show, :exitstatus => true
-    expect(exitstatus).to eq(0)
-  end
-
-end
-
-describe "when a gem has no architecture" do
-  it "still installs correctly" do
-    simulate_platform mswin
-
-    gemfile <<-G
-      # Try to install gem with nil arch
-      source "http://localgemserver.test/"
-      gem "rcov"
-    G
-
-    bundle :install, :fakeweb => "windows"
-    should_be_installed "rcov 1.0.0"
-  end
-end
diff --git a/spec/install/gems/post_install_spec.rb b/spec/install/gems/post_install_spec.rb
deleted file mode 100644
index 69841fe..0000000
--- a/spec/install/gems/post_install_spec.rb
+++ /dev/null
@@ -1,121 +0,0 @@
-require 'spec_helper'
-
-describe "bundle install with gem sources" do
-  describe "when gems include post install messages" do
-    it "should display the post-install messages after installing" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem 'rack'
-        gem 'thin'
-        gem 'rack-obama'
-      G
-
-      bundle :install
-      expect(out).to include("Post-install message from rack:")
-      expect(out).to include("Rack's post install message")
-      expect(out).to include("Post-install message from thin:")
-      expect(out).to include("Thin's post install message")
-      expect(out).to include("Post-install message from rack-obama:")
-      expect(out).to include("Rack-obama's post install message")
-    end
-  end
-
-  describe "when gems do not include post install messages" do
-    it "should not display any post-install messages" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "activesupport"
-      G
-
-      bundle :install
-      expect(out).not_to include("Post-install message")
-    end
-  end
-
-  describe "when a dependecy includes a post install message" do
-    it "should display the post install message" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem 'rack_middleware'
-      G
-
-      bundle :install
-      expect(out).to include("Post-install message from rack:")
-      expect(out).to include("Rack's post install message")
-    end
-  end
-end
-
-describe "bundle install with git sources" do
-  describe "when gems include post install messages" do
-    it "should display the post-install messages after installing" do
-      build_git "foo" do |s|
-        s.post_install_message = "Foo's post install message"
-      end
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem 'foo', :git => '#{lib_path("foo-1.0")}'
-      G
-
-      bundle :install
-      expect(out).to include("Post-install message from foo:")
-      expect(out).to include("Foo's post install message")
-    end
-
-    it "should display the post-install messages if repo is updated" do
-      build_git "foo" do |s|
-        s.post_install_message = "Foo's post install message"
-      end
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem 'foo', :git => '#{lib_path("foo-1.0")}'
-      G
-      bundle :install
-
-      build_git "foo", "1.1" do |s|
-        s.post_install_message = "Foo's 1.1 post install message"
-      end
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem 'foo', :git => '#{lib_path("foo-1.1")}'
-      G
-      bundle :install
-
-      expect(out).to include("Post-install message from foo:")
-      expect(out).to include("Foo's 1.1 post install message")
-    end
-
-    it "should not display the post-install messages if repo is not updated" do
-      build_git "foo" do |s|
-        s.post_install_message = "Foo's post install message"
-      end
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem 'foo', :git => '#{lib_path("foo-1.0")}'
-      G
-
-      bundle :install
-      expect(out).to include("Post-install message from foo:")
-      expect(out).to include("Foo's post install message")
-
-      bundle :install
-      expect(out).not_to include("Post-install message")
-    end
-  end
-
-  describe "when gems do not include post install messages" do
-    it "should not display any post-install messages" do
-      build_git "foo" do |s|
-        s.post_install_message = nil
-      end
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem 'foo', :git => '#{lib_path("foo-1.0")}'
-      G
-
-      bundle :install
-      expect(out).not_to include("Post-install message")
-    end
-  end
-
-end
diff --git a/spec/install/gems/resolving_spec.rb b/spec/install/gems/resolving_spec.rb
deleted file mode 100644
index 6e07073..0000000
--- a/spec/install/gems/resolving_spec.rb
+++ /dev/null
@@ -1,124 +0,0 @@
-require "spec_helper"
-
-describe "bundle install with gem sources" do
-  describe "install time dependencies" do
-    it "installs gems with implicit rake dependencies" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "with_implicit_rake_dep"
-        gem "another_implicit_rake_dep"
-        gem "rake"
-      G
-
-      run <<-R
-        require 'implicit_rake_dep'
-        require 'another_implicit_rake_dep'
-        puts IMPLICIT_RAKE_DEP
-        puts ANOTHER_IMPLICIT_RAKE_DEP
-      R
-      expect(out).to eq("YES\nYES")
-    end
-
-    it "installs gems with a dependency with no type" do
-      build_repo2
-
-      path = "#{gem_repo2}/#{Gem::MARSHAL_SPEC_DIR}/actionpack-2.3.2.gemspec.rz"
-      spec = Marshal.load(Gem.inflate(File.read(path)))
-      spec.dependencies.each do |d|
-        d.instance_variable_set(:@type, :fail)
-      end
-      File.open(path, 'w') do |f|
-        f.write Gem.deflate(Marshal.dump(spec))
-      end
-
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "actionpack", "2.3.2"
-      G
-
-      should_be_installed "actionpack 2.3.2", "activesupport 2.3.2"
-    end
-
-    describe "with crazy rubygem plugin stuff" do
-      it "installs plugins" do
-        install_gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "net_b"
-        G
-
-        should_be_installed "net_b 1.0"
-      end
-
-      it "installs plugins depended on by other plugins" do
-        install_gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "net_a"
-        G
-
-        should_be_installed "net_a 1.0", "net_b 1.0"
-      end
-
-      it "installs multiple levels of dependencies" do
-        install_gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "net_c"
-          gem "net_e"
-        G
-
-        should_be_installed "net_a 1.0", "net_b 1.0", "net_c 1.0", "net_d 1.0", "net_e 1.0"
-      end
-
-      context "with ENV['DEBUG_RESOLVER'] set" do
-        it "produces debug output" do
-          gemfile <<-G
-            source "file://#{gem_repo1}"
-            gem "net_c"
-            gem "net_e"
-          G
-
-          resolve_output = capture(:stdout) do
-            bundle :install, :env => {"DEBUG_RESOLVER" => "1"}
-          end
-
-          expect(resolve_output).to include("==== Iterating ====")
-        end
-      end
-
-      context "with ENV['DEBUG_RESOLVER_TREE'] set" do
-        it "produces debug output" do
-          gemfile <<-G
-            source "file://#{gem_repo1}"
-            gem "net_c"
-            gem "net_e"
-          G
-
-          resolve_output = capture(:stdout) do
-            bundle :install, :env => {"DEBUG_RESOLVER_TREE" => "1"}
-          end
-
-          expect(resolve_output).to include(" net_b (>= 0) ruby")
-        end
-      end
-
-    end
-
-    describe "when some gems require a different version of ruby" do
-      it "does not try to install those gems" do
-        pending "waiting for a rubygems index that includes ruby version"
-
-        update_repo gem_repo1 do
-          build_gem "require_ruby" do |s|
-            s.required_ruby_version = "> 9000"
-          end
-        end
-
-        install_gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem 'require_ruby'
-        G
-
-        expect(out).to_not include("Gem::InstallError: require_ruby requires Ruby version > 9000")
-      end
-    end
-  end
-end
diff --git a/spec/install/gems/simple_case_spec.rb b/spec/install/gems/simple_case_spec.rb
deleted file mode 100644
index aac70db..0000000
--- a/spec/install/gems/simple_case_spec.rb
+++ /dev/null
@@ -1,377 +0,0 @@
-require "spec_helper"
-
-describe "bundle install with gem sources" do
-  describe "the simple case" do
-    it "prints output and returns if no dependencies are specified" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-      G
-
-      bundle :install
-      expect(out).to match(/no dependencies/)
-    end
-
-    it "does not make a lockfile if the install fails" do
-      install_gemfile <<-G, :expect_err => true
-        raise StandardError, "FAIL"
-      G
-
-      expect(err).to match(/FAIL \(StandardError\)/)
-      expect(bundled_app("Gemfile.lock")).not_to exist
-    end
-
-    it "creates a Gemfile.lock" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-      G
-
-      expect(bundled_app('Gemfile.lock')).to exist
-    end
-
-    it "creates lock files based on the Gemfile name" do
-      gemfile bundled_app('OmgFile'), <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", "1.0"
-      G
-
-      bundle 'install --gemfile OmgFile'
-
-      expect(bundled_app("OmgFile.lock")).to exist
-    end
-
-    it "doesn't delete the lockfile if one already exists" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem 'rack'
-      G
-
-      lockfile = File.read(bundled_app("Gemfile.lock"))
-
-      install_gemfile <<-G, :expect_err => true
-        raise StandardError, "FAIL"
-      G
-
-      expect(File.read(bundled_app("Gemfile.lock"))).to eq(lockfile)
-    end
-
-    it "does not touch the lockfile if nothing changed" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-      G
-
-      expect { run '1' }.not_to change { File.mtime(bundled_app('Gemfile.lock')) }
-    end
-
-    it "fetches gems" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem 'rack'
-      G
-
-      expect(default_bundle_path("gems/rack-1.0.0")).to exist
-      should_be_installed("rack 1.0.0")
-    end
-
-    it "fetches gems when multiple versions are specified" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem 'rack', "> 0.9", "< 1.0"
-      G
-
-      expect(default_bundle_path("gems/rack-0.9.1")).to exist
-      should_be_installed("rack 0.9.1")
-    end
-
-    it "fetches gems when multiple versions are specified take 2" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem 'rack', "< 1.0", "> 0.9"
-      G
-
-      expect(default_bundle_path("gems/rack-0.9.1")).to exist
-      should_be_installed("rack 0.9.1")
-    end
-
-    it "raises an appropriate error when gems are specified using symbols" do
-      status = install_gemfile(<<-G, :exitstatus => true)
-        source "file://#{gem_repo1}"
-        gem :rack
-      G
-      expect(status).to eq(4)
-    end
-
-    it "pulls in dependencies" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rails"
-      G
-
-      should_be_installed "actionpack 2.3.2", "rails 2.3.2"
-    end
-
-    it "does the right version" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", "0.9.1"
-      G
-
-      should_be_installed "rack 0.9.1"
-    end
-
-    it "does not install the development dependency" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "with_development_dependency"
-      G
-
-      should_be_installed "with_development_dependency 1.0.0"
-      should_not_be_installed "activesupport 2.3.5"
-    end
-
-    it "resolves correctly" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "activemerchant"
-        gem "rails"
-      G
-
-      should_be_installed "activemerchant 1.0", "activesupport 2.3.2", "actionpack 2.3.2"
-    end
-
-    it "activates gem correctly according to the resolved gems" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "activesupport", "2.3.5"
-      G
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "activemerchant"
-        gem "rails"
-      G
-
-      should_be_installed "activemerchant 1.0", "activesupport 2.3.2", "actionpack 2.3.2"
-    end
-
-    it "does not reinstall any gem that is already available locally" do
-      system_gems "activesupport-2.3.2"
-
-      build_repo2 do
-        build_gem "activesupport", "2.3.2" do |s|
-          s.write "lib/activesupport.rb", "ACTIVESUPPORT = 'fail'"
-        end
-      end
-
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "activerecord", "2.3.2"
-      G
-
-      should_be_installed "activesupport 2.3.2"
-    end
-
-    it "works when the gemfile specifies gems that only exist in the system" do
-      build_gem "foo", :to_system => true
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-        gem "foo"
-      G
-
-      should_be_installed "rack 1.0.0", "foo 1.0.0"
-    end
-
-    it "prioritizes local gems over remote gems" do
-      build_gem 'rack', '1.0.0', :to_system => true do |s|
-        s.add_dependency "activesupport", "2.3.5"
-      end
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-      G
-
-      should_be_installed "rack 1.0.0", "activesupport 2.3.5"
-    end
-
-    describe "with a gem that installs multiple platforms" do
-      it "installs gems for the local platform as first choice" do
-        install_gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "platform_specific"
-        G
-
-        run "require 'platform_specific' ; puts PLATFORM_SPECIFIC"
-        expect(out).to eq("1.0.0 #{Gem::Platform.local}")
-      end
-
-      it "falls back on plain ruby" do
-        simulate_platform "foo-bar-baz"
-        install_gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "platform_specific"
-        G
-
-        run "require 'platform_specific' ; puts PLATFORM_SPECIFIC"
-        expect(out).to eq("1.0.0 RUBY")
-      end
-
-      it "installs gems for java" do
-        simulate_platform "java"
-        install_gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "platform_specific"
-        G
-
-        run "require 'platform_specific' ; puts PLATFORM_SPECIFIC"
-        expect(out).to eq("1.0.0 JAVA")
-      end
-
-      it "installs gems for windows" do
-        simulate_platform mswin
-
-        install_gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "platform_specific"
-        G
-
-        run "require 'platform_specific' ; puts PLATFORM_SPECIFIC"
-        expect(out).to eq("1.0.0 MSWIN")
-      end
-    end
-
-    describe "doing bundle install foo" do
-      before do
-        gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "rack"
-        G
-      end
-
-      it "works" do
-        bundle "install --path vendor"
-        should_be_installed "rack 1.0"
-      end
-
-      it "allows running bundle install --system without deleting foo" do
-        bundle "install --path vendor"
-        bundle "install --system"
-        FileUtils.rm_rf(bundled_app("vendor"))
-        should_be_installed "rack 1.0"
-      end
-
-      it "allows running bundle install --system after deleting foo" do
-        bundle "install --path vendor"
-        FileUtils.rm_rf(bundled_app("vendor"))
-        bundle "install --system"
-        should_be_installed "rack 1.0"
-      end
-    end
-
-    it "finds gems in multiple sources" do
-      build_repo2
-      update_repo2
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        source "file://#{gem_repo2}"
-
-        gem "activesupport", "1.2.3"
-        gem "rack", "1.2"
-      G
-
-      should_be_installed "rack 1.2", "activesupport 1.2.3"
-    end
-
-    it "gives a useful error if no sources are set" do
-      install_gemfile <<-G
-        gem "rack"
-      G
-
-      bundle :install, :expect_err => true
-      expect(out).to include("Your Gemfile has no gem server sources")
-    end
-
-    it "creates a Gemfile.lock on a blank Gemfile" do
-      install_gemfile <<-G
-      G
-
-      expect(File.exist?(bundled_app("Gemfile.lock"))).to eq(true)
-    end
-
-    it "gracefully handles error when rubygems server is unavailable" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        source "http://localhost:9384"
-
-        gem 'foo'
-      G
-
-      bundle :install
-      expect(out).to include("Could not fetch specs from http://localhost:9384/")
-      expect(out).not_to include("file://")
-    end
-
-    it "doesn't blow up when the local .bundle/config is empty" do
-      FileUtils.mkdir_p(bundled_app(".bundle"))
-      FileUtils.touch(bundled_app(".bundle/config"))
-
-      install_gemfile(<<-G, :exitstatus => true)
-        source "file://#{gem_repo1}"
-
-        gem 'foo'
-      G
-      expect(exitstatus).to eq(0)
-    end
-
-    it "doesn't blow up when the global .bundle/config is empty" do
-      FileUtils.mkdir_p("#{Bundler.rubygems.user_home}/.bundle")
-      FileUtils.touch("#{Bundler.rubygems.user_home}/.bundle/config")
-
-      install_gemfile(<<-G, :exitstatus => true)
-        source "file://#{gem_repo1}"
-
-        gem 'foo'
-      G
-      expect(exitstatus).to eq(0)
-    end
-  end
-
-  describe "when Bundler root contains regex chars" do
-    before do
-      root_dir = tmp("foo[]bar")
-
-      FileUtils.mkdir_p(root_dir)
-      in_app_root_custom(root_dir)
-    end
-
-    it "doesn't blow up" do
-      build_lib "foo"
-      gemfile = <<-G
-        gem 'foo', :path => "#{lib_path('foo-1.0')}"
-      G
-      File.open('Gemfile', 'w') do |file|
-        file.puts gemfile
-      end
-
-      bundle :install, :exitstatus => true
-
-      expect(exitstatus).to eq(0)
-    end
-  end
-
-  describe "when requesting a quiet install via --quiet" do
-    it "should be quiet" do
-      gemfile <<-G
-        gem 'rack'
-      G
-
-      bundle :install, :quiet => true
-      expect(out).to include("Could not find gem 'rack (>= 0) ruby'")
-      expect(out).to_not include("Your Gemfile has no gem server sources")
-    end
-  end
-
-end
diff --git a/spec/install/gems/sources_spec.rb b/spec/install/gems/sources_spec.rb
deleted file mode 100644
index 546aac4..0000000
--- a/spec/install/gems/sources_spec.rb
+++ /dev/null
@@ -1,259 +0,0 @@
-require "spec_helper"
-
-describe "bundle install with gems on multiple sources" do
-  # repo1 is built automatically before all of the specs run
-  # it contains rack-obama 1.0.0 and rack 0.9.1 & 1.0.0 amongst other gems
-
-  context "without source affinity" do
-    before do
-      # Oh no! Someone evil is trying to hijack rack :(
-      # need this to be broken to check for correct source ordering
-      build_repo gem_repo3 do
-        build_gem "rack", repo3_rack_version do |s|
-          s.write "lib/rack.rb", "RACK = 'FAIL'"
-        end
-      end
-    end
-
-    context "when the same version of the same gem is in multiple sources" do
-      let(:repo3_rack_version) { "1.0.0" }
-
-      before do
-        gemfile <<-G
-          source "file://#{gem_repo3}"
-          source "file://#{gem_repo1}"
-          gem "rack-obama"
-          gem "rack"
-        G
-      end
-
-      it "warns about ambiguous gems, but installs anyway, prioritizing sources last to first" do
-        bundle :install
-
-        expect(out).to include("Warning: the gem 'rack' was found in multiple sources.")
-        expect(out).to include("Installed from: file:#{gem_repo1}")
-        should_be_installed("rack-obama 1.0.0", "rack 1.0.0")
-      end
-    end
-
-    context "when different versions of the same gem are in multiple sources" do
-      let(:repo3_rack_version) { "1.2" }
-
-      before do
-        gemfile <<-G
-          source "file://#{gem_repo3}"
-          source "file://#{gem_repo1}"
-          gem "rack-obama"
-          gem "rack", "1.0.0" # force it to install the working version in repo1
-        G
-      end
-
-      it "warns about ambiguous gems, but installs anyway" do
-        bundle :install
-
-        expect(out).to include("Warning: the gem 'rack' was found in multiple sources.")
-        expect(out).to include("Installed from: file:#{gem_repo1}")
-        should_be_installed("rack-obama 1.0.0", "rack 1.0.0")
-      end
-    end
-  end
-
-  context "with source affinity" do
-    context "with sources given by a block" do
-      before do
-        # Oh no! Someone evil is trying to hijack rack :(
-        # need this to be broken to check for correct source ordering
-        build_repo gem_repo3 do
-          build_gem "rack", "1.0.0" do |s|
-            s.write "lib/rack.rb", "RACK = 'FAIL'"
-          end
-        end
-
-        gemfile <<-G
-          source "file://#{gem_repo3}"
-          source "file://#{gem_repo1}" do
-            gem "rack"
-          end
-          gem "rack-obama" # shoud come from repo3!
-        G
-      end
-
-      it "installs the gems without any warning" do
-        bundle :install
-        expect(out).not_to include("Warning")
-        should_be_installed("rack-obama 1.0.0", "rack 1.0.0")
-      end
-
-      it "can cache and deploy" do
-        bundle :package
-
-        expect(bundled_app("vendor/cache/rack-1.0.0.gem")).to exist
-        expect(bundled_app("vendor/cache/rack-obama-1.0.gem")).to exist
-
-        bundle "install --deployment", :exitstatus => true
-
-        expect(exitstatus).to eq(0)
-        should_be_installed("rack-obama 1.0.0", "rack 1.0.0")
-      end
-    end
-
-    context "with sources set by an option" do
-      before do
-        # Oh no! Someone evil is trying to hijack rack :(
-        # need this to be broken to check for correct source ordering
-        build_repo gem_repo3 do
-          build_gem "rack", "1.0.0" do |s|
-            s.write "lib/rack.rb", "RACK = 'FAIL'"
-          end
-        end
-
-        gemfile <<-G
-          source "file://#{gem_repo3}"
-          gem "rack-obama" # should come from repo3!
-          gem "rack", :source => "file://#{gem_repo1}"
-        G
-      end
-
-      it "installs the gems without any warning" do
-        bundle :install
-        expect(out).not_to include("Warning")
-        should_be_installed("rack-obama 1.0.0", "rack 1.0.0")
-      end
-    end
-
-    context "with an indirect dependency" do
-      before do
-        build_repo gem_repo3 do
-          build_gem "depends_on_rack", "1.0.1" do |s|
-            s.add_dependency "rack"
-          end
-        end
-      end
-
-      context "when the indirect dependency is in the pinned source" do
-        before do
-          # we need a working rack gem in repo3
-          update_repo gem_repo3 do
-            build_gem "rack", "1.0.0"
-          end
-
-          gemfile <<-G
-            source "file://#{gem_repo2}"
-            source "file://#{gem_repo3}" do
-              gem "depends_on_rack"
-            end
-          G
-        end
-
-        context "and not in any other sources" do
-          before do
-            build_repo(gem_repo2) {}
-          end
-
-          it "installs from the same source without any warning" do
-            bundle :install
-            expect(out).not_to include("Warning")
-            should_be_installed("depends_on_rack 1.0.1", "rack 1.0.0")
-          end
-        end
-
-        context "and in another source" do
-          before do
-            # need this to be broken to check for correct source ordering
-            build_repo gem_repo2 do
-              build_gem "rack", "1.0.0" do |s|
-                s.write "lib/rack.rb", "RACK = 'FAIL'"
-              end
-            end
-          end
-
-          it "installs from the same source without any warning" do
-            bundle :install
-            expect(out).not_to include("Warning")
-            should_be_installed("depends_on_rack 1.0.1", "rack 1.0.0")
-          end
-        end
-      end
-
-      context "when the indirect dependency is in a different source" do
-        before do
-          # In these tests, we need a working rack gem in repo2 and not repo3
-          build_repo gem_repo2 do
-            build_gem "rack", "1.0.0"
-          end
-        end
-
-        context "and not in any other sources" do
-          before do
-            gemfile <<-G
-              source "file://#{gem_repo2}"
-              source "file://#{gem_repo3}" do
-                gem "depends_on_rack"
-              end
-            G
-          end
-
-          it "installs from the other source without any warning" do
-            bundle :install
-            expect(out).not_to include("Warning")
-            should_be_installed("depends_on_rack 1.0.1", "rack 1.0.0")
-          end
-        end
-
-        context "and in yet another source" do
-          before do
-            gemfile <<-G
-              source "file://#{gem_repo1}"
-              source "file://#{gem_repo2}"
-              source "file://#{gem_repo3}" do
-                gem "depends_on_rack"
-              end
-            G
-          end
-
-          it "installs from the other source and warns about ambiguous gems" do
-            bundle :install
-            expect(out).to include("Warning: the gem 'rack' was found in multiple sources.")
-            expect(out).to include("Installed from: file:#{gem_repo2}")
-            should_be_installed("depends_on_rack 1.0.1", "rack 1.0.0")
-          end
-        end
-      end
-    end
-
-    context "with a gem that is only found in the wrong source" do
-      before do
-        build_repo gem_repo3 do
-          build_gem "not_in_repo1", "1.0.0"
-        end
-
-        gemfile <<-G
-          source "file://#{gem_repo3}"
-          gem "not_in_repo1", :source => "file://#{gem_repo1}"
-        G
-      end
-
-      it "does not install the gem" do
-        bundle :install
-        expect(out).to include("Could not find gem 'not_in_repo1 (>= 0) ruby'")
-      end
-    end
-  end
-
-  context "when an older version of the same gem also ships with Ruby" do
-    before do
-      system_gems "rack-0.9.1"
-
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack" # shoud come from repo1!
-      G
-    end
-
-    it "installs the gems without any warning" do
-      bundle :install
-      expect(out).not_to include("Warning")
-      should_be_installed("rack 1.0.0")
-    end
-  end
-end
diff --git a/spec/install/gems/standalone_spec.rb b/spec/install/gems/standalone_spec.rb
deleted file mode 100644
index c666120..0000000
--- a/spec/install/gems/standalone_spec.rb
+++ /dev/null
@@ -1,260 +0,0 @@
-require "spec_helper"
-
-describe "bundle install --standalone" do
-  describe "with simple gems" do
-    before do
-      install_gemfile <<-G, :standalone => true
-        source "file://#{gem_repo1}"
-        gem "rails"
-      G
-    end
-
-    it "still makes the gems available to normal bundler" do
-      should_be_installed "actionpack 2.3.2", "rails 2.3.2"
-    end
-
-    it "generates a bundle/bundler/setup.rb" do
-      expect(bundled_app("bundle/bundler/setup.rb")).to exist
-    end
-
-    it "makes the gems available without bundler" do
-      ruby <<-RUBY, :no_lib => true
-        $:.unshift File.expand_path("bundle")
-        require "bundler/setup"
-
-        require "actionpack"
-        puts ACTIONPACK
-      RUBY
-
-      expect(out).to eq("2.3.2")
-    end
-
-    it "works on a different system" do
-      FileUtils.mv(bundled_app, "#{bundled_app}2")
-      Dir.chdir("#{bundled_app}2")
-
-      ruby <<-RUBY, :no_lib => true
-        $:.unshift File.expand_path("bundle")
-        require "bundler/setup"
-
-        require "actionpack"
-        puts ACTIONPACK
-      RUBY
-
-      expect(out).to eq("2.3.2")
-    end
-  end
-
-  describe "with a combination of gems and git repos" do
-    before do
-      build_git "devise", "1.0"
-
-      install_gemfile <<-G, :standalone => true
-        source "file://#{gem_repo1}"
-        gem "rails"
-        gem "devise", :git => "#{lib_path('devise-1.0')}"
-      G
-    end
-
-    it "still makes the gems available to normal bundler" do
-      should_be_installed "actionpack 2.3.2", "rails 2.3.2", "devise 1.0"
-    end
-
-    it "generates a bundle/bundler/setup.rb" do
-      expect(bundled_app("bundle/bundler/setup.rb")).to exist
-    end
-
-    it "makes the gems available without bundler" do
-      ruby <<-RUBY, :no_lib => true
-        $:.unshift File.expand_path("bundle")
-        require "bundler/setup"
-
-        require "devise"
-        require "actionpack"
-        puts DEVISE
-        puts ACTIONPACK
-      RUBY
-
-      expect(out).to eq("1.0\n2.3.2")
-    end
-  end
-
-  describe "with groups" do
-    before do
-      build_git "devise", "1.0"
-
-      install_gemfile <<-G, :standalone => true
-        source "file://#{gem_repo1}"
-        gem "rails"
-
-        group :test do
-          gem "rspec"
-          gem "rack-test"
-        end
-      G
-    end
-
-    it "makes the gems available without bundler" do
-      ruby <<-RUBY, :no_lib => true
-        $:.unshift File.expand_path("bundle")
-        require "bundler/setup"
-
-        require "actionpack"
-        require "spec"
-        require "rack/test"
-        puts ACTIONPACK
-        puts SPEC
-        puts RACK_TEST
-      RUBY
-
-      expect(out).to eq("2.3.2\n1.2.7\n1.0")
-    end
-
-    it "allows creating a standalone file with limited groups" do
-      bundle "install --standalone default"
-
-      load_error_ruby <<-RUBY, 'spec', :no_lib => true
-        $:.unshift File.expand_path("bundle")
-        require "bundler/setup"
-
-        require "actionpack"
-        puts ACTIONPACK
-        require "spec"
-      RUBY
-
-      expect(out).to eq("2.3.2")
-      expect(err).to eq("ZOMG LOAD ERROR")
-    end
-
-    it "allows --without to limit the groups used in a standalone" do
-      bundle "install --standalone --without test"
-
-      load_error_ruby <<-RUBY, 'spec', :no_lib => true
-        $:.unshift File.expand_path("bundle")
-        require "bundler/setup"
-
-        require "actionpack"
-        puts ACTIONPACK
-        require "spec"
-      RUBY
-
-      expect(out).to eq("2.3.2")
-      expect(err).to eq("ZOMG LOAD ERROR")
-    end
-
-    it "allows --path to change the location of the standalone bundle" do
-      bundle "install --standalone --path path/to/bundle"
-
-      ruby <<-RUBY, :no_lib => true, :expect_err => false
-        $:.unshift File.expand_path("path/to/bundle")
-        require "bundler/setup"
-
-        require "actionpack"
-        puts ACTIONPACK
-      RUBY
-
-      expect(out).to eq("2.3.2")
-    end
-
-    it "allows remembered --without to limit the groups used in a standalone" do
-      bundle "install --without test"
-      bundle "install --standalone"
-
-      load_error_ruby <<-RUBY, 'spec', :no_lib => true
-        $:.unshift File.expand_path("bundle")
-        require "bundler/setup"
-
-        require "actionpack"
-        puts ACTIONPACK
-        require "spec"
-      RUBY
-
-      expect(out).to eq("2.3.2")
-      expect(err).to eq("ZOMG LOAD ERROR")
-    end
-  end
-
-  describe "with gemcutter's dependency API" do
-    let(:source_uri) { "http://localgemserver.test" }
-
-    describe "simple gems" do
-      before do
-        gemfile <<-G
-          source "#{source_uri}"
-          gem "rails"
-        G
-      end
-
-      it "should run without errors" do
-        bundle "install --standalone", :artifice => "endpoint", :exitstatus => true
-
-        expect(@exitstatus).to eq(0)
-      end
-
-      it "still makes the gems available to normal bundler" do
-        bundle "install --standalone", :artifice => "endpoint"
-
-        should_be_installed "actionpack 2.3.2", "rails 2.3.2"
-      end
-
-      it "generates a bundle/bundler/setup.rb" do
-        bundle "install --standalone", :artifice => "endpoint"
-
-        expect(bundled_app("bundle/bundler/setup.rb")).to exist
-      end
-
-      it "makes the gems available without bundler" do
-        bundle "install --standalone", :artifice => "endpoint"
-
-        ruby <<-RUBY, :no_lib => true
-          $:.unshift File.expand_path("bundle")
-          require "bundler/setup"
-
-          require "actionpack"
-          puts ACTIONPACK
-        RUBY
-
-        expect(out).to eq("2.3.2")
-      end
-
-      it "works on a different system" do
-        bundle "install --standalone", :artifice => "endpoint"
-
-        FileUtils.mv(bundled_app, "#{bundled_app}2")
-        Dir.chdir("#{bundled_app}2")
-
-        ruby <<-RUBY, :no_lib => true
-          $:.unshift File.expand_path("bundle")
-          require "bundler/setup"
-
-          require "actionpack"
-          puts ACTIONPACK
-        RUBY
-
-        expect(out).to eq("2.3.2")
-      end
-    end
-  end
-
-  describe "with --binstubs" do
-    before do
-      install_gemfile <<-G, :standalone => true, :binstubs => true
-        source "file://#{gem_repo1}"
-        gem "rails"
-      G
-    end
-
-    it "creates stubs that use the standalone load path" do
-      Dir.chdir(bundled_app) do
-        expect(`bin/rails -v`.chomp).to eql "2.3.2"
-      end
-    end
-
-    it "creates stubs that can be executed from anywhere" do
-      require 'tmpdir'
-      Dir.chdir(Dir.tmpdir) do
-        expect(`#{bundled_app}/bin/rails -v`.chomp).to eql "2.3.2"
-      end
-    end
-  end
-end
diff --git a/spec/install/gems/sudo_spec.rb b/spec/install/gems/sudo_spec.rb
deleted file mode 100644
index 3664321..0000000
--- a/spec/install/gems/sudo_spec.rb
+++ /dev/null
@@ -1,136 +0,0 @@
-require "spec_helper"
-
-describe "when using sudo", :sudo => true do
-  describe "and BUNDLE_PATH is writable" do
-    context "but BUNDLE_PATH/build_info is not writable" do
-      before do
-        subdir = system_gem_path('cache')
-        subdir.mkpath
-        sudo "chmod u-w #{subdir}"
-      end
-
-      it "installs" do
-        install_gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "rack"
-        G
-
-        expect(out).to_not match(/an error occurred/i)
-        expect(system_gem_path("cache/rack-1.0.0.gem")).to exist
-        should_be_installed "rack 1.0"
-      end
-    end
-  end
-
-  describe "and GEM_HOME is owned by root" do
-    before :each do
-      chown_system_gems_to_root
-    end
-
-    it "installs" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", '1.0'
-        gem "thin"
-      G
-
-      expect(system_gem_path("gems/rack-1.0.0")).to exist
-      expect(system_gem_path("gems/rack-1.0.0").stat.uid).to eq(0)
-      should_be_installed "rack 1.0"
-    end
-
-    it "installs rake and a gem dependent on rake in the same session" do
-      gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "rake"
-          gem "another_implicit_rake_dep"
-      G
-      bundle "install"
-      expect(system_gem_path("gems/another_implicit_rake_dep-1.0")).to exist
-    end
-
-
-    it "installs when BUNDLE_PATH is owned by root" do
-      bundle_path = tmp("owned_by_root")
-      FileUtils.mkdir_p bundle_path
-      sudo "chown -R root #{bundle_path}"
-
-      ENV['BUNDLE_PATH'] = bundle_path.to_s
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", '1.0'
-      G
-
-      expect(bundle_path.join("gems/rack-1.0.0")).to exist
-      expect(bundle_path.join("gems/rack-1.0.0").stat.uid).to eq(0)
-      should_be_installed "rack 1.0"
-    end
-
-    it "installs when BUNDLE_PATH does not exist" do
-      root_path = tmp("owned_by_root")
-      FileUtils.mkdir_p root_path
-      sudo "chown -R root #{root_path}"
-      bundle_path = root_path.join("does_not_exist")
-
-      ENV['BUNDLE_PATH'] = bundle_path.to_s
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", '1.0'
-      G
-
-      expect(bundle_path.join("gems/rack-1.0.0")).to exist
-      expect(bundle_path.join("gems/rack-1.0.0").stat.uid).to eq(0)
-      should_be_installed "rack 1.0"
-    end
-
-    it "installs extensions/ compiled by Rubygems 2.2", :rubygems => "2.2" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "very_simple_binary"
-      G
-
-      expect(system_gem_path("gems/very_simple_binary-1.0")).to exist
-      binary_glob = system_gem_path("extensions/*/*/very_simple_binary-1.0")
-      expect(Dir.glob(binary_glob).first).to be
-    end
-  end
-
-  describe "and BUNDLE_PATH is not writable" do
-    it "installs" do
-      sudo "chmod ugo-w #{default_bundle_path}"
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", '1.0'
-      G
-
-      expect(default_bundle_path("gems/rack-1.0.0")).to exist
-      should_be_installed "rack 1.0"
-    end
-  end
-
-  describe "and GEM_HOME is not writable" do
-    it "installs" do
-      gem_home = tmp('sudo_gem_home')
-      sudo "mkdir -p #{gem_home}"
-      sudo "chmod ugo-w #{gem_home}"
-
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", '1.0'
-      G
-
-      bundle :install, :env => {'GEM_HOME' => gem_home.to_s, 'GEM_PATH' => nil}
-      expect(gem_home.join('bin/rackup')).to exist
-      should_be_installed "rack 1.0", :env => {'GEM_HOME' => gem_home.to_s, 'GEM_PATH' => nil}
-    end
-  end
-
-  describe "and root runs install" do
-    it "warns against that" do
-      gemfile %|source "file://#{gem_repo1}"|
-      bundle :install, :sudo => true
-      expect(out).to include("Don't run Bundler as root.")
-    end
-  end
-
-end
diff --git a/spec/install/gems/win32_spec.rb b/spec/install/gems/win32_spec.rb
deleted file mode 100644
index 6224220..0000000
--- a/spec/install/gems/win32_spec.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-require 'spec_helper'
-
-describe "bundle install with win32-generated lockfile" do
-  it "should read lockfile" do
-    File.open(bundled_app('Gemfile.lock'), 'wb') do |f|
-      f << "GEM\r\n"
-      f << "  remote: file:#{gem_repo1}/\r\n"
-      f << "  specs:\r\n"
-      f << "\r\n"
-      f << "    rack (1.0.0)\r\n"
-      f << "\r\n"
-      f << "PLATFORMS\r\n"
-      f << "  ruby\r\n"
-      f << "\r\n"
-      f << "DEPENDENCIES\r\n"
-      f << "  rack\r\n"
-    end
-
-    install_gemfile <<-G, :exitstatus => true
-      source "file://#{gem_repo1}"
-
-      gem "rack"
-    G
-    expect(@exitstatus).to eq(0)
-  end
-end
diff --git a/spec/install/gemspecs_spec.rb b/spec/install/gemspecs_spec.rb
deleted file mode 100644
index 201ba95..0000000
--- a/spec/install/gemspecs_spec.rb
+++ /dev/null
@@ -1,50 +0,0 @@
-require 'spec_helper'
-
-describe "bundle install" do
-
-  describe "when a gem has a YAML gemspec" do
-    before :each do
-      build_repo2 do
-        build_gem "yaml_spec", :gemspec => :yaml
-      end
-    end
-
-    it "still installs correctly" do
-      gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "yaml_spec"
-      G
-      bundle :install
-      expect(err).to be_empty
-    end
-
-    it "still installs correctly when using path" do
-      build_lib 'yaml_spec', :gemspec => :yaml
-
-      install_gemfile <<-G
-        gem 'yaml_spec', :path => "#{lib_path('yaml_spec-1.0')}"
-      G
-      expect(err).to eq("")
-    end
-  end
-
-  it "should use gemspecs in the system cache when available" do
-    gemfile <<-G
-      source "http://localtestserver.gem"
-      gem 'rack'
-    G
-
-    FileUtils.mkdir_p "#{tmp}/gems/system/specifications"
-    File.open("#{tmp}/gems/system/specifications/rack-1.0.0.gemspec", 'w+') do |f|
-      spec = Gem::Specification.new do |s|
-        s.name = 'rack'
-        s.version = '1.0.0'
-        s.add_runtime_dependency 'activesupport', '2.3.2'
-      end
-      f.write spec.to_ruby
-    end
-    bundle :install, :artifice => 'endpoint_marshal_fail' # force gemspec load
-    should_be_installed "activesupport 2.3.2"
-  end
-
-end
diff --git a/spec/install/path_spec.rb b/spec/install/path_spec.rb
deleted file mode 100644
index 2ddceb2..0000000
--- a/spec/install/path_spec.rb
+++ /dev/null
@@ -1,150 +0,0 @@
-require "spec_helper"
-
-describe "bundle install" do
-
-  describe "with --path" do
-    before :each do
-      build_gem "rack", "1.0.0", :to_system => true do |s|
-        s.write "lib/rack.rb", "puts 'FAIL'"
-      end
-
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-      G
-    end
-
-    it "does not use available system gems with bundle --path vendor/bundle" do
-      bundle "install --path vendor/bundle"
-      should_be_installed "rack 1.0.0"
-    end
-
-    it "handles paths with regex characters in them" do
-      dir = bundled_app("bun++dle")
-      dir.mkpath
-
-      Dir.chdir(dir) do
-        bundle "install --path vendor/bundle"
-        expect(out).to include("installed into ./vendor/bundle")
-      end
-
-      dir.rmtree
-    end
-
-    it "prints a warning to let the user know what has happened with bundle --path vendor/bundle" do
-      bundle "install --path vendor/bundle"
-      expect(out).to include("It was installed into ./vendor")
-    end
-
-    it "disallows --path vendor/bundle --system" do
-      bundle "install --path vendor/bundle --system"
-      expect(out).to include("Please choose.")
-    end
-
-    it "remembers to disable system gems after the first time with bundle --path vendor/bundle" do
-      bundle "install --path vendor/bundle"
-      FileUtils.rm_rf bundled_app('vendor')
-      bundle "install"
-
-      expect(vendored_gems('gems/rack-1.0.0')).to be_directory
-      should_be_installed "rack 1.0.0"
-    end
-  end
-
-  describe "when BUNDLE_PATH or the global path config is set" do
-    before :each do
-      build_lib "rack", "1.0.0", :to_system => true do |s|
-        s.write "lib/rack.rb", "raise 'FAIL'"
-      end
-
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-      G
-    end
-
-    def set_bundle_path(type, location)
-      if type == :env
-        ENV["BUNDLE_PATH"] = location
-      elsif type == :global
-        bundle "config path #{location}", "no-color" => nil
-      end
-    end
-
-    [:env, :global].each do |type|
-      it "installs gems to a path if one is specified" do
-        set_bundle_path(type, bundled_app("vendor2").to_s)
-        bundle "install --path vendor/bundle"
-
-        expect(vendored_gems("gems/rack-1.0.0")).to be_directory
-        expect(bundled_app("vendor2")).not_to be_directory
-        should_be_installed "rack 1.0.0"
-      end
-
-      it "installs gems to BUNDLE_PATH with #{type}" do
-        set_bundle_path(type, bundled_app("vendor").to_s)
-
-        bundle :install
-
-        expect(bundled_app('vendor/gems/rack-1.0.0')).to be_directory
-        should_be_installed "rack 1.0.0"
-      end
-
-      it "installs gems to BUNDLE_PATH relative to root when relative" do
-        set_bundle_path(type, "vendor")
-
-        FileUtils.mkdir_p bundled_app('lol')
-        Dir.chdir(bundled_app('lol')) do
-          bundle :install
-        end
-
-        expect(bundled_app('vendor/gems/rack-1.0.0')).to be_directory
-        should_be_installed "rack 1.0.0"
-      end
-    end
-
-    it "installs gems to BUNDLE_PATH from .bundle/config" do
-      config "BUNDLE_PATH" => bundled_app("vendor/bundle").to_s
-
-      bundle :install
-
-      expect(vendored_gems('gems/rack-1.0.0')).to be_directory
-      should_be_installed "rack 1.0.0"
-    end
-
-    it "sets BUNDLE_PATH as the first argument to bundle install" do
-      bundle "install --path ./vendor/bundle"
-
-      expect(vendored_gems('gems/rack-1.0.0')).to be_directory
-      should_be_installed "rack 1.0.0"
-    end
-
-    it "disables system gems when passing a path to install" do
-      # This is so that vendored gems can be distributed to others
-      build_gem "rack", "1.1.0", :to_system => true
-      bundle "install --path ./vendor/bundle"
-
-      expect(vendored_gems('gems/rack-1.0.0')).to be_directory
-      should_be_installed "rack 1.0.0"
-    end
-  end
-
-  describe "to a dead symlink" do
-    before do
-      in_app_root do
-        `ln -s /tmp/idontexist bundle`
-      end
-    end
-
-    it "reports the symlink is dead" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-      G
-
-      bundle "install --path bundle"
-      expect(out).to match(/invalid symlink/)
-    end
-  end
-
-end
diff --git a/spec/install/post_bundle_message_spec.rb b/spec/install/post_bundle_message_spec.rb
deleted file mode 100644
index 6bd4e85..0000000
--- a/spec/install/post_bundle_message_spec.rb
+++ /dev/null
@@ -1,142 +0,0 @@
-require 'spec_helper'
-
-describe "post bundle message" do
-  before :each do
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack"
-      gem "activesupport", "2.3.5", :group => [:emo, :test]
-      group :test do
-        gem "rspec"
-      end
-      gem "rack-obama", :group => :obama
-    G
-  end
-
-  let(:bundle_show_message)       {"Use `bundle show [gemname]` to see where a bundled gem is installed."}
-  let(:bundle_deployment_message) {"It was installed into ./vendor"}
-  let(:bundle_complete_message)   {"Your bundle is complete!"}
-  let(:bundle_updated_message)    {"Your bundle is updated!"}
-
-  describe "for fresh bundle install" do
-    it "without any options" do
-      bundle :install
-      expect(out).to include(bundle_show_message)
-      expect(out).not_to include("Gems in the group")
-      expect(out).to include(bundle_complete_message)
-    end
-
-    it "with --without one group" do
-      bundle "install --without emo"
-      expect(out).to include(bundle_show_message)
-      expect(out).to include("Gems in the group emo were not installed")
-      expect(out).to include(bundle_complete_message)
-    end
-
-    it "with --without two groups" do
-      bundle "install --without emo test"
-      expect(out).to include(bundle_show_message)
-      expect(out).to include("Gems in the groups emo and test were not installed")
-      expect(out).to include(bundle_complete_message)
-    end
-
-    it "with --without more groups" do
-      bundle "install --without emo obama test"
-      expect(out).to include(bundle_show_message)
-      expect(out).to include("Gems in the groups emo, obama and test were not installed")
-      expect(out).to include(bundle_complete_message)
-    end
-
-    describe "with --path and" do
-      it "without any options" do
-        bundle "install --path vendor"
-        expect(out).to include(bundle_deployment_message)
-        expect(out).to_not include("Gems in the group")
-        expect(out).to include(bundle_complete_message)
-      end
-
-      it "with --without one group" do
-        bundle "install --without emo --path vendor"
-        expect(out).to include(bundle_deployment_message)
-        expect(out).to include("Gems in the group emo were not installed")
-        expect(out).to include(bundle_complete_message)
-      end
-
-      it "with --without two groups" do
-        bundle "install --without emo test --path vendor"
-        expect(out).to include(bundle_deployment_message)
-        expect(out).to include("Gems in the groups emo and test were not installed")
-        expect(out).to include(bundle_complete_message)
-      end
-
-      it "with --without more groups" do
-        bundle "install --without emo obama test --path vendor"
-        expect(out).to include(bundle_deployment_message)
-        expect(out).to include("Gems in the groups emo, obama and test were not installed")
-        expect(out).to include(bundle_complete_message)
-      end
-    end
-  end
-
-  describe "for second bundle install run" do
-    it "without any options" do
-      2.times { bundle :install }
-      expect(out).to include(bundle_show_message)
-      expect(out).to_not include("Gems in the groups")
-      expect(out).to include(bundle_complete_message)
-    end
-
-    it "with --without one group" do
-      bundle "install --without emo"
-      bundle :install
-      expect(out).to include(bundle_show_message)
-      expect(out).to include("Gems in the group emo were not installed")
-      expect(out).to include(bundle_complete_message)
-    end
-
-    it "with --without two groups" do
-      bundle "install --without emo test"
-      bundle :install
-      expect(out).to include(bundle_show_message)
-      expect(out).to include("Gems in the groups emo and test were not installed")
-      expect(out).to include(bundle_complete_message)
-    end
-
-    it "with --without more groups" do
-      bundle "install --without emo obama test"
-      bundle :install
-      expect(out).to include(bundle_show_message)
-      expect(out).to include("Gems in the groups emo, obama and test were not installed")
-      expect(out).to include(bundle_complete_message)
-    end
-  end
-
-  describe "for bundle update" do
-    it "without any options" do
-      bundle :update
-      expect(out).not_to include("Gems in the groups")
-      expect(out).to include(bundle_updated_message)
-    end
-
-    it "with --without one group" do
-      bundle :install, :without => :emo
-      bundle :update
-      expect(out).to include("Gems in the group emo were not installed")
-      expect(out).to include(bundle_updated_message)
-    end
-
-    it "with --without two groups" do
-      bundle "install --without emo test"
-      bundle :update
-      expect(out).to include("Gems in the groups emo and test were not installed")
-      expect(out).to include(bundle_updated_message)
-    end
-
-    it "with --without more groups" do
-      bundle "install --without emo obama test"
-      bundle :update
-      expect(out).to include("Gems in the groups emo, obama and test were not installed")
-      expect(out).to include(bundle_updated_message)
-    end
-  end
-end
diff --git a/spec/install/prereleases_spec.rb b/spec/install/prereleases_spec.rb
deleted file mode 100644
index f4f79af..0000000
--- a/spec/install/prereleases_spec.rb
+++ /dev/null
@@ -1,43 +0,0 @@
-require 'spec_helper'
-
-describe "bundle install" do
-
-  describe "when prerelease gems are available" do
-    it "finds prereleases" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "not_released"
-      G
-      should_be_installed "not_released 1.0.pre"
-    end
-
-    it "uses regular releases if available" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "has_prerelease"
-      G
-      should_be_installed "has_prerelease 1.0"
-    end
-
-    it "uses prereleases if requested" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "has_prerelease", "1.1.pre"
-      G
-      should_be_installed "has_prerelease 1.1.pre"
-    end
-  end
-
-  describe "when prerelease gems are not available" do
-    it "still works" do
-      build_repo3
-      install_gemfile <<-G
-        source "file://#{gem_repo3}"
-        gem "rack"
-      G
-
-      should_be_installed "rack 1.0"
-    end
-  end
-
-end
diff --git a/spec/install/security_policy_spec.rb b/spec/install/security_policy_spec.rb
deleted file mode 100644
index 941e14d..0000000
--- a/spec/install/security_policy_spec.rb
+++ /dev/null
@@ -1,77 +0,0 @@
-require "spec_helper"
-require "rubygems/security"
-
-# unfortunately, testing signed gems with a provided CA is extremely difficult
-# as 'gem cert' is currently the only way to add CAs to the system.
-
-describe "policies with unsigned gems" do
-  before do
-    build_security_repo
-    gemfile <<-G
-      source "file://#{security_repo}"
-      gem "rack"
-      gem "signed_gem"
-    G
-  end
-
-  it "will work after you try to deploy without a lock" do
-    bundle "install --deployment"
-    bundle :install, :exitstatus => true
-    expect(exitstatus).to eq(0)
-    should_be_installed "rack 1.0", "signed_gem 1.0"
-  end
-
-  it "will fail when given invalid security policy" do
-    bundle "install --trust-policy=InvalidPolicyName"
-    expect(out).to include("Rubygems doesn't know about trust policy")
-  end
-
-  it "will fail with High Security setting due to presence of unsigned gem" do
-    bundle "install --trust-policy=HighSecurity"
-    expect(out).to include("security policy didn't allow")
-  end
-
-  # This spec will fail on Rubygems 2 rc1 due to a bug in policy.rb. the bug is fixed in rc3.
-  it "will fail with Medium Security setting due to presence of unsigned gem", :unless => ENV['RGV'] == "v2.0.0.rc.1" do
-    bundle "install --trust-policy=MediumSecurity"
-    expect(out).to include("security policy didn't allow")
-  end
-
-  it "will succeed with no policy" do
-    bundle "install", :exitstatus => true
-    expect(exitstatus).to eq(0)
-  end
-
-end
-
-describe "policies with signed gems and no CA" do
-  before do
-    build_security_repo
-    gemfile <<-G
-      source "file://#{security_repo}"
-      gem "signed_gem"
-    G
-  end
-
-  it "will fail with High Security setting, gem is self-signed" do
-    bundle "install --trust-policy=HighSecurity"
-    expect(out).to include("security policy didn't allow")
-  end
-
-  it "will fail with Medium Security setting, gem is self-signed" do
-    bundle "install --trust-policy=MediumSecurity"
-    expect(out).to include("security policy didn't allow")
-  end
-
-  it "will succeed with Low Security setting, low security accepts self signed gem" do
-    bundle "install --trust-policy=LowSecurity", :exitstatus => true
-    expect(exitstatus).to eq(0)
-    should_be_installed "signed_gem 1.0"
-  end
-
-  it "will succeed with no policy" do
-    bundle "install", :exitstatus => true
-    expect(exitstatus).to eq(0)
-    should_be_installed "signed_gem 1.0"
-  end
-end
diff --git a/spec/install/upgrade_spec.rb b/spec/install/upgrade_spec.rb
deleted file mode 100644
index 603c39b..0000000
--- a/spec/install/upgrade_spec.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-require "spec_helper"
-
-describe "bundle install for the first time with v1.0" do
-  before :each do
-    in_app_root
-
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack"
-    G
-  end
-
-  it "removes lockfiles in 0.9 YAML format" do
-    File.open("Gemfile.lock", "w"){|f| YAML.dump({}, f) }
-    bundle :install
-    expect(File.read("Gemfile.lock")).not_to match(/^---/)
-  end
-
-  it "removes env.rb if it exists" do
-    bundled_app.join(".bundle").mkdir
-    bundled_app.join(".bundle/environment.rb").open("w"){|f| f.write("raise 'nooo'") }
-    bundle :install
-    expect(bundled_app.join(".bundle/environment.rb")).not_to exist
-  end
-
-end
diff --git a/spec/lock/git_spec.rb b/spec/lock/git_spec.rb
deleted file mode 100644
index 9d4ecf9..0000000
--- a/spec/lock/git_spec.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-require "spec_helper"
-
-describe "bundle lock with git gems" do
-  before :each do
-    build_git "foo"
-
-    install_gemfile <<-G
-      gem 'foo', :git => "#{lib_path('foo-1.0')}"
-    G
-  end
-
-  it "doesn't break right after running lock" do
-    should_be_installed "foo 1.0.0"
-  end
-
-  it "locks a git source to the current ref" do
-    update_git "foo"
-    bundle :install
-
-    run <<-RUBY
-      require 'foo'
-      puts "WIN" unless defined?(FOO_PREV_REF)
-    RUBY
-
-    expect(out).to eq("WIN")
-  end
-
-  it "provides correct #full_gem_path" do
-    run <<-RUBY
-      puts Bundler.rubygems.find_name('foo').first.full_gem_path
-    RUBY
-    expect(out).to eq(bundle("show foo"))
-  end
-end
diff --git a/spec/lock/lockfile_spec.rb b/spec/lock/lockfile_spec.rb
deleted file mode 100644
index 588d643..0000000
--- a/spec/lock/lockfile_spec.rb
+++ /dev/null
@@ -1,924 +0,0 @@
-require "spec_helper"
-
-describe "the lockfile format" do
-  include Bundler::GemHelpers
-
-  it "generates a simple lockfile for a single source, gem" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "rack"
-    G
-
-    lockfile_should_be <<-G
-      GEM
-        remote: file:#{gem_repo1}/
-        specs:
-          rack (1.0.0)
-
-      PLATFORMS
-        #{generic(Gem::Platform.local)}
-
-      DEPENDENCIES
-        rack
-    G
-  end
-
-  it "generates a simple lockfile for a single source, gem with dependencies" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "rack-obama"
-    G
-
-    lockfile_should_be <<-G
-      GEM
-        remote: file:#{gem_repo1}/
-        specs:
-          rack (1.0.0)
-          rack-obama (1.0)
-            rack
-
-      PLATFORMS
-        #{generic(Gem::Platform.local)}
-
-      DEPENDENCIES
-        rack-obama
-    G
-  end
-
-  it "generates a simple lockfile for a single source, gem with a version requirement" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "rack-obama", ">= 1.0"
-    G
-
-    lockfile_should_be <<-G
-      GEM
-        remote: file:#{gem_repo1}/
-        specs:
-          rack (1.0.0)
-          rack-obama (1.0)
-            rack
-
-      PLATFORMS
-        #{generic(Gem::Platform.local)}
-
-      DEPENDENCIES
-        rack-obama (>= 1.0)
-    G
-  end
-
-  it "generates a lockfile wihout credentials for a configured source" do
-    bundle "config http://localgemserver.test/ user:pass"
-
-    install_gemfile(<<-G, :artifice => "endpoint_strict_basic_authentication", :quiet => true)
-      source "http://localgemserver.test/"
-
-      gem "rack-obama", ">= 1.0"
-    G
-
-    lockfile_should_be <<-G
-      GEM
-        remote: http://localgemserver.test/
-        specs:
-          rack (1.0.0)
-          rack-obama (1.0)
-            rack
-
-      PLATFORMS
-        #{generic(Gem::Platform.local)}
-
-      DEPENDENCIES
-        rack-obama (>= 1.0)
-    G
-  end
-
-  it "generates lockfiles with multiple requirements" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "net-sftp"
-    G
-
-    lockfile_should_be <<-G
-      GEM
-        remote: file:#{gem_repo1}/
-        specs:
-          net-sftp (1.1.1)
-            net-ssh (>= 1.0.0, < 1.99.0)
-          net-ssh (1.0)
-
-      PLATFORMS
-        ruby
-
-      DEPENDENCIES
-        net-sftp
-    G
-
-    should_be_installed "net-sftp 1.1.1", "net-ssh 1.0.0"
-  end
-
-  it "generates a simple lockfile for a single pinned source, gem with a version requirement" do
-    git = build_git "foo"
-
-    install_gemfile <<-G
-      gem "foo", :git => "#{lib_path("foo-1.0")}"
-    G
-
-    lockfile_should_be <<-G
-      GIT
-        remote: #{lib_path("foo-1.0")}
-        revision: #{git.ref_for('master')}
-        specs:
-          foo (1.0)
-
-      GEM
-        specs:
-
-      PLATFORMS
-        #{generic(Gem::Platform.local)}
-
-      DEPENDENCIES
-        foo!
-    G
-  end
-
-  it "does not asplode when a platform specific dependency is present and the Gemfile has not been resolved on that platform" do
-    build_lib "omg", :path => lib_path('omg')
-
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      platforms :#{not_local_tag} do
-        gem "omg", :path => "#{lib_path('omg')}"
-      end
-
-      gem "rack"
-    G
-
-    lockfile <<-L
-      GIT
-        remote: git://github.com/nex3/haml.git
-        revision: 8a2271f
-        specs:
-
-      GEM
-        remote: file://#{gem_repo1}/
-        specs:
-          rack (1.0.0)
-
-      PLATFORMS
-        #{not_local}
-
-      DEPENDENCIES
-        omg!
-        rack
-    L
-
-    bundle "install"
-    should_be_installed "rack 1.0.0"
-  end
-
-  it "serializes global git sources" do
-    git = build_git "foo"
-
-    install_gemfile <<-G
-      git "#{lib_path('foo-1.0')}" do
-        gem "foo"
-      end
-    G
-
-    lockfile_should_be <<-G
-      GIT
-        remote: #{lib_path('foo-1.0')}
-        revision: #{git.ref_for('master')}
-        specs:
-          foo (1.0)
-
-      GEM
-        specs:
-
-      PLATFORMS
-        #{generic(Gem::Platform.local)}
-
-      DEPENDENCIES
-        foo!
-    G
-  end
-
-  it "generates a lockfile with a ref for a single pinned source, git gem with a branch requirement" do
-    git = build_git "foo"
-    update_git "foo", :branch => "omg"
-
-    install_gemfile <<-G
-      gem "foo", :git => "#{lib_path("foo-1.0")}", :branch => "omg"
-    G
-
-    lockfile_should_be <<-G
-      GIT
-        remote: #{lib_path("foo-1.0")}
-        revision: #{git.ref_for('omg')}
-        branch: omg
-        specs:
-          foo (1.0)
-
-      GEM
-        specs:
-
-      PLATFORMS
-        #{generic(Gem::Platform.local)}
-
-      DEPENDENCIES
-        foo!
-    G
-  end
-
-  it "generates a lockfile with a ref for a single pinned source, git gem with a tag requirement" do
-    git = build_git "foo"
-    update_git "foo", :tag => "omg"
-
-    install_gemfile <<-G
-      gem "foo", :git => "#{lib_path("foo-1.0")}", :tag => "omg"
-    G
-
-    lockfile_should_be <<-G
-      GIT
-        remote: #{lib_path("foo-1.0")}
-        revision: #{git.ref_for('omg')}
-        tag: omg
-        specs:
-          foo (1.0)
-
-      GEM
-        specs:
-
-      PLATFORMS
-        #{generic(Gem::Platform.local)}
-
-      DEPENDENCIES
-        foo!
-    G
-  end
-
-  it "serializes pinned path sources to the lockfile" do
-    build_lib "foo"
-
-    install_gemfile <<-G
-      gem "foo", :path => "#{lib_path("foo-1.0")}"
-    G
-
-    lockfile_should_be <<-G
-      PATH
-        remote: #{lib_path("foo-1.0")}
-        specs:
-          foo (1.0)
-
-      GEM
-        specs:
-
-      PLATFORMS
-        #{generic(Gem::Platform.local)}
-
-      DEPENDENCIES
-        foo!
-    G
-  end
-
-  it "sorts serialized sources by type" do
-    build_lib "foo"
-    bar = build_git "bar"
-
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "rack"
-      gem "foo", :path => "#{lib_path("foo-1.0")}"
-      gem "bar", :git => "#{lib_path("bar-1.0")}"
-    G
-
-    lockfile_should_be <<-G
-      GIT
-        remote: #{lib_path("bar-1.0")}
-        revision: #{bar.ref_for('master')}
-        specs:
-          bar (1.0)
-
-      PATH
-        remote: #{lib_path("foo-1.0")}
-        specs:
-          foo (1.0)
-
-      GEM
-        remote: file:#{gem_repo1}/
-        specs:
-          rack (1.0.0)
-
-      PLATFORMS
-        #{generic(Gem::Platform.local)}
-
-      DEPENDENCIES
-        bar!
-        foo!
-        rack
-    G
-  end
-
-  it "lists gems alphabetically" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "thin"
-      gem "actionpack"
-      gem "rack-obama"
-    G
-
-    lockfile_should_be <<-G
-      GEM
-        remote: file:#{gem_repo1}/
-        specs:
-          actionpack (2.3.2)
-            activesupport (= 2.3.2)
-          activesupport (2.3.2)
-          rack (1.0.0)
-          rack-obama (1.0)
-            rack
-          thin (1.0)
-            rack
-
-      PLATFORMS
-        #{generic(Gem::Platform.local)}
-
-      DEPENDENCIES
-        actionpack
-        rack-obama
-        thin
-    G
-  end
-
-  it "orders dependencies' dependencies in alphabetical order" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "rails"
-    G
-
-    lockfile_should_be <<-G
-      GEM
-        remote: file:#{gem_repo1}/
-        specs:
-          actionmailer (2.3.2)
-            activesupport (= 2.3.2)
-          actionpack (2.3.2)
-            activesupport (= 2.3.2)
-          activerecord (2.3.2)
-            activesupport (= 2.3.2)
-          activeresource (2.3.2)
-            activesupport (= 2.3.2)
-          activesupport (2.3.2)
-          rails (2.3.2)
-            actionmailer (= 2.3.2)
-            actionpack (= 2.3.2)
-            activerecord (= 2.3.2)
-            activeresource (= 2.3.2)
-            rake (= 10.0.2)
-          rake (10.0.2)
-
-      PLATFORMS
-        #{generic(Gem::Platform.local)}
-
-      DEPENDENCIES
-        rails
-    G
-  end
-
-  it "orders dependencies by version" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem 'double_deps'
-    G
-
-    lockfile_should_be <<-G
-      GEM
-        remote: file:#{gem_repo1}/
-        specs:
-          double_deps (1.0)
-            net-ssh
-            net-ssh (>= 1.0.0)
-          net-ssh (1.0)
-
-      PLATFORMS
-        #{generic(Gem::Platform.local)}
-
-      DEPENDENCIES
-        double_deps
-    G
-  end
-
-  it "does not add the :require option to the lockfile" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "rack-obama", ">= 1.0", :require => "rack/obama"
-    G
-
-    lockfile_should_be <<-G
-      GEM
-        remote: file:#{gem_repo1}/
-        specs:
-          rack (1.0.0)
-          rack-obama (1.0)
-            rack
-
-      PLATFORMS
-        #{generic(Gem::Platform.local)}
-
-      DEPENDENCIES
-        rack-obama (>= 1.0)
-    G
-  end
-
-  it "does not add the :group option to the lockfile" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "rack-obama", ">= 1.0", :group => :test
-    G
-
-    lockfile_should_be <<-G
-      GEM
-        remote: file:#{gem_repo1}/
-        specs:
-          rack (1.0.0)
-          rack-obama (1.0)
-            rack
-
-      PLATFORMS
-        #{generic(Gem::Platform.local)}
-
-      DEPENDENCIES
-        rack-obama (>= 1.0)
-    G
-  end
-
-  it "stores relative paths when the path is provided in a relative fashion and in Gemfile dir" do
-    build_lib "foo", :path => bundled_app('foo')
-
-    install_gemfile <<-G
-      path "foo"
-      gem "foo"
-    G
-
-    lockfile_should_be <<-G
-      PATH
-        remote: foo
-        specs:
-          foo (1.0)
-
-      GEM
-        specs:
-
-      PLATFORMS
-        #{generic(Gem::Platform.local)}
-
-      DEPENDENCIES
-        foo
-    G
-  end
-
-  it "stores relative paths when the path is provided in a relative fashion and is above Gemfile dir" do
-    build_lib "foo", :path => bundled_app(File.join('..', 'foo'))
-
-    install_gemfile <<-G
-      path "../foo"
-      gem "foo"
-    G
-
-    lockfile_should_be <<-G
-      PATH
-        remote: ../foo
-        specs:
-          foo (1.0)
-
-      GEM
-        specs:
-
-      PLATFORMS
-        #{generic(Gem::Platform.local)}
-
-      DEPENDENCIES
-        foo
-    G
-  end
-
-  it "stores relative paths when the path is provided in an absolute fashion but is relative" do
-    build_lib "foo", :path => bundled_app('foo')
-
-    install_gemfile <<-G
-      path File.expand_path("../foo", __FILE__)
-      gem "foo"
-    G
-
-    lockfile_should_be <<-G
-      PATH
-        remote: foo
-        specs:
-          foo (1.0)
-
-      GEM
-        specs:
-
-      PLATFORMS
-        #{generic(Gem::Platform.local)}
-
-      DEPENDENCIES
-        foo
-    G
-  end
-
-  it "stores relative paths when the path is provided for gemspec" do
-    build_lib("foo", :path => tmp.join("foo"))
-
-    install_gemfile <<-G
-      gemspec :path => "../foo"
-    G
-
-    lockfile_should_be <<-G
-      PATH
-        remote: ../foo
-        specs:
-          foo (1.0)
-
-      GEM
-        specs:
-
-      PLATFORMS
-        #{generic(Gem::Platform.local)}
-
-      DEPENDENCIES
-        foo!
-    G
-  end
-
-  it "keeps existing platforms in the lockfile" do
-    lockfile <<-G
-      GEM
-        remote: file:#{gem_repo1}/
-        specs:
-          rack (1.0.0)
-
-      PLATFORMS
-        java
-
-      DEPENDENCIES
-        rack
-    G
-
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      gem "rack"
-    G
-
-    platforms = ['java', generic(Gem::Platform.local).to_s].sort
-
-    lockfile_should_be <<-G
-      GEM
-        remote: file:#{gem_repo1}/
-        specs:
-          rack (1.0.0)
-
-      PLATFORMS
-        #{platforms[0]}
-        #{platforms[1]}
-
-      DEPENDENCIES
-        rack
-    G
-  end
-
-  it "persists the spec's platform to the lockfile" do
-    build_gem "platform_specific", "1.0.0", :to_system => true do |s|
-      s.platform = Gem::Platform.new('universal-java-16')
-    end
-
-    simulate_platform "universal-java-16"
-
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "platform_specific"
-    G
-
-    lockfile_should_be <<-G
-      GEM
-        remote: file:#{gem_repo1}/
-        specs:
-          platform_specific (1.0-java)
-
-      PLATFORMS
-        java
-
-      DEPENDENCIES
-        platform_specific
-    G
-  end
-
-  it "does not add duplicate gems" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack"
-    G
-
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack"
-      gem "activesupport"
-    G
-
-    lockfile_should_be <<-G
-      GEM
-        remote: file:#{gem_repo1}/
-        specs:
-          activesupport (2.3.5)
-          rack (1.0.0)
-
-      PLATFORMS
-        ruby
-
-      DEPENDENCIES
-        activesupport
-        rack
-    G
-  end
-
-  it "does not add duplicate dependencies" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack"
-      gem "rack"
-    G
-
-    lockfile_should_be <<-G
-      GEM
-        remote: file:#{gem_repo1}/
-        specs:
-          rack (1.0.0)
-
-      PLATFORMS
-        ruby
-
-      DEPENDENCIES
-        rack
-    G
-  end
-
-  it "does not add duplicate dependencies with versions" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack", "1.0"
-      gem "rack", "1.0"
-    G
-
-    lockfile_should_be <<-G
-      GEM
-        remote: file:#{gem_repo1}/
-        specs:
-          rack (1.0.0)
-
-      PLATFORMS
-        ruby
-
-      DEPENDENCIES
-        rack (= 1.0)
-    G
-  end
-
-  it "does not add duplicate dependencies in different groups" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack", "1.0", :group => :one
-      gem "rack", "1.0", :group => :two
-    G
-
-    lockfile_should_be <<-G
-      GEM
-        remote: file:#{gem_repo1}/
-        specs:
-          rack (1.0.0)
-
-      PLATFORMS
-        ruby
-
-      DEPENDENCIES
-        rack (= 1.0)
-    G
-  end
-
-  it "raises if two different versions are used" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack", "1.0"
-      gem "rack", "1.1"
-    G
-
-    expect(bundled_app("Gemfile.lock")).not_to exist
-    expect(out).to include "rack (= 1.0) and rack (= 1.1)"
-  end
-
-
-  it "raises if two different sources are used" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack"
-      gem "rack", :git => "git://hubz.com"
-    G
-
-    expect(bundled_app("Gemfile.lock")).not_to exist
-    expect(out).to include "rack (>= 0) should come from an unspecified source and git://hubz.com (at master)"
-  end
-
-  it "works correctly with multiple version dependencies" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack", "> 0.9", "< 1.0"
-    G
-
-    lockfile_should_be <<-G
-      GEM
-        remote: file:#{gem_repo1}/
-        specs:
-          rack (0.9.1)
-
-      PLATFORMS
-        ruby
-
-      DEPENDENCIES
-        rack (> 0.9, < 1.0)
-    G
-
-  end
-
-  # Some versions of the Bundler 1.1 RC series introduced corrupted
-  # lockfiles. There were two major problems:
-  #
-  # * multiple copies of the same GIT section appeared in the lockfile
-  # * when this happened, those sections got multiple copies of gems
-  #   in those sections.
-  it "fixes corrupted lockfiles" do
-    build_git "omg", :path => lib_path('omg')
-    revision = revision_for(lib_path('omg'))
-
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "omg", :git => "#{lib_path('omg')}", :branch => 'master'
-    G
-
-    bundle "install --path vendor"
-    should_be_installed "omg 1.0"
-
-    # Create a Gemfile.lock that has duplicate GIT sections
-    lockfile <<-L
-      GIT
-        remote: #{lib_path('omg')}
-        revision: #{revision}
-        branch: master
-        specs:
-          omg (1.0)
-
-      GIT
-        remote: #{lib_path('omg')}
-        revision: #{revision}
-        branch: master
-        specs:
-          omg (1.0)
-
-      GEM
-        remote: file:#{gem_repo1}/
-        specs:
-
-      PLATFORMS
-        #{local}
-
-      DEPENDENCIES
-        omg!
-    L
-
-    FileUtils.rm_rf(bundled_app('vendor'))
-    bundle "install"
-    should_be_installed "omg 1.0"
-
-    # Confirm that duplicate specs do not appear
-    expect(File.read(bundled_app('Gemfile.lock'))).to eq(strip_whitespace(<<-L))
-      GIT
-        remote: #{lib_path('omg')}
-        revision: #{revision}
-        branch: master
-        specs:
-          omg (1.0)
-
-      GEM
-        remote: file:#{gem_repo1}/
-        specs:
-
-      PLATFORMS
-        #{local}
-
-      DEPENDENCIES
-        omg!
-    L
-  end
-
-  describe "a line ending" do
-    def set_lockfile_mtime_to_known_value
-      time = Time.local(2000, 1, 1, 0, 0, 0)
-      File.utime(time, time, bundled_app('Gemfile.lock'))
-    end
-    before(:each) do
-      build_repo2
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "rack"
-      G
-      set_lockfile_mtime_to_known_value
-    end
-
-    it "generates Gemfile.lock with \\n line endings" do
-      expect(File.read(bundled_app("Gemfile.lock"))).not_to match("\r\n")
-      should_be_installed "rack 1.0"
-    end
-
-    context "during updates" do
-
-      it "preserves Gemfile.lock \\n line endings" do
-        update_repo2
-
-        expect { bundle "update" }.to change { File.mtime(bundled_app('Gemfile.lock')) }
-        expect(File.read(bundled_app("Gemfile.lock"))).not_to match("\r\n")
-        should_be_installed "rack 1.2"
-      end
-
-      it "preserves Gemfile.lock \\n\\r line endings" do
-        update_repo2
-        win_lock = File.read(bundled_app("Gemfile.lock")).gsub(/\n/, "\r\n")
-        File.open(bundled_app("Gemfile.lock"), "wb"){|f| f.puts(win_lock) }
-        set_lockfile_mtime_to_known_value
-
-        expect { bundle "update" }.to change { File.mtime(bundled_app('Gemfile.lock')) }
-        expect(File.read(bundled_app("Gemfile.lock"))).to match("\r\n")
-        should_be_installed "rack 1.2"
-      end
-    end
-
-    context "when nothing changes" do
-
-      it "preserves Gemfile.lock \\n line endings" do
-        expect { ruby <<-RUBY
-                   require 'rubygems'
-                   require 'bundler'
-                   Bundler.setup
-                 RUBY
-               }.not_to change { File.mtime(bundled_app('Gemfile.lock')) }
-      end
-
-      it "preserves Gemfile.lock \\n\\r line endings" do
-        win_lock = File.read(bundled_app("Gemfile.lock")).gsub(/\n/, "\r\n")
-        File.open(bundled_app("Gemfile.lock"), "wb"){|f| f.puts(win_lock) }
-        set_lockfile_mtime_to_known_value
-
-        expect { ruby <<-RUBY
-                   require 'rubygems'
-                   require 'bundler'
-                   Bundler.setup
-                 RUBY
-               }.not_to change { File.mtime(bundled_app('Gemfile.lock')) }
-      end
-    end
-  end
-
-  it "refuses to install if Gemfile.lock contains conflict markers" do
-    lockfile <<-L
-      GEM
-        remote: file://#{gem_repo1}/
-        specs:
-      <<<<<<<
-          rack (1.0.0)
-      =======
-          rack (1.0.1)
-      >>>>>>>
-
-      PLATFORMS
-        ruby
-
-      DEPENDENCIES
-        rack
-    L
-
-    error = install_gemfile(<<-G, :expect_err => true)
-      source "file://#{gem_repo1}"
-      gem "rack"
-    G
-
-    expect(error).to match(/your Gemfile.lock contains merge conflicts/i)
-    expect(error).to match(/git checkout HEAD -- Gemfile.lock/i)
-  end
-end
diff --git a/spec/other/bundle_ruby_spec.rb b/spec/other/bundle_ruby_spec.rb
deleted file mode 100644
index 08d24ee..0000000
--- a/spec/other/bundle_ruby_spec.rb
+++ /dev/null
@@ -1,142 +0,0 @@
-require "spec_helper"
-
-describe "bundle_ruby" do
-  context "without patchlevel" do
-    it "returns the ruby version" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        ruby "1.9.3", :engine => 'ruby', :engine_version => '1.9.3'
-
-        gem "foo"
-      G
-
-      bundle_ruby
-
-      expect(out).to eq("ruby 1.9.3")
-    end
-
-    it "engine defaults to MRI" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        ruby "1.9.3"
-
-        gem "foo"
-      G
-
-      bundle_ruby
-
-      expect(out).to eq("ruby 1.9.3")
-    end
-
-    it "handles jruby" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        ruby "1.8.7", :engine => 'jruby', :engine_version => '1.6.5'
-
-        gem "foo"
-      G
-
-      bundle_ruby
-
-      expect(out).to eq("ruby 1.8.7 (jruby 1.6.5)")
-    end
-
-    it "handles rbx" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        ruby "1.8.7", :engine => 'rbx', :engine_version => '1.2.4'
-
-        gem "foo"
-      G
-
-      bundle_ruby
-
-      expect(out).to eq("ruby 1.8.7 (rbx 1.2.4)")
-    end
-
-    it "raises an error if engine is used but engine version is not" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        ruby "1.8.7", :engine => 'rbx'
-
-        gem "foo"
-      G
-
-      bundle_ruby :exitstatus => true
-      expect(exitstatus).not_to eq(0)
-
-      bundle_ruby
-      expect(out).to eq("Please define :engine_version")
-    end
-
-    it "raises an error if engine_version is used but engine is not" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        ruby "1.8.7", :engine_version => '1.2.4'
-
-        gem "foo"
-      G
-
-      bundle_ruby :exitstatus => true
-      expect(exitstatus).not_to eq(0)
-
-      bundle_ruby
-      expect(out).to eq("Please define :engine")
-    end
-
-    it "raises an error if engine version doesn't match ruby version for MRI" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        ruby "1.8.7", :engine => 'ruby', :engine_version => '1.2.4'
-
-        gem "foo"
-      G
-
-      bundle_ruby :exitstatus => true
-      expect(exitstatus).not_to eq(0)
-
-      bundle_ruby
-      expect(out).to eq("ruby_version must match the :engine_version for MRI")
-    end
-
-    it "should print if no ruby version is specified" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-
-        gem "foo"
-      G
-
-      bundle_ruby
-
-      expect(out).to eq("No ruby version specified")
-    end
-  end
-
-  context "when using patchlevel" do
-    it "returns the ruby version" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        ruby "1.9.3", :patchlevel => '429', :engine => 'ruby', :engine_version => '1.9.3'
-
-        gem "foo"
-      G
-
-      bundle_ruby
-
-      expect(out).to eq("ruby 1.9.3p429")
-    end
-
-    it "handles an engine" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        ruby "1.9.3", :patchlevel => '392', :engine => 'jruby', :engine_version => '1.7.4'
-
-        gem "foo"
-      G
-
-      bundle_ruby
-
-      expect(out).to eq("ruby 1.9.3p392 (jruby 1.7.4)")
-    end
-  end
-end
diff --git a/spec/other/cli_dispatch_spec.rb b/spec/other/cli_dispatch_spec.rb
deleted file mode 100644
index f03c4ce..0000000
--- a/spec/other/cli_dispatch_spec.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-require "spec_helper"
-
-describe "bundle command names" do
-  it "work when given fully" do
-    bundle "install"
-    expect(err).to eq("")
-    expect(out).not_to match(/Ambiguous command/)
-  end
-
-  it "work when not ambiguous" do
-    bundle "ins"
-    expect(err).to eq("")
-    expect(out).not_to match(/Ambiguous command/)
-  end
-
-  it "print a friendly error when ambiguous" do
-    bundle "i"
-    expect(err).to eq("")
-    expect(out).to match(/Ambiguous command/)
-  end
-end
diff --git a/spec/other/ext_spec.rb b/spec/other/ext_spec.rb
deleted file mode 100644
index cbee163..0000000
--- a/spec/other/ext_spec.rb
+++ /dev/null
@@ -1,60 +0,0 @@
-require 'spec_helper'
-
-describe "Gem::Specification#match_platform" do
-  it "does not match platforms other than the gem platform" do
-    darwin = gem "lol", "1.0", "platform_specific-1.0-x86-darwin-10"
-    expect(darwin.match_platform(pl('java'))).to eq(false)
-  end
-end
-
-describe "Bundler::GemHelpers#generic" do
-  include Bundler::GemHelpers
-
-  it "converts non-windows platforms into ruby" do
-    expect(generic(pl('x86-darwin-10'))).to eq(pl('ruby'))
-    expect(generic(pl('ruby'))).to eq(pl('ruby'))
-  end
-
-  it "converts java platform variants into java" do
-    expect(generic(pl('universal-java-17'))).to eq(pl('java'))
-    expect(generic(pl('java'))).to eq(pl('java'))
-  end
-
-  it "converts mswin platform variants into x86-mswin32" do
-    expect(generic(pl('mswin32'))).to eq(pl('x86-mswin32'))
-    expect(generic(pl('i386-mswin32'))).to eq(pl('x86-mswin32'))
-    expect(generic(pl('x86-mswin32'))).to eq(pl('x86-mswin32'))
-  end
-
-  it "converts 32-bit mingw platform variants into x86-mingw32" do
-    expect(generic(pl('mingw32'))).to eq(pl('x86-mingw32'))
-    expect(generic(pl('i386-mingw32'))).to eq(pl('x86-mingw32'))
-    expect(generic(pl('x86-mingw32'))).to eq(pl('x86-mingw32'))
-  end
-
-  it "converts 64-bit mingw platform variants into x64-mingw32" do
-    expect(generic(pl('x64-mingw32'))).to eq(pl('x64-mingw32'))
-    expect(generic(pl('x86_64-mingw32'))).to eq(pl('x64-mingw32'))
-  end
-end
-
-describe "Gem::SourceIndex#refresh!" do
-  rubygems_1_7 = Gem::Version.new(Gem::VERSION) >= Gem::Version.new("1.7.0")
-
-  before do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack"
-    G
-  end
-
-  it "does not explode when called", :if => rubygems_1_7 do
-    run "Gem.source_index.refresh!"
-    run "Gem::SourceIndex.new([]).refresh!"
-  end
-
-  it "does not explode when called", :unless => rubygems_1_7 do
-    run "Gem.source_index.refresh!"
-    run "Gem::SourceIndex.from_gems_in([]).refresh!"
-  end
-end
diff --git a/spec/other/platform_spec.rb b/spec/other/platform_spec.rb
deleted file mode 100644
index 619b5c7..0000000
--- a/spec/other/platform_spec.rb
+++ /dev/null
@@ -1,1285 +0,0 @@
-require "spec_helper"
-
-describe "bundle platform" do
-  context "without flags" do
-    it "returns all the output" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-
-        #{ruby_version_correct}
-
-        gem "foo"
-      G
-
-      bundle "platform"
-      expect(out).to eq(<<-G.chomp)
-Your platform is: #{RUBY_PLATFORM}
-
-Your app has gems that work on these platforms:
-* ruby
-
-Your Gemfile specifies a Ruby version requirement:
-* ruby #{RUBY_VERSION}
-
-Your current platform satisfies the Ruby version requirement.
-G
-    end
-
-    it "returns all the output including the patchlevel" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-
-        #{ruby_version_correct_patchlevel}
-
-        gem "foo"
-      G
-
-      bundle "platform"
-      expect(out).to eq(<<-G.chomp)
-Your platform is: #{RUBY_PLATFORM}
-
-Your app has gems that work on these platforms:
-* ruby
-
-Your Gemfile specifies a Ruby version requirement:
-* ruby #{RUBY_VERSION}p#{RUBY_PATCHLEVEL}
-
-Your current platform satisfies the Ruby version requirement.
-G
-    end
-
-    it "doesn't print ruby version requirement if it isn't specified" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-
-        gem "foo"
-      G
-
-      bundle "platform"
-      expect(out).to eq(<<-G.chomp)
-Your platform is: #{RUBY_PLATFORM}
-
-Your app has gems that work on these platforms:
-* ruby
-
-Your Gemfile does not specify a Ruby version requirement.
-G
-    end
-
-    it "doesn't match the ruby version requirement" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-
-        #{ruby_version_incorrect}
-
-        gem "foo"
-      G
-
-      bundle "platform"
-      expect(out).to eq(<<-G.chomp)
-Your platform is: #{RUBY_PLATFORM}
-
-Your app has gems that work on these platforms:
-* ruby
-
-Your Gemfile specifies a Ruby version requirement:
-* ruby #{not_local_ruby_version}
-
-Your Ruby version is #{RUBY_VERSION}, but your Gemfile specified #{not_local_ruby_version}
-G
-    end
-  end
-
-  context "--ruby" do
-    it "returns ruby version when explicit" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        ruby "1.9.3", :engine => 'ruby', :engine_version => '1.9.3'
-
-        gem "foo"
-      G
-
-      bundle "platform --ruby"
-
-      expect(out).to eq("ruby 1.9.3")
-    end
-
-    it "defaults to MRI" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        ruby "1.9.3"
-
-        gem "foo"
-      G
-
-      bundle "platform --ruby"
-
-      expect(out).to eq("ruby 1.9.3")
-    end
-
-    it "handles jruby" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        ruby "1.8.7", :engine => 'jruby', :engine_version => '1.6.5'
-
-        gem "foo"
-      G
-
-      bundle "platform --ruby"
-
-      expect(out).to eq("ruby 1.8.7 (jruby 1.6.5)")
-    end
-
-    it "handles rbx" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        ruby "1.8.7", :engine => 'rbx', :engine_version => '1.2.4'
-
-        gem "foo"
-      G
-
-      bundle "platform --ruby"
-
-      expect(out).to eq("ruby 1.8.7 (rbx 1.2.4)")
-    end
-
-    it "raises an error if engine is used but engine version is not" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        ruby "1.8.7", :engine => 'rbx'
-
-        gem "foo"
-      G
-
-      bundle "platform", :exitstatus => true
-
-      expect(exitstatus).not_to eq(0)
-    end
-
-    it "raises an error if engine_version is used but engine is not" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        ruby "1.8.7", :engine_version => '1.2.4'
-
-        gem "foo"
-      G
-
-      bundle "platform", :exitstatus => true
-
-      expect(exitstatus).not_to eq(0)
-    end
-
-    it "raises an error if engine version doesn't match ruby version for MRI" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        ruby "1.8.7", :engine => 'ruby', :engine_version => '1.2.4'
-
-        gem "foo"
-      G
-
-      bundle "platform", :exitstatus => true
-
-      expect(exitstatus).not_to eq(0)
-    end
-
-    it "should print if no ruby version is specified" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-
-        gem "foo"
-      G
-
-      bundle "platform --ruby"
-      puts err
-
-      expect(out).to eq("No ruby version specified")
-    end
-  end
-
-  let(:ruby_version_correct) { "ruby \"#{RUBY_VERSION}\", :engine => \"#{local_ruby_engine}\", :engine_version => \"#{local_engine_version}\"" }
-  let(:ruby_version_correct_engineless) { "ruby \"#{RUBY_VERSION}\"" }
-  let(:ruby_version_correct_patchlevel) { "#{ruby_version_correct}, :patchlevel => '#{RUBY_PATCHLEVEL}'" }
-  let(:ruby_version_incorrect) { "ruby \"#{not_local_ruby_version}\", :engine => \"#{local_ruby_engine}\", :engine_version => \"#{not_local_ruby_version}\"" }
-  let(:engine_incorrect) { "ruby \"#{RUBY_VERSION}\", :engine => \"#{not_local_tag}\", :engine_version => \"#{RUBY_VERSION}\"" }
-  let(:engine_version_incorrect) { "ruby \"#{RUBY_VERSION}\", :engine => \"#{local_ruby_engine}\", :engine_version => \"#{not_local_engine_version}\"" }
-  let(:patchlevel_incorrect) { "#{ruby_version_correct}, :patchlevel => '#{not_local_patchlevel}'" }
-  let(:patchlevel_fixnum) { "#{ruby_version_correct}, :patchlevel => #{RUBY_PATCHLEVEL}1" }
-
-  def should_be_ruby_version_incorrect(opts = {:exitstatus => true})
-    expect(exitstatus).to eq(18) if opts[:exitstatus]
-    expect(out).to be_include("Your Ruby version is #{RUBY_VERSION}, but your Gemfile specified #{not_local_ruby_version}")
-  end
-
-  def should_be_engine_incorrect(opts = {:exitstatus => true})
-    expect(exitstatus).to eq(18) if opts[:exitstatus]
-    expect(out).to be_include("Your Ruby engine is #{local_ruby_engine}, but your Gemfile specified #{not_local_tag}")
-  end
-
-  def should_be_engine_version_incorrect(opts = {:exitstatus => true})
-    expect(exitstatus).to eq(18) if opts[:exitstatus]
-    expect(out).to be_include("Your #{local_ruby_engine} version is #{local_engine_version}, but your Gemfile specified #{local_ruby_engine} #{not_local_engine_version}")
-  end
-
-  def should_be_patchlevel_incorrect(opts = {:exitstatus => true})
-    expect(exitstatus).to eq(18) if opts[:exitstatus]
-
-    expect(out).to be_include("Your Ruby patchlevel is #{RUBY_PATCHLEVEL}, but your Gemfile specified #{not_local_patchlevel}")
-  end
-
-  def should_be_patchlevel_fixnum(opts = {:exitstatus => true})
-    expect(exitstatus).to eq(18) if opts[:exitstatus]
-
-    expect(out).to be_include("The Ruby patchlevel in your Gemfile must be a string")
-  end
-
-  context "bundle install" do
-    it "installs fine when the ruby version matches" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-
-        #{ruby_version_correct}
-      G
-
-      expect(bundled_app('Gemfile.lock')).to exist
-    end
-
-    it "installs fine with any engine" do
-      simulate_ruby_engine "jruby" do
-        install_gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "rack"
-
-          #{ruby_version_correct_engineless}
-        G
-
-        expect(bundled_app('Gemfile.lock')).to exist
-      end
-    end
-
-    it "installs fine when the patchlevel matches" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-
-        #{ruby_version_correct_patchlevel}
-      G
-
-      expect(bundled_app('Gemfile.lock')).to exist
-    end
-
-    it "doesn't install when the ruby version doesn't match" do
-      install_gemfile <<-G, :exitstatus => true
-        source "file://#{gem_repo1}"
-        gem "rack"
-
-        #{ruby_version_incorrect}
-      G
-
-      expect(bundled_app('Gemfile.lock')).not_to exist
-      should_be_ruby_version_incorrect
-    end
-
-    it "doesn't install when engine doesn't match" do
-      install_gemfile <<-G, :exitstatus => true
-        source "file://#{gem_repo1}"
-        gem "rack"
-
-        #{engine_incorrect}
-      G
-
-      expect(bundled_app('Gemfile.lock')).not_to exist
-      should_be_engine_incorrect
-    end
-
-    it "doesn't install when engine version doesn't match" do
-      simulate_ruby_engine "jruby" do
-        install_gemfile <<-G, :exitstatus => true
-          source "file://#{gem_repo1}"
-          gem "rack"
-
-          #{engine_version_incorrect}
-        G
-
-        expect(bundled_app('Gemfile.lock')).not_to exist
-        should_be_engine_version_incorrect
-      end
-    end
-
-    it "doesn't install when patchlevel doesn't match" do
-      install_gemfile <<-G, :exitstatus => true
-        source "file://#{gem_repo1}"
-        gem "rack"
-
-        #{patchlevel_incorrect}
-      G
-
-      expect(bundled_app('Gemfile.lock')).not_to exist
-      should_be_patchlevel_incorrect
-    end
-  end
-
-  context "bundle check" do
-    it "checks fine when the ruby version matches" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-      G
-
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-
-        #{ruby_version_correct}
-      G
-
-      bundle :check, :exitstatus => true
-      expect(exitstatus).to eq(0)
-      expect(out).to eq("The Gemfile's dependencies are satisfied")
-    end
-
-    it "checks fine with any engine" do
-      simulate_ruby_engine "jruby" do
-        install_gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "rack"
-        G
-
-        gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "rack"
-
-          #{ruby_version_correct_engineless}
-        G
-
-        bundle :check, :exitstatus => true
-        expect(exitstatus).to eq(0)
-        expect(out).to eq("The Gemfile's dependencies are satisfied")
-      end
-    end
-
-    it "fails when ruby version doesn't match" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-      G
-
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-
-        #{ruby_version_incorrect}
-      G
-
-      bundle :check, :exitstatus => true
-      should_be_ruby_version_incorrect
-    end
-
-    it "fails when engine doesn't match" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-      G
-
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-
-        #{engine_incorrect}
-      G
-
-      bundle :check, :exitstatus => true
-      should_be_engine_incorrect
-    end
-
-    it "fails when engine version doesn't match" do
-      simulate_ruby_engine "ruby" do
-        install_gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "rack"
-        G
-
-        gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "rack"
-
-          #{engine_version_incorrect}
-        G
-
-        bundle :check, :exitstatus => true
-        should_be_engine_version_incorrect
-      end
-    end
-
-    it "fails when patchlevel doesn't match" do
-      install_gemfile <<-G, :exitstatus => true
-        source "file://#{gem_repo1}"
-        gem "rack"
-      G
-
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-
-        #{patchlevel_incorrect}
-      G
-
-      bundle :check, :exitstatus => true
-      should_be_patchlevel_incorrect
-    end
-  end
-
-  context "bundle update" do
-    before do
-      build_repo2
-
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "activesupport"
-        gem "rack-obama"
-      G
-    end
-
-    it "updates successfully when the ruby version matches" do
-      gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "activesupport"
-        gem "rack-obama"
-
-        #{ruby_version_correct}
-      G
-      update_repo2 do
-        build_gem "activesupport", "3.0"
-      end
-
-      bundle "update"
-      should_be_installed "rack 1.2", "rack-obama 1.0", "activesupport 3.0"
-    end
-
-    it "updates fine with any engine" do
-      simulate_ruby_engine "jruby" do
-        gemfile <<-G
-          source "file://#{gem_repo2}"
-          gem "activesupport"
-          gem "rack-obama"
-
-          #{ruby_version_correct_engineless}
-        G
-        update_repo2 do
-          build_gem "activesupport", "3.0"
-        end
-
-        bundle "update"
-        should_be_installed "rack 1.2", "rack-obama 1.0", "activesupport 3.0"
-      end
-    end
-
-    it "fails when ruby version doesn't match" do
-      gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "activesupport"
-        gem "rack-obama"
-
-        #{ruby_version_incorrect}
-      G
-      update_repo2 do
-        build_gem "activesupport", "3.0"
-      end
-
-      bundle :update, :exitstatus => true
-      should_be_ruby_version_incorrect
-    end
-
-    it "fails when ruby engine doesn't match" do
-      gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "activesupport"
-        gem "rack-obama"
-
-        #{engine_incorrect}
-      G
-      update_repo2 do
-        build_gem "activesupport", "3.0"
-      end
-
-      bundle :update, :exitstatus => true
-      should_be_engine_incorrect
-    end
-
-    it "fails when ruby engine version doesn't match" do
-      simulate_ruby_engine "jruby" do
-        gemfile <<-G
-          source "file://#{gem_repo2}"
-          gem "activesupport"
-          gem "rack-obama"
-
-          #{engine_version_incorrect}
-        G
-        update_repo2 do
-          build_gem "activesupport", "3.0"
-        end
-
-        bundle :update, :exitstatus => true
-        should_be_engine_version_incorrect
-      end
-    end
-
-    it "fails when patchlevel doesn't match" do
-      gemfile <<-G, :exitstatus => true
-        source "file://#{gem_repo1}"
-        gem "rack"
-
-        #{patchlevel_incorrect}
-      G
-      update_repo2 do
-        build_gem "activesupport", "3.0"
-      end
-
-      bundle :update, :exitstatus => true
-      should_be_patchlevel_incorrect
-    end
-  end
-
-  context "bundle show" do
-    before do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rails"
-      G
-    end
-
-    it "prints path if ruby version is correct" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rails"
-
-        #{ruby_version_correct}
-      G
-
-      bundle "show rails"
-      expect(out).to eq(default_bundle_path('gems', 'rails-2.3.2').to_s)
-    end
-
-    it "prints path if ruby version is correct for any engine" do
-      simulate_ruby_engine "jruby" do
-        gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "rails"
-
-          #{ruby_version_correct_engineless}
-        G
-
-        bundle "show rails"
-        expect(out).to eq(default_bundle_path('gems', 'rails-2.3.2').to_s)
-      end
-    end
-
-    it "fails if ruby version doesn't match" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rails"
-
-        #{ruby_version_incorrect}
-      G
-
-      bundle "show rails", :exitstatus => true
-      should_be_ruby_version_incorrect
-    end
-
-    it "fails if engine doesn't match" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rails"
-
-        #{engine_incorrect}
-      G
-
-      bundle "show rails", :exitstatus => true
-      should_be_engine_incorrect
-    end
-
-    it "fails if engine version doesn't match" do
-      simulate_ruby_engine "jruby" do
-        gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "rails"
-
-          #{engine_version_incorrect}
-        G
-
-        bundle "show rails", :exitstatus => true
-        should_be_engine_version_incorrect
-      end
-    end
-
-    it "fails when patchlevel doesn't match" do
-      gemfile <<-G, :exitstatus => true
-        source "file://#{gem_repo1}"
-        gem "rack"
-
-        #{patchlevel_incorrect}
-      G
-      update_repo2 do
-        build_gem "activesupport", "3.0"
-      end
-
-      bundle "show rails", :exitstatus => true
-      should_be_patchlevel_incorrect
-    end
-  end
-
-  context "bundle cache" do
-    before do
-      gemfile <<-G
-        gem 'rack'
-      G
-
-      system_gems "rack-1.0.0"
-    end
-
-    it "copies the .gem file to vendor/cache when ruby version matches" do
-      gemfile <<-G
-        gem 'rack'
-
-        #{ruby_version_correct}
-      G
-
-      bundle :cache
-      expect(bundled_app("vendor/cache/rack-1.0.0.gem")).to exist
-    end
-
-    it "copies the .gem file to vendor/cache when ruby version matches for any engine" do
-      simulate_ruby_engine "jruby" do
-        gemfile <<-G
-          gem 'rack'
-
-          #{ruby_version_correct_engineless}
-        G
-
-        bundle :cache
-        expect(bundled_app("vendor/cache/rack-1.0.0.gem")).to exist
-      end
-    end
-
-    it "fails if the ruby version doesn't match" do
-      gemfile <<-G
-        gem 'rack'
-
-        #{ruby_version_incorrect}
-      G
-
-      bundle :cache, :exitstatus => true
-      should_be_ruby_version_incorrect
-    end
-
-    it "fails if the engine doesn't match" do
-      gemfile <<-G
-        gem 'rack'
-
-        #{engine_incorrect}
-      G
-
-      bundle :cache, :exitstatus => true
-      should_be_engine_incorrect
-    end
-
-    it "fails if the engine version doesn't match" do
-      simulate_ruby_engine "jruby" do
-        gemfile <<-G
-          gem 'rack'
-
-          #{engine_version_incorrect}
-        G
-
-        bundle :cache, :exitstatus => true
-        should_be_engine_version_incorrect
-      end
-    end
-
-    it "fails when patchlevel doesn't match" do
-      gemfile <<-G, :exitstatus => true
-        source "file://#{gem_repo1}"
-        gem "rack"
-
-        #{patchlevel_incorrect}
-      G
-
-      bundle :cache, :exitstatus => true
-      should_be_patchlevel_incorrect
-    end
-  end
-
-  context "bundle pack" do
-    before do
-      gemfile <<-G
-        gem 'rack'
-      G
-
-      system_gems "rack-1.0.0"
-    end
-
-    it "copies the .gem file to vendor/cache when ruby version matches" do
-      gemfile <<-G
-        gem 'rack'
-
-        #{ruby_version_correct}
-      G
-
-      bundle :pack
-      expect(bundled_app("vendor/cache/rack-1.0.0.gem")).to exist
-    end
-
-    it "copies the .gem file to vendor/cache when ruby version matches any engine" do
-      simulate_ruby_engine "jruby" do
-        gemfile <<-G
-          gem 'rack'
-
-          #{ruby_version_correct_engineless}
-        G
-
-        bundle :pack
-        expect(bundled_app("vendor/cache/rack-1.0.0.gem")).to exist
-      end
-    end
-
-    it "fails if the ruby version doesn't match" do
-      gemfile <<-G
-        gem 'rack'
-
-        #{ruby_version_incorrect}
-      G
-
-      bundle :pack, :exitstatus => true
-      should_be_ruby_version_incorrect
-    end
-
-    it "fails if the engine doesn't match" do
-      gemfile <<-G
-        gem 'rack'
-
-        #{engine_incorrect}
-      G
-
-      bundle :pack, :exitstatus => true
-      should_be_engine_incorrect
-    end
-
-    it "fails if the engine version doesn't match" do
-      simulate_ruby_engine "jruby" do
-        gemfile <<-G
-          gem 'rack'
-
-          #{engine_version_incorrect}
-        G
-
-        bundle :pack, :exitstatus => true
-        should_be_engine_version_incorrect
-      end
-    end
-
-    it "fails when patchlevel doesn't match" do
-      gemfile <<-G, :exitstatus => true
-        source "file://#{gem_repo1}"
-        gem "rack"
-
-        #{patchlevel_incorrect}
-      G
-
-      bundle :pack, :exitstatus => true
-      should_be_patchlevel_incorrect
-    end
-  end
-
-  context "bundle exec" do
-    before do
-      system_gems "rack-1.0.0", "rack-0.9.1"
-    end
-
-    it "activates the correct gem when ruby version matches" do
-      gemfile <<-G
-        gem "rack", "0.9.1"
-
-        #{ruby_version_correct}
-      G
-
-      bundle "exec rackup"
-      expect(out).to eq("0.9.1")
-    end
-
-    it "activates the correct gem when ruby version matches any engine" do
-      simulate_ruby_engine "jruby" do
-        gemfile <<-G
-          gem "rack", "0.9.1"
-
-          #{ruby_version_correct_engineless}
-        G
-
-        bundle "exec rackup"
-        expect(out).to eq("0.9.1")
-      end
-    end
-
-    it "fails when the ruby version doesn't match" do
-      gemfile <<-G
-        gem "rack", "0.9.1"
-
-        #{ruby_version_incorrect}
-      G
-
-      bundle "exec rackup", :exitstatus => true
-      should_be_ruby_version_incorrect
-    end
-
-    it "fails when the engine doesn't match" do
-      gemfile <<-G
-        gem "rack", "0.9.1"
-
-        #{engine_incorrect}
-      G
-
-      bundle "exec rackup", :exitstatus => true
-      should_be_engine_incorrect
-    end
-
-    it "fails when the engine version doesn't match" do
-      simulate_ruby_engine "jruby" do
-        gemfile <<-G
-          gem "rack", "0.9.1"
-
-          #{engine_version_incorrect}
-        G
-
-        bundle "exec rackup", :exitstatus => true
-        should_be_engine_version_incorrect
-      end
-    end
-
-    it "fails when patchlevel doesn't match" do
-      gemfile <<-G, :exitstatus => true
-        source "file://#{gem_repo1}"
-        gem "rack"
-
-        #{patchlevel_incorrect}
-      G
-
-      bundle "exec rackup", :exitstatus => true
-      should_be_patchlevel_incorrect
-    end
-  end
-
-  context "bundle console" do
-    before do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-        gem "activesupport", :group => :test
-        gem "rack_middleware", :group => :development
-      G
-    end
-
-    it "starts IRB with the default group loaded when ruby version matches" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-        gem "activesupport", :group => :test
-        gem "rack_middleware", :group => :development
-
-        #{ruby_version_correct}
-      G
-
-      bundle "console" do |input|
-        input.puts("puts RACK")
-        input.puts("exit")
-      end
-      expect(out).to include("0.9.1")
-    end
-
-    it "starts IRB with the default group loaded when ruby version matches any engine" do
-      simulate_ruby_engine "jruby" do
-        gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "rack"
-          gem "activesupport", :group => :test
-          gem "rack_middleware", :group => :development
-
-          #{ruby_version_correct_engineless}
-        G
-
-        bundle "console" do |input|
-          input.puts("puts RACK")
-          input.puts("exit")
-        end
-        expect(out).to include("0.9.1")
-      end
-    end
-
-    it "fails when ruby version doesn't match" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-        gem "activesupport", :group => :test
-        gem "rack_middleware", :group => :development
-
-        #{ruby_version_incorrect}
-      G
-
-      bundle "console", :exitstatus => true
-      should_be_ruby_version_incorrect
-    end
-
-    it "fails when engine doesn't match" do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-        gem "activesupport", :group => :test
-        gem "rack_middleware", :group => :development
-
-        #{engine_incorrect}
-      G
-
-      bundle "console", :exitstatus => true
-      should_be_engine_incorrect
-    end
-
-    it "fails when engine version doesn't match" do
-      simulate_ruby_engine "jruby" do
-        gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "rack"
-          gem "activesupport", :group => :test
-          gem "rack_middleware", :group => :development
-
-          #{engine_version_incorrect}
-        G
-
-        bundle "console", :exitstatus => true
-        should_be_engine_version_incorrect
-      end
-    end
-
-    it "fails when patchlevel doesn't match" do
-      gemfile <<-G, :exitstatus => true
-        source "file://#{gem_repo1}"
-        gem "rack"
-        gem "activesupport", :group => :test
-        gem "rack_middleware", :group => :development
-
-        #{patchlevel_incorrect}
-      G
-
-      bundle "console", :exitstatus => true
-      should_be_patchlevel_incorrect
-    end
-  end
-
-  context "Bundler.setup" do
-    before do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "yard"
-        gem "rack", :group => :test
-      G
-    end
-
-    it "makes a Gemfile.lock if setup succeeds" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "yard"
-        gem "rack"
-
-        #{ruby_version_correct}
-      G
-
-      File.read(bundled_app("Gemfile.lock"))
-
-      FileUtils.rm(bundled_app("Gemfile.lock"))
-
-      run "1"
-      expect(bundled_app("Gemfile.lock")).to exist
-    end
-
-    it "makes a Gemfile.lock if setup succeeds for any engine" do
-      simulate_ruby_engine "jruby" do
-        install_gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "yard"
-          gem "rack"
-
-          #{ruby_version_correct_engineless}
-        G
-
-        File.read(bundled_app("Gemfile.lock"))
-
-        FileUtils.rm(bundled_app("Gemfile.lock"))
-
-        run "1"
-        expect(bundled_app("Gemfile.lock")).to exist
-      end
-    end
-
-    it "fails when ruby version doesn't match" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "yard"
-        gem "rack"
-
-        #{ruby_version_incorrect}
-      G
-
-      File.read(bundled_app("Gemfile.lock"))
-
-      FileUtils.rm(bundled_app("Gemfile.lock"))
-
-      ruby <<-R
-        require 'rubygems'
-        require 'bundler'
-
-        begin
-          Bundler.setup
-        rescue Bundler::RubyVersionMismatch => e
-          puts e.message
-        end
-      R
-
-      expect(bundled_app("Gemfile.lock")).not_to exist
-      should_be_ruby_version_incorrect(:exitstatus => false)
-    end
-
-    it "fails when engine doesn't match" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "yard"
-        gem "rack"
-
-        #{engine_incorrect}
-      G
-
-      File.read(bundled_app("Gemfile.lock"))
-
-      FileUtils.rm(bundled_app("Gemfile.lock"))
-
-      ruby <<-R
-        require 'rubygems'
-        require 'bundler'
-
-        begin
-          Bundler.setup
-        rescue Bundler::RubyVersionMismatch => e
-          puts e.message
-        end
-      R
-
-      expect(bundled_app("Gemfile.lock")).not_to exist
-      should_be_engine_incorrect(:exitstatus => false)
-    end
-
-    it "fails when engine version doesn't match" do
-      simulate_ruby_engine "jruby" do
-        install_gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "yard"
-          gem "rack"
-
-          #{engine_version_incorrect}
-        G
-
-        File.read(bundled_app("Gemfile.lock"))
-
-        FileUtils.rm(bundled_app("Gemfile.lock"))
-
-        ruby <<-R
-          require 'rubygems'
-          require 'bundler'
-
-          begin
-            Bundler.setup
-          rescue Bundler::RubyVersionMismatch => e
-            puts e.message
-          end
-        R
-
-        expect(bundled_app("Gemfile.lock")).not_to exist
-        should_be_engine_version_incorrect(:exitstatus => false)
-      end
-    end
-
-    it "fails when patchlevel doesn't match" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "yard"
-        gem "rack"
-
-        #{patchlevel_incorrect}
-      G
-
-      puts File.read(bundled_app("Gemfile"))
-      File.read(bundled_app("Gemfile.lock"))
-
-      FileUtils.rm(bundled_app("Gemfile.lock"))
-
-      ruby <<-R
-        require 'rubygems'
-        require 'bundler'
-
-        begin
-          Bundler.setup
-        rescue Bundler::RubyVersionMismatch => e
-          puts e.message
-        end
-      R
-
-      expect(bundled_app("Gemfile.lock")).not_to exist
-      should_be_patchlevel_incorrect(:exitstatus => false)
-    end
-  end
-
-  context "bundle outdated" do
-    before do
-      build_repo2 do
-        build_git "foo", :path => lib_path("foo")
-      end
-
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "activesupport", "2.3.5"
-        gem "foo", :git => "#{lib_path('foo')}"
-      G
-    end
-
-    it "returns list of outdated gems when the ruby version matches" do
-      update_repo2 do
-        build_gem "activesupport", "3.0"
-        update_git "foo", :path => lib_path("foo")
-      end
-
-      gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "activesupport", "2.3.5"
-        gem "foo", :git => "#{lib_path('foo')}"
-
-        #{ruby_version_correct}
-      G
-
-      bundle "outdated"
-      expect(out).to include("activesupport (3.0 > 2.3.5)")
-      expect(out).to include("foo (1.0")
-    end
-
-    it "returns list of outdated gems when the ruby version matches for any engine" do
-      simulate_ruby_engine "jruby" do
-        update_repo2 do
-          build_gem "activesupport", "3.0"
-          update_git "foo", :path => lib_path("foo")
-        end
-
-        gemfile <<-G
-          source "file://#{gem_repo2}"
-          gem "activesupport", "2.3.5"
-          gem "foo", :git => "#{lib_path('foo')}"
-
-          #{ruby_version_correct_engineless}
-        G
-
-        bundle "outdated"
-        expect(out).to include("activesupport (3.0 > 2.3.5)")
-        expect(out).to include("foo (1.0")
-      end
-    end
-
-    it "fails when the ruby version doesn't match" do
-      update_repo2 do
-        build_gem "activesupport", "3.0"
-        update_git "foo", :path => lib_path("foo")
-      end
-
-      gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "activesupport", "2.3.5"
-        gem "foo", :git => "#{lib_path('foo')}"
-
-        #{ruby_version_incorrect}
-      G
-
-      bundle "outdated", :exitstatus => true
-      should_be_ruby_version_incorrect
-    end
-
-    it "fails when the engine doesn't match" do
-      update_repo2 do
-        build_gem "activesupport", "3.0"
-        update_git "foo", :path => lib_path("foo")
-      end
-
-      gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "activesupport", "2.3.5"
-        gem "foo", :git => "#{lib_path('foo')}"
-
-        #{engine_incorrect}
-      G
-
-      bundle "outdated", :exitstatus => true
-      should_be_engine_incorrect
-    end
-
-    it "fails when the engine version doesn't match" do
-      simulate_ruby_engine "jruby" do
-        update_repo2 do
-          build_gem "activesupport", "3.0"
-          update_git "foo", :path => lib_path("foo")
-        end
-
-        gemfile <<-G
-          source "file://#{gem_repo2}"
-          gem "activesupport", "2.3.5"
-          gem "foo", :git => "#{lib_path('foo')}"
-
-          #{engine_version_incorrect}
-        G
-
-        bundle "outdated", :exitstatus => true
-        should_be_engine_version_incorrect
-      end
-    end
-
-    it "fails when the patchlevel doesn't match" do
-      simulate_ruby_engine "jruby" do
-        update_repo2 do
-          build_gem "activesupport", "3.0"
-          update_git "foo", :path => lib_path("foo")
-        end
-
-        gemfile <<-G
-          source "file://#{gem_repo2}"
-          gem "activesupport", "2.3.5"
-          gem "foo", :git => "#{lib_path('foo')}"
-
-          #{patchlevel_incorrect}
-        G
-
-        bundle "outdated", :exitstatus => true
-        should_be_patchlevel_incorrect
-      end
-    end
-
-    it "fails when the patchlevel is a fixnum" do
-      simulate_ruby_engine "jruby" do
-        update_repo2 do
-          build_gem "activesupport", "3.0"
-          update_git "foo", :path => lib_path("foo")
-        end
-
-        gemfile <<-G
-          source "file://#{gem_repo2}"
-          gem "activesupport", "2.3.5"
-          gem "foo", :git => "#{lib_path('foo')}"
-
-          #{patchlevel_fixnum}
-        G
-
-        bundle "outdated", :exitstatus => true
-        should_be_patchlevel_fixnum
-      end
-    end
-  end
-end
diff --git a/spec/other/ssl_cert_spec.rb b/spec/other/ssl_cert_spec.rb
deleted file mode 100644
index ac9283a..0000000
--- a/spec/other/ssl_cert_spec.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require 'spec_helper'
-require 'bundler/ssl_certs/certificate_manager'
-
-describe "SSL Certificates", :if => (ENV['RGV'] == "master") do
-  it "are up to date with Rubygems" do
-    rubygems = File.expand_path("../../../tmp/rubygems", __FILE__)
-    manager = Bundler::SSLCerts::CertificateManager.new(rubygems)
-    expect(manager).to be_up_to_date
-  end
-end
diff --git a/spec/quality_spec.rb b/spec/quality_spec.rb
deleted file mode 100644
index 59a8520..0000000
--- a/spec/quality_spec.rb
+++ /dev/null
@@ -1,88 +0,0 @@
-require "spec_helper"
-
-if defined?(Encoding) && Encoding.default_external != "UTF-8"
-  Encoding.default_external = "UTF-8"
-end
-
-describe "The library itself" do
-  def check_for_spec_defs_with_single_quotes(filename)
-    failing_lines = []
-
-    File.readlines(filename).each_with_index do |line,number|
-      failing_lines << number + 1 if line =~ /^ *(describe|it|context) {1}'{1}/
-    end
-
-    unless failing_lines.empty?
-      "#{filename} uses inconsistent single quotes on lines #{failing_lines.join(', ')}"
-    end
-  end
-
-  def check_for_tab_characters(filename)
-    failing_lines = []
-    File.readlines(filename).each_with_index do |line,number|
-      failing_lines << number + 1 if line =~ /\t/
-    end
-
-    unless failing_lines.empty?
-      "#{filename} has tab characters on lines #{failing_lines.join(', ')}"
-    end
-  end
-
-  def check_for_extra_spaces(filename)
-    failing_lines = []
-    File.readlines(filename).each_with_index do |line,number|
-      next if line =~ /^\s+#.*\s+\n$/
-      next if %w(LICENCE.md).include?(line)
-      failing_lines << number + 1 if line =~ /\s+\n$/
-    end
-
-    unless failing_lines.empty?
-      "#{filename} has spaces on the EOL on lines #{failing_lines.join(', ')}"
-    end
-  end
-
-  RSpec::Matchers.define :be_well_formed do
-    match do |actual|
-      actual.empty?
-    end
-
-    failure_message do |actual|
-      actual.join("\n")
-    end
-  end
-
-  it "has no malformed whitespace" do
-    exempt = /\.gitmodules|\.marshal|fixtures|vendor|ssl_certs|LICENSE/
-    error_messages = []
-    Dir.chdir(File.expand_path("../..", __FILE__)) do
-      `git ls-files -z`.split("\x0").each do |filename|
-        next if filename =~ exempt
-        error_messages << check_for_tab_characters(filename)
-        error_messages << check_for_extra_spaces(filename)
-      end
-    end
-    expect(error_messages.compact).to be_well_formed
-  end
-
-  it "uses double-quotes consistently in specs" do
-    included = /spec/
-    error_messages = []
-    Dir.chdir(File.expand_path("../", __FILE__)) do
-      `git ls-files -z`.split("\x0").each do |filename|
-        next unless filename =~ included
-        error_messages << check_for_spec_defs_with_single_quotes(filename)
-      end
-    end
-    expect(error_messages.compact).to be_well_formed
-  end
-
-  it "can still be built" do
-    Dir.chdir(root) do
-      `gem build bundler.gemspec`
-      expect($?).to eq(0)
-
-      # clean up the .gem generated
-      system("rm bundler-#{Bundler::VERSION}.gem")
-    end
-  end
-end
diff --git a/spec/realworld/dependency_api_spec.rb b/spec/realworld/dependency_api_spec.rb
deleted file mode 100644
index 5d32947..0000000
--- a/spec/realworld/dependency_api_spec.rb
+++ /dev/null
@@ -1,60 +0,0 @@
-require "spec_helper"
-
-describe "gemcutter's dependency API", :realworld => true do
-  def wait_for_server(port, seconds = 15)
-    tries = 0
-    TCPSocket.new("127.0.0.1", port)
-  rescue => e
-    raise(e) if tries > (seconds * 2)
-    tries += 1
-    sleep 0.5
-    retry
-  end
-
-  context "when Gemcutter API takes too long to respond" do
-    before do
-      # need to hack, so we can require rack
-      old_gem_home = ENV['GEM_HOME']
-      ENV['GEM_HOME'] = Spec::Path.base_system_gems.to_s
-      require 'rack'
-      ENV['GEM_HOME'] = old_gem_home
-
-      port = 21453
-      port += 1 while TCPSocket.new("127.0.0.1", port) rescue false
-      @server_uri = "http://127.0.0.1:#{port}"
-
-      require File.expand_path('../../support/artifice/endpoint_timeout', __FILE__)
-      require 'thread'
-      @t = Thread.new {
-        server = Rack::Server.start(:app       => EndpointTimeout,
-                                    :Host      => '0.0.0.0',
-                                    :Port      => port,
-                                    :server    => 'webrick',
-                                    :AccessLog => [])
-        server.start
-      }
-      @t.run
-
-      wait_for_server(port)
-    end
-
-    after do
-      @t.kill
-    end
-
-    it "times out and falls back on the modern index" do
-      gemfile <<-G
-        source "#{@server_uri}"
-        gem "rack"
-
-        old_v, $VERBOSE = $VERBOSE, nil
-        Bundler::Fetcher.api_timeout = 1
-        $VERBOSE = old_v
-      G
-
-      bundle :install
-      expect(out).to include("Fetching source index from #{@server_uri}/")
-      should_be_installed "rack 1.0.0"
-    end
-  end
-end
diff --git a/spec/realworld/edgecases_spec.rb b/spec/realworld/edgecases_spec.rb
deleted file mode 100644
index 263ac52..0000000
--- a/spec/realworld/edgecases_spec.rb
+++ /dev/null
@@ -1,177 +0,0 @@
-require 'spec_helper'
-
-describe "real world edgecases", :realworld => true do
-  # there is no rbx-relative-require gem that will install on 1.9
-  it "ignores extra gems with bad platforms", :ruby => "1.8" do
-    install_gemfile <<-G
-      source :rubygems
-      gem "linecache", "0.46"
-    G
-    expect(err).to eq("")
-  end
-
-  # https://github.com/bundler/bundler/issues/1202
-  it "bundle cache works with rubygems 1.3.7 and pre gems", :ruby => "1.8" do
-    install_gemfile <<-G
-      source :rubygems
-      gem "rack",          "1.3.0.beta2"
-      gem "will_paginate", "3.0.pre2"
-    G
-    bundle :cache
-    expect(out).not_to include("Removing outdated .gem files from vendor/cache")
-  end
-
-  # https://github.com/bundler/bundler/issues/1486
-  # this is a hash collision that only manifests on 1.8.7
-  it "finds the correct child versions", :ruby => "1.8" do
-    install_gemfile <<-G
-      source :rubygems
-
-      gem 'i18n', '~> 0.4'
-      gem 'activesupport', '~> 3.0'
-      gem 'activerecord', '~> 3.0'
-      gem 'builder', '~> 2.1.2'
-    G
-    expect(out).to include("activemodel 3.0.5")
-  end
-
-  # https://github.com/bundler/bundler/issues/1500
-  it "does not fail install because of gem plugins" do
-    realworld_system_gems("open_gem --version 1.4.2", "rake --version 0.9.2")
-    gemfile <<-G
-      source :rubygems
-
-      gem 'rack', '1.0.1'
-    G
-
-    bundle "install --path vendor/bundle", :expect_err => true
-    expect(err).not_to include("Could not find rake")
-    expect(err).to be_empty
-  end
-
-  it "checks out git repos when the lockfile is corrupted" do
-    gemfile <<-G
-      source :rubygems
-
-      gem 'activerecord',  :github => 'carlhuda/rails-bundler-test', :branch => 'master'
-      gem 'activesupport', :github => 'carlhuda/rails-bundler-test', :branch => 'master'
-      gem 'actionpack',    :github => 'carlhuda/rails-bundler-test', :branch => 'master'
-    G
-
-    lockfile <<-L
-      GIT
-        remote: git://github.com/carlhuda/rails-bundler-test.git
-        revision: 369e28a87419565f1940815219ea9200474589d4
-        branch: master
-        specs:
-          actionpack (3.2.2)
-            activemodel (= 3.2.2)
-            activesupport (= 3.2.2)
-            builder (~> 3.0.0)
-            erubis (~> 2.7.0)
-            journey (~> 1.0.1)
-            rack (~> 1.4.0)
-            rack-cache (~> 1.2)
-            rack-test (~> 0.6.1)
-            sprockets (~> 2.1.2)
-          activemodel (3.2.2)
-            activesupport (= 3.2.2)
-            builder (~> 3.0.0)
-          activerecord (3.2.2)
-            activemodel (= 3.2.2)
-            activesupport (= 3.2.2)
-            arel (~> 3.0.2)
-            tzinfo (~> 0.3.29)
-          activesupport (3.2.2)
-            i18n (~> 0.6)
-            multi_json (~> 1.0)
-
-      GIT
-        remote: git://github.com/carlhuda/rails-bundler-test.git
-        revision: 369e28a87419565f1940815219ea9200474589d4
-        branch: master
-        specs:
-          actionpack (3.2.2)
-            activemodel (= 3.2.2)
-            activesupport (= 3.2.2)
-            builder (~> 3.0.0)
-            erubis (~> 2.7.0)
-            journey (~> 1.0.1)
-            rack (~> 1.4.0)
-            rack-cache (~> 1.2)
-            rack-test (~> 0.6.1)
-            sprockets (~> 2.1.2)
-          activemodel (3.2.2)
-            activesupport (= 3.2.2)
-            builder (~> 3.0.0)
-          activerecord (3.2.2)
-            activemodel (= 3.2.2)
-            activesupport (= 3.2.2)
-            arel (~> 3.0.2)
-            tzinfo (~> 0.3.29)
-          activesupport (3.2.2)
-            i18n (~> 0.6)
-            multi_json (~> 1.0)
-
-      GIT
-        remote: git://github.com/carlhuda/rails-bundler-test.git
-        revision: 369e28a87419565f1940815219ea9200474589d4
-        branch: master
-        specs:
-          actionpack (3.2.2)
-            activemodel (= 3.2.2)
-            activesupport (= 3.2.2)
-            builder (~> 3.0.0)
-            erubis (~> 2.7.0)
-            journey (~> 1.0.1)
-            rack (~> 1.4.0)
-            rack-cache (~> 1.2)
-            rack-test (~> 0.6.1)
-            sprockets (~> 2.1.2)
-          activemodel (3.2.2)
-            activesupport (= 3.2.2)
-            builder (~> 3.0.0)
-          activerecord (3.2.2)
-            activemodel (= 3.2.2)
-            activesupport (= 3.2.2)
-            arel (~> 3.0.2)
-            tzinfo (~> 0.3.29)
-          activesupport (3.2.2)
-            i18n (~> 0.6)
-            multi_json (~> 1.0)
-
-      GEM
-        remote: https://rubygems.org/
-        specs:
-          arel (3.0.2)
-          builder (3.0.0)
-          erubis (2.7.0)
-          hike (1.2.1)
-          i18n (0.6.0)
-          journey (1.0.3)
-          multi_json (1.1.0)
-          rack (1.4.1)
-          rack-cache (1.2)
-            rack (>= 0.4)
-          rack-test (0.6.1)
-            rack (>= 1.0)
-          sprockets (2.1.2)
-            hike (~> 1.2)
-            rack (~> 1.0)
-            tilt (~> 1.1, != 1.3.0)
-          tilt (1.3.3)
-          tzinfo (0.3.32)
-
-      PLATFORMS
-        ruby
-
-      DEPENDENCIES
-        actionpack!
-        activerecord!
-        activesupport!
-    L
-
-    bundle :install, :exitstatus => true
-    expect(exitstatus).to eq(0)
-  end
-end
diff --git a/spec/realworld/parallel_spec.rb b/spec/realworld/parallel_spec.rb
deleted file mode 100644
index 457139b..0000000
--- a/spec/realworld/parallel_spec.rb
+++ /dev/null
@@ -1,69 +0,0 @@
-require 'spec_helper'
-
-describe "parallel", :realworld => true do
-  it "installs", :ruby => "1.8" do
-    gemfile <<-G
-      source "https://rubygems.org"
-      gem 'activesupport', '~> 3.2.13'
-      gem 'faker', '~> 1.1.2'
-    G
-
-    bundle :install, :jobs => 4, :env => {"DEBUG" => "1"}
-    expect(out).to match(/[1-3]: /)
-
-    bundle "show activesupport"
-    expect(out).to match(/activesupport/)
-
-    bundle "show faker"
-    expect(out).to match(/faker/)
-
-    bundle "config jobs"
-    expect(out).to match(/: "4"/)
-  end
-
-  it "installs even with circular dependency", :ruby => "1.9" do
-    gemfile <<-G
-      source 'https://rubygems.org'
-      gem 'activesupport', '~> 3.2.13'
-      gem 'mongoid_auto_increment', "0.1.1"
-    G
-
-    bundle :install, :jobs => 4, :env => {"DEBUG" => "1"}
-    expect(out).to match(/[1-3]: /)
-
-    bundle "show activesupport"
-    expect(out).to match(/activesupport/)
-
-    bundle "show mongoid_auto_increment"
-    expect(out).to match(%r{gems/mongoid_auto_increment})
-
-    bundle "config jobs"
-    expect(out).to match(/: "4"/)
-  end
-
-  it "updates" do
-    install_gemfile <<-G
-      source "https://rubygems.org"
-      gem 'activesupport', '3.2.12'
-      gem 'faker', '~> 1.1.2'
-    G
-
-    gemfile <<-G
-      source "https://rubygems.org"
-      gem 'activesupport', '~> 3.2.12'
-      gem 'faker', '~> 1.1.2'
-    G
-
-    bundle :update, :jobs => 4, :env => {"DEBUG" => "1"}
-     expect(out).to match(/[1-3]: /)
-
-    bundle "show activesupport"
-    expect(out).to match(/activesupport-3\.2\.1[3-9]/)
-
-    bundle "show faker"
-    expect(out).to match(/faker/)
-
-    bundle "config jobs"
-    expect(out).to match(/: "4"/)
-  end
-end
diff --git a/spec/resolver/basic_spec.rb b/spec/resolver/basic_spec.rb
deleted file mode 100644
index e588c9e..0000000
--- a/spec/resolver/basic_spec.rb
+++ /dev/null
@@ -1,66 +0,0 @@
-require "spec_helper"
-
-describe "Resolving" do
-
-  before :each do
-    @index = an_awesome_index
-  end
-
-  it "resolves a single gem" do
-    dep "rack"
-
-    should_resolve_as %w(rack-1.1)
-  end
-
-  it "resolves a gem with dependencies" do
-    dep "actionpack"
-
-    should_resolve_as %w(actionpack-2.3.5 activesupport-2.3.5 rack-1.0)
-  end
-
-  it "resolves a conflicting index" do
-    @index = a_conflict_index
-    dep "my_app"
-    should_resolve_as %w(activemodel-3.2.11 builder-3.0.4 grape-0.2.6 my_app-1.0.0)
-  end
-
-  it "resolves a complex conflicting index" do
-    @index = a_complex_conflict_index
-    dep "my_app"
-    should_resolve_as %w(a-1.4.0 b-0.3.5 c-3.2 d-0.9.8 my_app-1.1.0)
-  end
-
-  it "resolves a index with conflict on child" do
-    @index = index_with_conflict_on_child
-    dep "chef_app"
-    should_resolve_as %w(berkshelf-2.0.7 chef-10.26 chef_app-1.0.0 json-1.7.7)
-  end
-
-  it "resolves a index with root level conflict on child" do
-    @index = a_index_with_root_conflict_on_child
-    dep "i18n", "~> 0.4"
-    dep "activesupport", "~> 3.0"
-    dep "activerecord", "~> 3.0"
-    dep "builder", "~> 2.1.2"
-    should_resolve_as %w(activesupport-3.0.5 i18n-0.4.2 builder-2.1.2 activerecord-3.0.5 activemodel-3.0.5)
-  end
-
-  it "raises an exception if a child dependency is not resolved" do
-    @index = a_unresovable_child_index
-    dep "chef_app_error"
-    expect {
-      resolve
-    }.to raise_error(Bundler::VersionConflict)
-  end
-
-  it "should throw error in case of circular dependencies" do
-    @index = a_circular_index
-    dep "circular_app"
-
-    got = resolve
-    expect {
-      got = got.map { |s| s.full_name }.sort
-    }.to raise_error(Bundler::CyclicDependencyError, /please remove either gem 'foo' or gem 'bar'/i)
-  end
-
-end
diff --git a/spec/resolver/platform_spec.rb b/spec/resolver/platform_spec.rb
deleted file mode 100644
index 2a126e4..0000000
--- a/spec/resolver/platform_spec.rb
+++ /dev/null
@@ -1,88 +0,0 @@
-require "spec_helper"
-
-describe "Resolving platform craziness" do
-  describe "with cross-platform gems" do
-    before :each do
-      @index = an_awesome_index
-    end
-
-    it "resolves a simple multi platform gem" do
-      dep "nokogiri"
-      platforms "ruby", "java"
-
-      should_resolve_as %w(nokogiri-1.4.2 nokogiri-1.4.2-java weakling-0.0.3)
-    end
-
-    it "doesn't pull gems that don't exist for the current platform" do
-      dep "nokogiri"
-      platforms "ruby"
-
-      should_resolve_as %w(nokogiri-1.4.2)
-    end
-
-    it "doesn't pull gems when the version is available for all requested platforms" do
-      dep "nokogiri"
-      platforms "mswin32"
-
-      should_resolve_as %w(nokogiri-1.4.2.1-x86-mswin32)
-    end
-  end
-
-  describe "with mingw32" do
-
-    before :each do
-      @index = build_index do
-        platforms "mingw32 mswin32 x64-mingw32" do |platform|
-          gem "thin", "1.2.7", platform
-        end
-      end
-    end
-
-    it "finds mswin gems" do
-      # win32 is hardcoded to get CPU x86 in rubygems
-      platforms "mswin32"
-      dep "thin"
-      should_resolve_as %w(thin-1.2.7-x86-mswin32)
-    end
-
-    it "finds mingw gems" do
-      # mingw is _not_ hardcoded to add CPU x86 in rubygems
-      platforms "x86-mingw32"
-      dep "thin"
-      should_resolve_as %w(thin-1.2.7-x86-mingw32)
-    end
-
-    it "finds x64-mingw gems" do
-      platforms "x64-mingw32"
-      dep "thin"
-      should_resolve_as %w(thin-1.2.7-x64-mingw32)
-    end
-  end
-
-  describe "with conflicting cases" do
-    before :each do
-      @index = build_index do
-        gem "foo", "1.0.0" do
-          dep "bar", ">= 0"
-        end
-
-        gem 'bar', "1.0.0" do
-          dep "baz", "~> 1.0.0"
-        end
-
-        gem "bar", "1.0.0", "java" do
-          dep "baz", " ~> 1.1.0"
-        end
-
-        gem "baz", %w(1.0.0 1.1.0 1.2.0)
-      end
-    end
-
-    it "reports on the conflict" do
-      platforms "ruby", "java"
-      dep "foo"
-
-      should_conflict_on "baz"
-    end
-  end
-end
diff --git a/spec/runtime/executable_spec.rb b/spec/runtime/executable_spec.rb
deleted file mode 100644
index ad43c05..0000000
--- a/spec/runtime/executable_spec.rb
+++ /dev/null
@@ -1,149 +0,0 @@
-require "spec_helper"
-
-describe "Running bin/* commands" do
-  before :each do
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack"
-    G
-  end
-
-  it "runs the bundled command when in the bundle" do
-    bundle "install --binstubs"
-
-    build_gem "rack", "2.0", :to_system => true do |s|
-      s.executables = "rackup"
-    end
-
-    gembin "rackup"
-    expect(out).to eq("1.0.0")
-  end
-
-  it "allows the location of the gem stubs to be specified" do
-    bundle "install --binstubs gbin"
-
-    expect(bundled_app("bin")).not_to exist
-    expect(bundled_app("gbin/rackup")).to exist
-
-    gembin bundled_app("gbin/rackup")
-    expect(out).to eq("1.0.0")
-  end
-
-  it "allows absolute paths as a specification of where to install bin stubs" do
-    bundle "install --binstubs #{tmp}/bin"
-
-    gembin tmp("bin/rackup")
-    expect(out).to eq("1.0.0")
-  end
-
-  it "uses the default ruby install name when shebang is not specified" do
-   bundle "install --binstubs"
-   expect(File.open("bin/rackup").gets).to eq("#!/usr/bin/env #{RbConfig::CONFIG['ruby_install_name']}\n")
-  end
-
-  it "allows the name of the shebang executable to be specified" do
-    bundle "install --binstubs --shebang ruby-foo"
-    expect(File.open("bin/rackup").gets).to eq("#!/usr/bin/env ruby-foo\n")
-  end
-
-  it "runs the bundled command when out of the bundle" do
-    bundle "install --binstubs"
-
-    build_gem "rack", "2.0", :to_system => true do |s|
-      s.executables = "rackup"
-    end
-
-    Dir.chdir(tmp) do
-      gembin "rackup"
-      expect(out).to eq("1.0.0")
-    end
-  end
-
-  it "works with gems in path" do
-    build_lib "rack", :path => lib_path("rack") do |s|
-      s.executables = 'rackup'
-    end
-
-    gemfile <<-G
-      gem "rack", :path => "#{lib_path('rack')}"
-    G
-
-    bundle "install --binstubs"
-
-    build_gem 'rack', '2.0', :to_system => true do |s|
-      s.executables = 'rackup'
-    end
-
-    gembin "rackup"
-    expect(out).to eq('1.0')
-  end
-
-  it "don't bundle da bundla" do
-    build_gem "bundler", Bundler::VERSION, :to_system => true do |s|
-      s.executables = "bundle"
-    end
-
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "bundler"
-    G
-
-    bundle "install --binstubs"
-
-    expect(bundled_app("bin/bundle")).not_to exist
-  end
-
-  it "does not generate bin stubs if the option was not specified" do
-    bundle "install"
-
-    expect(bundled_app("bin/rackup")).not_to exist
-  end
-
-  it "allows you to stop installing binstubs" do
-    bundle "install --binstubs bin/"
-    bundled_app("bin/rackup").rmtree
-    bundle "install --binstubs \"\""
-
-    expect(bundled_app("bin/rackup")).not_to exist
-    #expect(bundled_app("rackup")).not_to exist
-
-    bundle "config bin"
-    expect(out).to include("You have not configured a value for `bin`")
-  end
-
-  it "remembers that the option was specified" do
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "activesupport"
-    G
-
-    bundle "install --binstubs"
-
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "activesupport"
-      gem "rack"
-    G
-
-    bundle "install"
-
-    expect(bundled_app("bin/rackup")).to exist
-  end
-
-  it "rewrites bins on --binstubs (to maintain backwards compatibility)" do
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack"
-    G
-
-    bundle "install --binstubs bin/"
-
-    File.open(bundled_app("bin/rackup"), 'wb') do |file|
-      file.print "OMG"
-    end
-
-    bundle "install"
-
-    expect(bundled_app("bin/rackup").read).to_not eq("OMG")
-  end
-end
diff --git a/spec/runtime/load_spec.rb b/spec/runtime/load_spec.rb
deleted file mode 100644
index cc2cebf..0000000
--- a/spec/runtime/load_spec.rb
+++ /dev/null
@@ -1,107 +0,0 @@
-require "spec_helper"
-
-describe "Bundler.load" do
-  before :each do
-    system_gems "rack-1.0.0"
-    # clear memoized method results
-    # TODO: Don't reset internal ivars
-    Bundler.instance_eval do
-      @load = nil
-      @runtime = nil
-      @definition = nil
-    end
-  end
-
-  describe "with a gemfile" do
-    before(:each) do
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack"
-      G
-    end
-
-    it "provides a list of the env dependencies" do
-      expect(Bundler.load.dependencies).to have_dep("rack", ">= 0")
-    end
-
-    it "provides a list of the resolved gems" do
-      expect(Bundler.load.gems).to have_gem("rack-1.0.0", "bundler-#{Bundler::VERSION}")
-    end
-
-    it "ignores blank BUNDLE_GEMFILEs" do
-      expect {
-        ENV['BUNDLE_GEMFILE'] = ""
-        Bundler.load
-      }.not_to raise_error()
-    end
-
-  end
-
-  describe "without a gemfile" do
-    it "raises an exception if the default gemfile is not found" do
-      expect {
-        Bundler.load
-      }.to raise_error(Bundler::GemfileNotFound, /could not locate gemfile/i)
-    end
-
-    it "raises an exception if a specified gemfile is not found" do
-      expect {
-        ENV['BUNDLE_GEMFILE'] = "omg.rb"
-        Bundler.load
-      }.to raise_error(Bundler::GemfileNotFound, /omg\.rb/)
-    end
-
-    it "does not find a Gemfile above the testing directory" do
-      bundler_gemfile = tmp.join("../Gemfile")
-      unless File.exist?(bundler_gemfile)
-        FileUtils.touch(bundler_gemfile)
-        @remove_bundler_gemfile = true
-      end
-      begin
-        expect { Bundler.load }.to raise_error(Bundler::GemfileNotFound)
-      ensure
-        bundler_gemfile.rmtree if @remove_bundler_gemfile
-      end
-    end
-
-  end
-
-  describe "when called twice" do
-    it "doesn't try to load the runtime twice" do
-      system_gems "rack-1.0.0", "activesupport-2.3.5"
-      gemfile <<-G
-        gem "rack"
-        gem "activesupport", :group => :test
-      G
-
-      ruby <<-RUBY
-        require "bundler"
-        Bundler.setup :default
-        Bundler.require :default
-        puts RACK
-        begin
-          require "activesupport"
-        rescue LoadError
-          puts "no activesupport"
-        end
-      RUBY
-
-      expect(out.split("\n")).to eq(["1.0.0", "no activesupport"])
-    end
-  end
-
-  describe "not hurting brittle rubygems" do
-    it "does not inject #source into the generated YAML of the gem specs" do
-      system_gems "activerecord-2.3.2", "activesupport-2.3.2"
-      gemfile <<-G
-        gem "activerecord"
-      G
-
-      Bundler.load.specs.each do |spec|
-        expect(spec.to_yaml).not_to match(/^\s+source:/)
-        expect(spec.to_yaml).not_to match(/^\s+groups:/)
-      end
-    end
-  end
-
-end
diff --git a/spec/runtime/platform_spec.rb b/spec/runtime/platform_spec.rb
deleted file mode 100644
index cbc12ef..0000000
--- a/spec/runtime/platform_spec.rb
+++ /dev/null
@@ -1,90 +0,0 @@
-require "spec_helper"
-
-describe "Bundler.setup with multi platform stuff" do
-  it "raises a friendly error when gems are missing locally" do
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack"
-    G
-
-    lockfile <<-G
-      GEM
-        remote: file:#{gem_repo1}/
-        specs:
-          rack (1.0)
-
-      PLATFORMS
-        #{local_tag}
-
-      DEPENDENCIES
-        rack
-    G
-
-    ruby <<-R
-      begin
-        require 'bundler'
-        Bundler.setup
-      rescue Bundler::GemNotFound => e
-        puts "WIN"
-      end
-    R
-
-    expect(out).to eq("WIN")
-  end
-
-  it "will resolve correctly on the current platform when the lockfile was targetted for a different one" do
-    lockfile <<-G
-      GEM
-        remote: file:#{gem_repo1}/
-        specs:
-          nokogiri (1.4.2-java)
-            weakling (= 0.0.3)
-          weakling (0.0.3)
-
-      PLATFORMS
-        java
-
-      DEPENDENCIES
-        nokogiri
-    G
-
-    system_gems "nokogiri-1.4.2"
-
-    simulate_platform "x86-darwin-10"
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "nokogiri"
-    G
-
-    should_be_installed "nokogiri 1.4.2"
-  end
-
-  it "will add the resolve for the current platform" do
-    lockfile <<-G
-      GEM
-        remote: file:#{gem_repo1}/
-        specs:
-          nokogiri (1.4.2-java)
-            weakling (= 0.0.3)
-          weakling (0.0.3)
-
-      PLATFORMS
-        java
-
-      DEPENDENCIES
-        nokogiri
-    G
-
-    simulate_platform "x86-darwin-100"
-
-    system_gems "nokogiri-1.4.2", "platform_specific-1.0-x86-darwin-100"
-
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "nokogiri"
-      gem "platform_specific"
-    G
-
-    should_be_installed "nokogiri 1.4.2", "platform_specific 1.0 x86-darwin-100"
-  end
-end
diff --git a/spec/runtime/require_spec.rb b/spec/runtime/require_spec.rb
deleted file mode 100644
index e1c9389..0000000
--- a/spec/runtime/require_spec.rb
+++ /dev/null
@@ -1,332 +0,0 @@
-require "spec_helper"
-
-describe "Bundler.require" do
-  before :each do
-    build_lib "one", "1.0.0" do |s|
-      s.write "lib/baz.rb", "puts 'baz'"
-      s.write "lib/qux.rb", "puts 'qux'"
-    end
-
-    build_lib "two", "1.0.0" do |s|
-      s.write "lib/two.rb", "puts 'two'"
-      s.add_dependency "three", "= 1.0.0"
-    end
-
-    build_lib "three", "1.0.0" do |s|
-      s.write "lib/three.rb", "puts 'three'"
-      s.add_dependency "seven", "= 1.0.0"
-    end
-
-    build_lib "four", "1.0.0" do |s|
-      s.write "lib/four.rb", "puts 'four'"
-    end
-
-    build_lib "five", "1.0.0", :no_default => true do |s|
-      s.write "lib/mofive.rb", "puts 'five'"
-    end
-
-    build_lib "six", "1.0.0" do |s|
-      s.write "lib/six.rb", "puts 'six'"
-    end
-
-    build_lib "seven", "1.0.0" do |s|
-      s.write "lib/seven.rb", "puts 'seven'"
-    end
-
-    build_lib "eight", "1.0.0" do |s|
-      s.write "lib/eight.rb", "puts 'eight'"
-    end
-
-    gemfile <<-G
-      path "#{lib_path}"
-      gem "one", :group => :bar, :require => %w(baz qux)
-      gem "two"
-      gem "three", :group => :not
-      gem "four", :require => false
-      gem "five"
-      gem "six", :group => "string"
-      gem "seven", :group => :not
-      gem "eight", :require => true, :group => :require_true
-    G
-  end
-
-  it "requires the gems" do
-    # default group
-    run "Bundler.require"
-    expect(out).to eq("two")
-
-    # specific group
-    run "Bundler.require(:bar)"
-    expect(out).to eq("baz\nqux")
-
-    # default and specific group
-    run "Bundler.require(:default, :bar)"
-    expect(out).to eq("baz\nqux\ntwo")
-
-    # specific group given as a string
-    run "Bundler.require('bar')"
-    expect(out).to eq("baz\nqux")
-
-    # specific group declared as a string
-    run "Bundler.require(:string)"
-    expect(out).to eq("six")
-
-    # required in resolver order instead of gemfile order
-    run("Bundler.require(:not)")
-    expect(out.split("\n").sort).to eq(['seven', 'three'])
-
-    # test require: true
-    run "Bundler.require(:require_true)"
-    expect(out).to eq("eight")
-  end
-
-  it "allows requiring gems with non standard names explicitly" do
-    run "Bundler.require ; require 'mofive'"
-    expect(out).to eq("two\nfive")
-  end
-
-  it "raises an exception if a require is specified but the file does not exist" do
-    gemfile <<-G
-      path "#{lib_path}"
-      gem "two", :require => 'fail'
-    G
-
-    load_error_run <<-R, 'fail'
-      Bundler.require
-    R
-
-    expect(err).to eq("ZOMG LOAD ERROR")
-  end
-
-  describe "with namespaced gems" do
-    before :each do
-      build_lib "jquery-rails", "1.0.0" do |s|
-        s.write "lib/jquery/rails.rb", "puts 'jquery/rails'"
-      end
-      lib_path('jquery-rails-1.0.0/lib/jquery-rails.rb').rmtree
-    end
-
-    it "requires gem names that are namespaced" do
-      gemfile <<-G
-        path '#{lib_path}'
-        gem 'jquery-rails'
-      G
-
-      run "Bundler.require"
-      expect(out).to eq("jquery/rails")
-    end
-
-    it "silently passes if the require fails" do
-      build_lib "bcrypt-ruby", "1.0.0", :no_default => true do |s|
-        s.write "lib/brcrypt.rb", "BCrypt = '1.0.0'"
-      end
-      gemfile <<-G
-        path "#{lib_path}"
-        gem "bcrypt-ruby"
-      G
-
-      cmd = <<-RUBY
-        require 'bundler'
-        Bundler.require
-      RUBY
-      ruby(cmd, :expect_err => true)
-
-      expect(err).to be_empty
-    end
-
-    it "does not mangle explictly given requires" do
-      gemfile <<-G
-        path "#{lib_path}"
-        gem 'jquery-rails', :require => 'jquery-rails'
-      G
-
-      load_error_run <<-R, 'jquery-rails'
-        Bundler.require
-      R
-      expect(err).to eq("ZOMG LOAD ERROR")
-    end
-
-    it "handles the case where regex fails" do
-      build_lib "load-fuuu", "1.0.0" do |s|
-        s.write "lib/load-fuuu.rb", "raise LoadError.new(\"Could not open library 'libfuuu-1.0': libfuuu-1.0: cannot open shared object file: No such file or directory.\")"
-      end
-
-      gemfile <<-G
-        path "#{lib_path}"
-        gem "load-fuuu"
-      G
-
-      cmd = <<-RUBY
-        begin
-          Bundler.require
-        rescue LoadError => e
-          $stderr.puts "ZOMG LOAD ERROR" if e.message.include?("Could not open library 'libfuuu-1.0'")
-        end
-      RUBY
-      run(cmd, :expect_err => true)
-
-      expect(err).to eq("ZOMG LOAD ERROR")
-    end
-
-    it "doesn't swallow the error when the library has an unrelated error" do
-      build_lib "load-fuuu", "1.0.0" do |s|
-        s.write "lib/load-fuuu.rb", "raise LoadError.new(\"cannot load such file -- load-bar\")"
-      end
-
-      gemfile <<-G
-        path "#{lib_path}"
-        gem "load-fuuu"
-      G
-
-      cmd = <<-RUBY
-        begin
-          Bundler.require
-        rescue LoadError => e
-          $stderr.puts "ZOMG LOAD ERROR: \#{e.message}"
-        end
-      RUBY
-      run(cmd, :expect_err => true)
-
-      expect(err).to eq("ZOMG LOAD ERROR: cannot load such file -- load-bar")
-    end
-  end
-
-  describe "using bundle exec" do
-    it "requires the locked gems" do
-      bundle "exec ruby -e 'Bundler.require'"
-      expect(out).to eq("two")
-
-      bundle "exec ruby -e 'Bundler.require(:bar)'"
-      expect(out).to eq("baz\nqux")
-
-      bundle "exec ruby -e 'Bundler.require(:default, :bar)'"
-      expect(out).to eq("baz\nqux\ntwo")
-    end
-  end
-
-  describe "order" do
-    before(:each) do
-      build_lib "one", "1.0.0" do |s|
-        s.write "lib/one.rb", <<-ONE
-          if defined?(Two)
-            Two.two
-          else
-            puts "two_not_loaded"
-          end
-          puts 'one'
-        ONE
-      end
-
-      build_lib "two", "1.0.0" do |s|
-        s.write "lib/two.rb", <<-TWO
-          module Two
-            def self.two
-              puts 'module_two'
-            end
-          end
-          puts 'two'
-        TWO
-      end
-    end
-
-    it "works when the gems are in the Gemfile in the correct order" do
-      gemfile <<-G
-        path "#{lib_path}"
-        gem "two"
-        gem "one"
-      G
-
-      run "Bundler.require"
-      expect(out).to eq("two\nmodule_two\none")
-    end
-
-    describe "a gem with different requires for different envs" do
-      before(:each) do
-        build_gem "multi_gem", :to_system => true do |s|
-          s.write "lib/one.rb", "puts 'ONE'"
-          s.write "lib/two.rb", "puts 'TWO'"
-        end
-
-        install_gemfile <<-G
-          gem "multi_gem", :require => "one", :group => :one
-          gem "multi_gem", :require => "two", :group => :two
-        G
-      end
-
-      it "requires both with Bundler.require(both)" do
-        run "Bundler.require(:one, :two)"
-        expect(out).to eq("ONE\nTWO")
-      end
-
-      it "requires one with Bundler.require(:one)" do
-        run "Bundler.require(:one)"
-        expect(out).to eq("ONE")
-      end
-
-      it "requires :two with Bundler.require(:two)" do
-        run "Bundler.require(:two)"
-        expect(out).to eq("TWO")
-      end
-    end
-
-    it "fails when the gems are in the Gemfile in the wrong order" do
-      gemfile <<-G
-        path "#{lib_path}"
-        gem "one"
-        gem "two"
-      G
-
-      run "Bundler.require"
-      expect(out).to eq("two_not_loaded\none\ntwo")
-    end
-
-    describe "with busted gems" do
-      it "should be busted" do
-        build_gem "busted_require", :to_system => true do |s|
-          s.write "lib/busted_require.rb", "require 'no_such_file_omg'"
-        end
-
-        install_gemfile <<-G
-          gem "busted_require"
-        G
-
-        load_error_run <<-R, 'no_such_file_omg'
-          Bundler.require
-        R
-        expect(err).to eq('ZOMG LOAD ERROR')
-      end
-    end
-  end
-end
-
-describe "Bundler.require with platform specific dependencies" do
-  it "does not require the gems that are pinned to other platforms" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      platforms :#{not_local_tag} do
-        gem "fail", :require => "omgomg"
-      end
-
-      gem "rack", "1.0.0"
-    G
-
-    run "Bundler.require", :expect_err => true
-    expect(err).to be_empty
-  end
-
-  it "requires gems pinned to multiple platforms, including the current one" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-
-      platforms :#{not_local_tag}, :#{local_tag} do
-        gem "rack", :require => "rack"
-      end
-    G
-
-    run "Bundler.require; puts RACK", :expect_err => true
-
-    expect(out).to eq("1.0.0")
-    expect(err).to be_empty
-  end
-end
diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb
deleted file mode 100644
index 02ce0de..0000000
--- a/spec/runtime/setup_spec.rb
+++ /dev/null
@@ -1,853 +0,0 @@
-require "spec_helper"
-
-describe "Bundler.setup" do
-  describe "with no arguments" do
-    it "makes all groups available" do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", :group => :test
-      G
-
-      ruby <<-RUBY
-        require 'rubygems'
-        require 'bundler'
-        Bundler.setup
-
-        require 'rack'
-        puts RACK
-      RUBY
-      expect(err).to eq("")
-      expect(out).to eq("1.0.0")
-    end
-  end
-
-  describe "when called with groups" do
-    before(:each) do
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "yard"
-        gem "rack", :group => :test
-      G
-    end
-
-    it "doesn't make all groups available" do
-      ruby <<-RUBY
-        require 'rubygems'
-        require 'bundler'
-        Bundler.setup(:default)
-
-        begin
-          require 'rack'
-        rescue LoadError
-          puts "WIN"
-        end
-      RUBY
-      expect(err).to eq("")
-      expect(out).to eq("WIN")
-    end
-
-    it "accepts string for group name" do
-      ruby <<-RUBY
-        require 'rubygems'
-        require 'bundler'
-        Bundler.setup(:default, 'test')
-
-        require 'rack'
-        puts RACK
-      RUBY
-      expect(err).to eq("")
-      expect(out).to eq("1.0.0")
-    end
-
-    it "leaves all groups available if they were already" do
-      ruby <<-RUBY
-        require 'rubygems'
-        require 'bundler'
-        Bundler.setup
-        Bundler.setup(:default)
-
-        require 'rack'
-        puts RACK
-      RUBY
-      expect(err).to eq("")
-      expect(out).to eq("1.0.0")
-    end
-
-    it "leaves :default available if setup is called twice" do
-      ruby <<-RUBY
-        require 'rubygems'
-        require 'bundler'
-        Bundler.setup(:default)
-        Bundler.setup(:default, :test)
-
-        begin
-          require 'yard'
-          puts "WIN"
-        rescue LoadError
-          puts "FAIL"
-        end
-      RUBY
-      expect(err).to eq("")
-      expect(out).to match("WIN")
-    end
-  end
-
-  it "raises if the Gemfile was not yet installed" do
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack"
-    G
-
-    ruby <<-R
-      require 'rubygems'
-      require 'bundler'
-
-      begin
-        Bundler.setup
-        puts "FAIL"
-      rescue Bundler::GemNotFound
-        puts "WIN"
-      end
-    R
-
-    expect(out).to eq("WIN")
-  end
-
-  it "doesn't create a Gemfile.lock if the setup fails" do
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack"
-    G
-
-    ruby <<-R, :expect_err => true
-      require 'rubygems'
-      require 'bundler'
-
-      Bundler.setup
-    R
-
-    expect(bundled_app("Gemfile.lock")).not_to exist
-  end
-
-  it "doesn't change the Gemfile.lock if the setup fails" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack"
-    G
-
-    lockfile = File.read(bundled_app("Gemfile.lock"))
-
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack"
-      gem "nosuchgem", "10.0"
-    G
-
-    ruby <<-R, :expect_err => true
-      require 'rubygems'
-      require 'bundler'
-
-      Bundler.setup
-    R
-
-    expect(File.read(bundled_app("Gemfile.lock"))).to eq(lockfile)
-  end
-
-  it "makes a Gemfile.lock if setup succeeds" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack"
-    G
-
-    File.read(bundled_app("Gemfile.lock"))
-
-    FileUtils.rm(bundled_app("Gemfile.lock"))
-
-    run "1"
-    expect(bundled_app("Gemfile.lock")).to exist
-  end
-
-  it "uses BUNDLE_GEMFILE to locate the gemfile if present" do
-    gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack"
-    G
-
-    gemfile bundled_app('4realz'), <<-G
-      source "file://#{gem_repo1}"
-      gem "activesupport", "2.3.5"
-    G
-
-    ENV['BUNDLE_GEMFILE'] = bundled_app('4realz').to_s
-    bundle :install
-
-    should_be_installed "activesupport 2.3.5"
-  end
-
-  it "prioritizes gems in BUNDLE_PATH over gems in GEM_HOME" do
-    ENV['BUNDLE_PATH'] = bundled_app('.bundle').to_s
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack", "1.0.0"
-    G
-
-    build_gem "rack", "1.0", :to_system => true do |s|
-      s.write "lib/rack.rb", "RACK = 'FAIL'"
-    end
-
-    should_be_installed "rack 1.0.0"
-  end
-
-  describe "integrate with rubygems" do
-    describe "by replacing #gem" do
-      before :each do
-        install_gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "rack", "0.9.1"
-        G
-      end
-
-      it "replaces #gem but raises when the gem is missing" do
-        run <<-R
-          begin
-            gem "activesupport"
-            puts "FAIL"
-          rescue LoadError
-            puts "WIN"
-          end
-        R
-
-        expect(out).to eq("WIN")
-      end
-
-      it "version_requirement is now deprecated in rubygems 1.4.0+ when gem is missing" do
-        run <<-R, :expect_err => true
-          begin
-            gem "activesupport"
-            puts "FAIL"
-          rescue LoadError
-            puts "WIN"
-          end
-        R
-
-        expect(err).to be_empty
-      end
-
-      it "replaces #gem but raises when the version is wrong" do
-        run <<-R
-          begin
-            gem "rack", "1.0.0"
-            puts "FAIL"
-          rescue LoadError
-            puts "WIN"
-          end
-        R
-
-        expect(out).to eq("WIN")
-      end
-
-      it "version_requirement is now deprecated in rubygems 1.4.0+ when the version is wrong" do
-        run <<-R, :expect_err => true
-          begin
-            gem "rack", "1.0.0"
-            puts "FAIL"
-          rescue LoadError
-            puts "WIN"
-          end
-        R
-
-        expect(err).to be_empty
-      end
-    end
-
-    describe "by hiding system gems" do
-      before :each do
-        system_gems "activesupport-2.3.5"
-        install_gemfile <<-G
-          source "file://#{gem_repo1}"
-          gem "yard"
-        G
-      end
-
-      it "removes system gems from Gem.source_index" do
-        run "require 'yard'"
-        expect(out).to eq("bundler-#{Bundler::VERSION}\nyard-1.0")
-      end
-
-      context "when the ruby stdlib is a substring of Gem.path" do
-        it "does not reject the stdlib from $LOAD_PATH" do
-          substring = "/" + $LOAD_PATH.find{|p| p =~ /vendor_ruby/ }.split("/")[2]
-          run "puts 'worked!'", :env => {"GEM_PATH" => substring}
-          expect(out).to eq("worked!")
-        end
-      end
-    end
-  end
-
-  describe "with paths" do
-    it "activates the gems in the path source" do
-      system_gems "rack-1.0.0"
-
-      build_lib "rack", "1.0.0" do |s|
-        s.write "lib/rack.rb", "puts 'WIN'"
-      end
-
-      gemfile <<-G
-        path "#{lib_path('rack-1.0.0')}"
-        source "file://#{gem_repo1}"
-        gem "rack"
-      G
-
-      run "require 'rack'"
-      expect(out).to eq("WIN")
-    end
-  end
-
-  describe "with git" do
-    before do
-      build_git "rack", "1.0.0"
-
-      gemfile <<-G
-        gem "rack", :git => "#{lib_path('rack-1.0.0')}"
-      G
-    end
-
-    it "provides a useful exception when the git repo is not checked out yet" do
-      run "1", :expect_err => true
-      expect(err).to match(/the git source #{lib_path('rack-1.0.0')} is not yet checked out. Please run `bundle install`/i)
-    end
-
-    it "does not hit the git binary if the lockfile is available and up to date" do
-      bundle "install"
-
-      break_git!
-
-      ruby <<-R
-        require 'rubygems'
-        require 'bundler'
-
-        begin
-          Bundler.setup
-          puts "WIN"
-        rescue Exception => e
-          puts "FAIL"
-        end
-      R
-
-      expect(out).to eq("WIN")
-    end
-
-    it "provides a good exception if the lockfile is unavailable" do
-      bundle "install"
-
-      FileUtils.rm(bundled_app("Gemfile.lock"))
-
-      break_git!
-
-      ruby <<-R
-        require "rubygems"
-        require "bundler"
-
-        begin
-          Bundler.setup
-          puts "FAIL"
-        rescue Bundler::GitError => e
-          puts e.message
-        end
-      R
-
-      run "puts 'FAIL'", :expect_err => true
-
-      expect(err).not_to include "This is not the git you are looking for"
-    end
-
-    it "works even when the cache directory has been deleted" do
-      bundle "install --path vendor/bundle"
-      FileUtils.rm_rf vendored_gems('cache')
-      should_be_installed "rack 1.0.0"
-    end
-
-    it "does not randomly change the path when specifying --path and the bundle directory becomes read only" do
-      bundle "install --path vendor/bundle"
-
-      with_read_only("**/*") do
-        should_be_installed "rack 1.0.0"
-      end
-    end
-
-    it "finds git gem when default bundle path becomes read only" do
-      bundle "install"
-
-      with_read_only("#{Bundler.bundle_path}/**/*") do
-        should_be_installed "rack 1.0.0"
-      end
-    end
-  end
-
-  describe "when specifying local override" do
-    it "explodes if given path does not exist on runtime" do
-      build_git "rack", "0.8"
-
-      FileUtils.cp_r("#{lib_path('rack-0.8')}/.", lib_path('local-rack'))
-
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "master"
-      G
-
-      bundle %|config local.rack #{lib_path('local-rack')}|
-      bundle :install
-      expect(out).to match(/at #{lib_path('local-rack')}/)
-
-      FileUtils.rm_rf(lib_path('local-rack'))
-      run "require 'rack'", :expect_err => true
-      expect(err).to match(/Cannot use local override for rack-0.8 because #{Regexp.escape(lib_path('local-rack').to_s)} does not exist/)
-    end
-
-    it "explodes if branch is not given on runtime" do
-      build_git "rack", "0.8"
-
-      FileUtils.cp_r("#{lib_path('rack-0.8')}/.", lib_path('local-rack'))
-
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "master"
-      G
-
-      bundle %|config local.rack #{lib_path('local-rack')}|
-      bundle :install
-      expect(out).to match(/at #{lib_path('local-rack')}/)
-
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", :git => "#{lib_path('rack-0.8')}"
-      G
-
-      run "require 'rack'", :expect_err => true
-      expect(err).to match(/because :branch is not specified in Gemfile/)
-    end
-
-    it "explodes on different branches on runtime" do
-      build_git "rack", "0.8"
-
-      FileUtils.cp_r("#{lib_path('rack-0.8')}/.", lib_path('local-rack'))
-
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "master"
-      G
-
-      bundle %|config local.rack #{lib_path('local-rack')}|
-      bundle :install
-      expect(out).to match(/at #{lib_path('local-rack')}/)
-
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "changed"
-      G
-
-      run "require 'rack'", :expect_err => true
-      expect(err).to match(/is using branch master but Gemfile specifies changed/)
-    end
-
-    it "explodes on refs with different branches on runtime" do
-      build_git "rack", "0.8"
-
-      FileUtils.cp_r("#{lib_path('rack-0.8')}/.", lib_path('local-rack'))
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", :git => "#{lib_path('rack-0.8')}", :ref => "master", :branch => "master"
-      G
-
-      gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", :git => "#{lib_path('rack-0.8')}", :ref => "master", :branch => "nonexistant"
-      G
-
-      bundle %|config local.rack #{lib_path('local-rack')}|
-      run "require 'rack'", :expect_err => true
-      expect(err).to match(/is using branch master but Gemfile specifies nonexistant/)
-    end
-  end
-
-  describe "when excluding groups" do
-    it "doesn't change the resolve if --without is used" do
-      install_gemfile <<-G, :without => :rails
-        source "file://#{gem_repo1}"
-        gem "activesupport"
-
-        group :rails do
-          gem "rails", "2.3.2"
-        end
-      G
-
-      install_gems "activesupport-2.3.5"
-
-      should_be_installed "activesupport 2.3.2", :groups => :default
-    end
-
-    it "remembers --without and does not bail on bare Bundler.setup" do
-      install_gemfile <<-G, :without => :rails
-        source "file://#{gem_repo1}"
-        gem "activesupport"
-
-        group :rails do
-          gem "rails", "2.3.2"
-        end
-      G
-
-      install_gems "activesupport-2.3.5"
-
-      should_be_installed "activesupport 2.3.2"
-    end
-
-    it "remembers --without and does not include groups passed to Bundler.setup" do
-      install_gemfile <<-G, :without => :rails
-        source "file://#{gem_repo1}"
-        gem "activesupport"
-
-        group :rack do
-          gem "rack"
-        end
-
-        group :rails do
-          gem "rails", "2.3.2"
-        end
-      G
-
-      should_not_be_installed "activesupport 2.3.2", :groups => :rack
-      should_be_installed "rack 1.0.0", :groups => :rack
-    end
-  end
-
-  # Unfortunately, gem_prelude does not record the information about
-  # activated gems, so this test cannot work on 1.9 :(
-  if RUBY_VERSION < "1.9"
-    describe "preactivated gems" do
-      it "raises an exception if a pre activated gem conflicts with the bundle" do
-        system_gems "thin-1.0", "rack-1.0.0"
-        build_gem "thin", "1.1", :to_system => true do |s|
-          s.add_dependency "rack"
-        end
-
-        gemfile <<-G
-          gem "thin", "1.0"
-        G
-
-        ruby <<-R
-          require 'rubygems'
-          gem "thin"
-          require 'bundler'
-          begin
-            Bundler.setup
-            puts "FAIL"
-          rescue Gem::LoadError => e
-            puts e.message
-          end
-        R
-
-        expect(out).to eq("You have already activated thin 1.1, but your Gemfile requires thin 1.0. Prepending `bundle exec` to your command may solve this.")
-      end
-
-      it "version_requirement is now deprecated in rubygems 1.4.0+" do
-        system_gems "thin-1.0", "rack-1.0.0"
-        build_gem "thin", "1.1", :to_system => true do |s|
-          s.add_dependency "rack"
-        end
-
-        gemfile <<-G
-          gem "thin", "1.0"
-        G
-
-        ruby <<-R, :expect_err => true
-          require 'rubygems'
-          gem "thin"
-          require 'bundler'
-          begin
-            Bundler.setup
-            puts "FAIL"
-          rescue Gem::LoadError => e
-            puts e.message
-          end
-        R
-
-        expect(err).to be_empty
-      end
-    end
-  end
-
-  # Rubygems returns loaded_from as a string
-  it "has loaded_from as a string on all specs" do
-    build_git "foo"
-    build_git "no-gemspec", :gemspec => false
-
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack"
-      gem "foo", :git => "#{lib_path('foo-1.0')}"
-      gem "no-gemspec", "1.0", :git => "#{lib_path('no-gemspec-1.0')}"
-    G
-
-    run <<-R
-      Gem.loaded_specs.each do |n, s|
-        puts "FAIL" unless s.loaded_from.is_a?(String)
-      end
-    R
-
-    expect(out).to be_empty
-  end
-
-  it "ignores empty gem paths" do
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "rack"
-    G
-
-    ENV["GEM_HOME"] = ""
-    bundle %{exec ruby -e "require 'set'"}
-
-    expect(err).to be_empty
-  end
-
-  it "should prepend gemspec require paths to $LOAD_PATH in order" do
-    update_repo2 do
-      build_gem("requirepaths") do |s|
-        s.write("lib/rq.rb", "puts 'yay'")
-        s.write("src/rq.rb", "puts 'nooo'")
-        s.require_paths = ["lib", "src"]
-      end
-    end
-
-    install_gemfile <<-G
-      source "file://#{gem_repo2}"
-      gem "requirepaths", :require => nil
-    G
-
-    run "require 'rq'"
-    expect(out).to eq("yay")
-  end
-
-  it "stubs out Gem.refresh so it does not reveal system gems" do
-    system_gems "rack-1.0.0"
-
-    install_gemfile <<-G
-      source "file://#{gem_repo1}"
-      gem "activesupport"
-    G
-
-    run <<-R
-      puts Bundler.rubygems.find_name("rack").inspect
-      Gem.refresh
-      puts Bundler.rubygems.find_name("rack").inspect
-    R
-
-    expect(out).to eq("[]\n[]")
-  end
-
-  describe "when a vendored gem specification uses the :path option" do
-    it "should resolve paths relative to the Gemfile" do
-      path = bundled_app(File.join('vendor', 'foo'))
-      build_lib "foo", :path => path
-
-      # If the .gemspec exists, then Bundler handles the path differently.
-      # See Source::Path.load_spec_files for details.
-      FileUtils.rm(File.join(path, 'foo.gemspec'))
-
-      install_gemfile <<-G
-        gem 'foo', '1.2.3', :path => 'vendor/foo'
-      G
-
-      Dir.chdir(bundled_app.parent) do
-        run <<-R, :env => {"BUNDLE_GEMFILE" => bundled_app('Gemfile')}
-          require 'foo'
-        R
-      end
-      expect(err).to eq("")
-    end
-
-    it "should make sure the Bundler.root is really included in the path relative to the Gemfile" do
-      relative_path = File.join('vendor', Dir.pwd[1..-1], 'foo')
-      absolute_path = bundled_app(relative_path)
-      FileUtils.mkdir_p(absolute_path)
-      build_lib "foo", :path => absolute_path
-
-      # If the .gemspec exists, then Bundler handles the path differently.
-      # See Source::Path.load_spec_files for details.
-      FileUtils.rm(File.join(absolute_path, 'foo.gemspec'))
-
-      gemfile <<-G
-        gem 'foo', '1.2.3', :path => '#{relative_path}'
-      G
-
-      bundle :install
-
-      Dir.chdir(bundled_app.parent) do
-        run <<-R, :env => {"BUNDLE_GEMFILE" => bundled_app('Gemfile')}
-          require 'foo'
-        R
-      end
-
-      expect(err).to eq("")
-    end
-  end
-
-  describe "with git gems that don't have gemspecs" do
-    before :each do
-      build_git "no-gemspec", :gemspec => false
-
-      install_gemfile <<-G
-        gem "no-gemspec", "1.0", :git => "#{lib_path('no-gemspec-1.0')}"
-      G
-    end
-
-    it "loads the library via a virtual spec" do
-      run <<-R
-        require 'no-gemspec'
-        puts NOGEMSPEC
-      R
-
-      expect(out).to eq("1.0")
-    end
-  end
-
-  describe "with bundled and system gems" do
-    before :each do
-      system_gems "rack-1.0.0"
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-
-        gem "activesupport", "2.3.5"
-      G
-    end
-
-    it "does not pull in system gems" do
-      run <<-R
-        require 'rubygems'
-
-        begin;
-          require 'rack'
-        rescue LoadError
-          puts 'WIN'
-        end
-      R
-
-      expect(out).to eq("WIN")
-    end
-
-    it "provides a gem method" do
-      run <<-R
-        gem 'activesupport'
-        require 'activesupport'
-        puts ACTIVESUPPORT
-      R
-
-      expect(out).to eq("2.3.5")
-    end
-
-    it "raises an exception if gem is used to invoke a system gem not in the bundle" do
-      run <<-R
-        begin
-          gem 'rack'
-        rescue LoadError => e
-          puts e.message
-        end
-      R
-
-      expect(out).to eq("rack is not part of the bundle. Add it to Gemfile.")
-    end
-
-    it "sets GEM_HOME appropriately" do
-      run "puts ENV['GEM_HOME']"
-      expect(out).to eq(default_bundle_path.to_s)
-    end
-  end
-
-  describe "with system gems in the bundle" do
-    before :each do
-      system_gems "rack-1.0.0"
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", "1.0.0"
-        gem "activesupport", "2.3.5"
-      G
-    end
-
-    it "sets GEM_PATH appropriately" do
-      run "puts Gem.path"
-      paths = out.split("\n")
-      expect(paths).to include(system_gem_path.to_s)
-      expect(paths).to include(default_bundle_path.to_s)
-    end
-  end
-
-  describe "with a gemspec that requires other files" do
-    before :each do
-      build_git "bar", :gemspec => false do |s|
-        s.write "lib/bar/version.rb", %{BAR_VERSION = '1.0'}
-        s.write "bar.gemspec", <<-G
-          lib = File.expand_path('../lib/', __FILE__)
-          $:.unshift lib unless $:.include?(lib)
-          require 'bar/version'
-
-          Gem::Specification.new do |s|
-            s.name        = 'bar'
-            s.version     = BAR_VERSION
-            s.summary     = 'Bar'
-            s.files       = Dir["lib/**/*.rb"]
-          end
-        G
-      end
-
-      gemfile <<-G
-        gem "bar", :git => "#{lib_path('bar-1.0')}"
-      G
-    end
-
-    it "evals each gemspec in the context of its parent directory" do
-      bundle :install
-      run "require 'bar'; puts BAR"
-      expect(out).to eq("1.0")
-    end
-
-    it "error intelligently if the gemspec has a LoadError" do
-      update_git "bar", :gemspec => false do |s|
-        s.write "bar.gemspec", "require 'foobarbaz'"
-      end
-      bundle :install
-      expect(out).to include("was a LoadError while loading bar.gemspec")
-      expect(out).to include("foobarbaz")
-      expect(out).to include("bar.gemspec:1")
-      expect(out).to include("try to require a relative path") if RUBY_VERSION >= "1.9"
-    end
-
-    it "evals each gemspec with a binding from the top level" do
-      bundle "install"
-
-      ruby <<-RUBY
-        require 'bundler'
-        def Bundler.require(path)
-          raise "LOSE"
-        end
-        Bundler.load
-      RUBY
-
-      expect(err).to eq("")
-      expect(out).to eq("")
-    end
-  end
-
-  describe "when Bundler is bundled" do
-    it "doesn't blow up" do
-      install_gemfile <<-G
-        gem "bundler", :path => "#{File.expand_path("..", lib)}"
-      G
-
-      bundle %|exec ruby -e "require 'bundler'; Bundler.setup"|
-      expect(err).to be_empty
-    end
-  end
-
-end
diff --git a/spec/runtime/with_clean_env_spec.rb b/spec/runtime/with_clean_env_spec.rb
deleted file mode 100644
index 193a6e5..0000000
--- a/spec/runtime/with_clean_env_spec.rb
+++ /dev/null
@@ -1,91 +0,0 @@
-require "spec_helper"
-
-describe "Bundler.with_env helpers" do
-
-  shared_examples_for "Bundler.with_*_env" do
-    it "should reset and restore the environment" do
-      gem_path = ENV['GEM_PATH']
-
-      Bundler.with_clean_env do
-        expect(`echo $GEM_PATH`.strip).not_to eq(gem_path)
-      end
-
-      expect(ENV['GEM_PATH']).to eq(gem_path)
-    end
-  end
-
-  around do |example|
-    env = Bundler::ORIGINAL_ENV.dup
-    Bundler::ORIGINAL_ENV['BUNDLE_PATH'] = "./Gemfile"
-    example.run
-    Bundler::ORIGINAL_ENV.replace env
-  end
-
-  describe "Bundler.with_clean_env" do
-
-    it_should_behave_like "Bundler.with_*_env"
-
-    it "should keep the original GEM_PATH even in sub processes" do
-      gemfile ""
-      bundle "install --path vendor/bundle"
-
-      code = "Bundler.with_clean_env do;" +
-             "  print ENV['GEM_PATH'] != '';" +
-             "end"
-
-      result = bundle "exec ruby -e #{code.inspect}"
-      expect(result).to eq("true")
-    end
-
-    it "should not pass any bundler environment variables" do
-      Bundler.with_clean_env do
-        expect(`echo $BUNDLE_PATH`.strip).not_to eq('./Gemfile')
-      end
-    end
-
-    it "should not pass RUBYOPT changes" do
-      lib_path = File.expand_path('../../../lib', __FILE__)
-      Bundler::ORIGINAL_ENV['RUBYOPT'] = " -I#{lib_path} -rbundler/setup"
-
-      Bundler.with_clean_env do
-        expect(`echo $RUBYOPT`.strip).not_to include '-rbundler/setup'
-        expect(`echo $RUBYOPT`.strip).not_to include "-I#{lib_path}"
-      end
-
-      expect(Bundler::ORIGINAL_ENV['RUBYOPT']).to eq(" -I#{lib_path} -rbundler/setup")
-    end
-
-    it "should not change ORIGINAL_ENV" do
-      expect(Bundler::ORIGINAL_ENV['BUNDLE_PATH']).to eq('./Gemfile')
-    end
-
-  end
-
-  describe "Bundler.with_original_env" do
-
-    it_should_behave_like "Bundler.with_*_env"
-
-    it "should pass bundler environment variables set before Bundler was run" do
-      Bundler.with_original_env do
-        expect(`echo $BUNDLE_PATH`.strip).to eq('./Gemfile')
-      end
-    end
-  end
-
-  describe "Bundler.clean_system" do
-    it "runs system inside with_clean_env" do
-      Bundler.clean_system(%{echo 'if [ "$BUNDLE_PATH" = "" ]; then exit 42; else exit 1; fi' | /bin/sh})
-      expect($?.exitstatus).to eq(42)
-    end
-  end
-
-  describe "Bundler.clean_exec" do
-    it "runs exec inside with_clean_env" do
-      pid = Kernel.fork do
-        Bundler.clean_exec(%{echo 'if [ "$BUNDLE_PATH" = "" ]; then exit 42; else exit 1; fi' | /bin/sh})
-      end
-      Process.wait(pid)
-      expect($?.exitstatus).to eq(42)
-    end
-  end
-end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
deleted file mode 100644
index bef35a1..0000000
--- a/spec/spec_helper.rb
+++ /dev/null
@@ -1,121 +0,0 @@
-$:.unshift File.expand_path('..', __FILE__)
-$:.unshift File.expand_path('../../lib', __FILE__)
-# stdlib first
-require 'uri'
-require 'digest/sha1'
-require 'fileutils'
-require 'bundler/psyched_yaml'
-require 'rubygems'
-require 'rspec'
-require 'bundler'
-
-# Require the correct version of popen for the current platform
-if RbConfig::CONFIG['host_os'] =~ /mingw|mswin/
-  begin
-    require 'win32/open3'
-  rescue LoadError
-    abort "Run `gem install win32-open3` to be able to run specs"
-  end
-else
-  require 'open3'
-end
-
-Dir["#{File.expand_path('../support', __FILE__)}/*.rb"].each do |file|
-  require file unless file =~ /fakeweb\/.*\.rb/
-end
-
-$debug    = false
-$show_err = true
-
-Spec::Rubygems.setup
-FileUtils.rm_rf(Spec::Path.gem_repo1)
-ENV['RUBYOPT'] = "#{ENV['RUBYOPT']} -r#{Spec::Path.root}/spec/support/hax.rb"
-ENV['BUNDLE_SPEC_RUN'] = "true"
-
-# Don't wrap output in tests
-ENV['THOR_COLUMNS'] = '10000'
-
-RSpec.configure do |config|
-  config.include Spec::Builders
-  config.include Spec::Helpers
-  config.include Spec::Indexes
-  config.include Spec::Matchers
-  config.include Spec::Path
-  config.include Spec::Rubygems
-  config.include Spec::Platforms
-  config.include Spec::Sudo
-  config.include Spec::Permissions
-
-  if ENV['BUNDLER_SUDO_TESTS'] && Spec::Sudo.present?
-    config.filter_run :sudo => true
-  else
-    config.filter_run_excluding :sudo => true
-  end
-
-  if ENV['BUNDLER_REALWORLD_TESTS']
-    config.filter_run :realworld => true
-  else
-    config.filter_run_excluding :realworld => true
-  end
-
-  if RUBY_VERSION >= "1.9"
-    config.filter_run_excluding :ruby => "1.8"
-  else
-    config.filter_run_excluding :ruby => "1.9"
-  end
-
-  if RUBY_VERSION >= "2.0"
-    config.filter_run_excluding :ruby => "1.8"
-    config.filter_run_excluding :ruby => "1.9"
-  else
-    config.filter_run_excluding :ruby => "2.0"
-    config.filter_run_excluding :ruby => "2.1"
-  end
-
-  if Gem::VERSION < "2.2"
-    config.filter_run_excluding :rubygems => "2.2"
-  end
-
-  config.filter_run :focused => true unless ENV['CI']
-  config.run_all_when_everything_filtered = true
-  config.alias_example_to :fit, :focused => true
-
-  original_wd       = Dir.pwd
-  original_path     = ENV['PATH']
-  original_gem_home = ENV['GEM_HOME']
-
-  def pending_jruby_shebang_fix
-    pending "JRuby executables do not have a proper shebang" if RUBY_PLATFORM == "java"
-  end
-
-  config.expect_with :rspec do |c|
-    c.syntax = :expect
-  end
-
-  config.before :all do
-    build_repo1
-  end
-
-  config.before :each do
-    reset!
-    system_gems []
-    in_app_root
-  end
-
-  config.after :each do |example|
-    puts @out if defined?(@out) && example.exception
-
-    Dir.chdir(original_wd)
-    # Reset ENV
-    ENV['PATH']           = original_path
-    ENV['GEM_HOME']       = original_gem_home
-    ENV['GEM_PATH']       = original_gem_home
-    ENV['BUNDLE_PATH']    = nil
-    ENV['BUNDLE_GEMFILE'] = nil
-    ENV['BUNDLER_TEST']   = nil
-    ENV['BUNDLE_FROZEN']  = nil
-    ENV['BUNDLER_SPEC_PLATFORM'] = nil
-    ENV['BUNDLER_SPEC_VERSION']  = nil
-    ENV['BUNDLE_APP_CONFIG']     = nil
-  end
-end
diff --git a/spec/support/artifice/endopint_marshal_fail_basic_authentication.rb b/spec/support/artifice/endopint_marshal_fail_basic_authentication.rb
deleted file mode 100644
index 205b258..0000000
--- a/spec/support/artifice/endopint_marshal_fail_basic_authentication.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-require File.expand_path("../endpoint_marshal_fail", __FILE__)
-
-Artifice.deactivate
-
-class EndpointMarshalFailBasicAuthentication < EndpointMarshalFail
-  before do
-    unless env["HTTP_AUTHORIZATION"]
-      halt 401, "Authentication info not supplied"
-    end
-  end
-end
-
-Artifice.activate_with(EndpointMarshalFailBasicAuthentication)
diff --git a/spec/support/artifice/endpoint.rb b/spec/support/artifice/endpoint.rb
deleted file mode 100644
index 68b41b7..0000000
--- a/spec/support/artifice/endpoint.rb
+++ /dev/null
@@ -1,71 +0,0 @@
-require File.expand_path("../../path.rb", __FILE__)
-require File.expand_path("../../../../lib/bundler/deprecate", __FILE__)
-include Spec::Path
-
-# Set up pretend http gem server with FakeWeb
-$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/artifice*/lib")].first}"
-$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/rack-*/lib")].first}"
-$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/rack-*/lib")].last}"
-$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/tilt*/lib")].first}"
-$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/sinatra*/lib")].first}"
-require 'artifice'
-require 'sinatra/base'
-
-class Endpoint < Sinatra::Base
-
-  helpers do
-    def dependencies_for(gem_names, marshal = gem_repo1("specs.4.8"))
-      return [] if gem_names.nil? || gem_names.empty?
-
-      require 'rubygems'
-      require 'bundler'
-      Bundler::Deprecate.skip_during do
-        Marshal.load(File.open(marshal).read).map do |name, version, platform|
-          spec = load_spec(name, version, platform)
-          if gem_names.include?(spec.name)
-            {
-              :name         => spec.name,
-              :number       => spec.version.version,
-              :platform     => spec.platform.to_s,
-              :dependencies => spec.dependencies.select {|dep| dep.type == :runtime }.map do |dep|
-                [dep.name, dep.requirement.requirements.map {|a| a.join(" ") }.join(", ")]
-              end
-            }
-          end
-        end.compact
-      end
-    end
-
-    def load_spec(name, version, platform)
-      full_name = "#{name}-#{version}"
-      full_name += "-#{platform}" if platform != "ruby"
-      Marshal.load(Gem.inflate(File.open(gem_repo1("quick/Marshal.4.8/#{full_name}.gemspec.rz")).read))
-    end
-  end
-
-  get "/quick/Marshal.4.8/:id" do
-    redirect "/fetch/actual/gem/#{params[:id]}"
-  end
-
-  get "/fetch/actual/gem/:id" do
-    File.read("#{gem_repo1}/quick/Marshal.4.8/#{params[:id]}")
-  end
-
-  get "/gems/:id" do
-    File.read("#{gem_repo1}/gems/#{params[:id]}")
-  end
-
-  get "/api/v1/dependencies" do
-    Marshal.dump(dependencies_for(params[:gems]))
-  end
-
-  get "/specs.4.8.gz" do
-    File.read("#{gem_repo1}/specs.4.8.gz")
-  end
-
-  get "/prerelease_specs.4.8.gz" do
-    File.read("#{gem_repo1}/prerelease_specs.4.8.gz")
-  end
-end
-
-Artifice.activate_with(Endpoint)
diff --git a/spec/support/artifice/endpoint_500.rb b/spec/support/artifice/endpoint_500.rb
deleted file mode 100644
index 84997db..0000000
--- a/spec/support/artifice/endpoint_500.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-require File.expand_path("../../path.rb", __FILE__)
-include Spec::Path
-
-$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/artifice*/lib")].first}"
-$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/rack-*/lib")].first}"
-$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/rack-*/lib")].last}"
-$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/tilt*/lib")].first}"
-$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/sinatra*/lib")].first}"
-
-require 'artifice'
-require 'sinatra/base'
-
-Artifice.deactivate
-
-class Endpoint500 < Sinatra::Base
-  get "/quick/Marshal.4.8/:id" do
-    halt 500
-  end
-
-  get "/fetch/actual/gem/:id" do
-    halt 500
-  end
-
-  get "/gems/:id" do
-    halt 500
-  end
-
-  get "/api/v1/dependencies" do
-    halt 500
-  end
-
-  get "/specs.4.8.gz" do
-    halt 500
-  end
-end
-
-Artifice.activate_with(Endpoint500)
diff --git a/spec/support/artifice/endpoint_api_missing.rb b/spec/support/artifice/endpoint_api_missing.rb
deleted file mode 100644
index bc89db3..0000000
--- a/spec/support/artifice/endpoint_api_missing.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-require File.expand_path("../endpoint", __FILE__)
-
-Artifice.deactivate
-
-class EndpointApiMissing < Endpoint
-  get "/fetch/actual/gem/:id" do
-    $stderr.puts params[:id]
-    if params[:id] == 'rack-1.0.gemspec.rz'
-      halt 404
-    else
-      File.read("#{gem_repo2}/quick/Marshal.4.8/#{params[:id]}")
-    end
-  end
-end
-
-Artifice.activate_with(EndpointApiMissing)
diff --git a/spec/support/artifice/endpoint_basic_authentication.rb b/spec/support/artifice/endpoint_basic_authentication.rb
deleted file mode 100644
index 0cfba89..0000000
--- a/spec/support/artifice/endpoint_basic_authentication.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-require File.expand_path("../endpoint", __FILE__)
-
-Artifice.deactivate
-
-class EndpointBasicAuthentication < Endpoint
-  before do
-    unless env["HTTP_AUTHORIZATION"]
-      halt 401, "Authentication info not supplied"
-    end
-  end
-end
-
-Artifice.activate_with(EndpointBasicAuthentication)
diff --git a/spec/support/artifice/endpoint_creds_diff_host.rb b/spec/support/artifice/endpoint_creds_diff_host.rb
deleted file mode 100644
index 21cce22..0000000
--- a/spec/support/artifice/endpoint_creds_diff_host.rb
+++ /dev/null
@@ -1,38 +0,0 @@
-require File.expand_path("../endpoint", __FILE__)
-
-Artifice.deactivate
-
-class EndpointCredsDiffHost < Endpoint
-  helpers do
-    def auth
-      @auth ||= Rack::Auth::Basic::Request.new(request.env)
-    end
-
-    def authorized?
-      auth.provided? && auth.basic? && auth.credentials && auth.credentials == ['user', 'pass']
-    end
-
-    def protected!
-      unless authorized?
-        response['WWW-Authenticate'] = %(Basic realm="Testing HTTP Auth")
-        throw(:halt, [401, "Not authorized\n"])
-      end
-    end
-  end
-
-  before do
-    protected! unless request.path_info.include?("/no/creds/")
-  end
-
-  get "/gems/:id" do
-    redirect "http://diffhost.com/no/creds/#{params[:id]}"
-  end
-
-  get "/no/creds/:id" do
-    if request.host.include?("diffhost") && !auth.provided?
-      File.read("#{gem_repo1}/gems/#{params[:id]}")
-    end
-  end
-end
-
-Artifice.activate_with(EndpointCredsDiffHost)
diff --git a/spec/support/artifice/endpoint_extra.rb b/spec/support/artifice/endpoint_extra.rb
deleted file mode 100644
index c50428f..0000000
--- a/spec/support/artifice/endpoint_extra.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-require File.expand_path("../endpoint", __FILE__)
-
-Artifice.deactivate
-
-class EndpointExtra < Endpoint
-  get "/extra/api/v1/dependencies" do
-    halt 404
-  end
-
-  get "/extra/specs.4.8.gz" do
-    File.read("#{gem_repo2}/specs.4.8.gz")
-  end
-
-  get "/extra/prerelease_specs.4.8.gz" do
-    File.read("#{gem_repo2}/prerelease_specs.4.8.gz")
-  end
-
-  get "/extra/quick/Marshal.4.8/:id" do
-    redirect "/extra/fetch/actual/gem/#{params[:id]}"
-  end
-
-  get "/extra/fetch/actual/gem/:id" do
-    File.read("#{gem_repo2}/quick/Marshal.4.8/#{params[:id]}")
-  end
-
-  get "/extra/gems/:id" do
-    File.read("#{gem_repo2}/gems/#{params[:id]}")
-  end
-end
-
-Artifice.activate_with(EndpointExtra)
diff --git a/spec/support/artifice/endpoint_extra_missing.rb b/spec/support/artifice/endpoint_extra_missing.rb
deleted file mode 100644
index 29322ad..0000000
--- a/spec/support/artifice/endpoint_extra_missing.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-require File.expand_path("../endpoint_extra", __FILE__)
-
-Artifice.deactivate
-
-class EndpointExtraMissing < EndpointExtra
-  get "/extra/fetch/actual/gem/:id" do
-    if params[:id] == 'missing-1.0.gemspec.rz'
-      halt 404
-    else
-      File.read("#{gem_repo2}/quick/Marshal.4.8/#{params[:id]}")
-    end
-  end
-end
-
-Artifice.activate_with(EndpointExtraMissing)
diff --git a/spec/support/artifice/endpoint_fallback.rb b/spec/support/artifice/endpoint_fallback.rb
deleted file mode 100644
index db02a88..0000000
--- a/spec/support/artifice/endpoint_fallback.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-require File.expand_path("../endpoint", __FILE__)
-
-Artifice.deactivate
-
-class EndpointFallback < Endpoint
-  DEPENDENCY_LIMIT = 60
-
-  get "/api/v1/dependencies" do
-    if params[:gems] && params[:gems].size <= DEPENDENCY_LIMIT
-      Marshal.dump(dependencies_for(params[:gems]))
-    else
-      halt 413, "Too many gems to resolve, please request less than #{DEPENDENCY_LIMIT} gems"
-    end
-  end
-end
-
-Artifice.activate_with(EndpointFallback)
diff --git a/spec/support/artifice/endpoint_host_redirect.rb b/spec/support/artifice/endpoint_host_redirect.rb
deleted file mode 100644
index e44d63e..0000000
--- a/spec/support/artifice/endpoint_host_redirect.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-require File.expand_path("../endpoint", __FILE__)
-
-Artifice.deactivate
-
-class EndpointHostRedirect < Endpoint
-  get "/fetch/actual/gem/:id", :host_name => 'localgemserver.test' do
-    redirect "http://bundler.localgemserver.test#{request.path_info}"
-  end
-
-  get "/api/v1/dependencies" do
-    status 404
-  end
-end
-
-Artifice.activate_with(EndpointHostRedirect)
diff --git a/spec/support/artifice/endpoint_marshal_fail.rb b/spec/support/artifice/endpoint_marshal_fail.rb
deleted file mode 100644
index a0dc182..0000000
--- a/spec/support/artifice/endpoint_marshal_fail.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-require File.expand_path("../endpoint_fallback", __FILE__)
-
-Artifice.deactivate
-
-class EndpointMarshalFail < EndpointFallback
-  get "/api/v1/dependencies" do
-    "f0283y01hasf"
-  end
-end
-
-Artifice.activate_with(EndpointMarshalFail)
diff --git a/spec/support/artifice/endpoint_redirect.rb b/spec/support/artifice/endpoint_redirect.rb
deleted file mode 100644
index 2b48fa5..0000000
--- a/spec/support/artifice/endpoint_redirect.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-require File.expand_path("../endpoint", __FILE__)
-
-Artifice.deactivate
-
-class EndpointRedirect < Endpoint
-  get "/fetch/actual/gem/:id" do
-    redirect "/fetch/actual/gem/#{params[:id]}"
-  end
-
-  get "/api/v1/dependencies" do
-    status 404
-  end
-end
-
-Artifice.activate_with(EndpointRedirect)
diff --git a/spec/support/artifice/endpoint_strict_basic_authentication.rb b/spec/support/artifice/endpoint_strict_basic_authentication.rb
deleted file mode 100644
index e7329ab..0000000
--- a/spec/support/artifice/endpoint_strict_basic_authentication.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-require File.expand_path("../endpoint", __FILE__)
-
-Artifice.deactivate
-
-class EndpointStrictBasicAuthentication < Endpoint
-  before do
-    unless env["HTTP_AUTHORIZATION"]
-      halt 401, "Authentication info not supplied"
-    end
-
-    # Only accepts password == "password"
-    unless env["HTTP_AUTHORIZATION"] == "Basic dXNlcjpwYXNz"
-      halt 403, "Authentication failed"
-    end
-  end
-end
-
-Artifice.activate_with(EndpointStrictBasicAuthentication)
diff --git a/spec/support/artifice/endpoint_timeout.rb b/spec/support/artifice/endpoint_timeout.rb
deleted file mode 100644
index da68220..0000000
--- a/spec/support/artifice/endpoint_timeout.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-require File.expand_path("../endpoint_fallback", __FILE__)
-
-Artifice.deactivate
-
-class EndpointTimeout < EndpointFallback
-  SLEEP_TIMEOUT = 15
-
-  get "/api/v1/dependencies" do
-    sleep(SLEEP_TIMEOUT)
-  end
-end
-
-Artifice.activate_with(EndpointTimeout)
diff --git a/spec/support/builders.rb b/spec/support/builders.rb
deleted file mode 100644
index a49cda8..0000000
--- a/spec/support/builders.rb
+++ /dev/null
@@ -1,681 +0,0 @@
-require 'bundler/shared_helpers'
-
-module Spec
-  module Builders
-    def self.constantize(name)
-      name.gsub('-', '').upcase
-    end
-
-    def v(version)
-      Gem::Version.new(version)
-    end
-
-    def pl(platform)
-      Gem::Platform.new(platform)
-    end
-
-    def build_repo1
-      build_repo gem_repo1 do
-        build_gem "rack", %w(0.9.1 1.0.0) do |s|
-          s.executables = "rackup"
-          s.post_install_message = "Rack's post install message"
-        end
-
-        build_gem "thin" do |s|
-          s.add_dependency "rack"
-          s.post_install_message = "Thin's post install message"
-        end
-
-        build_gem "rack-obama" do |s|
-          s.add_dependency "rack"
-          s.post_install_message = "Rack-obama's post install message"
-        end
-
-        build_gem "rack_middleware", "1.0" do |s|
-          s.add_dependency "rack", "0.9.1"
-        end
-
-        build_gem "rails",          "2.3.2" do |s|
-          s.executables = "rails"
-          s.add_dependency "rake",           "10.0.2"
-          s.add_dependency "actionpack",     "2.3.2"
-          s.add_dependency "activerecord",   "2.3.2"
-          s.add_dependency "actionmailer",   "2.3.2"
-          s.add_dependency "activeresource", "2.3.2"
-        end
-        build_gem "actionpack",     "2.3.2" do |s|
-          s.add_dependency "activesupport", "2.3.2"
-        end
-        build_gem "activerecord",   ["2.3.1", "2.3.2"] do |s|
-          s.add_dependency "activesupport", "2.3.2"
-        end
-        build_gem "actionmailer",   "2.3.2" do |s|
-          s.add_dependency "activesupport", "2.3.2"
-        end
-        build_gem "activeresource", "2.3.2" do |s|
-          s.add_dependency "activesupport", "2.3.2"
-        end
-        build_gem "activesupport",  %w(1.2.3 2.3.2 2.3.5)
-
-        build_gem "activemerchant" do |s|
-          s.add_dependency "activesupport", ">= 2.0.0"
-        end
-
-        build_gem "rails_fail" do |s|
-          s.add_dependency "activesupport", "= 1.2.3"
-        end
-
-        build_gem "missing_dep" do |s|
-          s.add_dependency "not_here"
-        end
-
-        build_gem "rspec", "1.2.7", :no_default => true do |s|
-          s.write "lib/spec.rb", "SPEC = '1.2.7'"
-        end
-
-        build_gem "rack-test", :no_default => true do |s|
-          s.write "lib/rack/test.rb", "RACK_TEST = '1.0'"
-        end
-
-        build_gem "platform_specific" do |s|
-          s.platform = Gem::Platform.local
-          s.write "lib/platform_specific.rb", "PLATFORM_SPECIFIC = '1.0.0 #{Gem::Platform.local}'"
-        end
-
-        build_gem "platform_specific" do |s|
-          s.platform = "java"
-          s.write "lib/platform_specific.rb", "PLATFORM_SPECIFIC = '1.0.0 JAVA'"
-        end
-
-        build_gem "platform_specific" do |s|
-          s.platform = "ruby"
-          s.write "lib/platform_specific.rb", "PLATFORM_SPECIFIC = '1.0.0 RUBY'"
-        end
-
-        build_gem "platform_specific" do |s|
-          s.platform = "x86-mswin32"
-          s.write "lib/platform_specific.rb", "PLATFORM_SPECIFIC = '1.0.0 MSWIN'"
-        end
-
-        build_gem "platform_specific" do |s|
-          s.platform = "x86-darwin-100"
-          s.write "lib/platform_specific.rb", "PLATFORM_SPECIFIC = '1.0.0 x86-darwin-100'"
-        end
-
-        build_gem "only_java" do |s|
-          s.platform = "java"
-        end
-
-        build_gem "nokogiri", "1.4.2"
-        build_gem "nokogiri", "1.4.2" do |s|
-          s.platform = "java"
-          s.write "lib/nokogiri.rb", "NOKOGIRI = '1.4.2 JAVA'"
-          s.add_dependency "weakling", ">= 0.0.3"
-        end
-
-        build_gem "weakling", "0.0.3"
-
-        build_gem "multiple_versioned_deps" do |s|
-          s.add_dependency "weakling", ">= 0.0.1", "< 0.1"
-        end
-
-        build_gem "not_released", "1.0.pre"
-
-        build_gem "has_prerelease", "1.0"
-        build_gem "has_prerelease", "1.1.pre"
-
-        build_gem "with_development_dependency" do |s|
-          s.add_development_dependency "activesupport", "= 2.3.5"
-        end
-
-        build_gem "with_license" do |s|
-          s.license = "MIT"
-        end
-
-        build_gem "with_implicit_rake_dep" do |s|
-          s.extensions << "Rakefile"
-          s.write "Rakefile", <<-RUBY
-            task :default do
-              path = File.expand_path("../lib", __FILE__)
-              FileUtils.mkdir_p(path)
-              File.open("\#{path}/implicit_rake_dep.rb", "w") do |f|
-                f.puts "IMPLICIT_RAKE_DEP = 'YES'"
-              end
-            end
-          RUBY
-        end
-
-        build_gem "another_implicit_rake_dep" do |s|
-          s.extensions << "Rakefile"
-          s.write "Rakefile", <<-RUBY
-            task :default do
-              path = File.expand_path("../lib", __FILE__)
-              FileUtils.mkdir_p(path)
-              File.open("\#{path}/another_implicit_rake_dep.rb", "w") do |f|
-                f.puts "ANOTHER_IMPLICIT_RAKE_DEP = 'YES'"
-              end
-            end
-          RUBY
-        end
-
-        build_gem "very_simple_binary" do |s|
-          s.add_c_extension
-        end
-
-        build_gem "bundler", "0.9" do |s|
-          s.executables = "bundle"
-          s.write "bin/bundle", "puts 'FAIL'"
-        end
-
-        # The bundler 0.8 gem has a rubygems plugin that always loads :(
-        build_gem "bundler", "0.8.1" do |s|
-          s.write "lib/bundler/omg.rb", ""
-          s.write "lib/rubygems_plugin.rb", "require 'bundler/omg' ; puts 'FAIL'"
-        end
-
-        build_gem "bundler_dep" do |s|
-          s.add_dependency "bundler"
-        end
-
-        # The yard gem iterates over Gem.source_index looking for plugins
-        build_gem "yard" do |s|
-          s.write "lib/yard.rb", <<-Y
-            if Gem::Version.new(Gem::VERSION) >= Gem::Version.new("1.8.10")
-              specs = Gem::Specification
-            else
-              specs = Gem.source_index.find_name('')
-            end
-            specs.each do |gem|
-              puts gem.full_name
-            end
-          Y
-        end
-
-        # The rcov gem is platform mswin32, but has no arch
-        build_gem "rcov" do |s|
-          s.platform = Gem::Platform.new([nil, "mswin32", nil])
-          s.write "lib/rcov.rb", "RCOV = '1.0.0'"
-        end
-
-        build_gem "net-ssh"
-        build_gem "net-sftp", "1.1.1" do |s|
-          s.add_dependency "net-ssh", ">= 1.0.0", "< 1.99.0"
-        end
-
-        # Test comlicated gem dependencies for install
-        build_gem "net_a" do |s|
-          s.add_dependency "net_b"
-          s.add_dependency "net_build_extensions"
-        end
-
-        build_gem "net_b"
-
-        build_gem "net_build_extensions" do |s|
-          s.add_dependency "rake"
-          s.extensions << "Rakefile"
-          s.write "Rakefile", <<-RUBY
-            task :default do
-              path = File.expand_path("../lib", __FILE__)
-              FileUtils.mkdir_p(path)
-              File.open("\#{path}/net_build_extensions.rb", "w") do |f|
-                f.puts "NET_BUILD_EXTENSIONS = 'YES'"
-              end
-            end
-          RUBY
-        end
-
-        build_gem "net_c" do |s|
-          s.add_dependency "net_a"
-          s.add_dependency "net_d"
-        end
-
-        build_gem "net_d"
-
-        build_gem "net_e" do |s|
-          s.add_dependency "net_d"
-        end
-
-        # Capistrano did this (at least until version 2.5.10)
-        # Rubygems 2.2 doesn't allow the specifying of a dependency twice
-        # See https://github.com/rubygems/rubygems/commit/03dbac93a3396a80db258d9bc63500333c25bd2f
-        build_gem "double_deps", "1.0", :skip_validation => true do |s|
-          s.add_dependency "net-ssh", ">= 1.0.0"
-          s.add_dependency "net-ssh"
-        end
-
-        build_gem "foo"
-      end
-    end
-
-    def build_repo2(&blk)
-      FileUtils.rm_rf gem_repo2
-      FileUtils.cp_r gem_repo1, gem_repo2
-      update_repo2(&blk) if block_given?
-    end
-
-    def build_repo3
-      build_repo gem_repo3 do
-        build_gem "rack"
-      end
-      FileUtils.rm_rf Dir[gem_repo3("prerelease*")]
-    end
-
-    def update_repo2
-      update_repo gem_repo2 do
-        build_gem "rack", "1.2" do |s|
-          s.executables = "rackup"
-        end
-        yield if block_given?
-      end
-    end
-
-    def build_security_repo
-      build_repo security_repo do
-        build_gem "rack"
-
-        build_gem "signed_gem" do |s|
-          cert = 'signing-cert.pem'
-          pkey = 'signing-pkey.pem'
-          s.write cert, TEST_CERT
-          s.write pkey, TEST_PKEY
-          s.signing_key = pkey
-          s.cert_chain = [cert]
-        end
-      end
-
-    end
-
-    def build_repo(path, &blk)
-      return if File.directory?(path)
-      rake_path = Dir["#{Path.base_system_gems}/**/rake*.gem"].first
-      if rake_path
-        FileUtils.mkdir_p("#{path}/gems")
-        FileUtils.cp rake_path, "#{path}/gems/"
-      else
-        abort "You need to `rm -rf #{tmp}`"
-      end
-      update_repo(path, &blk)
-    end
-
-    def update_repo(path)
-      @_build_path = "#{path}/gems"
-      yield
-      @_build_path = nil
-      with_gem_path_as Path.base_system_gems do
-        Dir.chdir(path) { gem_command :generate_index }
-      end
-    end
-
-    def build_index(&block)
-      index = Bundler::Index.new
-      IndexBuilder.run(index, &block) if block_given?
-      index
-    end
-
-    def build_spec(name, version, platform = nil, &block)
-      Array(version).map do |v|
-        Gem::Specification.new do |s|
-          s.name     = name
-          s.version  = Gem::Version.new(v)
-          s.platform = platform
-          DepBuilder.run(s, &block) if block_given?
-        end
-      end
-    end
-
-    def build_dep(name, requirements = Gem::Requirement.default, type = :runtime)
-      Bundler::Dependency.new(name, :version => requirements)
-    end
-
-    def build_lib(name, *args, &blk)
-      build_with(LibBuilder, name, args, &blk)
-    end
-
-    def build_gem(name, *args, &blk)
-      build_with(GemBuilder, name, args, &blk)
-    end
-
-    def build_git(name, *args, &block)
-      opts = args.last.is_a?(Hash) ? args.last : {}
-      builder = opts[:bare] ? GitBareBuilder : GitBuilder
-      spec = build_with(builder, name, args, &block)
-      GitReader.new(opts[:path] || lib_path(spec.full_name))
-    end
-
-    def update_git(name, *args, &block)
-      spec = build_with(GitUpdater, name, args, &block)
-      GitReader.new lib_path(spec.full_name)
-    end
-
-  private
-
-    def build_with(builder, name, args, &blk)
-      @_build_path ||= nil
-      options  = args.last.is_a?(Hash) ? args.pop : {}
-      versions = args.last || "1.0"
-      spec     = nil
-
-      options[:path] ||= @_build_path
-
-      Array(versions).each do |version|
-        spec = builder.new(self, name, version)
-        if !spec.authors or spec.authors.empty?
-          spec.authors = ["no one"]
-        end
-        yield spec if block_given?
-        spec._build(options)
-      end
-
-      spec
-    end
-
-    class IndexBuilder
-      include Builders
-
-      def self.run(index, &block)
-        new(index).run(&block)
-      end
-
-      def initialize(index)
-        @index = index
-      end
-
-      def run(&block)
-        instance_eval(&block)
-      end
-
-      def gem(*args, &block)
-        build_spec(*args, &block).each do |s|
-          @index << s
-        end
-      end
-
-      def platforms(platforms)
-        platforms.split(/\s+/).each do |platform|
-          platform.gsub!(/^(mswin32)$/, 'x86-\1')
-          yield Gem::Platform.new(platform)
-        end
-      end
-
-      def versions(versions)
-        versions.split(/\s+/).each { |version| yield v(version) }
-      end
-    end
-
-    class DepBuilder
-      include Builders
-
-      def self.run(spec, &block)
-        new(spec).run(&block)
-      end
-
-      def initialize(spec)
-        @spec = spec
-      end
-
-      def run(&block)
-        instance_eval(&block)
-      end
-
-      def runtime(name, requirements)
-        @spec.add_runtime_dependency(name, requirements)
-      end
-
-      alias dep runtime
-    end
-
-    class LibBuilder
-      def initialize(context, name, version)
-        @context = context
-        @name    = name
-        @spec = Gem::Specification.new do |s|
-          s.name    = name
-          s.version = version
-          s.summary = "This is just a fake gem for testing"
-        end
-        @files = {}
-      end
-
-      def method_missing(*args, &blk)
-        @spec.send(*args, &blk)
-      end
-
-      def write(file, source = "")
-        @files[file] = source
-      end
-
-      def executables=(val)
-        Array(val).each do |file|
-          write "#{@spec.bindir}/#{file}", "require '#{@name}' ; puts #{@name.upcase}"
-        end
-        @spec.executables = Array(val)
-      end
-
-      def add_c_extension
-        require_paths << 'ext'
-        extensions << "ext/extconf.rb"
-        write "ext/extconf.rb", <<-RUBY
-          require "mkmf"
-
-          # exit 1 unless with_config("simple")
-
-          extension_name = "very_simple_binary_c"
-          dir_config extension_name
-          create_makefile extension_name
-        RUBY
-        write "ext/very_simple_binary.c", <<-C
-          #include "ruby.h"
-
-          void Init_very_simple_binary_c() {
-            rb_define_module("VerySimpleBinaryInC");
-          }
-        C
-      end
-
-      def _build(options)
-        path = options[:path] || _default_path
-
-        if options[:rubygems_version]
-          @spec.rubygems_version = options[:rubygems_version]
-          def @spec.mark_version; end
-          def @spec.validate; end
-        end
-
-        case options[:gemspec]
-        when false
-          # do nothing
-        when :yaml
-          @files["#{name}.gemspec"] = @spec.to_yaml
-        else
-          @files["#{name}.gemspec"] = @spec.to_ruby
-        end
-
-        unless options[:no_default]
-          @files = _default_files.merge(@files)
-        end
-
-        @spec.authors = ["no one"]
-
-        @files.each do |file, source|
-          file = Pathname.new(path).join(file)
-          FileUtils.mkdir_p(file.dirname)
-          File.open(file, 'w') { |f| f.puts source }
-        end
-        @spec.files = @files.keys
-        path
-      end
-
-      def _default_files
-        @_default_files ||= { "lib/#{name}.rb" => "#{Builders.constantize(name)} = '#{version}'" }
-      end
-
-      def _default_path
-        @context.tmp('libs', @spec.full_name)
-      end
-    end
-
-    class GitBuilder < LibBuilder
-      def _build(options)
-        path = options[:path] || _default_path
-        super(options.merge(:path => path))
-        Dir.chdir(path) do
-          `git init`
-          `git add *`
-          `git config user.email "lol at wut.com"`
-          `git config user.name "lolwut"`
-          `git commit -m 'OMG INITIAL COMMIT'`
-        end
-      end
-    end
-
-    class GitBareBuilder < LibBuilder
-      def _build(options)
-        path = options[:path] || _default_path
-        super(options.merge(:path => path))
-        Dir.chdir(path) do
-          `git init --bare`
-        end
-      end
-    end
-
-    class GitUpdater < LibBuilder
-      def silently(str)
-        `#{str} 2>#{Bundler::NULL}`
-      end
-
-      def _build(options)
-        libpath = options[:path] || _default_path
-
-        Dir.chdir(libpath) do
-          silently "git checkout master"
-
-          if branch = options[:branch]
-            raise "You can't specify `master` as the branch" if branch == "master"
-
-            if `git branch | grep #{branch}`.empty?
-              silently("git branch #{branch}")
-            end
-
-            silently("git checkout #{branch}")
-          elsif tag = options[:tag]
-            `git tag #{tag}`
-          elsif options[:remote]
-            silently("git remote add origin file://#{options[:remote]}")
-          elsif options[:push]
-            silently("git push origin #{options[:push]}")
-          end
-
-          current_ref = `git rev-parse HEAD`.strip
-          _default_files.keys.each do |path|
-            _default_files[path] << "\n#{Builders.constantize(name)}_PREV_REF = '#{current_ref}'"
-          end
-          super(options.merge(:path => libpath, :gemspec => false))
-          `git add *`
-          `git commit -m "BUMP"`
-        end
-      end
-    end
-
-    class GitReader
-      attr_reader :path
-
-      def initialize(path)
-        @path = path
-      end
-
-      def ref_for(ref, len = nil)
-        ref = git "rev-parse #{ref}"
-        ref = ref[0..len] if len
-        ref
-      end
-
-    private
-
-      def git(cmd)
-        Bundler::SharedHelpers.with_clean_git_env do
-          Dir.chdir(@path) { `git #{cmd}`.strip }
-        end
-      end
-
-    end
-
-    class GemBuilder < LibBuilder
-
-      def _build(opts)
-        lib_path = super(opts.merge(:path => @context.tmp(".tmp/#{@spec.full_name}"), :no_default => opts[:no_default]))
-        Dir.chdir(lib_path) do
-          destination = opts[:path] || _default_path
-          FileUtils.mkdir_p(destination)
-
-          if !@spec.authors or @spec.authors.empty?
-            @spec.authors = ["that guy"]
-          end
-
-          Bundler.rubygems.build(@spec, opts[:skip_validation])
-          if opts[:to_system]
-            `gem install --ignore-dependencies #{@spec.full_name}.gem`
-          else
-            FileUtils.mv("#{@spec.full_name}.gem", opts[:path] || _default_path)
-          end
-        end
-      end
-
-      def _default_path
-        @context.gem_repo1('gems')
-      end
-    end
-
-    TEST_CERT=<<CERT
------BEGIN CERTIFICATE-----
-MIIDMjCCAhqgAwIBAgIBATANBgkqhkiG9w0BAQUFADAnMQwwCgYDVQQDDAN5b3Ux
-FzAVBgoJkiaJk/IsZAEZFgdleGFtcGxlMB4XDTE0MDIwNTE0MTEwNloXDTE1MDIw
-NTE0MTEwNlowJzEMMAoGA1UEAwwDeW91MRcwFQYKCZImiZPyLGQBGRYHZXhhbXBs
-ZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANlvFdpN43c4DMS9Jo06
-m0a7k3bQ3HWQ1yrYhZMi77F1F73NpBknYHIzDktQpGn6hs/4QFJT4m4zNEBF47UL
-jHU5nTK5rjkS3niGYUjvh3ZEzVeo9zHUlD/UwflDo4ALl3TSo2KY/KdPS/UTdLXL
-ajkQvaVJtEDgBPE3DPhlj5whp+Ik3mDHej7qpV6F502leAwYaFyOtlEG/ZGNG+nZ
-L0clH0j77HpP42AylHDi+vakEM3xcjo9BeWQ6Vkboic93c9RTt6CWBWxMQP7Nol1
-MOebz9XOSQclxpxWteXNfPRtMdAhmRl76SMI8ywzThNPpa4EH/yz34ftebVOgKyM
-nd0CAwEAAaNpMGcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFA7D
-n9qo0np23qi3aOYuAAPn/5IdMBYGA1UdEQQPMA2BC3lvdUBleGFtcGxlMBYGA1Ud
-EgQPMA2BC3lvdUBleGFtcGxlMA0GCSqGSIb3DQEBBQUAA4IBAQB5N+71KiNX3k0Y
-FWizUHUYOqo+fEk3aBoFbOFcx+M5TXPiA91pH8mgyyD9tVzqiYgCGk7g/UrOv5Ec
-NHjYqsFecNPayj8u2Po07pp2Nbc9aqt9uxoRSENZ72Dzrk3YDStgji7Sk/LZW5Kn
-4JFTeRof+B7/ZijLZWBEnMfSHSIPaQu0Ig6c19OEhiiuhGOn4WUhGFYCadciKgnj
-PtaUcxKuvXMwRPG3NZqeGZivTlrhAmmf7iPV/E334qzMytvAV8zycZFj2J5hvyLk
-432zLezmbFGc0uLIUjXDu9bM5WYGy1BOTuzuApyuCs9S1greqz17f8f01J87DX3X
-wJsshs4b
------END CERTIFICATE-----
-CERT
-
-    TEST_PKEY=<<PKEY
------BEGIN RSA PRIVATE KEY-----
-MIIEowIBAAKCAQEA2W8V2k3jdzgMxL0mjTqbRruTdtDcdZDXKtiFkyLvsXUXvc2k
-GSdgcjMOS1CkafqGz/hAUlPibjM0QEXjtQuMdTmdMrmuORLeeIZhSO+HdkTNV6j3
-MdSUP9TB+UOjgAuXdNKjYpj8p09L9RN0tctqORC9pUm0QOAE8TcM+GWPnCGn4iTe
-YMd6PuqlXoXnTaV4DBhoXI62UQb9kY0b6dkvRyUfSPvsek/jYDKUcOL69qQQzfFy
-Oj0F5ZDpWRuiJz3dz1FO3oJYFbExA/s2iXUw55vP1c5JByXGnFa15c189G0x0CGZ
-GXvpIwjzLDNOE0+lrgQf/LPfh+15tU6ArIyd3QIDAQABAoIBACbDqz20TS1gDMa2
-gj0DidNedbflHKjJHdNBru7Ad8NHgOgR1YO2hXdWquG6itVqGMbTF4SV9/R1pIcg
-7qvEV1I+50u31tvOBWOvcYCzU48+TO2n7gowQA3xPHPYHzog1uu48fAOHl0lwgD7
-av9OOK3b0jO5pC08wyTOD73pPWU0NrkTh2+N364leIi1pNuI1z4V+nEuIIm7XpVd
-5V4sXidMTiEMJwE6baEDfTjHKaoRndXrrPo3ryIXmcX7Ag1SwAQwF5fBCRToCgIx
-dszEZB1bJD5gA6r+eGnJLB/F60nK607az5o3EdguoB2LKa6q6krpaRCmZU5svvoF
-J7xgBPECgYEA8RIzHAQ3zbaibKdnllBLIgsqGdSzebTLKheFuigRotEV3Or/z5Lg
-k/nVnThWVkTOSRqXTNpJAME6a4KTdcVSxYP+SdZVO1esazHrGb7xPVb7MWSE1cqp
-WEk3Yy8OUOPoPQMc4dyGzd30Mi8IBB6gnFIYOTrpUo0XtkBv8rGGhfsCgYEA5uYn
-6QgL4NqNT84IXylmMb5ia3iBt6lhxI/A28CDtQvfScl4eYK0IjBwdfG6E1vJgyzg
-nJzv3xEVo9bz+Kq7CcThWpK5JQaPnsV0Q74Wjk0ShHet15txOdJuKImnh5F6lylC
-GTLR9gnptytfMH/uuw4ws0Q2kcg4l5NHKOWOnAcCgYEAvAwIVkhsB0n59Wu4gCZu
-FUZENxYWUk/XUyQ6KnZrG2ih90xQ8+iMyqFOIm/52R2fFKNrdoWoALC6E3ct8+ZS
-pMRLrelFXx8K3it4SwMJR2H8XBEfFW4bH0UtsW7Zafv+AunUs9LETP5gKG1LgXsq
-qgXX43yy2LQ61O365YPZfdUCgYBVbTvA3MhARbvYldrFEnUL3GtfZbNgdxuD9Mee
-xig0eJMBIrgfBLuOlqtVB70XYnM4xAbKCso4loKSHnofO1N99siFkRlM2JOUY2tz
-kMWZmmxKdFjuF0WZ5f/5oYxI/QsFGC+rUQEbbWl56mMKd5qkvEhKWudxoklF0yiV
-ufC8SwKBgDWb8iWqWN5a/kfvKoxFcDM74UHk/SeKMGAL+ujKLf58F+CbweM5pX9C
-EUsxeoUEraVWTiyFVNqD81rCdceus9TdBj0ZIK1vUttaRZyrMAwF0uQSfjtxsOpd
-l69BkyvzjgDPkmOHVGiSZDLi3YDvypbUpo6LOy4v5rVg5U2F/A0v
------END RSA PRIVATE KEY-----
-PKEY
-  end
-end
diff --git a/spec/support/fakeweb/rack-1.0.0.marshal b/spec/support/fakeweb/rack-1.0.0.marshal
deleted file mode 100644
index 383ce40..0000000
--- a/spec/support/fakeweb/rack-1.0.0.marshal
+++ /dev/null
@@ -1,2 +0,0 @@
-[{	:dependencies[
["	thin"	>= 0["ruby-openid"
~> 2.0.0["
mongrel"	>= 0["memcache-client"	>= 0["	fcgi"	>= 0["
camping"	>= 0["test-spec"	>= 0:
platform"	ruby:	name"	rack:
number"
-1.0.0
\ No newline at end of file
diff --git a/spec/support/fakeweb/windows.rb b/spec/support/fakeweb/windows.rb
deleted file mode 100644
index 0a5dfcb..0000000
--- a/spec/support/fakeweb/windows.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-require File.expand_path("../../path.rb", __FILE__)
-include Spec::Path
-
-files = [ 'specs.4.8.gz',
-          'prerelease_specs.4.8.gz',
-          'quick/Marshal.4.8/rcov-1.0-mswin32.gemspec.rz',
-          'gems/rcov-1.0-mswin32.gem' ]
-
-# Set up pretend http gem server with FakeWeb
-$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/fakeweb*/lib")].first}"
-require 'fakeweb'
-
-FakeWeb.allow_net_connect = false
-
-files.each do |file|
-  FakeWeb.register_uri(:get, "http://localgemserver.test/#{file}",
-    :body => File.read("#{gem_repo1}/#{file}"))
-end
-FakeWeb.register_uri(:get, "http://localgemserver.test/gems/rcov-1.0-x86-mswin32.gem",
-  :status => ["404", "Not Found"])
-
-FakeWeb.register_uri(:get, "http://localgemserver.test/api/v1/dependencies",
-  :status => ["404", "Not Found"])
diff --git a/spec/support/hax.rb b/spec/support/hax.rb
deleted file mode 100644
index a473768..0000000
--- a/spec/support/hax.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-require 'rubygems'
-
-class Gem::Platform
-  @local = new(ENV['BUNDLER_SPEC_PLATFORM']) if ENV['BUNDLER_SPEC_PLATFORM']
-end
-
-if ENV['BUNDLER_SPEC_VERSION']
-  module Bundler
-    VERSION = ENV['BUNDLER_SPEC_VERSION'].dup
-  end
-end
-
-class Object
-  if ENV['BUNDLER_SPEC_RUBY_ENGINE']
-    remove_const :RUBY_ENGINE if defined?(RUBY_ENGINE)
-    RUBY_ENGINE = ENV['BUNDLER_SPEC_RUBY_ENGINE']
-
-    if RUBY_ENGINE == "jruby"
-      JRUBY_VERSION = ENV["BUNDLER_SPEC_RUBY_ENGINE_VERSION"]
-    end
-  end
-end
diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb
deleted file mode 100644
index db1a785..0000000
--- a/spec/support/helpers.rb
+++ /dev/null
@@ -1,359 +0,0 @@
-module Spec
-  module Helpers
-    def reset!
-      @in_p, @out_p, @err_p = nil, nil, nil
-      Dir["#{tmp}/{gems/*,*}"].each do |dir|
-        next if %(base remote1 gems rubygems).include?(File.basename(dir))
-        unless ENV['BUNDLER_SUDO_TESTS']
-          FileUtils.rm_rf(dir)
-        else
-          `sudo rm -rf #{dir}`
-        end
-      end
-      FileUtils.mkdir_p(tmp)
-      FileUtils.mkdir_p(home)
-    end
-
-    attr_reader :out, :err, :exitstatus
-
-    def in_app_root(&blk)
-      Dir.chdir(bundled_app, &blk)
-    end
-
-    def in_app_root2(&blk)
-      Dir.chdir(bundled_app2, &blk)
-    end
-
-    def in_app_root_custom(root, &blk)
-      Dir.chdir(root, &blk)
-    end
-
-    def run(cmd, *args)
-      opts = args.last.is_a?(Hash) ? args.pop : {}
-      expect_err = opts.delete(:expect_err)
-      env = opts.delete(:env)
-      groups = args.map {|a| a.inspect }.join(", ")
-      setup = "require 'rubygems' ; require 'bundler' ; Bundler.setup(#{groups})\n"
-      @out = ruby(setup + cmd, :expect_err => expect_err, :env => env)
-    end
-
-    def load_error_run(ruby, name, *args)
-      cmd = <<-RUBY
-        begin
-          #{ruby}
-        rescue LoadError => e
-          $stderr.puts "ZOMG LOAD ERROR" if e.message.include?("-- #{name}")
-        end
-      RUBY
-      opts = args.last.is_a?(Hash) ? args.pop : {}
-      opts.merge!(:expect_err => true)
-      args += [opts]
-      run(cmd, *args)
-    end
-
-    def lib
-      File.expand_path('../../../lib', __FILE__)
-    end
-
-    def bundle(cmd, options = {})
-      expect_err = options.delete(:expect_err)
-      exitstatus = options.delete(:exitstatus)
-      sudo       = "sudo" if options.delete(:sudo)
-      options["no-color"] = true unless options.key?("no-color") || %w(exec conf).include?(cmd.to_s[0..3])
-
-      bundle_bin = File.expand_path('../../../bin/bundle', __FILE__)
-
-      requires = options.delete(:requires) || []
-      requires << File.expand_path('../fakeweb/'+options.delete(:fakeweb)+'.rb', __FILE__) if options.key?(:fakeweb)
-      requires << File.expand_path('../artifice/'+options.delete(:artifice)+'.rb', __FILE__) if options.key?(:artifice)
-      requires_str = requires.map{|r| "-r#{r}"}.join(" ")
-
-      env = (options.delete(:env) || {}).map{|k,v| "#{k}='#{v}'"}.join(" ")
-      args = options.map do |k,v|
-        v == true ? " --#{k}" : " --#{k} #{v}" if v
-      end.join
-
-      cmd = "#{env} #{sudo} #{Gem.ruby} -I#{lib} #{requires_str} #{bundle_bin} #{cmd}#{args}"
-
-      if exitstatus
-        sys_status(cmd)
-      else
-        sys_exec(cmd, expect_err){|i| yield i if block_given? }
-      end
-    end
-
-    def bundle_ruby(options = {})
-      expect_err  = options.delete(:expect_err)
-      exitstatus = options.delete(:exitstatus)
-      options["no-color"] = true unless options.key?("no-color")
-
-      bundle_bin = File.expand_path('../../../bin/bundle_ruby', __FILE__)
-
-      requires = options.delete(:requires) || []
-      requires << File.expand_path('../fakeweb/'+options.delete(:fakeweb)+'.rb', __FILE__) if options.key?(:fakeweb)
-      requires << File.expand_path('../artifice/'+options.delete(:artifice)+'.rb', __FILE__) if options.key?(:artifice)
-      requires_str = requires.map{|r| "-r#{r}"}.join(" ")
-
-      env = (options.delete(:env) || {}).map{|k,v| "#{k}='#{v}' "}.join
-      cmd = "#{env}#{Gem.ruby} -I#{lib} #{requires_str} #{bundle_bin}"
-
-      if exitstatus
-        sys_status(cmd)
-      else
-        sys_exec(cmd, expect_err){|i| yield i if block_given? }
-      end
-    end
-
-    def ruby(ruby, options = {})
-      expect_err = options.delete(:expect_err)
-      env = (options.delete(:env) || {}).map{|k,v| "#{k}='#{v}' "}.join
-      ruby.gsub!(/["`\$]/) {|m| "\\#{m}" }
-      lib_option = options[:no_lib] ? "" : " -I#{lib}"
-      sys_exec(%{#{env}#{Gem.ruby}#{lib_option} -e "#{ruby}"}, expect_err)
-    end
-
-    def load_error_ruby(ruby, name, opts = {})
-      cmd = <<-R
-        begin
-          #{ruby}
-        rescue LoadError => e
-          $stderr.puts "ZOMG LOAD ERROR"# if e.message.include?("-- #{name}")
-        end
-      R
-      ruby(cmd, opts.merge(:expect_err => true))
-    end
-
-    def gembin(cmd)
-      lib = File.expand_path("../../../lib", __FILE__)
-      old, ENV['RUBYOPT'] = ENV['RUBYOPT'], "#{ENV['RUBYOPT']} -I#{lib}"
-      cmd = bundled_app("bin/#{cmd}") unless cmd.to_s.include?("/")
-      sys_exec(cmd.to_s)
-    ensure
-      ENV['RUBYOPT'] = old
-    end
-
-    def sys_exec(cmd, expect_err = false)
-      Open3.popen3(cmd.to_s) do |stdin, stdout, stderr|
-        @in_p, @out_p, @err_p = stdin, stdout, stderr
-
-        yield @in_p if block_given?
-        @in_p.close
-
-        @out = @out_p.read_available_bytes.strip
-        @err = @err_p.read_available_bytes.strip
-      end
-
-      puts @err unless expect_err || @err.empty? || !$show_err
-      @out
-    end
-
-    def sys_status(cmd)
-      @err = nil
-      @out = %x{#{cmd}}.strip
-      @exitstatus = $?.exitstatus
-    end
-
-    def config(config = nil)
-      path = bundled_app('.bundle/config')
-      return YAML.load_file(path) unless config
-      FileUtils.mkdir_p(File.dirname(path))
-      File.open(path, 'w') do |f|
-        f.puts config.to_yaml
-      end
-      config
-    end
-
-    def gemfile(*args)
-      path = bundled_app("Gemfile")
-      path = args.shift if args.first.is_a?(Pathname)
-      str  = args.shift || ""
-      path.dirname.mkpath
-      File.open(path.to_s, 'w') do |f|
-        f.puts strip_whitespace(str)
-      end
-    end
-
-    def lockfile(*args)
-      path = bundled_app("Gemfile.lock")
-      path = args.shift if args.first.is_a?(Pathname)
-      str  = args.shift || ""
-      File.open(path.to_s, 'w') do |f|
-        f.puts strip_whitespace(str)
-      end
-    end
-
-    def strip_whitespace(str)
-      # Trim the leading spaces
-      spaces = str[/\A\s+/, 0] || ""
-      str.gsub(/^#{spaces}/, '')
-    end
-
-    def install_gemfile(*args)
-      gemfile(*args)
-      opts = args.last.is_a?(Hash) ? args.last : {}
-      opts[:retry] ||= 0
-      bundle :install, opts
-    end
-
-    def install_gems(*gems)
-      gems.each do |g|
-        path = "#{gem_repo1}/gems/#{g}.gem"
-
-        raise "OMG `#{path}` does not exist!" unless File.exist?(path)
-
-        gem_command :install, "--no-rdoc --no-ri --ignore-dependencies #{path}"
-      end
-    end
-
-    alias install_gem install_gems
-
-    def with_gem_path_as(path)
-      gem_home, gem_path = ENV['GEM_HOME'], ENV['GEM_PATH']
-      ENV['GEM_HOME'], ENV['GEM_PATH'] = path.to_s, path.to_s
-      yield
-    ensure
-      ENV['GEM_HOME'], ENV['GEM_PATH'] = gem_home, gem_path
-    end
-
-    def break_git!
-      FileUtils.mkdir_p(tmp("broken_path"))
-      File.open(tmp("broken_path/git"), "w", 0755) do |f|
-        f.puts "#!/usr/bin/env ruby\nSTDERR.puts 'This is not the git you are looking for'\nexit 1"
-      end
-
-      ENV["PATH"] = "#{tmp("broken_path")}:#{ENV["PATH"]}"
-    end
-
-    def fake_man!
-      FileUtils.mkdir_p(tmp("fake_man"))
-      File.open(tmp("fake_man/man"), "w", 0755) do |f|
-        f.puts "#!/usr/bin/env ruby\nputs ARGV.inspect\n"
-      end
-
-      ENV["PATH"] = "#{tmp("fake_man")}:#{ENV["PATH"]}"
-    end
-
-    def kill_path!
-      ENV["PATH"] = ""
-    end
-
-    def system_gems(*gems)
-      gems = gems.flatten
-
-      FileUtils.rm_rf(system_gem_path)
-      FileUtils.mkdir_p(system_gem_path)
-
-      Gem.clear_paths
-
-      gem_home, gem_path, path = ENV['GEM_HOME'], ENV['GEM_PATH'], ENV['PATH']
-      ENV['GEM_HOME'], ENV['GEM_PATH'] = system_gem_path.to_s, system_gem_path.to_s
-
-      install_gems(*gems)
-      if block_given?
-        begin
-          yield
-        ensure
-          ENV['GEM_HOME'], ENV['GEM_PATH'] = gem_home, gem_path
-          ENV['PATH'] = path
-        end
-      end
-    end
-
-    def realworld_system_gems(*gems)
-      gems = gems.flatten
-
-      FileUtils.rm_rf(system_gem_path)
-      FileUtils.mkdir_p(system_gem_path)
-
-      Gem.clear_paths
-
-      gem_home, gem_path, path = ENV['GEM_HOME'], ENV['GEM_PATH'], ENV['PATH']
-      ENV['GEM_HOME'], ENV['GEM_PATH'] = system_gem_path.to_s, system_gem_path.to_s
-
-      gems.each do |gem|
-        gem_command :install, "--no-rdoc --no-ri #{gem}"
-      end
-      if block_given?
-        begin
-          yield
-        ensure
-          ENV['GEM_HOME'], ENV['GEM_PATH'] = gem_home, gem_path
-          ENV['PATH'] = path
-        end
-      end
-    end
-
-    def cache_gems(*gems)
-      gems = gems.flatten
-
-      FileUtils.rm_rf("#{bundled_app}/vendor/cache")
-      FileUtils.mkdir_p("#{bundled_app}/vendor/cache")
-
-      gems.each do |g|
-        path = "#{gem_repo1}/gems/#{g}.gem"
-        raise "OMG `#{path}` does not exist!" unless File.exist?(path)
-        FileUtils.cp(path, "#{bundled_app}/vendor/cache")
-      end
-    end
-
-    def simulate_new_machine
-      system_gems []
-      FileUtils.rm_rf default_bundle_path
-      FileUtils.rm_rf bundled_app('.bundle')
-    end
-
-    def simulate_platform(platform)
-      old, ENV['BUNDLER_SPEC_PLATFORM'] = ENV['BUNDLER_SPEC_PLATFORM'], platform.to_s
-      yield if block_given?
-    ensure
-      ENV['BUNDLER_SPEC_PLATFORM'] = old if block_given?
-    end
-
-    def simulate_ruby_engine(engine, version = "1.6.0")
-      return if engine == local_ruby_engine
-
-      old, ENV['BUNDLER_SPEC_RUBY_ENGINE'] = ENV['BUNDLER_SPEC_RUBY_ENGINE'], engine
-      old_version, ENV['BUNDLER_SPEC_RUBY_ENGINE_VERSION'] = ENV['BUNDLER_SPEC_RUBY_ENGINE_VERSION'], version
-      yield if block_given?
-    ensure
-      ENV['BUNDLER_SPEC_RUBY_ENGINE'] = old if block_given?
-      ENV['BUNDLER_SPEC_RUBY_ENGINE_VERSION'] = old_version if block_given?
-    end
-
-    def simulate_bundler_version(version)
-      old, ENV['BUNDLER_SPEC_VERSION'] = ENV['BUNDLER_SPEC_VERSION'], version.to_s
-      yield if block_given?
-    ensure
-      ENV['BUNDLER_SPEC_VERSION'] = old if block_given?
-    end
-
-    def revision_for(path)
-      Dir.chdir(path) { `git rev-parse HEAD`.strip }
-    end
-
-    def capture_output
-      fake_stdout = StringIO.new
-      actual_stdout = $stdout
-      $stdout = fake_stdout
-      yield
-      fake_stdout.rewind
-      fake_stdout.read
-    ensure
-      $stdout = actual_stdout
-    end
-
-    def with_read_only(pattern)
-      chmod = lambda do |dirmode, filemode|
-        lambda do |f|
-          mode = File.directory?(f) ? dirmode : filemode
-          File.chmod(mode, f)
-        end
-      end
-
-      Dir[pattern].each(&chmod[0555, 0444])
-      yield
-    ensure
-      Dir[pattern].each(&chmod[0755, 0644])
-    end
-  end
-end
diff --git a/spec/support/indexes.rb b/spec/support/indexes.rb
deleted file mode 100644
index 5aba3e2..0000000
--- a/spec/support/indexes.rb
+++ /dev/null
@@ -1,280 +0,0 @@
-module Spec
-  module Indexes
-    def dep(name, reqs = nil)
-      @deps ||= []
-      @deps << Bundler::Dependency.new(name, reqs)
-    end
-
-    def platform(*args)
-      @platforms ||= []
-      @platforms.concat args.map { |p| Gem::Platform.new(p) }
-    end
-
-    alias platforms platform
-
-    def resolve
-      @platforms ||= ['ruby']
-      deps = []
-      @deps.each do |d|
-        @platforms.each do |p|
-          deps << Bundler::DepProxy.new(d, p)
-        end
-      end
-      Bundler::Resolver.resolve(deps, @index)
-    end
-
-    def should_resolve_as(specs)
-      got = resolve
-      got = got.map { |s| s.full_name }.sort
-      expect(got).to eq(specs.sort)
-    end
-
-    def should_conflict_on(names)
-      begin
-        got = resolve
-        flunk "The resolve succeeded with: #{got.map { |s| s.full_name }.sort.inspect}"
-      rescue Bundler::VersionConflict => e
-        expect(Array(names).sort).to eq(e.conflicts.sort)
-      end
-    end
-
-    def gem(*args, &blk)
-      build_spec(*args, &blk).first
-    end
-
-    def an_awesome_index
-      build_index do
-        gem "rack", %w(0.8 0.9 0.9.1 0.9.2 1.0 1.1)
-        gem "rack-mount", %w(0.4 0.5 0.5.1 0.5.2 0.6)
-
-        # --- Rails
-        versions "1.2.3 2.2.3 2.3.5 3.0.0.beta 3.0.0.beta1" do |version|
-          gem "activesupport", version
-          gem "actionpack", version do
-            dep "activesupport", version
-            if version >= v('3.0.0.beta')
-              dep "rack", '~> 1.1'
-              dep "rack-mount", ">= 0.5"
-            elsif version > v('2.3')   then dep "rack", '~> 1.0.0'
-            elsif version > v('2.0.0') then dep "rack", '~> 0.9.0'
-            end
-          end
-          gem "activerecord", version do
-            dep "activesupport", version
-            dep "arel", ">= 0.2" if version >= v('3.0.0.beta')
-          end
-          gem "actionmailer", version do
-            dep "activesupport", version
-            dep "actionmailer",  version
-          end
-          if version < v('3.0.0.beta')
-            gem "railties", version do
-              dep "activerecord",  version
-              dep "actionpack",    version
-              dep "actionmailer",  version
-              dep "activesupport", version
-            end
-          else
-            gem "railties", version
-            gem "rails", version do
-              dep "activerecord",  version
-              dep "actionpack",    version
-              dep "actionmailer",  version
-              dep "activesupport", version
-              dep "railties",      version
-            end
-          end
-        end
-
-        versions '1.0 1.2 1.2.1 1.2.2 1.3 1.3.0.1 1.3.5 1.4.0 1.4.2 1.4.2.1' do |version|
-          platforms "ruby java mswin32 mingw32 x64-mingw32" do |platform|
-            next if version == v('1.4.2.1') && platform != pl('x86-mswin32')
-            next if version == v('1.4.2') && platform == pl('x86-mswin32')
-            gem "nokogiri", version, platform do
-              dep "weakling", ">= 0.0.3" if platform =~ pl('java')
-            end
-          end
-        end
-
-        versions '0.0.1 0.0.2 0.0.3' do |version|
-          gem "weakling", version
-        end
-
-        # --- Rails related
-        versions '1.2.3 2.2.3 2.3.5' do |version|
-          gem "activemerchant", version do
-            dep "activesupport", ">= #{version}"
-          end
-        end
-      end
-    end
-
-    # Builder 3.1.4 will activate first, but if all
-    # goes well, it should resolve to 3.0.4
-    def a_conflict_index
-      build_index do
-        gem "builder", %w(3.0.4 3.1.4)
-        gem("grape", '0.2.6') do
-          dep "builder", ">= 0"
-        end
-
-        versions '3.2.8 3.2.9 3.2.10 3.2.11' do |version|
-          gem("activemodel", version) do
-            dep "builder", "~> 3.0.0"
-          end
-        end
-
-        gem("my_app", '1.0.0') do
-          dep "activemodel", ">= 0"
-          dep "grape", ">= 0"
-        end
-      end
-    end
-
-    def a_complex_conflict_index
-      build_index do
-        gem("a", %w(1.0.2 1.1.4 1.2.0 1.4.0)) do
-          dep "d", ">= 0"
-        end
-
-        gem("d", %w(1.3.0 1.4.1)) do
-          dep "x", ">= 0"
-        end
-
-        gem "d", "0.9.8"
-
-        gem("b", '0.3.4') do
-          dep "a", ">= 1.5.0"
-        end
-
-        gem("b", '0.3.5') do
-          dep "a", ">= 1.2"
-        end
-
-        gem("b", '0.3.3') do
-          dep "a", "> 1.0"
-        end
-
-        versions '3.2 3.3' do |version|
-          gem("c", version) do
-            dep "a", "~> 1.0"
-          end
-        end
-
-        gem("my_app", '1.3.0') do
-          dep "c", ">= 4.0"
-          dep "b", ">= 0"
-        end
-
-        gem("my_app", '1.2.0') do
-          dep "c", "~> 3.3.0"
-          dep "b", "0.3.4"
-        end
-
-        gem("my_app", '1.1.0') do
-          dep "c", "~> 3.2.0"
-          dep "b", "0.3.5"
-        end
-      end
-    end
-
-    def index_with_conflict_on_child
-      build_index do
-        gem "json", %w(1.6.5 1.7.7 1.8.0)
-
-        gem("chef", '10.26') do
-          dep "json", [">= 1.4.4", "<= 1.7.7"]
-        end
-
-        gem("berkshelf", "2.0.7") do
-          dep "json", ">= 1.7.7"
-        end
-
-        gem("chef_app", '1.0.0') do
-          dep "berkshelf", "~> 2.0"
-          dep "chef", "~> 10.26"
-        end
-      end
-    end
-
-    def a_unresovable_child_index
-      build_index do
-        gem "json", %w(1.8.0)
-
-        gem("chef", '10.26') do
-          dep "json", [">= 1.4.4", "<= 1.7.7"]
-        end
-
-        gem("berkshelf", "2.0.7") do
-          dep "json", ">= 1.7.7"
-        end
-
-        gem("chef_app_error", '1.0.0') do
-          dep "berkshelf", "~> 2.0"
-          dep "chef", "~> 10.26"
-        end
-      end
-    end
-
-    def a_index_with_root_conflict_on_child
-      build_index do
-        gem "builder", %w(2.1.2 3.0.1 3.1.3)
-        gem "i18n", %w(0.4.1 0.4.2)
-
-        gem "activesupport", %w(3.0.0 3.0.1 3.0.5 3.1.7)
-
-        gem("activemodel", '3.0.5') do
-          dep "activesupport", "= 3.0.5"
-          dep "builder", "~> 2.1.2"
-          dep 'i18n', '~> 0.4'
-        end
-
-        gem("activemodel", '3.0.0') do
-          dep "activesupport", "= 3.0.0"
-          dep "builder", "~> 2.1.2"
-          dep 'i18n', '~> 0.4.1'
-        end
-
-        gem("activemodel", '3.1.3') do
-          dep "activesupport", "= 3.1.3"
-          dep "builder", "~> 2.1.2"
-          dep 'i18n', '~> 0.5'
-        end
-
-        gem("activerecord", '3.0.0') do
-          dep "activesupport", "= 3.0.0"
-          dep "activemodel", "= 3.0.0"
-        end
-
-        gem("activerecord", '3.0.5') do
-          dep "activesupport", "= 3.0.5"
-          dep "activemodel", "= 3.0.5"
-        end
-
-        gem("activerecord", '3.0.9') do
-          dep "activesupport", "= 3.1.5"
-          dep "activemodel", "= 3.1.5"
-        end
-      end
-    end
-
-    def a_circular_index
-      build_index do
-        gem "rack", "1.0.1"
-        gem("foo", '0.2.6') do
-          dep "bar", ">= 0"
-        end
-
-        gem("bar", "1.0.0") do
-          dep "foo", ">= 0"
-        end
-
-        gem("circular_app", '1.0.0') do
-          dep "foo", ">= 0"
-          dep "bar", ">= 0"
-        end
-      end
-    end
-
-  end
-end
diff --git a/spec/support/matchers.rb b/spec/support/matchers.rb
deleted file mode 100644
index e42c67b..0000000
--- a/spec/support/matchers.rb
+++ /dev/null
@@ -1,77 +0,0 @@
-module Spec
-  module Matchers
-    RSpec::Matchers.define :have_dep do |*args|
-      dep = Bundler::Dependency.new(*args)
-
-      match do |actual|
-        actual.length == 1 && actual.all? { |d| d == dep }
-      end
-    end
-
-    RSpec::Matchers.define :have_gem do |*args|
-      match do |actual|
-        actual.length == args.length && actual.all? { |a| args.include?(a.full_name) }
-      end
-    end
-
-    RSpec::Matchers.define :have_rubyopts do |*args|
-      args = args.flatten
-      args = args.first.split(/\s+/) if args.size == 1
-
-      #failure_message_for_should "Expected RUBYOPT to have options #{args.join(" ")}. It was #{ENV["RUBYOPT"]}"
-
-      match do |actual|
-        actual = actual.split(/\s+/) if actual.is_a?(String)
-        args.all? {|arg| actual.include?(arg) } && actual.uniq.size == actual.size
-      end
-    end
-
-    def should_be_installed(*names)
-      opts = names.last.is_a?(Hash) ? names.pop : {}
-      groups = Array(opts[:groups])
-      groups << opts
-      names.each do |name|
-        name, version, platform = name.split(/\s+/)
-        version_const = name == 'bundler' ? 'Bundler::VERSION' : Spec::Builders.constantize(name)
-        run "require '#{name}.rb'; puts #{version_const}", *groups
-        actual_version, actual_platform = out.split(/\s+/)
-        expect(Gem::Version.new(actual_version)).to eq(Gem::Version.new(version))
-        expect(actual_platform).to eq(platform)
-      end
-    end
-
-    alias should_be_available should_be_installed
-
-    def should_not_be_installed(*names)
-      opts = names.last.is_a?(Hash) ? names.pop : {}
-      groups = Array(opts[:groups]) || []
-      names.each do |name|
-        name, version = name.split(/\s+/)
-        run <<-R, *(groups + [opts])
-          begin
-            require '#{name}'
-            puts #{Spec::Builders.constantize(name)}
-          rescue LoadError, NameError
-            puts "WIN"
-          end
-        R
-        if version.nil? || out == "WIN"
-          expect(out).to eq("WIN")
-        else
-          expect(Gem::Version.new(out)).not_to eq(Gem::Version.new(version))
-        end
-      end
-    end
-
-    def should_be_locked
-      expect(bundled_app("Gemfile.lock")).to exist
-    end
-
-    def lockfile_should_be(expected)
-      should_be_locked
-      spaces = expected[/\A\s+/, 0] || ""
-      expected.gsub!(/^#{spaces}/, '')
-      expect(bundled_app("Gemfile.lock").read).to eq(expected)
-    end
-  end
-end
diff --git a/spec/support/path.rb b/spec/support/path.rb
deleted file mode 100644
index 74dbd89..0000000
--- a/spec/support/path.rb
+++ /dev/null
@@ -1,81 +0,0 @@
-require 'pathname'
-
-module Spec
-  module Path
-    def root
-      @root ||= Pathname.new(File.expand_path("../../..", __FILE__))
-    end
-
-    def tmp(*path)
-      root.join("tmp", *path)
-    end
-
-    def home(*path)
-      tmp.join("home", *path)
-    end
-
-    def default_bundle_path(*path)
-      system_gem_path(*path)
-    end
-
-    def bundled_app(*path)
-      root = tmp.join("bundled_app")
-      FileUtils.mkdir_p(root)
-      root.join(*path)
-    end
-
-    alias bundled_app1 bundled_app
-
-    def bundled_app2(*path)
-      root = tmp.join("bundled_app2")
-      FileUtils.mkdir_p(root)
-      root.join(*path)
-    end
-
-    def vendored_gems(path = nil)
-      bundled_app(*["vendor/bundle", Gem.ruby_engine, Gem::ConfigMap[:ruby_version], path].compact)
-    end
-
-    def cached_gem(path)
-      bundled_app("vendor/cache/#{path}.gem")
-    end
-
-    def base_system_gems
-      tmp.join("gems/base")
-    end
-
-    def gem_repo1(*args)
-      tmp("gems/remote1", *args)
-    end
-
-    def gem_repo_missing(*args)
-      tmp("gems/missing", *args)
-    end
-
-    def gem_repo2(*args)
-      tmp("gems/remote2", *args)
-    end
-
-    def gem_repo3(*args)
-      tmp("gems/remote3", *args)
-    end
-
-    def security_repo(*args)
-      tmp("gems/security_repo", *args)
-    end
-
-    def system_gem_path(*path)
-      tmp("gems/system", *path)
-    end
-
-    def lib_path(*args)
-      tmp("libs", *args)
-    end
-
-    def bundler_path
-      Pathname.new(File.expand_path('../../../lib', __FILE__))
-    end
-
-    extend self
-  end
-end
diff --git a/spec/support/permissions.rb b/spec/support/permissions.rb
deleted file mode 100644
index efdb4a5..0000000
--- a/spec/support/permissions.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-module Spec
-  module Permissions
-    def with_umask(new_umask)
-      old_umask = File.umask(new_umask)
-      yield if block_given?
-    ensure
-      File.umask(old_umask)
-    end
-  end
-end
diff --git a/spec/support/platforms.rb b/spec/support/platforms.rb
deleted file mode 100644
index b574d63..0000000
--- a/spec/support/platforms.rb
+++ /dev/null
@@ -1,94 +0,0 @@
-module Spec
-  module Platforms
-    include Bundler::GemHelpers
-
-    def rb
-      Gem::Platform::RUBY
-    end
-
-    def mac
-      Gem::Platform.new('x86-darwin-10')
-    end
-
-    def java
-      Gem::Platform.new([nil, "java", nil])
-    end
-
-    def linux
-      Gem::Platform.new(['x86', 'linux', nil])
-    end
-
-    def mswin
-      Gem::Platform.new(['x86', 'mswin32', nil])
-    end
-
-    def mingw
-      Gem::Platform.new(['x86', 'mingw32', nil])
-    end
-
-    def x64_mingw
-      Gem::Platform.new(['x64', 'mingw32', nil])
-    end
-
-    def all_platforms
-      [rb, java, linux, mswin, mingw, x64_mingw]
-    end
-
-    def local
-      generic(Gem::Platform.local)
-    end
-
-    def not_local
-      all_platforms.find { |p| p != generic(Gem::Platform.local) }
-    end
-
-    def local_tag
-      if RUBY_PLATFORM == "java"
-        :jruby
-      else
-        :ruby
-      end
-    end
-
-    def not_local_tag
-      [:ruby, :jruby].find { |tag| tag != local_tag }
-    end
-
-    def local_ruby_engine
-      ENV["BUNDLER_SPEC_RUBY_ENGINE"] || (defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby")
-    end
-
-    def local_engine_version
-      return ENV["BUNDLER_SPEC_RUBY_ENGINE_VERSION"] if ENV["BUNDLER_SPEC_RUBY_ENGINE_VERSION"]
-
-      case local_ruby_engine
-      when "ruby"
-        RUBY_VERSION
-      when "rbx"
-        Rubinius::VERSION
-      when "jruby"
-        JRUBY_VERSION
-      else
-        raise BundlerError, "That RUBY_ENGINE is not recognized"
-        nil
-      end
-    end
-
-    def not_local_engine_version
-      case not_local_tag
-      when :ruby
-        not_local_ruby_version
-      when :jruby
-        "1.6.1"
-      end
-    end
-
-    def not_local_ruby_version
-      "1.12"
-    end
-
-    def not_local_patchlevel
-      9999
-    end
-  end
-end
diff --git a/spec/support/ruby_ext.rb b/spec/support/ruby_ext.rb
deleted file mode 100644
index f1590a7..0000000
--- a/spec/support/ruby_ext.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-class IO
-  def read_available_bytes(chunk_size = 16384, select_timeout = 0.02)
-    buffer = []
-
-    return "" if closed? || eof?
-    # IO.select cannot be used here due to the fact that it
-    # just does not work on windows
-    while true
-      begin
-        IO.select([self], nil, nil, select_timeout)
-        break if eof? # stop raising :-(
-        buffer << self.readpartial(chunk_size)
-      rescue(EOFError)
-        break
-      end
-    end
-
-    return buffer.join
-  end
-end
diff --git a/spec/support/rubygems_ext.rb b/spec/support/rubygems_ext.rb
deleted file mode 100644
index 6d71d32..0000000
--- a/spec/support/rubygems_ext.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-require 'rubygems/user_interaction'
-require 'support/path'
-
-module Spec
-  module Rubygems
-    def self.setup
-      Gem.clear_paths
-
-      ENV['BUNDLE_PATH'] = nil
-      ENV['GEM_HOME'] = ENV['GEM_PATH'] = Path.base_system_gems.to_s
-      ENV['PATH'] = ["#{Path.root}/bin", "#{Path.system_gem_path}/bin", ENV['PATH']].join(File::PATH_SEPARATOR)
-
-      unless File.exist?("#{Path.base_system_gems}")
-        FileUtils.mkdir_p(Path.base_system_gems)
-        puts "fetching fakeweb, artifice, sinatra, rake, rack, and builder for the tests to use..."
-        `gem install fakeweb artifice --no-rdoc --no-ri`
-        `gem install sinatra --version 1.2.7 --no-rdoc --no-ri`
-        # Rake version has to be consistent for tests to pass
-        `gem install rake --version 10.0.2 --no-rdoc --no-ri`
-        # 3.0.0 breaks 1.9.2 specs
-        `gem install builder --version 2.1.2 --no-rdoc --no-ri`
-        `gem install rack --no-rdoc --no-ri`
-      end
-
-      ENV['HOME'] = Path.home.to_s
-
-      Gem::DefaultUserInteraction.ui = Gem::SilentUI.new
-    end
-
-    def gem_command(command, args = "", options = {})
-      if command == :exec && !options[:no_quote]
-        args = args.gsub(/(?=")/, "\\")
-        args = %["#{args}"]
-      end
-      lib  = File.join(File.dirname(__FILE__), '..', '..', 'lib')
-      %x{#{Gem.ruby} -I#{lib} -rubygems -S gem --backtrace #{command} #{args}}.strip
-    end
-  end
-end
diff --git a/spec/support/streams.rb b/spec/support/streams.rb
deleted file mode 100644
index 610e999..0000000
--- a/spec/support/streams.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-require 'stringio'
-
-def capture(*streams)
-  streams.map! { |stream| stream.to_s }
-  begin
-    result = StringIO.new
-    streams.each { |stream| eval "$#{stream} = result" }
-    yield
-  ensure
-    streams.each { |stream| eval("$#{stream} = #{stream.upcase}") }
-  end
-  result.string
-end
diff --git a/spec/support/sudo.rb b/spec/support/sudo.rb
deleted file mode 100644
index 2192b09..0000000
--- a/spec/support/sudo.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-module Spec
-  module Sudo
-    def self.present?
-      @which_sudo ||= Bundler.which("sudo")
-    end
-
-    def sudo(cmd)
-      raise "sudo not present" unless Sudo.present?
-      sys_exec("sudo #{cmd}")
-    end
-
-    def chown_system_gems_to_root
-      sudo "chown -R root #{system_gem_path}"
-    end
-  end
-end
diff --git a/spec/update/gems_spec.rb b/spec/update/gems_spec.rb
deleted file mode 100644
index 856e922..0000000
--- a/spec/update/gems_spec.rb
+++ /dev/null
@@ -1,201 +0,0 @@
-require "spec_helper"
-
-describe "bundle update" do
-  before :each do
-    build_repo2
-
-    install_gemfile <<-G
-      source "file://#{gem_repo2}"
-      gem "activesupport"
-      gem "rack-obama"
-    G
-  end
-
-  describe "with no arguments" do
-    it "updates the entire bundle" do
-      update_repo2 do
-        build_gem "activesupport", "3.0"
-      end
-
-      bundle "update"
-      should_be_installed "rack 1.2", "rack-obama 1.0", "activesupport 3.0"
-    end
-
-    it "doesn't delete the Gemfile.lock file if something goes wrong" do
-      gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "activesupport"
-        gem "rack-obama"
-        exit!
-      G
-      bundle "update"
-      expect(bundled_app("Gemfile.lock")).to exist
-    end
-  end
-
-  describe "--quiet argument" do
-    it "shows UI messages without --quiet argument" do
-      bundle "update"
-      expect(out).to include("Fetching source")
-    end
-
-    it "does not show UI messages with --quiet argument" do
-      bundle "update --quiet"
-      expect(out).not_to include("Fetching source")
-    end
-  end
-
-  describe "with a top level dependency" do
-    it "unlocks all child dependencies that are unrelated to other locked dependencies" do
-      update_repo2 do
-        build_gem "activesupport", "3.0"
-      end
-
-      bundle "update rack-obama"
-      should_be_installed "rack 1.2", "rack-obama 1.0", "activesupport 2.3.5"
-    end
-  end
-
-  describe "with an unknown dependency" do
-    it "should inform the user" do
-      bundle "update halting-problem-solver", :expect_err=>true
-      expect(out).to include "Could not find gem 'halting-problem-solver'"
-    end
-    it "should suggest alternatives" do
-      bundle "update active-support", :expect_err=>true
-      expect(out).to include "Did you mean activesupport?"
-    end
-  end
-
-  describe "with a child dependency" do
-    it "should update the child dependency" do
-      update_repo2
-      bundle "update rack"
-      should_be_installed "rack 1.2"
-    end
-  end
-
-  describe "with --local option" do
-    it "doesn't hit repo2" do
-      FileUtils.rm_rf(gem_repo2)
-
-      bundle "update --local"
-      expect(out).not_to match(/Fetching source index/)
-    end
-  end
-
-  describe "with --group option" do
-    it "should update only specifed group gems" do
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        gem "activesupport", :group => :development
-        gem "rack"
-      G
-      update_repo2 do
-        build_gem "activesupport", "3.0"
-      end
-      bundle "update --group development"
-      should_be_installed "activesupport 3.0"
-      should_not_be_installed "rack 1.2"
-    end
-  end
-end
-
-describe "bundle update in more complicated situations" do
-  before :each do
-    build_repo2
-  end
-
-  it "will eagerly unlock dependencies of a specified gem" do
-    install_gemfile <<-G
-      source "file://#{gem_repo2}"
-
-      gem "thin"
-      gem "rack-obama"
-    G
-
-    update_repo2 do
-      build_gem "thin" , '2.0' do |s|
-        s.add_dependency "rack"
-      end
-    end
-
-    bundle "update thin"
-    should_be_installed "thin 2.0", "rack 1.2", "rack-obama 1.0"
-  end
-end
-
-describe "bundle update without a Gemfile.lock" do
-  it "should not explode" do
-    build_repo2
-
-    gemfile <<-G
-      source "file://#{gem_repo2}"
-
-      gem "rack", "1.0"
-    G
-
-    bundle "update"
-
-    should_be_installed "rack 1.0.0"
-  end
-end
-
-describe "bundle update when a gem depends on a newer version of bundler" do
-  before(:each) do
-    build_repo2 do
-      build_gem "rails", "3.0.1" do |s|
-        s.add_dependency "bundler", Bundler::VERSION.succ
-      end
-    end
-
-    gemfile <<-G
-      source "file://#{gem_repo2}"
-      gem "rails", "3.0.1"
-    G
-  end
-
-  it "should not explode" do
-    bundle "update"
-    expect(err).to be_empty
-  end
-
-  it "should explain that bundler conflicted" do
-    bundle "update"
-    expect(out).not_to match(/in snapshot/i)
-    expect(out).to match(/current Bundler version/i)
-    expect(out).to match(/perhaps you need to update bundler/i)
-  end
-end
-
-describe "bundle update" do
-  it "shows the previous version of the gem when updated from rubygems source" do
-    build_repo2
-
-    install_gemfile <<-G
-      source "file://#{gem_repo2}"
-      gem "activesupport"
-    G
-
-    bundle "update"
-    expect(out).to include("Using activesupport 2.3.5")
-
-    update_repo2 do
-      build_gem "activesupport", "3.0"
-    end
-
-    bundle "update"
-    expect(out).to include("Installing activesupport 3.0 (was 2.3.5)")
-  end
-
-  it "shows error message when Gemfile.lock is not preset and gem is specified" do
-    install_gemfile <<-G
-      source "file://#{gem_repo2}"
-      gem "activesupport"
-    G
-
-    bundle "update nonexisting", :exitstatus => true
-    expect(out).to include("This Bundle hasn't been installed yet. Run `bundle install` to update and install the bundled gems.")
-    expect(@exitstatus).to eq(22)
-  end
-end
diff --git a/spec/update/git_spec.rb b/spec/update/git_spec.rb
deleted file mode 100644
index 2452636..0000000
--- a/spec/update/git_spec.rb
+++ /dev/null
@@ -1,283 +0,0 @@
-require "spec_helper"
-
-describe "bundle update" do
-  describe "git sources" do
-    it "floats on a branch when :branch is used" do
-      build_git  "foo", "1.0"
-      update_git "foo", :branch => "omg"
-
-      install_gemfile <<-G
-        git "#{lib_path('foo-1.0')}", :branch => "omg" do
-          gem 'foo'
-        end
-      G
-
-      update_git "foo", :branch => "omg" do |s|
-        s.write "lib/foo.rb", "FOO = '1.1'"
-      end
-
-      bundle "update"
-
-      should_be_installed "foo 1.1"
-    end
-
-    it "updates correctly when you have like craziness" do
-      build_lib "activesupport", "3.0", :path => lib_path("rails/activesupport")
-      build_git "rails", "3.0", :path => lib_path("rails") do |s|
-        s.add_dependency "activesupport", "= 3.0"
-      end
-
-      install_gemfile <<-G
-        gem "rails", :git => "#{lib_path('rails')}"
-      G
-
-      bundle "update rails"
-      expect(out).to include("Using activesupport 3.0 from #{lib_path('rails')} (at master)")
-      should_be_installed "rails 3.0", "activesupport 3.0"
-    end
-
-    it "floats on a branch when :branch is used and the source is specified in the update" do
-      build_git  "foo", "1.0", :path => lib_path("foo")
-      update_git "foo", :branch => "omg", :path => lib_path("foo")
-
-      install_gemfile <<-G
-        git "#{lib_path('foo')}", :branch => "omg" do
-          gem 'foo'
-        end
-      G
-
-      update_git "foo", :branch => "omg", :path => lib_path("foo") do |s|
-        s.write "lib/foo.rb", "FOO = '1.1'"
-      end
-
-      bundle "update --source foo"
-
-      should_be_installed "foo 1.1"
-    end
-
-    it "floats on master when updating all gems that are pinned to the source even if you have child dependencies" do
-      build_git "foo", :path => lib_path('foo')
-      build_gem "bar", :to_system => true do |s|
-        s.add_dependency "foo"
-      end
-
-      install_gemfile <<-G
-        gem "foo", :git => "#{lib_path('foo')}"
-        gem "bar"
-      G
-
-      update_git "foo", :path => lib_path('foo') do |s|
-        s.write "lib/foo.rb", "FOO = '1.1'"
-      end
-
-      bundle "update foo"
-
-      should_be_installed "foo 1.1"
-    end
-
-    it "notices when you change the repo url in the Gemfile" do
-      build_git "foo", :path => lib_path("foo_one")
-      build_git "foo", :path => lib_path("foo_two")
-
-      install_gemfile <<-G
-        gem "foo", "1.0", :git => "#{lib_path('foo_one')}"
-      G
-
-      FileUtils.rm_rf lib_path("foo_one")
-
-      install_gemfile <<-G
-        gem "foo", "1.0", :git => "#{lib_path('foo_two')}"
-      G
-
-      expect(err).to be_empty
-      expect(out).to include("Fetching #{lib_path}/foo_two")
-      expect(out).to include("Your bundle is complete!")
-    end
-
-
-    it "fetches tags from the remote" do
-      build_git "foo"
-      @remote = build_git("bar", :bare => true)
-      update_git "foo", :remote => @remote.path
-      update_git "foo", :push => "master"
-
-      install_gemfile <<-G
-        gem 'foo', :git => "#{@remote.path}"
-      G
-
-      # Create a new tag on the remote that needs fetching
-      update_git "foo", :tag => "fubar"
-      update_git "foo", :push => "fubar"
-
-      gemfile <<-G
-        gem 'foo', :git => "#{@remote.path}", :tag => "fubar"
-      G
-
-      bundle "update", :exitstatus => true
-      expect(exitstatus).to eq(0)
-    end
-
-    describe "with submodules" do
-      before :each do
-        build_gem "submodule", :to_system => true do |s|
-          s.write "lib/submodule.rb", "puts 'GEM'"
-        end
-
-        build_git "submodule", "1.0" do |s|
-          s.write "lib/submodule.rb", "puts 'GIT'"
-        end
-
-        build_git "has_submodule", "1.0" do |s|
-          s.add_dependency "submodule"
-        end
-
-        Dir.chdir(lib_path('has_submodule-1.0')) do
-          `git submodule add #{lib_path('submodule-1.0')} submodule-1.0`
-          `git commit -m "submodulator"`
-        end
-      end
-
-      it "it unlocks the source when submodules are added to a git source" do
-        install_gemfile <<-G
-          git "#{lib_path('has_submodule-1.0')}" do
-            gem "has_submodule"
-          end
-        G
-
-        run "require 'submodule'"
-        expect(out).to eq('GEM')
-
-        install_gemfile <<-G
-          git "#{lib_path('has_submodule-1.0')}", :submodules => true do
-            gem "has_submodule"
-          end
-        G
-
-        run "require 'submodule'"
-        expect(out).to eq('GIT')
-      end
-
-      it "it unlocks the source when submodules are removed from git source" do
-        pending "This would require actually removing the submodule from the clone"
-        install_gemfile <<-G
-          git "#{lib_path('has_submodule-1.0')}", :submodules => true do
-            gem "has_submodule"
-          end
-        G
-
-        run "require 'submodule'"
-        expect(out).to eq('GIT')
-
-        install_gemfile <<-G
-          git "#{lib_path('has_submodule-1.0')}" do
-            gem "has_submodule"
-          end
-        G
-
-        run "require 'submodule'"
-        expect(out).to eq('GEM')
-      end
-    end
-
-    it "errors with a message when the .git repo is gone" do
-      build_git "foo", "1.0"
-
-      install_gemfile <<-G
-        gem "foo", :git => "#{lib_path('foo-1.0')}"
-      G
-
-      lib_path("foo-1.0").join(".git").rmtree
-
-      bundle :update, :expect_err => true
-      expect(out).to include(lib_path("foo-1.0").to_s)
-    end
-
-    it "should not explode on invalid revision on update of gem by name" do
-      build_git "rack", "0.8"
-
-      build_git "rack", "0.8", :path => lib_path('local-rack') do |s|
-        s.write "lib/rack.rb", "puts :LOCAL"
-      end
-
-      install_gemfile <<-G
-        source "file://#{gem_repo1}"
-        gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "master"
-      G
-
-      bundle %|config local.rack #{lib_path('local-rack')}|
-      bundle "update rack"
-      expect(out).to include("Your bundle is updated!")
-    end
-
-    it "shows the previous version of the gem" do
-      build_git "rails", "3.0", :path => lib_path("rails")
-
-      install_gemfile <<-G
-        gem "rails", :git => "#{lib_path('rails')}"
-      G
-
-      lockfile <<-G
-        GIT
-          remote: #{lib_path("rails")}
-          specs:
-            rails (2.3.2)
-
-        PLATFORMS
-          #{generic(Gem::Platform.local)}
-
-        DEPENDENCIES
-          rails!
-      G
-
-      bundle "update"
-      expect(out).to include("Using rails 3.0 (was 2.3.2) from #{lib_path('rails')} (at master)")
-    end
-  end
-
-  describe "with --source flag" do
-    before :each do
-      build_repo2
-      @git = build_git "foo", :path => lib_path("foo") do |s|
-        s.executables = "foobar"
-      end
-
-      install_gemfile <<-G
-        source "file://#{gem_repo2}"
-        git "#{lib_path('foo')}" do
-          gem 'foo'
-        end
-        gem 'rack'
-      G
-    end
-
-    it "updates the source" do
-      update_git "foo", :path => @git.path
-
-      bundle "update --source foo"
-
-      in_app_root do
-        run <<-RUBY
-          require 'foo'
-          puts "WIN" if defined?(FOO_PREV_REF)
-        RUBY
-
-        expect(out).to eq("WIN")
-      end
-    end
-
-    it "unlocks gems that were originally pulled in by the source" do
-      update_git "foo", "2.0", :path => @git.path
-
-      bundle "update --source foo"
-      should_be_installed "foo 2.0"
-    end
-
-    it "leaves all other gems frozen" do
-      update_repo2
-      update_git "foo", :path => @git.path
-
-      bundle "update --source foo"
-      should_be_installed "rack 1.0"
-    end
-  end
-end
diff --git a/spec/update/path_spec.rb b/spec/update/path_spec.rb
deleted file mode 100644
index fdc4615..0000000
--- a/spec/update/path_spec.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-require "spec_helper"
-
-describe "path sources" do
-  describe "bundle update --source" do
-    it "shows the previous version of the gem when updated from path source" do
-      build_lib "activesupport", "2.3.5", :path => lib_path("rails/activesupport")
-
-      install_gemfile <<-G
-      gem "activesupport", :path => "#{lib_path('rails/activesupport')}"
-      G
-
-      build_lib "activesupport", "3.0", :path => lib_path("rails/activesupport")
-
-      bundle "update --source activesupport"
-      expect(out).to include("Using activesupport 3.0 (was 2.3.5) from source at #{lib_path('rails/activesupport')}")
-    end
-  end
-end

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/bundler.git



More information about the Pkg-ruby-extras-commits mailing list