summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel E. Giddins <segiddins@segiddins.me>2015-02-23 18:19:23 -0800
committerSamuel E. Giddins <segiddins@segiddins.me>2015-02-23 18:19:23 -0800
commitc40d129e9da8072eaf087ffdb773a801c6c2218e (patch)
treee898f23d9e69dc935a14b5d041aba22b50483e5f
parent516d54839f202737dbb1b5e4cbe68198ac3715e9 (diff)
downloadbundler-c40d129e9da8072eaf087ffdb773a801c6c2218e.tar.gz
[Source::Path] Sort gemspecs by relative depth
-rw-r--r--lib/bundler/source/path.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/source/path.rb b/lib/bundler/source/path.rb
index 59131a52b4..1a32b132bd 100644
--- a/lib/bundler/source/path.rb
+++ b/lib/bundler/source/path.rb
@@ -130,7 +130,7 @@ module Bundler
index = Index.new
if File.directory?(expanded_path)
- Dir["#{expanded_path}/#{@glob}"].each do |file|
+ Dir["#{expanded_path}/#{@glob}"].sort_by { |p| p.split(File::SEPARATOR).size }.each do |file|
spec = Bundler.load_gemspec(file)
if spec
spec.loaded_from = file.to_s