Stubbing in jruby version

mostly to get used to jruby, I suppose, but I need to know how to use
the official rabbitmq java client in this context, too.
This commit is contained in:
Dan Buch 2012-11-16 19:38:13 -05:00
parent 2ef0c8207a
commit 4b81b14358
4 changed files with 31 additions and 0 deletions

2
sylvilagus/jruby/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/tmp/
/lib/java/*.jar

View File

@ -0,0 +1 @@
jruby-1.6.7.2

28
sylvilagus/jruby/Rakefile Normal file
View File

@ -0,0 +1,28 @@
require 'open-uri'
directory './tmp'
file './tmp/rabbitmq-java-client-bin-2.8.7.tar.gz' => ['./tmp'] do |f|
open('http://www.rabbitmq.com/releases/rabbitmq-java-client/v2.8.7/rabbitmq-java-client-bin-2.8.7.tar.gz') do |f|
open('./tmp/rabbitmq-java-client-bin.tar.gz', 'w') do |out|
out.write(f.read)
end
end
end
file './tmp/rabbitmq-java-client-bin-2.8.7' => ['./tmp/rabbitmq-java-client-bin-2.8.7.tar.gz'] do
Dir.chdir('./tmp') do
`tar xzvf rabbitmq-java-client-bin.tar.gz`
end
end
file './lib/java/rabbitmq-client.jar' => ['./tmp/rabbitmq-java-client-bin-2.8.7'] do
Dir['./tmp/rabbitmq-java-client-bin-2.8.7/*.jar'].each do |jar|
FileUtils.mv(jar, './lib/java', :verbose => true)
end
end
desc 'Download and copy over the rabbitmq client jar'
task :rabbitmq_client_jar => ['./lib/java/rabbitmq-client.jar']
task :default => [:rabbitmq_client_jar]

View File