diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-21 23:27:30 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-21 23:27:30 +0000 |
commit | 5307d803f5cce7b14a6afd1d51f6d53ec85ca87d () | |
tree | aac2997a9ff000fbf2f1f9f27077bb7b2403f2c9 /lib/rubygems/resolver/conflict.rb | |
parent | b1529a30e08040b717adef8ac1fa8be1c060e7e1 (diff) |
* lib/rubygems: Update to RubyGems master 50a8210. Important changes
in this commit: RubyGems now automatically checks for gem.deps.rb or Gemfile when running ruby executables. This behavior is similar to `bundle exec rake`. This change may be reverted before Ruby 2.1.0 if too many bugs are found. * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | lib/rubygems/resolver/conflict.rb | 41 |
1 files changed, 31 insertions, 10 deletions
@@ -4,25 +4,38 @@ class Gem::Resolver::Conflict attr_reader :activated attr_reader :dependency attr_reader :failed_dep # :nodoc: def initialize(dependency, activated, failed_dep=dependency) @dependency = dependency @activated = activated @failed_dep = failed_dep end - def == other self.class === other and @dependency == other.dependency and @activated == other.activated and @failed_dep == other.failed_dep end def explain "<Conflict wanted: #{@failed_dep}, had: #{activated.spec.full_name}>" end @@ -41,11 +54,15 @@ class Gem::Resolver::Conflict activated = @activated.spec.full_name requirement = @failed_dep.dependency.requirement - " Activated %s instead of (%s) via:\n %s\n" % [ - activated, requirement, request_path.join(', ') ] end def for_spec?(spec) @dependency.name == spec.name end @@ -72,16 +89,17 @@ class Gem::Resolver::Conflict end ## - # Path of specifications that requested this dependency - def request_path - current = requester - path = [] while current do - path << current.spec.full_name - current = current.request.requester end path = ['user request (gem command or Gemfile)'] if path.empty? @@ -98,5 +116,8 @@ class Gem::Resolver::Conflict end -Gem::Resolver::DependencyConflict = Gem::Resolver::Conflict |