summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel E. Giddins <segiddins@segiddins.me>2015-07-15 20:48:37 -0700
committerSamuel E. Giddins <segiddins@segiddins.me>2015-07-15 20:48:37 -0700
commitcc5294531a5f23935029094d165c7311b8d97483 (patch)
treebd38021cea492d8de8bf6310e9044edfab97bd50
parent4dd3e73459545c4a94913fe465e37b2da0c710b1 (diff)
downloadbundler-cc5294531a5f23935029094d165c7311b8d97483.tar.gz
[RuboCop] Enable Lint/Loop
-rw-r--r--.rubocop_todo.yml4
-rw-r--r--lib/bundler/source/rubygems.rb5
2 files changed, 3 insertions, 6 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index fc1336bfe1..a3d0776a27 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -14,10 +14,6 @@ Lint/HandleExceptions:
Enabled: false
# Offense count: 1
-Lint/Loop:
- Enabled: false
-
-# Offense count: 1
Lint/NestedMethodDefinition:
Enabled: false
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb
index a7a826d3f9..92d14774ab 100644
--- a/lib/bundler/source/rubygems.rb
+++ b/lib/bundler/source/rubygems.rb
@@ -349,14 +349,15 @@ module Bundler
# but will not have found any versions of Bar from source B, which is a problem if the requested version
# of Foo specifically depends on a version of Bar that is only found in source B. This ensures that for
# each spec we found, we add all possible versions from all sources to the index.
- begin
+ loop do
idxcount = idx.size
api_fetchers.each do |f|
Bundler.ui.info "Fetching version metadata from #{f.uri}", Bundler.ui.debug?
idx.use f.specs(idx.dependency_names, self), true
Bundler.ui.info "" if !Bundler.ui.debug? # new line now that the dots are over
end
- end until idxcount == idx.size
+ break if idxcount == idx.size
+ end
if api_fetchers.any?
# it's possible that gems from one source depend on gems from some