THRIFT-2571 Simplify cross compilation using CMake
Patch: Pascal Bach

    This closes #137

----
diff --git a/.travis.yml b/.travis.yml
index d40e81c..d54acc4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -28,14 +28,13 @@
 
 # see what we need: http://thrift.apache.org/docs/install/ubuntu
 before_install:
- - export NUM_CPU="`grep processor /proc/cpuinfo | wc -l`"; echo $NUM_CPU
+ - sudo apt-add-repository "deb http://archive.ubuntu.com/ubuntu/ trusty main restricted" -y
  - sudo apt-get update -qq
-# - sudo DEBIAN_FRONTEND=noninteractive apt-get -qq -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
  - sudo apt-get install -qq libboost-dev libboost-test-dev libboost-program-options-dev libevent-dev automake libtool flex bison pkg-config g++ libssl-dev bc 
+ - dpkg -S /usr/include/boost/version.hpp
 # Java
  - sudo apt-get install -qq ant
 # Ruby
-# - gem uninstall bundler -I -x
  - gem install bundler -v 1.3.5 || true
 # Python
 # - sudo apt-get install -qq python-all python-all-dev python-all-dbg
@@ -58,7 +57,7 @@
 # Haskell
 # - sudo apt-get install -qq ghc6 cabal-install libghc6-binary-dev libghc6-network-dev libghc6-http-dev
 # Thrift Compiler for Windows
- - sudo apt-get install -qq mingw32 mingw32-binutils mingw32-runtime
+ - sudo apt-get install -qq mingw32
 # node.js
  - sudo apt-get install -qq nodejs npm
  - sudo npm install nodeunit -g || true
@@ -69,8 +68,8 @@
 script:
 # TODO: fix these languages
   - sh configure --without-erlang --without-haskell --without-python --without-go --without-lua
-  - make -j$NUM_CPU && make dist
-  - make cross -j$NUM_CPU
+  - make -j2 && make dist
+  - make cross -j2
   - sh bootstrap.sh ; sh contrib/mingw-cross-compile.sh
   - mkdir build_native && cd build_native && cmake ../compiler/cpp/ && make; cd ..
   - mkdir build_mingw32 && cd build_mingw32 && cmake -DCMAKE_TOOLCHAIN_FILE=../contrib/mingw32-toolchain.cmake ../compiler/cpp/ && make; cd ..
diff --git a/configure.ac b/configure.ac
index 5941cd8..e20dc64 100755
--- a/configure.ac
+++ b/configure.ac
@@ -127,7 +127,7 @@
 AX_THRIFT_LIB(cpp, [C++], yes)
 have_cpp=no
 if test "$with_cpp" = "yes";  then
-  AX_BOOST_BASE([1.53.0])
+  AX_BOOST_BASE([1.54.0])
   if test "x$succeeded" = "xyes" ; then
     have_cpp="yes"
   fi
diff --git a/doc/install/README.md b/doc/install/README.md
index 83798af..75e4127 100644
--- a/doc/install/README.md
+++ b/doc/install/README.md
@@ -3,7 +3,7 @@
 * A relatively POSIX-compliant *NIX system
     * Cygwin or MinGW can be used on Windows
 * g++ 4.2
-* boost 1.53.0
+* boost 1.54.0
 * Runtime libraries for lex and yacc might be needed for the compiler.
 
 ## Requirements for building from source
diff --git a/test/rb/integration/simple_client.rb b/test/rb/integration/TestClient.rb
old mode 100755
new mode 100644
similarity index 60%
rename from test/rb/integration/simple_client.rb
rename to test/rb/integration/TestClient.rb
index f7516fc..f3450db
--- a/test/rb/integration/simple_client.rb
+++ b/test/rb/integration/TestClient.rb
@@ -23,16 +23,68 @@
 require 'thrift'
 require 'thrift_test'
 
+$protocolType = "binary"
+$host = "localhost"
+$port = 9090
+$transport = "buffered"
+ARGV.each do|a|
+  if a == "--help"
+    puts "Allowed options:"
+    puts "\t -h [ --help ] \t produce help message"
+    puts "\t--host arg (=localhost) \t Host to connect"
+    puts "\t--port arg (=9090) \t Port number to listen"
+    puts "\t--protocol arg (=binary) \t protocol: binary, accel"
+    puts "\t--transport arg (=buffered) transport: buffered, framed, http"
+    exit
+  elsif a.start_with?("--host")
+    $host = a.split("=")[1]
+  elsif a.start_with?("--protocol")
+    $protocolType = a.split("=")[1]
+  elsif a.start_with?("--transport")
+    $transport = a.split("=")[1]
+  elsif a.start_with?("--port")
+    $port = a.split("=")[1].to_i 
+  end
+end
+ARGV=[]
+
 class SimpleClientTest < Test::Unit::TestCase
-  def setup    
+  def setup 
     unless @socket
-      @socket   = Thrift::Socket.new('localhost', 9090)
-      @protocol = Thrift::BinaryProtocol.new(@socket)
+      @socket   = Thrift::Socket.new($host, $port)
+      transportFactory = Thrift::BufferedTransport.new(@socket)
+      if $transport == "buffered"
+        transportFactory = Thrift::BufferedTransport.new(@socket)
+      elsif $transport == ""
+        transportFactory = Thrift::BufferedTransport.new(@socket)
+      elsif $transport == "framed"
+        transportFactory = Thrift::FramedTransport.new(@socket)
+      else
+        raise 'Unknown transport type'
+      end
+
+      if $protocolType == "binary"
+        @protocol = Thrift::BinaryProtocol.new(transportFactory)
+      elsif $protocolType == ""
+        @protocol = Thrift::BinaryProtocol.new(transportFactory)
+      elsif $protocolType == "compact"
+        @protocol = Thrift::CompactProtocol.new(transportFactory)
+      elsif $protocolType == "json"
+        @protocol = Thrift::JsonProtocol.new(transportFactory)
+      elsif $protocolType == "accel"
+        @protocol = Thrift::BinaryProtocolAccelerated.new(transportFactory)
+      else
+        raise 'Unknown protocol type'
+      end
       @client   = Thrift::Test::ThriftTest::Client.new(@protocol)
       @socket.open
     end
   end
   
+  def test_void
+    @client.testVoid()
+  end
+
   def test_string
     assert_equal(@client.testString('string'), 'string')
   end
@@ -84,6 +136,8 @@
 
   def test_typedef
     #UserId  testTypedef(1: UserId thing),
+    assert_equal(@client.testTypedef(309858235082523), 309858235082523)
+    assert_kind_of(Fixnum, @client.testTypedef(309858235082523))
     true
   end
 
@@ -122,7 +176,7 @@
     assert_kind_of(Thrift::Test::Xtruct2, ret)
   end
 
-  def test_insane
+  def test_insanity
     insane = Thrift::Test::Insanity.new({
       'userMap' => { Thrift::Test::Numberz::ONE => 44 },
       'xtructs' => [get_struct,
@@ -157,8 +211,30 @@
 
   def test_exception
     assert_raise Thrift::Test::Xception do
-      @client.testException('foo')
+      @client.testException('Xception')
     end
+#    assert_raise Thrift::TException do
+#      @client.testException('TException')
+#    end
+    assert_equal( @client.testException('test'), "test")
   end
+
+  def test_multi_exception
+    assert_raise Thrift::Test::Xception do
+      @client.testMultiException("Xception", "test 1")
+    end
+    assert_raise Thrift::Test::Xception2 do
+      @client.testMultiException("Xception2", "test 2")
+    end
+    assert_equal( @client.testMultiException("Success", "test 3").string_thing, "test 3")
+  end
+
+  def test_oneway
+    time1 = Time.now.to_f
+    @client.testOneway(3)
+    time2 = Time.now.to_f
+    assert_equal((time2-time1)*1000000<400, true)
+  end
+
 end
 
diff --git a/test/rb/integration/TestServer.rb b/test/rb/integration/TestServer.rb
new file mode 100755
index 0000000..8ae2e20
--- /dev/null
+++ b/test/rb/integration/TestServer.rb
@@ -0,0 +1,129 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+$:.push File.dirname(__FILE__) + '/..'
+
+require 'test_helper'
+require 'thrift'
+require 'thrift_test'
+
+class SimpleHandler
+  [:testVoid, :testString, :testByte, :testI32, :testI64, :testDouble,
+   :testStruct, :testMap, :testSet, :testList, :testNest,
+   :testEnum, :testTypedef, :testMultiException].each do |meth|
+
+    define_method(meth) do |thing|
+      thing
+    end
+
+  end
+
+  def testVoid()
+  end
+
+  def testInsanity(thing)
+    num, uid = thing.userMap.find { true }
+    return {uid => {num => thing}}
+  end
+
+  def testMapMap(thing)
+    return {thing => {thing => thing}}
+  end
+
+  def testEnum(thing)
+    return thing
+  end
+
+  def testTypedef(thing)
+    return thing
+  end
+
+  def testException(thing)
+    if thing == "Xception"
+      raise Thrift::Test::Xception, :message => thing
+    elsif thing == "TException"
+      raise Thrift::Test::TException, :message => thing
+    else
+      return arg1
+    end
+  end
+
+  def testMultiException(arg0, arg1)
+    if arg0 == "Xception2"
+      raise Thrift::Test::Xception2, :message => 'This is an Xception2'
+    elsif arg0 == "Xception"
+      raise Thrift::Test::Xception, :message => 'This is an Xception'
+    else
+      return arg1
+    end
+  end
+
+end
+
+protocol = "binary"
+port = 9090
+transport = "buffered"
+@transportFactory = Thrift::BufferedTransportFactory.new
+@protocolFactory = Thrift::BinaryProtocolFactory.new
+ARGV.each do|a|
+  if a == "--help"
+    puts "Allowed options:"
+    puts "\t -h [ --help ] \t produce help message"
+    puts "\t--port arg (=9090) \t Port number to listen"
+    puts "\t--protocol arg (=binary) \t protocol: binary, accel"
+    puts "\t--transport arg (=buffered) transport: buffered, framed, http"
+    exit
+  elsif a.start_with?("--protocol")
+    protocol = a.split("=")[1]
+  elsif a.start_with?("--transport")
+    transport = a.split("=")[1]
+  elsif a.start_with?("--port")
+    port = a.split("=")[1].to_i 
+  end
+end
+
+if protocol == "binary"
+  @protocolFactory = Thrift::BinaryProtocolFactory.new
+elsif protocol == ""
+  @protocolFactory = Thrift::BinaryProtocolFactory.new
+elsif protocol == "compact"
+  @protocolFactory = Thrift::CompactProtocolFactory.new
+elsif protocol == "json"
+  @protocolFactory = Thrift::JsonProtocolFactory.new
+elsif protocol == "accel"
+  @protocolFactory = Thrift::BinaryProtocolAcceleratedFactory.new
+else
+  raise 'Unknown protocol type'
+end
+
+if transport == "buffered"
+  @transportFactory = Thrift::BufferedTransportFactory.new
+elsif transport == ""
+  @transportFactory = Thrift::BufferedTransportFactory.new
+elsif transport == "framed"
+  @transportFactory = Thrift::FramedTransportFactory.new
+else
+  raise 'Unknown transport type'
+end
+
+@handler   = SimpleHandler.new
+@processor = Thrift::Test::ThriftTest::Processor.new(@handler)
+@transport = Thrift::ServerSocket.new(port)
+@server    = Thrift::ThreadedServer.new(@processor, @transport, @transportFactory, @protocolFactory)
+@server.serve
diff --git a/test/rb/integration/accelerated_buffered_client.rb b/test/rb/integration/accelerated_buffered_client.rb
deleted file mode 100755
index f2403c5..0000000
--- a/test/rb/integration/accelerated_buffered_client.rb
+++ /dev/null
@@ -1,164 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-$:.push File.dirname(__FILE__) + '/..'
-
-require 'test_helper'
-require 'thrift'
-require 'thrift_test'
-
-class AcceleratedBufferedClientTest < Test::Unit::TestCase
-  def setup
-    unless @socket
-      @socket   = Thrift::Socket.new('localhost', 9090)
-      @protocol = Thrift::BinaryProtocolAccelerated.new(Thrift::BufferedTransport.new(@socket))
-      @client   = Thrift::Test::ThriftTest::Client.new(@protocol)
-      @socket.open
-    end
-  end
-  
-  def test_string
-    assert_equal(@client.testString('string'), 'string')
-  end
-
-  def test_byte
-    val = 8
-    assert_equal(@client.testByte(val), val)
-    assert_equal(@client.testByte(-val), -val)
-  end
-
-  def test_i32
-    val = 32
-    assert_equal(@client.testI32(val), val)
-    assert_equal(@client.testI32(-val), -val)
-  end
-
-  def test_i64
-    val = 64
-    assert_equal(@client.testI64(val), val)
-    assert_equal(@client.testI64(-val), -val)
-  end
-
-  def test_double
-    val = 3.14
-    assert_equal(@client.testDouble(val), val)
-    assert_equal(@client.testDouble(-val), -val)
-    assert_kind_of(Float, @client.testDouble(val))
-  end
-
-  def test_map
-    val = {1 => 1, 2 => 2, 3 => 3}
-    assert_equal(@client.testMap(val), val)
-    assert_kind_of(Hash, @client.testMap(val))
-  end
-
-  def test_list
-    val = [1,2,3,4,5]
-    assert_equal(@client.testList(val), val)
-    assert_kind_of(Array, @client.testList(val))
-  end
-
-  def test_enum
-    val = Thrift::Test::Numberz::SIX
-    ret = @client.testEnum(val)
-
-    assert_equal(ret, 6)
-    assert_kind_of(Fixnum, ret)
-  end
-
-  def test_typedef
-    #UserId  testTypedef(1: UserId thing),
-    true
-  end
-
-  def test_set
-    val = Set.new([1,2,3])
-    assert_equal(@client.testSet(val), val)
-    assert_kind_of(Set, @client.testSet(val))
-  end
-
-  def get_struct
-    Thrift::Test::Xtruct.new({'string_thing' => 'hi!', 'i32_thing' => 4 })
-  end
-
-  def test_struct
-    ret = @client.testStruct(get_struct)
-
-    assert_nil(ret.byte_thing, nil)
-    assert_nil(ret.i64_thing, nil)
-    assert_equal(ret.string_thing, 'hi!')
-    assert_equal(ret.i32_thing, 4)
-    assert_kind_of(Thrift::Test::Xtruct, ret)
-  end
-
-  def test_nest
-    struct2 = Thrift::Test::Xtruct2.new({'struct_thing' => get_struct, 'i32_thing' => 10})
-
-    ret = @client.testNest(struct2)
-
-    assert_nil(ret.struct_thing.byte_thing, nil)
-    assert_nil(ret.struct_thing.i64_thing, nil)
-    assert_equal(ret.struct_thing.string_thing, 'hi!')
-    assert_equal(ret.struct_thing.i32_thing, 4)
-    assert_equal(ret.i32_thing, 10)
-
-    assert_kind_of(Thrift::Test::Xtruct, ret.struct_thing)
-    assert_kind_of(Thrift::Test::Xtruct2, ret)
-  end
-
-  def test_insane
-    insane = Thrift::Test::Insanity.new({
-      'userMap' => { Thrift::Test::Numberz::ONE => 44 },
-      'xtructs' => [get_struct,
-        Thrift::Test::Xtruct.new({
-          'string_thing' => 'hi again',
-          'i32_thing' => 12
-        })
-      ]
-    })
-
-    ret = @client.testInsanity(insane)
-
-    assert_not_nil(ret[44])
-    assert_not_nil(ret[44][1])
-
-    struct = ret[44][1]
-
-    assert_equal(struct.userMap[Thrift::Test::Numberz::ONE], 44)
-    assert_equal(struct.xtructs[1].string_thing, 'hi again')
-    assert_equal(struct.xtructs[1].i32_thing, 12)
-
-    assert_kind_of(Hash, struct.userMap)
-    assert_kind_of(Array, struct.xtructs)
-    assert_kind_of(Thrift::Test::Insanity, struct)
-  end
-
-  def test_map_map
-    ret = @client.testMapMap(4)
-    assert_kind_of(Hash, ret)
-    assert_equal(ret, { 4 => { 4 => 4}})
-  end
-
-  def test_exception
-    assert_raise Thrift::Test::Xception do
-      @client.testException('foo')
-    end
-  end
-end
-
diff --git a/test/rb/integration/accelerated_buffered_server.rb b/test/rb/integration/accelerated_buffered_server.rb
deleted file mode 100755
index af5e601..0000000
--- a/test/rb/integration/accelerated_buffered_server.rb
+++ /dev/null
@@ -1,64 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-$:.push File.dirname(__FILE__) + '/..'
-
-require 'test_helper'
-require 'thrift'
-require 'thrift_test'
-
-class SimpleHandler
-  [:testString, :testByte, :testI32, :testI64, :testDouble,
-   :testStruct, :testMap, :testSet, :testList, :testNest,
-   :testEnum, :testTypedef].each do |meth|
-
-    define_method(meth) do |thing|
-      thing
-    end
-
-  end
-
-  def testInsanity(thing)
-    num, uid = thing.userMap.find { true }
-    return {uid => {num => thing}}
-  end
-
-  def testMapMap(thing)
-    return {thing => {thing => thing}}
-  end
-
-  def testEnum(thing)
-    return thing
-  end
-
-  def testTypedef(thing)
-    return thing
-  end
-
-  def testException(thing)
-    raise Thrift::Test::Xception, :message => 'error'
-  end
-end
-
-@handler   = SimpleHandler.new
-@processor = Thrift::Test::ThriftTest::Processor.new(@handler)
-@transport = Thrift::ServerSocket.new(9090)
-@server    = Thrift::ThreadedServer.new(@processor, @transport, Thrift::BufferedTransportFactory.new, Thrift::BinaryProtocolAcceleratedFactory.new)
-
-@server.serve
diff --git a/test/rb/integration/buffered_client.rb b/test/rb/integration/buffered_client.rb
deleted file mode 100755
index 16f6d4e..0000000
--- a/test/rb/integration/buffered_client.rb
+++ /dev/null
@@ -1,164 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-$:.push File.dirname(__FILE__) + '/..'
-
-require 'test_helper'
-require 'thrift'
-require 'thrift_test'
-
-class BufferedClientTest < Test::Unit::TestCase
-  def setup
-    unless @socket
-      @socket   = Thrift::Socket.new('localhost', 9090)
-      @protocol = Thrift::BinaryProtocol.new(Thrift::BufferedTransport.new(@socket))
-      @client   = Thrift::Test::ThriftTest::Client.new(@protocol)
-      @socket.open
-    end
-  end
-  
-  def test_string
-    assert_equal(@client.testString('string'), 'string')
-  end
-
-  def test_byte
-    val = 8
-    assert_equal(@client.testByte(val), val)
-    assert_equal(@client.testByte(-val), -val)
-  end
-
-  def test_i32
-    val = 32
-    assert_equal(@client.testI32(val), val)
-    assert_equal(@client.testI32(-val), -val)
-  end
-
-  def test_i64
-    val = 64
-    assert_equal(@client.testI64(val), val)
-    assert_equal(@client.testI64(-val), -val)
-  end
-
-  def test_double
-    val = 3.14
-    assert_equal(@client.testDouble(val), val)
-    assert_equal(@client.testDouble(-val), -val)
-    assert_kind_of(Float, @client.testDouble(val))
-  end
-
-  def test_map
-    val = {1 => 1, 2 => 2, 3 => 3}
-    assert_equal(@client.testMap(val), val)
-    assert_kind_of(Hash, @client.testMap(val))
-  end
-
-  def test_list
-    val = [1,2,3,4,5]
-    assert_equal(@client.testList(val), val)
-    assert_kind_of(Array, @client.testList(val))
-  end
-
-  def test_enum
-    val = Thrift::Test::Numberz::SIX
-    ret = @client.testEnum(val)
-
-    assert_equal(ret, 6)
-    assert_kind_of(Fixnum, ret)
-  end
-
-  def test_typedef
-    #UserId  testTypedef(1: UserId thing),
-    true
-  end
-
-  def test_set
-    val = Set.new([1,2,3])
-    assert_equal(@client.testSet(val), val)
-    assert_kind_of(Set, @client.testSet(val))
-  end
-
-  def get_struct
-    Thrift::Test::Xtruct.new({'string_thing' => 'hi!', 'i32_thing' => 4 })
-  end
-
-  def test_struct
-    ret = @client.testStruct(get_struct)
-
-    assert_nil(ret.byte_thing, nil)
-    assert_nil(ret.i64_thing, nil)
-    assert_equal(ret.string_thing, 'hi!')
-    assert_equal(ret.i32_thing, 4)
-    assert_kind_of(Thrift::Test::Xtruct, ret)
-  end
-
-  def test_nest
-    struct2 = Thrift::Test::Xtruct2.new({'struct_thing' => get_struct, 'i32_thing' => 10})
-
-    ret = @client.testNest(struct2)
-
-    assert_nil(ret.struct_thing.byte_thing, nil)
-    assert_nil(ret.struct_thing.i64_thing, nil)
-    assert_equal(ret.struct_thing.string_thing, 'hi!')
-    assert_equal(ret.struct_thing.i32_thing, 4)
-    assert_equal(ret.i32_thing, 10)
-
-    assert_kind_of(Thrift::Test::Xtruct, ret.struct_thing)
-    assert_kind_of(Thrift::Test::Xtruct2, ret)
-  end
-
-  def test_insane
-    insane = Thrift::Test::Insanity.new({
-      'userMap' => { Thrift::Test::Numberz::ONE => 44 },
-      'xtructs' => [get_struct,
-        Thrift::Test::Xtruct.new({
-          'string_thing' => 'hi again',
-          'i32_thing' => 12
-        })
-      ]
-    })
-
-    ret = @client.testInsanity(insane)
-
-    assert_not_nil(ret[44])
-    assert_not_nil(ret[44][1])
-
-    struct = ret[44][1]
-
-    assert_equal(struct.userMap[Thrift::Test::Numberz::ONE], 44)
-    assert_equal(struct.xtructs[1].string_thing, 'hi again')
-    assert_equal(struct.xtructs[1].i32_thing, 12)
-
-    assert_kind_of(Hash, struct.userMap)
-    assert_kind_of(Array, struct.xtructs)
-    assert_kind_of(Thrift::Test::Insanity, struct)
-  end
-
-  def test_map_map
-    ret = @client.testMapMap(4)
-    assert_kind_of(Hash, ret)
-    assert_equal(ret, { 4 => { 4 => 4}})
-  end
-
-  def test_exception
-    assert_raise Thrift::Test::Xception do
-      @client.testException('foo')
-    end
-  end
-end
-
diff --git a/test/rb/integration/simple_server.rb b/test/rb/integration/simple_server.rb
deleted file mode 100755
index e543b70..0000000
--- a/test/rb/integration/simple_server.rb
+++ /dev/null
@@ -1,64 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-$:.push File.dirname(__FILE__) + '/..'
-
-require 'test_helper'
-require 'thrift'
-require 'thrift_test'
-
-class SimpleHandler
-  [:testString, :testByte, :testI32, :testI64, :testDouble,
-   :testStruct, :testMap, :testSet, :testList, :testNest,
-   :testEnum, :testTypedef].each do |meth|
-
-    define_method(meth) do |thing|
-      thing
-    end
-
-  end
-
-  def testInsanity(thing)
-    num, uid = thing.userMap.find { true }
-    return {uid => {num => thing}}
-  end
-
-  def testMapMap(thing)
-    return {thing => {thing => thing}}
-  end
-
-  def testEnum(thing)
-    return thing
-  end
-
-  def testTypedef(thing)
-    return thing
-  end
-
-  def testException(thing)
-    raise Thrift::Test::Xception, :message => 'error'
-  end
-end
-
-@handler   = SimpleHandler.new
-@processor = Thrift::Test::ThriftTest::Processor.new(@handler)
-@transport = Thrift::ServerSocket.new(9090)
-@server    = Thrift::ThreadedServer.new(@processor, @transport)
-
-@server.serve
diff --git a/test/rb/integration/test_simple_handler.rb b/test/rb/integration/test_simple_handler.rb
deleted file mode 100755
index c056139..0000000
--- a/test/rb/integration/test_simple_handler.rb
+++ /dev/null
@@ -1,212 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-$:.push File.dirname(__FILE__) + '/..'
-
-require 'test_helper'
-require 'thrift'
-require 'thrift_test'
-
-class TestHandler
-  [:testString, :testByte, :testI32, :testI64, :testDouble,
-   :testStruct, :testMap, :testSet, :testList, :testNest,
-   :testEnum, :testTypedef].each do |meth|
-
-    define_method(meth) do |thing|
-      thing
-    end
-
-  end
-
-  def testInsanity(thing)
-    num, uid = thing.userMap.find { true }
-    return {uid => {num => thing}}
-  end
-
-  def testMapMap(thing)
-    return {thing => {thing => thing}}
-  end
-
-  def testEnum(thing)
-    return thing
-  end
-
-  def testTypedef(thing)
-    return thing
-  end
-
-  def testException(thing)
-    raise Thrift::Test::Xception, :message => 'error'
-  end
-
-end
-class TestThrift < Test::Unit::TestCase
-
-  @@INIT = nil
-
-  def setup
-    if @@INIT.nil?
-      # Initialize the server
-      @handler   = TestHandler.new()
-      @processor = Thrift::Test::ThriftTest::Processor.new(@handler)
-      @transport = Thrift::ServerSocket.new(9090)
-      @server    = Thrift::ThreadedServer.new(@processor, @transport)
-
-      @thread    = Thread.new { @server.serve }
-
-      # And the Client
-      @socket   = Thrift::Socket.new('localhost', 9090)
-      @protocol = Thrift::BinaryProtocol.new(@socket)
-      @client   = Thrift::Test::ThriftTest::Client.new(@protocol)
-      @socket.open
-    end
-  end
-
-  def test_string
-    assert_equal(@client.testString('string'), 'string')
-  end
-
-  def test_byte
-    val = 8
-    assert_equal(@client.testByte(val), val)
-    assert_equal(@client.testByte(-val), -val)
-  end
-
-  def test_i32
-    val = 32
-    assert_equal(@client.testI32(val), val)
-    assert_equal(@client.testI32(-val), -val)
-  end
-
-  def test_i64
-    val = 64
-    assert_equal(@client.testI64(val), val)
-    assert_equal(@client.testI64(-val), -val)
-  end
-
-  def test_double
-    val = 3.14
-    assert_equal(@client.testDouble(val), val)
-    assert_equal(@client.testDouble(-val), -val)
-    assert_kind_of(Float, @client.testDouble(val))
-  end
-
-  def test_map
-    val = {1 => 1, 2 => 2, 3 => 3}
-    assert_equal(@client.testMap(val), val)
-    assert_kind_of(Hash, @client.testMap(val))
-  end
-
-  def test_list
-    val = [1,2,3,4,5]
-    assert_equal(@client.testList(val), val)
-    assert_kind_of(Array, @client.testList(val))
-  end
-
-  def test_enum
-    val = Thrift::Test::Numberz::SIX
-    ret = @client.testEnum(val)
-
-    assert_equal(ret, 6)
-    assert_kind_of(Fixnum, ret)
-  end
-
-  def test_typedef
-    #UserId  testTypedef(1: UserId thing),
-    true
-  end
-
-  def test_set
-    val = Set.new([1, 2, 3])
-    assert_equal(val, @client.testSet(val))
-    assert_kind_of(Set, @client.testSet(val))
-  end
-
-  def get_struct
-    Thrift::Test::Xtruct.new({'string_thing' => 'hi!', 'i32_thing' => 4 })
-  end
-
-  def test_struct
-    ret = @client.testStruct(get_struct)
-
-    assert_nil(ret.byte_thing, nil)
-    assert_nil(ret.i64_thing, nil)
-    assert_equal(ret.string_thing, 'hi!')
-    assert_equal(ret.i32_thing, 4)
-    assert_kind_of(Thrift::Test::Xtruct, ret)
-  end
-
-  def test_nest
-    struct2 = Thrift::Test::Xtruct2.new({'struct_thing' => get_struct, 'i32_thing' => 10})
-
-    ret = @client.testNest(struct2)
-
-    assert_nil(ret.struct_thing.byte_thing, nil)
-    assert_nil(ret.struct_thing.i64_thing, nil)
-    assert_equal(ret.struct_thing.string_thing, 'hi!')
-    assert_equal(ret.struct_thing.i32_thing, 4)
-    assert_equal(ret.i32_thing, 10)
-
-    assert_kind_of(Thrift::Test::Xtruct, ret.struct_thing)
-    assert_kind_of(Thrift::Test::Xtruct2, ret)
-  end
-
-  def test_insane
-    insane = Thrift::Test::Insanity.new({
-      'userMap' => { Thrift::Test::Numberz::ONE => 44 },
-      'xtructs' => [get_struct,
-        Thrift::Test::Xtruct.new({
-          'string_thing' => 'hi again',
-          'i32_thing' => 12
-        })
-      ]
-    })
-
-    ret = @client.testInsanity(insane)
-
-    assert_not_nil(ret[44])
-    assert_not_nil(ret[44][1])
-
-    struct = ret[44][1]
-
-    assert_equal(struct.userMap[Thrift::Test::Numberz::ONE], 44)
-    assert_equal(struct.xtructs[1].string_thing, 'hi again')
-    assert_equal(struct.xtructs[1].i32_thing, 12)
-
-    assert_kind_of(Hash, struct.userMap)
-    assert_kind_of(Array, struct.xtructs)
-    assert_kind_of(Thrift::Test::Insanity, struct)
-  end
-
-  def test_map_map
-    ret = @client.testMapMap(4)
-    assert_kind_of(Hash, ret)
-    assert_equal(ret, { 4 => { 4 => 4}})
-  end
-
-  def test_exception
-    assert_raise Thrift::Test::Xception do
-      @client.testException('foo')
-    end
-  end
-
-  def teardown
-  end
-
-end
diff --git a/test/test.sh b/test/test.sh
index 0fdb0de..ffcccfe 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -199,6 +199,10 @@
 py_transports="buffered framed"
 py_sockets="ip ip-ssl"
 
+ruby_protocols="binary compact json accel"
+ruby_transports="buffered framed"
+ruby_sockets="ip"
+
 
 ######### java client - java server #############
 for proto in $java_protocols; do
@@ -271,7 +275,6 @@
 NODE_TEST_DIR=${BASEDIR}/../lib/nodejs/test
 export NODE_PATH=${NODE_TEST_DIR}:${NODE_TEST_DIR}/../lib:${NODE_PATH}
 ######### nodejs client - nodejs server ##############
-##
 for proto in ${nodejs_protocols}; do
   for trans in ${nodejs_transports}; do
     for sock in ${nodejs_sockets}; do
@@ -288,7 +291,6 @@
 done
 
 ######### nodejs client - cpp server ##############
-##
 for proto in $(intersection "${nodejs_protocols}" "${cpp_protocols}"); do
   for trans in $(intersection "${nodejs_transports}" "${cpp_transports}"); do
     for sock in $(intersection "${nodejs_sockets}" "${cpp_sockets}"); do
@@ -321,7 +323,6 @@
 done
 
 ######### nodejs client - java server ##############
-##
 for proto in $(intersection "${nodejs_protocols}" "${java_protocols}"); do
   for trans in $(intersection "${nodejs_transports}" "${java_server_transports}"); do
     for sock in $(intersection "${nodejs_sockets}" "${java_sockets}"); do
@@ -445,7 +446,6 @@
   done
 
 ######### py client - java server ##############
-##
 for proto in $(intersection "${py_protocols}" "${java_protocols}"); do
   for trans in $(intersection "${py_transports}" "${java_server_transports}"); do
     for sock in $(intersection "${py_sockets}" "${java_sockets}"); do
@@ -504,7 +504,6 @@
   done
 
 ######### py client - nodejs server ##############
-##
 for proto in $(intersection "${py_protocols}" "${nodejs_protocols}"); do
   for trans in $(intersection "${py_transports}" "${nodejs_transports}"); do
     for sock in $(intersection "${py_sockets}" "${nodejs_sockets}"); do
@@ -562,6 +561,280 @@
     done
   done
 
+######### ruby client - ruby server ##############
+for proto in ${ruby_protocols}; do
+  for trans in ${ruby_transports}; do
+    for sock in ${ruby_sockets}; do
+      case "$sock" in
+        "ip" ) extraparam="";;
+        "ip-ssl" ) extraparam="--ssl";;
+      esac
+      do_test "ruby-ruby" "${proto}" "${trans}-${sock}" \
+              "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans} --port=9091" \
+              "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans} --port=9091" \
+              "5" "5"
+    done
+  done
+done
+
+for trans in ${ruby_transports}; do
+    for sock in ${ruby_sockets}; do
+      case "$sock" in
+        "ip" ) extraparam="";;
+        "ip-ssl" ) extraparam="--ssl";;
+      esac
+      do_test "ruby-ruby" "accel-binary" "${trans}-${sock}" \
+              "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans} --port=9091" \
+              "ruby rb/integration/TestServer.rb --protocol=binary --transport=${trans} --port=9091" \
+              "5" "5"
+      do_test "ruby-ruby" "binary-accel" "${trans}-${sock}" \
+              "ruby rb/integration/TestClient.rb --protocol=binary --transport=${trans} --port=9091" \
+              "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans} --port=9091" \
+              "5" "5"
+    done
+  done
+
+######### ruby client - cpp server ##############
+for proto in $(intersection "${cpp_protocols}" "${ruby_protocols}"); do
+  for trans in $(intersection "${cpp_transports}" "${ruby_transports}"); do
+    for sock in $(intersection "${cpp_sockets}" "${ruby_sockets}"); do
+      case "$sock" in
+        "ip" ) extraparam="";;
+        "ip-ssl" ) extraparam="--ssl";;
+      esac
+      do_test "ruby-cpp" "${proto}" "${trans}-${sock}" \
+              "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans}" \
+              "cpp/TestServer --protocol=${proto} --transport=${trans} ${extraparam}" \
+              "5" "5"
+    done
+  done
+done
+
+for trans in $(intersection "${cpp_transports}" "${ruby_transports}"); do
+    for sock in $(intersection "${cpp_sockets}" "${ruby_sockets}"); do
+      case "$sock" in
+        "ip" ) extraparam="";;
+        "ip-ssl" ) extraparam="--ssl";;
+      esac
+      do_test "ruby-cpp" "accel-binary" "${trans}-${sock}" \
+              "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans}" \
+              "cpp/TestServer --protocol=binary --transport=${trans} ${extraparam}" \
+              "5" "5"
+    done
+  done
+
+######### cpp client - ruby server ##############
+for proto in $(intersection "${cpp_protocols}" "${ruby_protocols}"); do
+  for trans in $(intersection "${cpp_transports}" "${ruby_transports}"); do
+    for sock in $(intersection "${cpp_sockets}" "${ruby_sockets}"); do
+      case "$sock" in
+        "ip" ) extraparam="";;
+        "ip-ssl" ) extraparam="--ssl";;
+      esac
+      do_test "cpp-ruby" "${proto}" "${trans}-${sock}" \
+              "cpp/TestClient --protocol=${proto} --transport=${trans} ${extraparam}" \
+              "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans}" \
+              "5" "5"
+    done
+  done
+done
+
+for trans in $(intersection "${cpp_transports}" "${ruby_transports}"); do
+    for sock in $(intersection "${cpp_sockets}" "${ruby_sockets}"); do
+      case "$sock" in
+        "ip" ) extraparam="";;
+        "ip-ssl" ) extraparam="--ssl";;
+      esac
+      do_test "cpp-ruby" "binary-accel" "${trans}-${sock}" \
+              "cpp/TestClient --protocol=binary --transport=${trans} ${extraparam}" \
+              "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans}" \
+              "5" "5"
+    done
+  done
+
+######### ruby client - java server ##############
+for proto in $(intersection "${ruby_protocols}" "${java_protocols}"); do
+  for trans in $(intersection "${ruby_transports}" "${java_server_transports}"); do
+    for sock in $(intersection "${ruby_sockets}" "${java_sockets}"); do
+      case "$sock" in
+        "ip" ) extraparam="";;
+        "ip-ssl" ) extraparam="--ssl";;
+      esac
+      do_test "ruby-java" "${proto}" "${trans}-${sock}" \
+              "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans}" \
+              "ant -f  ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testserver" \
+              "15" "5"
+    done
+  done
+done
+
+for trans in $(intersection "${ruby_transports}" "${java_server_transports}"); do
+    for sock in $(intersection "${ruby_sockets}" "${java_sockets}"); do
+      case "$sock" in
+        "ip" ) extraparam="";;
+        "ip-ssl" ) extraparam="--ssl";;
+      esac
+      do_test "ruby-java" "accel-binary" "${trans}-${sock}" \
+              "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans}" \
+              "ant -f  ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=binary --transport=${trans} ${extraparam}\" run-testserver" \
+              "15" "5"
+    done
+  done
+
+######### java client - ruby server ##############
+for proto in $(intersection "${ruby_protocols}" "${java_protocols}"); do
+  for trans in $(intersection "${ruby_transports}" "${java_client_transports}"); do
+    for sock in $(intersection "${ruby_sockets}" "${java_sockets}"); do
+      case "$sock" in
+        "ip" ) extraparam="";;
+        "ip-ssl" ) extraparam="--ssl";;
+      esac
+      do_test "java-ruby" "${proto}" "${trans}-${sock}" \
+              "ant -f  ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testclient" \
+              "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans}" \
+              "10" "5"
+    done
+  done
+done
+
+for trans in $(intersection "${ruby_transports}" "${java_client_transports}"); do
+    for sock in $(intersection "${ruby_sockets}" "${java_sockets}"); do
+      case "$sock" in
+        "ip" ) extraparam="";;
+        "ip-ssl" ) extraparam="--ssl";;
+      esac
+      do_test "java-ruby" "binary-accel" "${trans}-${sock}" \
+              "ant -f  ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=binary --transport=${trans} ${extraparam}\" run-testclient" \
+              "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans}" \
+              "10" "5"
+    done
+  done
+
+######### ruby client - nodejs server ##############
+for proto in $(intersection "${ruby_protocols}" "${nodejs_protocols}"); do
+  for trans in $(intersection "${ruby_transports}" "${nodejs_transports}"); do
+    for sock in $(intersection "${ruby_sockets}" "${nodejs_sockets}"); do
+      case "$sock" in
+        "ip" ) extraparam="";;
+        "ip-ssl" ) extraparam="--ssl";;
+      esac
+      do_test "ruby-nodejs" "${proto}" "${trans}-${sock}" \
+              "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans}" \
+              "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} ${extraparam}" \
+              "5" "2"
+    done
+  done
+done
+
+for trans in $(intersection "${ruby_transports}" "${nodejs_transports}"); do
+    for sock in $(intersection "${ruby_sockets}" "${nodejs_sockets}"); do
+      case "$sock" in
+        "ip" ) extraparam="";;
+        "ip-ssl" ) extraparam="--ssl";;
+      esac
+      do_test "ruby-nodejs" "${proto}" "${trans}-${sock}" \
+              "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans}" \
+              "node ${NODE_TEST_DIR}/server.js -p binary -t ${trans} ${extraparam}" \
+              "5" "2"
+    done
+  done
+
+######### nodejs client - ruby server ##############
+for proto in $(intersection "${ruby_protocols}" "${nodejs_protocols}"); do
+  for trans in $(intersection "${ruby_transports}" "${nodejs_transports}"); do
+    for sock in $(intersection "${ruby_sockets}" "${nodejs_sockets}"); do
+      case "$sock" in
+        "ip" ) extraparam="";;
+        "ip-ssl" ) extraparam="--ssl";;
+      esac
+      do_test "nodejs-ruby" "${proto}" "${trans}-${sock}" \
+              "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} ${extraparam}" \
+              "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans}" \
+              "10" "5"
+    done
+  done
+done
+
+for trans in $(intersection "${ruby_transports}" "${nodejs_transports}"); do
+    for sock in $(intersection "${ruby_sockets}" "${nodejs_sockets}"); do
+      case "$sock" in
+        "ip" ) extraparam="";;
+        "ip-ssl" ) extraparam="--ssl";;
+      esac
+      do_test "nodejs-ruby" "binary-accel" "${trans}-${sock}" \
+              "node ${NODE_TEST_DIR}/client.js -p binary -t ${trans} ${extraparam}" \
+              "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans}" \
+              "10" "2"
+    done
+  done
+
+  ######### py client - ruby server ##############
+for proto in $(intersection "${py_protocols}" "${ruby_protocols}"); do
+  for trans in $(intersection "${py_transports}" "${ruby_transports}"); do
+    for sock in $(intersection "${py_sockets}" "${ruby_sockets}"); do
+      case "$sock" in
+        "ip" ) extraparam="";;
+        "ip-ssl" ) extraparam="--ssl";;
+      esac
+      do_test "py-ruby" "${proto}" "${trans}-${sock}" \
+              "py/TestClient.py --protocol=${proto} --transport=${trans} --port=9090 --host=localhost --genpydir=py/gen-py ${extraparam}" \
+              "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans}" \
+              "15" "5"
+    done
+  done
+done
+
+for trans in $(intersection "${py_transports}" "${ruby_transports}"); do
+    for sock in $(intersection "${py_sockets}" "${ruby_sockets}"); do
+      case "$sock" in
+        "ip" ) extraparam="";;
+        "ip-ssl" ) extraparam="--ssl";;
+      esac
+      do_test "py-ruby" "${proto}" "${trans}-${sock}" \
+              "py/TestClient.py --protocol=accel --transport=${trans} --port=9090 --host=localhost --genpydir=py/gen-py ${extraparam}" \
+              "ruby rb/integration/TestServer.rb --protocol=binary --transport=${trans}" \
+              "15" "5"
+      do_test "py-ruby" "${proto}" "${trans}-${sock}" \
+              "py/TestClient.py --protocol=binary --transport=${trans} --port=9090 --host=localhost --genpydir=py/gen-py ${extraparam}" \
+              "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans}" \
+              "15" "5"
+    done
+  done
+
+######### ruby client - py server ##############
+for proto in $(intersection "${py_protocols}" "${ruby_protocols}"); do
+  for trans in $(intersection "${py_transports}" "${ruby_transports}"); do
+    for sock in $(intersection "${py_sockets}" "${ruby_sockets}"); do
+      case "$sock" in
+        "ip" ) extraparam="";;
+        "ip-ssl" ) extraparam="--ssl";;
+      esac
+      do_test "ruby-py" "${proto}" "${trans}-${sock}" \
+              "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans}" \
+              "py/TestServer.py --protocol=${proto} --transport=${trans} --port=9090 --genpydir=py/gen-py TSimpleServer ${extraparam}" \
+              "5" "2"
+    done
+  done
+done
+
+for trans in $(intersection "${py_transports}" "${ruby_transports}"); do
+    for sock in $(intersection "${py_sockets}" "${ruby_sockets}"); do
+      case "$sock" in
+        "ip" ) extraparam="";;
+        "ip-ssl" ) extraparam="--ssl";;
+      esac
+      do_test "ruby-py" "binary-accel" "${trans}-${sock}" \
+              "ruby rb/integration/TestClient.rb --protocol=binary --transport=${trans}" \
+              "py/TestServer.py --protocol=accel --transport=${trans} --port=9090 --genpydir=py/gen-py TSimpleServer ${extraparam}" \
+              "5" "2"
+      do_test "ruby-py" "accel-binary" "${trans}-${sock}" \
+              "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans}" \
+              "py/TestServer.py --protocol=binary --transport=${trans} --port=9090 --genpydir=py/gen-py TSimpleServer ${extraparam}" \
+              "5" "2"
+    done
+  done
+
+
 # delete Unix Domain Socket used by cpp tests
 rm -f /tmp/ThriftTest.thrift
 
@@ -595,14 +868,6 @@
         "make -C php/ client" \
         "cpp/TestServer" \
         "10" "2"
-do_test "rb-rb" "binary" "buffered-ip" \
-        "ruby rb/integration/simple_client.rb" \
-        "ruby rb/integration/simple_server.rb" \
-        "5" "5"
-do_test "rb-rb" "binary-accl" "buffered-ip" \
-        "ruby rb/integration/accelerated_buffered_client.rb" \
-        "ruby rb/integration/accelerated_buffered_server.rb" \
-        "5" "5"
 
 echo " failed tests are logged to test/log/error.log"
 echo " full log is here test/log/client_server_protocol_transport_client.log"