Created
January 14, 2011 23:08
-
-
Save Lytol/780460 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bsmith bundler (1-0-stable) $ grep -n -r "no-cache" ./ | |
./lib/bundler/cli.rb:139: method_option "no-cache", :type => :boolean, :banner => | |
bsmith bundler (1-0-stable) $ grep -n -r "no_cache" ./ | |
bsmith bundler (1-0-stable) $ | |
bsmith bundler (1-0-stable) $ git log --oneline | grep "no-cache" | |
4601dde Add install option --no-cache to prevent updating the cache. | |
e4287d2 Add install option --no-cache to prevent updating the cache. | |
bsmith bundler (1-0-stable) $ git show 4601dde | |
commit 4601ddeaaddf2671ecc2baa24f49d9e59e7fcfcb | |
Author: Andre Arko <[email protected]> | |
Date: Wed May 12 13:52:34 2010 -0700 | |
Add install option --no-cache to prevent updating the cache. | |
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb | |
index ef9ca0d..b8048e3 100644 | |
--- a/lib/bundler/cli.rb | |
+++ b/lib/bundler/cli.rb | |
@@ -85,8 +85,10 @@ module Bundler | |
"Do not use any shared gems, such as the system gem repository." | |
method_option "gemfile", :type => :string, :banner => | |
"Use the specified gemfile instead of Gemfile" | |
- method_option "no-prune", :type => :boolean, :banner => | |
+ method_option "no-prune", :type => :boolean, :banner => | |
"Don't remove stale gems from the cache." | |
+ method_option "no-cache", :type => :boolean, :banner => | |
+ "Don't update the existing gem cache." | |
def install(path = nil) | |
opts = options.dup | |
opts[:without] ||= [] | |
bsmith bundler (1-0-stable) $ git show e4287d2 | |
commit e4287d26ad52b4db5c6379432dd201bf1a0eb311 | |
Author: Andre Arko <[email protected]> | |
Date: Wed May 12 13:52:34 2010 -0700 | |
Add install option --no-cache to prevent updating the cache. | |
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb | |
index 0fff900..847dd05 100644 | |
--- a/lib/bundler/cli.rb | |
+++ b/lib/bundler/cli.rb | |
@@ -72,6 +72,7 @@ module Bundler | |
method_option "relock", :type => :boolean, :banner => "Unlock, install the gems, and relock." | |
method_option "disable-shared-gems", :type => :boolean, :banner => "Do not use any shared gems, such as the system gem repository." | |
method_option "gemfile", :type => :string, :banner => "Use the specified gemfile instead of Gemfile" | |
+ 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." | |
def install(path = nil) | |
opts = options.dup | |
@@ -94,7 +95,7 @@ module Bundler | |
end | |
lock if options[:relock] | |
- cache if Bundler.root.join("vendor/cache").exist? | |
+ cache if Bundler.root.join("vendor/cache").exist? && !options[:no_cache] | |
Bundler.ui.confirm "Your bundle is complete! " + | |
"Use `bundle show [gemname]` to see where a bundled gem is installed." | |
rescue GemNotFound => e |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
method_option
reference is for Thor to understand the option, but the option never seems to get referenced. The underscoredno_cache
is in case it is referenced as a symbol (and the dash gets changed to an underscore).