mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rubygems: Update to RubyGems master 2abce58. Changes:
Fixed documentation generation when sdoc and json are installed as gems. Added some missing documentation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
86c24c4430
commit
a1d96c9f47
10 changed files with 60 additions and 12 deletions
|
@ -1,3 +1,12 @@
|
|||
Thu Oct 17 07:36:53 2013 Eric Hodel <drbrain@segment7.net>
|
||||
|
||||
* lib/rubygems: Update to RubyGems master 2abce58. Changes:
|
||||
|
||||
Fixed documentation generation when sdoc and json are installed as
|
||||
gems.
|
||||
|
||||
Added some missing documentation.
|
||||
|
||||
Thu Oct 17 07:10:26 2013 Zachary Scott <e@zzak.io>
|
||||
|
||||
* ext/curses/curses.c: [DOC] Cleaned up formatting consistency of rdoc
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
require 'rubygems/command'
|
||||
|
||||
class Gem::Ext::CmakeBuilder < Gem::Ext::Builder
|
||||
def self.build(extension, directory, dest_path, results)
|
||||
unless File.exist?('Makefile') then
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
# See LICENSE.txt for permissions.
|
||||
#++
|
||||
|
||||
require 'rubygems/ext/builder'
|
||||
|
||||
class Gem::Ext::ConfigureBuilder < Gem::Ext::Builder
|
||||
|
||||
def self.build(extension, directory, dest_path, results, args=[])
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
# See LICENSE.txt for permissions.
|
||||
#++
|
||||
|
||||
require 'rubygems/ext/builder'
|
||||
require 'rubygems/command'
|
||||
require 'fileutils'
|
||||
require 'tempfile'
|
||||
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
# See LICENSE.txt for permissions.
|
||||
#++
|
||||
|
||||
require 'rubygems/ext/builder'
|
||||
require 'rubygems/command'
|
||||
|
||||
class Gem::Ext::RakeBuilder < Gem::Ext::Builder
|
||||
|
||||
def self.build(extension, directory, dest_path, results, args=[])
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
# See LICENSE.txt for permissions.
|
||||
#++
|
||||
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/exceptions'
|
||||
require 'rubygems/package'
|
||||
require 'rubygems/ext'
|
||||
|
|
|
@ -5,6 +5,19 @@ require 'rubygems/dependency_list'
|
|||
require 'rubygems/installer'
|
||||
require 'tsort'
|
||||
|
||||
##
|
||||
# A RequestSet groups a request to activate a set of dependencies.
|
||||
#
|
||||
# nokogiri = Gem::Dependency.new 'nokogiri', '~> 1.6'
|
||||
# pg = Gem::Dependency.new 'pg', '~> 0.14'
|
||||
#
|
||||
# set = Gem::RequestSet.new nokogiri, pg
|
||||
#
|
||||
# requests = set.resolve
|
||||
#
|
||||
# p requests.map { |r| r.full_name }
|
||||
# #=> ["nokogiri-1.6.0", "mini_portile-0.5.1", "pg-0.17.0"]
|
||||
|
||||
class Gem::RequestSet
|
||||
|
||||
include TSort
|
||||
|
@ -23,6 +36,15 @@ class Gem::RequestSet
|
|||
|
||||
attr_accessor :soft_missing
|
||||
|
||||
##
|
||||
# Creates a RequestSet for a list of Gem::Dependency objects, +deps+. You
|
||||
# can then #resolve and #install the resolved list of dependencies.
|
||||
#
|
||||
# nokogiri = Gem::Dependency.new 'nokogiri', '~> 1.6'
|
||||
# pg = Gem::Dependency.new 'pg', '~> 0.14'
|
||||
#
|
||||
# set = Gem::RequestSet.new nokogiri, pg
|
||||
|
||||
def initialize *deps
|
||||
@dependencies = deps
|
||||
|
||||
|
|
|
@ -1390,16 +1390,27 @@ class Gem::Specification < Gem::BasicSpecification
|
|||
|
||||
def build_extensions # :nodoc:
|
||||
return if default_gem?
|
||||
return if extensions.empty?
|
||||
return if File.exist? gem_build_complete_path
|
||||
return if !File.writable?(base_dir) &&
|
||||
!File.exist?(File.join(base_dir, 'extensions'))
|
||||
|
||||
gem_original_require 'rubygems/ext'
|
||||
gem_original_require 'rubygems/user_interaction'
|
||||
begin
|
||||
# We need to require things in $LOAD_PATH without looking for the
|
||||
# extension we are about to build.
|
||||
unresolved_deps = Gem::Specification.unresolved_deps.dup
|
||||
Gem::Specification.unresolved_deps.clear
|
||||
|
||||
Gem::DefaultUserInteraction.use_ui Gem::SilentUI.new do
|
||||
builder = Gem::Ext::Builder.new self
|
||||
builder.build_extensions
|
||||
require 'rubygems/config_file'
|
||||
require 'rubygems/ext'
|
||||
require 'rubygems/user_interaction'
|
||||
|
||||
Gem::DefaultUserInteraction.use_ui Gem::SilentUI.new do
|
||||
builder = Gem::Ext::Builder.new self
|
||||
builder.build_extensions
|
||||
end
|
||||
ensure
|
||||
Gem::Specification.unresolved_deps.replace unresolved_deps
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# coding: US-ASCII
|
||||
require 'rubygems/test_case'
|
||||
require 'rubygems'
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/installer'
|
||||
require 'pathname'
|
||||
require 'tmpdir'
|
||||
|
|
|
@ -1210,6 +1210,15 @@ dependencies: []
|
|||
FileUtils.chmod 0755, @gemhome
|
||||
end
|
||||
|
||||
def test_build_extensions_none
|
||||
refute_path_exists @a1.extension_install_dir, 'sanity check'
|
||||
assert_empty @a1.extensions, 'sanity check'
|
||||
|
||||
@a1.build_extensions
|
||||
|
||||
refute_path_exists @a1.extension_install_dir
|
||||
end
|
||||
|
||||
def test_contains_requirable_file_eh
|
||||
code_rb = File.join @a1.gem_dir, 'lib', 'code.rb'
|
||||
FileUtils.mkdir_p File.dirname code_rb
|
||||
|
|
Loading…
Reference in a new issue