aboutsummaryrefslogtreecommitdiff
path: root/ruby/travis-test.sh
diff options
context:
space:
mode:
authorChris Fallin <cfallin@c1f.net>2015-05-13 15:39:45 -0700
committerChris Fallin <cfallin@c1f.net>2015-05-13 15:39:45 -0700
commit2fe0483848b3e7da36a6f29099c71553a4af3adc (patch)
tree87a1d982445a86526e0a1903b156ddaaeeba790a /ruby/travis-test.sh
parent23bb79d4a32a77e8349d6c49052be1e56a8b8153 (diff)
parenteb37551ae4fbb491f7670bf4175cb43bbc649fe0 (diff)
downloadprotobuf-2fe0483848b3e7da36a6f29099c71553a4af3adc.tar.gz
protobuf-2fe0483848b3e7da36a6f29099c71553a4af3adc.tar.bz2
protobuf-2fe0483848b3e7da36a6f29099c71553a4af3adc.zip
Merge pull request #383 from cfallin/ruby-travis
Add Ruby to Travis testing
Diffstat (limited to 'ruby/travis-test.sh')
-rwxr-xr-xruby/travis-test.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/ruby/travis-test.sh b/ruby/travis-test.sh
new file mode 100755
index 00000000..2ccb490a
--- /dev/null
+++ b/ruby/travis-test.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+# Exit on any error.
+set -e
+
+test_version() {
+ version=$1
+ bash --login -c \
+ "rvm install $version && rvm use $version && \
+ which ruby && \
+ gem install bundler && bundle && \
+ rake test"
+}
+
+test_version ruby-1.9
+test_version ruby-2.0
+test_version ruby-2.1
+test_version ruby-2.2
+test_version jruby