1
0
Fork 0
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:
drbrain 2013-10-16 22:37:39 +00:00
parent 86c24c4430
commit a1d96c9f47
10 changed files with 60 additions and 12 deletions

View file

@ -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> Thu Oct 17 07:10:26 2013 Zachary Scott <e@zzak.io>
* ext/curses/curses.c: [DOC] Cleaned up formatting consistency of rdoc * ext/curses/curses.c: [DOC] Cleaned up formatting consistency of rdoc

View file

@ -1,3 +1,5 @@
require 'rubygems/command'
class Gem::Ext::CmakeBuilder < Gem::Ext::Builder class Gem::Ext::CmakeBuilder < Gem::Ext::Builder
def self.build(extension, directory, dest_path, results) def self.build(extension, directory, dest_path, results)
unless File.exist?('Makefile') then unless File.exist?('Makefile') then

View file

@ -4,8 +4,6 @@
# See LICENSE.txt for permissions. # See LICENSE.txt for permissions.
#++ #++
require 'rubygems/ext/builder'
class Gem::Ext::ConfigureBuilder < Gem::Ext::Builder class Gem::Ext::ConfigureBuilder < Gem::Ext::Builder
def self.build(extension, directory, dest_path, results, args=[]) def self.build(extension, directory, dest_path, results, args=[])

View file

@ -4,8 +4,6 @@
# See LICENSE.txt for permissions. # See LICENSE.txt for permissions.
#++ #++
require 'rubygems/ext/builder'
require 'rubygems/command'
require 'fileutils' require 'fileutils'
require 'tempfile' require 'tempfile'

View file

@ -4,9 +4,6 @@
# See LICENSE.txt for permissions. # See LICENSE.txt for permissions.
#++ #++
require 'rubygems/ext/builder'
require 'rubygems/command'
class Gem::Ext::RakeBuilder < Gem::Ext::Builder class Gem::Ext::RakeBuilder < Gem::Ext::Builder
def self.build(extension, directory, dest_path, results, args=[]) def self.build(extension, directory, dest_path, results, args=[])

View file

@ -4,6 +4,7 @@
# See LICENSE.txt for permissions. # See LICENSE.txt for permissions.
#++ #++
require 'rubygems/command'
require 'rubygems/exceptions' require 'rubygems/exceptions'
require 'rubygems/package' require 'rubygems/package'
require 'rubygems/ext' require 'rubygems/ext'

View file

@ -5,6 +5,19 @@ require 'rubygems/dependency_list'
require 'rubygems/installer' require 'rubygems/installer'
require 'tsort' 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 class Gem::RequestSet
include TSort include TSort
@ -23,6 +36,15 @@ class Gem::RequestSet
attr_accessor :soft_missing 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 def initialize *deps
@dependencies = deps @dependencies = deps

View file

@ -1390,16 +1390,27 @@ class Gem::Specification < Gem::BasicSpecification
def build_extensions # :nodoc: def build_extensions # :nodoc:
return if default_gem? return if default_gem?
return if extensions.empty?
return if File.exist? gem_build_complete_path return if File.exist? gem_build_complete_path
return if !File.writable?(base_dir) && return if !File.writable?(base_dir) &&
!File.exist?(File.join(base_dir, 'extensions')) !File.exist?(File.join(base_dir, 'extensions'))
gem_original_require 'rubygems/ext' begin
gem_original_require 'rubygems/user_interaction' # 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 require 'rubygems/config_file'
builder = Gem::Ext::Builder.new self require 'rubygems/ext'
builder.build_extensions 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
end end

View file

@ -1,6 +1,7 @@
# coding: US-ASCII # coding: US-ASCII
require 'rubygems/test_case' require 'rubygems/test_case'
require 'rubygems' require 'rubygems'
require 'rubygems/command'
require 'rubygems/installer' require 'rubygems/installer'
require 'pathname' require 'pathname'
require 'tmpdir' require 'tmpdir'

View file

@ -1210,6 +1210,15 @@ dependencies: []
FileUtils.chmod 0755, @gemhome FileUtils.chmod 0755, @gemhome
end 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 def test_contains_requirable_file_eh
code_rb = File.join @a1.gem_dir, 'lib', 'code.rb' code_rb = File.join @a1.gem_dir, 'lib', 'code.rb'
FileUtils.mkdir_p File.dirname code_rb FileUtils.mkdir_p File.dirname code_rb