diff options
author | gyngve <gary.yngve@gmail.com> | 2010-11-30 14:47:31 -0800 |
---|---|---|
committer | Andre Arko and Terence Lee <andre.arko+terence.lee@gmail.com> | 2011-01-18 17:20:01 -0800 |
commit | 08c38172daae4cbfa8e681c3edfd3785c2e98b07 (patch) | |
tree | b7f73bc443a22b5a048f441235c202e74e30e8a1 /lib/bundler | |
parent | e11fde089e0330c0b8b77427d4e0b14c2221c890 (diff) | |
download | bundler-08c38172daae4cbfa8e681c3edfd3785c2e98b07.tar.gz |
--local option for bundler update
Diffstat (limited to 'lib/bundler')
-rw-r--r-- | lib/bundler/cli.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index c03bc31a4b..a307ebb45e 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -258,6 +258,8 @@ module Bundler 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 "local", :type => :boolean, :banner => + "Do not attempt to fetch gems remotely and use the gem cache instead" def update(*gems) sources = Array(options[:source]) @@ -268,7 +270,8 @@ module Bundler Bundler.definition(:gems => gems, :sources => sources) end - Installer.install Bundler.root, Bundler.definition, "update" => true + opts = {"update" => true, "local" => options[:local]} + Installer.install Bundler.root, Bundler.definition, opts Bundler.load.cache if Bundler.root.join("vendor/cache").exist? Bundler.ui.confirm "Your bundle is updated! " + "Use `bundle show [gemname]` to see where a bundled gem is installed." |