Ruby support for Thrift
Summary: Just client support so far.
Reviewed By: tbr-doug
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664953 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/rb/TestClient.rb b/test/rb/TestClient.rb
new file mode 100755
index 0000000..80d2f7b
--- /dev/null
+++ b/test/rb/TestClient.rb
@@ -0,0 +1,31 @@
+#!/usr/bin/ruby
+
+$:.push('gen-rb')
+$:.push('../../lib/ruby/lib')
+
+require 'thrift/transport/tsocket'
+require 'thrift/protocol/tbinaryprotocol'
+require 'ThriftTest'
+
+s = TSocket.new('localhost', 9090)
+p = TBinaryProtocol.new(s)
+c = ThriftTest::Client.new(p)
+
+s.open()
+
+puts c.testString('string')
+puts c.testByte(8)
+puts c.testByte(-8)
+puts c.testI32(32)
+puts c.testI32(-32)
+puts c.testI64(64)
+puts c.testI64(-64)
+puts c.testDouble(3.14)
+puts c.testDouble(-3.14)
+puts c.testMap({1 => 1, 2 => 2, 3 => 3})
+puts c.testList([1,2,3,4,5])
+puts c.testSet({1 => true, 2 => true, 3 => true})
+
+s.close()
+
+