Permalink
Browse files

--local option for bundler update

  • Loading branch information...
1 parent e11fde0 commit 08c38172daae4cbfa8e681c3edfd3785c2e98b07 @gyngve gyngve committed with Andre Arko and Terence Lee Nov 30, 2010
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/bundler/cli.rb
View
@@ -258,6 +258,8 @@ def install(path = nil)
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 @@ def update(*gems)
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."

0 comments on commit 08c3817

Please sign in to comment.