summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2013-03-14 23:06:12 -0700
committerAndre Arko <andre@arko.net>2013-03-14 23:06:12 -0700
commit2569e99ca0d13f0af5ccf683ae3009a074d77c70 (patch)
tree18b75bbf4927b9b0061f7abb444222c39095b8e9
parenta4ed2935e0311355ed718d0f77563b2f17e4a951 (diff)
downloadbundler-2569e99ca0d13f0af5ccf683ae3009a074d77c70.tar.gz
warn about rubygems missing even with git sources
-rw-r--r--lib/bundler/cli.rb2
-rw-r--r--lib/bundler/definition.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index 3af45dbe9b..98d94361c7 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -269,7 +269,7 @@ module Bundler
Bundler.ui.warn "Some gems seem to be missing from your vendor/cache directory."
end
- if Bundler.definition.no_sources?
+ if Bundler.definition.rubygems_remotes.empty?
Bundler.ui.warn "Your Gemfile has no remote sources. If you need " \
"gems that are not already on\nyour machine, add a line like this " \
"to your Gemfile:\n source 'https://rubygems.org'"
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index 8c6e80c340..52443668b9 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -208,8 +208,8 @@ module Bundler
end
end
- def no_sources?
- @sources.length == 1 && @sources.first.remotes.empty?
+ def rubygems_remotes
+ @sources.select{|s| s.is_a?(Source::Rubygems) }.map{|s| s.remotes }.flatten
end
def groups