summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-10 19:37:05 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-10 19:37:05 +0000
commite22d8781c8005b068ffa73ecc88728d720b6e870 (patch)
treef9d6cf2366d206db45b935b7d0b733dc1c6e1af2
parentac778eb2cf8f66a7c15573a73c620f237f9f17dd (diff)
* 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
-rw-r--r--ChangeLog6
-rw-r--r--lib/rubygems/specification.rb2
-rw-r--r--test/rubygems/test_gem_specification.rb26
3 files changed, 33 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1dd01e4..b563002 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index 5330c10..5a66787 100644
--- a/lib/rubygems/specification.rb
+++ b/lib/rubygems/specification.rb
@@ -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'))
diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb
index 3936bc0..231f10d 100644
--- a/test/rubygems/test_gem_specification.rb
+++ b/test/rubygems/test_gem_specification.rb
@@ -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