aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler/source
diff options
context:
space:
mode:
authorAsutosh Palai <asupalai@gmail.com>2016-05-20 14:06:28 +0530
committerAsutosh Palai <asupalai@gmail.com>2016-05-24 21:15:01 +0530
commit011c69901ae3a103ec91385378f3df70b0f778d2 (patch)
treea5da1887f763a3ba63df38e676835ac323b87696 /lib/bundler/source
parentdbad52b5b477936b25c2c5605247a9e70a0796cb (diff)
downloadbundler-011c69901ae3a103ec91385378f3df70b0f778d2.tar.gz
Added plugin module with install functionality
Diffstat (limited to 'lib/bundler/source')
-rw-r--r--lib/bundler/source/rubygems.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb
index d8ca36e3..33e0e0be 100644
--- a/lib/bundler/source/rubygems.rb
+++ b/lib/bundler/source/rubygems.rb
@@ -21,7 +21,8 @@ module Bundler
@dependency_names = []
@allow_remote = false
@allow_cached = false
- @caches = [Bundler.app_cache, *Bundler.rubygems.gem_cache]
+ @caches = [*Bundler.rubygems.gem_cache]
+ @caches << Bundler.app_cache unless options[:ignore_app_cache] # To use this class for installing plugins
Array(options["remotes"] || []).reverse_each {|r| add_remote(r) }
end
@@ -80,7 +81,7 @@ module Bundler
# sources, and large_idx.use small_idx is way faster than
# small_idx.use large_idx.
idx = @allow_remote ? remote_specs.dup : Index.new
- idx.use(cached_specs, :override_dupes) if @allow_cached || @allow_remote
+ idx.use(cached_specs, :override_dupes) if @allow_cached || @allow_remote && !@options[:ignore_app_cache]
idx.use(installed_specs, :override_dupes)
idx
end