mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
* lib/rubygems: Update to RubyGems master 3de7e0f. Changes:
Only attempt to build extensions for newly-installed gems. This prevents compilation attempts at gem activation time for gems that already have extensions built. Fix crash in the dependency resolver for dependencies that cannot be resolved. * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
347e748bdd
commit
8552f7aa68
11 changed files with 134 additions and 16 deletions
|
@ -67,6 +67,7 @@ end
|
|||
|
||||
s.mark_version
|
||||
s.files = %w[lib/code.rb]
|
||||
s.installed_by_version = v('2.2')
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -1221,6 +1222,19 @@ dependencies: []
|
|||
refute_path_exists @a1.extension_install_dir
|
||||
end
|
||||
|
||||
def test_build_extensions_old
|
||||
ext_spec
|
||||
|
||||
refute_empty @ext.extensions, 'sanity check'
|
||||
|
||||
@ext.installed_by_version = v(0)
|
||||
|
||||
@ext.build_extensions
|
||||
|
||||
gem_make_out = File.join @ext.extension_install_dir, 'gem_make.out'
|
||||
refute_path_exists gem_make_out
|
||||
end
|
||||
|
||||
def test_contains_requirable_file_eh
|
||||
code_rb = File.join @a1.gem_dir, 'lib', 'code.rb'
|
||||
FileUtils.mkdir_p File.dirname code_rb
|
||||
|
@ -1544,6 +1558,14 @@ dependencies: []
|
|||
refute_equal @a1.hash, @a2.hash
|
||||
end
|
||||
|
||||
def test_installed_by_version
|
||||
assert_equal v(0), @a1.installed_by_version
|
||||
|
||||
@a1.installed_by_version = Gem.rubygems_version
|
||||
|
||||
assert_equal Gem.rubygems_version, @a1.installed_by_version
|
||||
end
|
||||
|
||||
def test_base_dir
|
||||
assert_equal @gemhome, @a1.base_dir
|
||||
end
|
||||
|
@ -1841,6 +1863,7 @@ end
|
|||
@a2.add_runtime_dependency 'b', '1'
|
||||
@a2.dependencies.first.instance_variable_set :@type, nil
|
||||
@a2.required_rubygems_version = Gem::Requirement.new '> 0'
|
||||
@a2.installed_by_version = Gem.rubygems_version
|
||||
|
||||
# cached specs do not have spec.files populated:
|
||||
ruby_code = @a2.to_ruby_for_cache
|
||||
|
@ -1863,6 +1886,8 @@ Gem::Specification.new do |s|
|
|||
s.rubygems_version = "#{Gem::VERSION}"
|
||||
s.summary = "this is a summary"
|
||||
|
||||
s.installed_by_version = "#{Gem::VERSION}"
|
||||
|
||||
if s.respond_to? :specification_version then
|
||||
s.specification_version = #{Gem::Specification::CURRENT_SPECIFICATION_VERSION}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue