mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rubygems: Update to RubyGems master cee6788. Changes:
Fix test failure on vc10-x64 Server on rubyci.org due to attempting to File.chmod where it is not supported. Continuing work on improved gem dependencies file (Gemfile) support. * test: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4fa08bbaf8
commit
05ca2faba2
11 changed files with 128 additions and 21 deletions
|
@ -8,6 +8,11 @@ class Gem::RequestSet::GemDependencyAPI
|
|||
|
||||
attr_reader :dependency_groups
|
||||
|
||||
##
|
||||
# A set of gems that are loaded via the +:path+ option to #gem
|
||||
|
||||
attr_reader :vendor_set # :nodoc:
|
||||
|
||||
##
|
||||
# Creates a new GemDependencyAPI that will add dependencies to the
|
||||
# Gem::RequestSet +set+ based on the dependency API description in +path+.
|
||||
|
@ -18,6 +23,7 @@ class Gem::RequestSet::GemDependencyAPI
|
|||
|
||||
@current_groups = nil
|
||||
@dependency_groups = Hash.new { |h, group| h[group] = [] }
|
||||
@vendor_set = @set.vendor_set
|
||||
end
|
||||
|
||||
##
|
||||
|
@ -41,13 +47,20 @@ class Gem::RequestSet::GemDependencyAPI
|
|||
options = requirements.pop if requirements.last.kind_of?(Hash)
|
||||
options ||= {}
|
||||
|
||||
groups =
|
||||
(group = options.delete(:group) and Array(group)) ||
|
||||
options.delete(:groups) ||
|
||||
@current_groups
|
||||
if directory = options.delete(:path) then
|
||||
@vendor_set.add_vendor_gem name, directory
|
||||
end
|
||||
|
||||
if groups then
|
||||
groups.each do |group|
|
||||
group = options.delete :group
|
||||
all_groups = group ? Array(group) : []
|
||||
|
||||
groups = options.delete :groups
|
||||
all_groups |= groups if groups
|
||||
|
||||
all_groups |= @current_groups if @current_groups
|
||||
|
||||
unless all_groups.empty? then
|
||||
all_groups.each do |group|
|
||||
gem_arguments = [name, *requirements]
|
||||
gem_arguments << options unless options.empty?
|
||||
@dependency_groups[group] << gem_arguments
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue