Created
June 5, 2012 14:04
-
-
Save bkabrda/2875212 to your computer and use it in GitHub Desktop.
Bundler - prefer local gems
This file contains 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
diff --git a/lib/bundler/resolver.rb b/lib/bundler/resolver.rb | |
index 236eedd..eb35d3d 100644 | |
--- a/lib/bundler/resolver.rb | |
+++ b/lib/bundler/resolver.rb | |
@@ -291,6 +291,10 @@ module Bundler | |
end | |
end | |
+ local = matching_versions.reject { |mv| mv[0].class == Bundler::RemoteSpecification } | |
+ others = matching_versions - local | |
+ matching_versions = others + local | |
+ | |
matching_versions.reverse_each do |spec_group| | |
conflict = resolve_requirement(spec_group, current, reqs.dup, activated.dup) | |
conflicts << conflict if conflict |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment