Thrift-1355: Running make in lib/rb doesn't build the native extensions
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
diff --git a/lib/rb/Rakefile b/lib/rb/Rakefile
index 780d652..944134a 100644
--- a/lib/rb/Rakefile
+++ b/lib/rb/Rakefile
@@ -25,7 +25,7 @@
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 @@
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"