diff --git a/sylvilagus/jruby/Rakefile b/sylvilagus/jruby/Rakefile index f6a044a..b87e112 100644 --- a/sylvilagus/jruby/Rakefile +++ b/sylvilagus/jruby/Rakefile @@ -5,11 +5,11 @@ RMQV = '2.8.7' directory './tmp' -file "./tmp/rabbitmq-java-client-bin-#{RMQV}.tar.gz" => ['./tmp'] do |f| +file "./tmp/rabbitmq-java-client-bin-#{RMQV}.tar.gz" => ['./tmp'] do |t| puts "*** Downloading tarball" - open("#{RMQ_URI_BASE}/v#{RMQV}/rabbitmq-java-client-bin-#{RMQV}.tar.gz") do |f| - open('./tmp/rabbitmq-java-client-bin.tar.gz', 'w') do |out| - out.write(f.read) + open("#{RMQ_URI_BASE}/v#{RMQV}/rabbitmq-java-client-bin-#{RMQV}.tar.gz") do |dl| + open(t.name, 'w') do |out| + out.write(dl.read) end end end @@ -18,8 +18,7 @@ file "./tmp/rabbitmq-java-client-bin-#{RMQV}/rabbitmq-client.jar" => ["./tmp/rabbitmq-java-client-bin-#{RMQV}.tar.gz"] do puts "*** Extracting tarball" Dir.chdir('./tmp') do - `tar xzvf rabbitmq-java-client-bin.tar.gz` - puts "*** Extracted, exit code = #{$?}" + sh "tar xzvf rabbitmq-java-client-bin-#{RMQV}.tar.gz" end end