Thrift-1355: Running make in lib/rb doesn't build the native extensions
authorJake Farrell <jfarrell@apache.org>
Fri, 23 Sep 2011 17:24:00 +0000 (17:24 +0000)
committerJake Farrell <jfarrell@apache.org>
Fri, 23 Sep 2011 17:24:00 +0000 (17:24 +0000)
Client: rb
Patch: jfarrell

Builds extension prior to running spec calls to resolve test deps.

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1174896 13f79535-47bb-0310-9956-ffa450edef68

lib/rb/Rakefile

index 780d652..944134a 100644 (file)
@@ -25,7 +25,7 @@ require 'spec/rake/spectask'
 THRIFT = '../../compiler/cpp/thrift'
 
 task :default => [:gem]
-task :spec => [:'gen-rb', :realspec]
+task :spec => [:'gen-rb', :build_ext, :realspec]
 
 Spec::Rake::SpecTask.new(:realspec) do |t|
   t.spec_files = FileList['spec/**/*_spec.rb']
@@ -59,7 +59,7 @@ namespace :'gen-rb' do
 end
 
 desc "Build the native library"
-task :build_ext => :spec do
+task :build_ext => :'gen-rb' do
    Dir::chdir(File::dirname('ext/extconf.rb')) do
       unless sh "ruby #{File::basename('ext/extconf.rb')}"
         $stderr.puts "Failed to run extconf"