Skip to content

Commit 8ba8bfd

Browse files
committed
Enable ruby tests.
In order to get them working you need recent rubygems, which makes everything way too complicated. Also, I couldn't get that working with ruby1.8, so using 1.9 instead.
1 parent 5fba979 commit 8ba8bfd

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

Makefile

+12-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ test: prerequisites dotnet/.ok erlang/.ok java/.ok python/.ok php/.ok ruby/.ok
1616

1717
.PHONY: prerequisites
1818
prerequisites:
19-
dpkg -L python-virtualenv git-core php5-cli rubygems1.8 > /dev/null
19+
dpkg -L python-virtualenv git-core php5-cli ruby1.9 ruby1.9-dev > /dev/null
2020

2121
R=http://www.rabbitmq.com/releases
2222
dotnet/.ok:
@@ -36,10 +36,10 @@ clean::
3636

3737
erlang/.ok:
3838
(cd erlang && \
39-
wget -c $(R)/plugins/v2.5.0/rabbit_common-2.5.0.ez && \
39+
wget -c $(R)/plugins/v2.5.0/rabbit_common-2.5.0.ez \
40+
$(R)/plugins/v2.5.0/amqp_client-2.5.0.ez && \
4041
unzip -q rabbit_common-2.5.0.ez && \
4142
ln -s rabbit_common-2.5.0 rabbit_common && \
42-
wget -c $(R)/plugins/v2.5.0/amqp_client-2.5.0.ez && \
4343
unzip -q amqp_client-2.5.0.ez && \
4444
ln -s amqp_client-2.5.0 amqp_client && \
4545
touch .ok)
@@ -75,9 +75,17 @@ clean::
7575
(cd php && \
7676
rm -rf .ok lib)
7777

78+
GEMSVER=1.8.5
79+
TOPDIR:=$(PWD)
7880
ruby/.ok:
7981
(cd ruby && \
80-
GEM_HOME=gems/gems RUBYLIB=gems/lib gem1.8 install amqp --pre --version "= 0.8.0.rc12" && \
82+
wget http://production.cf.rubygems.org/rubygems/rubygems-$(GEMSVER).tgz && \
83+
tar xzf rubygems-$(GEMSVER).tgz && \
84+
cd rubygems-$(GEMSVER) && \
85+
ruby1.9 setup.rb --prefix=$(TOPDIR)/ruby/gems && \
86+
cd .. && \
87+
rm -r rubygems-$(GEMSVER).tgz rubygems-$(GEMSVER) && \
88+
GEM_HOME=gems/gems RUBYLIB=gems/lib gem1.9 install amqp --version "0.8.0.rc13" && \
8189
touch .ok)
8290
clean::
8391
(cd ruby && \

test.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ def gen(prog, arg="", **kwargs):
6565
('java', 'java -cp .:commons-io-1.2.jar:commons-cli-1.1.jar:'
6666
'rabbitmq-client.jar %(java)s %(arg)s' % ctx),
6767
('dotnet', 'env MONO_PATH=lib/bin mono %(dotnet)s.exe %(arg)s' % ctx),
68-
# ('ruby', 'env RUBYOPT=-rubygems GEM_HOME=gems/gems RUBYLIB=gems/lib '
69-
# 'ruby1.8 %(ruby)s.rb %(arg)s' % ctx),
68+
('ruby', 'env GEM_HOME=gems/gems RUBYLIB=gems/lib '
69+
'ruby1.9 %(ruby)s.rb %(arg)s' % ctx),
7070
('php', 'php %(php)s.php %(arg)s' % ctx),
7171
]
7272

0 commit comments

Comments
 (0)