mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rubygems/specification.rb: Include 2.2.0.preview.2 when checking
if extensions should be built. Fixes a ruby-ci failure. * test/rubygems/test_gem_specification.rb: Test for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ac778eb2cf
commit
e22d8781c8
3 changed files with 33 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
Mon Nov 11 04:36:14 2013 Eric Hodel <drbrain@segment7.net>
|
||||
|
||||
* lib/rubygems/specification.rb: Include 2.2.0.preview.2 when checking
|
||||
if extensions should be built. Fixes a ruby-ci failure.
|
||||
* test/rubygems/test_gem_specification.rb: Test for the above.
|
||||
|
||||
Mon Nov 11 03:15:56 2013 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* vm_trace.c (symbol2event_flag): add secret feature.
|
||||
|
|
|
@ -1407,7 +1407,7 @@ class Gem::Specification < Gem::BasicSpecification
|
|||
def build_extensions # :nodoc:
|
||||
return if default_gem?
|
||||
return if extensions.empty?
|
||||
return if installed_by_version < Gem::Version.new('2.2')
|
||||
return if installed_by_version < Gem::Version.new('2.2.0.preview.2')
|
||||
return if File.exist? gem_build_complete_path
|
||||
return if !File.writable?(base_dir) &&
|
||||
!File.exist?(File.join(base_dir, 'extensions'))
|
||||
|
|
|
@ -1260,6 +1260,32 @@ dependencies: []
|
|||
refute_path_exists gem_make_out
|
||||
end
|
||||
|
||||
def test_build_extensions_preview
|
||||
ext_spec
|
||||
|
||||
extconf_rb = File.join @ext.gem_dir, @ext.extensions.first
|
||||
FileUtils.mkdir_p File.dirname extconf_rb
|
||||
|
||||
open extconf_rb, 'w' do |f|
|
||||
f.write <<-'RUBY'
|
||||
open 'Makefile', 'w' do |f|
|
||||
f.puts "clean:\n\techo clean"
|
||||
f.puts "default:\n\techo built"
|
||||
f.puts "install:\n\techo installed"
|
||||
end
|
||||
RUBY
|
||||
end
|
||||
|
||||
refute_empty @ext.extensions, 'sanity check'
|
||||
|
||||
@ext.installed_by_version = v('2.2.0.preview.2')
|
||||
|
||||
@ext.build_extensions
|
||||
|
||||
gem_make_out = File.join @ext.extension_install_dir, 'gem_make.out'
|
||||
assert_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
|
||||
|
|
Loading…
Reference in a new issue