mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 13:04:13 +02:00
* lib/rubygems: Update to RubyGems 2.2.0.preview.1
This brings several new features to RubyGems summarized here: https://github.com/rubygems/rubygems/blob/v2.2.0.preview.1/History.txt * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
81629f0531
commit
95683e5cb2
25 changed files with 540 additions and 159 deletions
|
@ -327,7 +327,7 @@ class Gem::Specification < Gem::BasicSpecification
|
|||
add_bindir(@executables),
|
||||
@extra_rdoc_files,
|
||||
@extensions,
|
||||
].flatten.uniq.compact
|
||||
].flatten.sort.uniq.compact
|
||||
end
|
||||
|
||||
######################################################################
|
||||
|
@ -1321,9 +1321,7 @@ class Gem::Specification < Gem::BasicSpecification
|
|||
def add_self_to_load_path
|
||||
return if default_gem?
|
||||
|
||||
paths = require_paths.map do |path|
|
||||
File.join full_gem_path, path
|
||||
end
|
||||
paths = full_require_paths
|
||||
|
||||
# gem directories must come after -I and ENV['RUBYLIB']
|
||||
insert_index = Gem.load_path_insert_index
|
||||
|
@ -2016,6 +2014,17 @@ class Gem::Specification < Gem::BasicSpecification
|
|||
self.require_paths = [path]
|
||||
end
|
||||
|
||||
##
|
||||
# Full paths in the gem to add to <code>$LOAD_PATH</code> when this gem is
|
||||
# activated.
|
||||
#
|
||||
|
||||
def full_require_paths
|
||||
require_paths.map do |path|
|
||||
File.join full_gem_path, path
|
||||
end
|
||||
end
|
||||
|
||||
##
|
||||
# The RubyGems version required by this gem
|
||||
|
||||
|
@ -2380,6 +2389,11 @@ class Gem::Specification < Gem::BasicSpecification
|
|||
"[\"#{non_files.join "\", \""}\"] are not files"
|
||||
end
|
||||
|
||||
if files.include? file_name then
|
||||
raise Gem::InvalidSpecificationException,
|
||||
"#{full_name} contains itself (#{file_name}), check your files list"
|
||||
end
|
||||
|
||||
unless specification_version.is_a?(Fixnum)
|
||||
raise Gem::InvalidSpecificationException,
|
||||
'specification_version must be a Fixnum (did you mean version?)'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue