From 07f38ff531c44148a5ca66838d3a22f91fb0f7bc Mon Sep 17 00:00:00 2001 From: Bryan Duxbury Date: Tue, 7 Apr 2009 04:37:28 +0000 Subject: [PATCH] THRIFT-430. rb: ruby tutorials and ruby tests require deprecated files and class names This patch cleans all this up. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@762618 13f79535-47bb-0310-9956-ffa450edef68 --- test/rb/benchmarks/protocol_benchmark.rb | 3 --- test/rb/core/test_backwards_compatability.rb | 1 - test/rb/core/transport/test_transport.rb | 6 +++--- test/rb/integration/accelerated_buffered_client.rb | 1 - test/rb/integration/accelerated_buffered_server.rb | 1 - test/rb/integration/buffered_client.rb | 1 - test/rb/integration/simple_client.rb | 1 - test/rb/integration/simple_server.rb | 1 - test/rb/integration/test_simple_handler.rb | 1 - tutorial/rb/RubyClient.rb | 1 - tutorial/rb/RubyServer.rb | 2 -- 11 files changed, 3 insertions(+), 16 deletions(-) diff --git a/test/rb/benchmarks/protocol_benchmark.rb b/test/rb/benchmarks/protocol_benchmark.rb index b9fde17a..05a8ee53 100644 --- a/test/rb/benchmarks/protocol_benchmark.rb +++ b/test/rb/benchmarks/protocol_benchmark.rb @@ -21,9 +21,6 @@ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), *%w[.. .. .. lib rb lib]) $LOAD_PATH.unshift File.join(File.dirname(__FILE__), *%w[.. .. .. lib rb ext]) require 'thrift' -require 'thrift/transport' -require 'thrift/protocol/binaryprotocol' -require 'thrift/protocol/binaryprotocolaccelerated' require 'benchmark' require 'rubygems' diff --git a/test/rb/core/test_backwards_compatability.rb b/test/rb/core/test_backwards_compatability.rb index 692aaf11..0577515d 100644 --- a/test/rb/core/test_backwards_compatability.rb +++ b/test/rb/core/test_backwards_compatability.rb @@ -26,6 +26,5 @@ class TestThriftException < Test::Unit::TestCase msg = "hi there thrift" assert_equal msg, Thrift::Exception.new(msg).message end - end diff --git a/test/rb/core/transport/test_transport.rb b/test/rb/core/transport/test_transport.rb index eb6e03dd..52755c1d 100644 --- a/test/rb/core/transport/test_transport.rb +++ b/test/rb/core/transport/test_transport.rb @@ -19,9 +19,9 @@ require File.join(File.dirname(__FILE__), '../../test_helper') -require 'thrift/transport' +require 'thrift' -class DummyTransport < Thrift::Transport +class DummyTransport < Thrift::BaseTransport def initialize(data) @data = data end @@ -34,7 +34,7 @@ end # TTransport is basically an abstract class, but isn't raising NotImplementedError class TestThriftTransport < Test::Unit::TestCase def setup - @trans = Thrift::Transport.new + @trans = Thrift::BaseTransport.new end def test_open? diff --git a/test/rb/integration/accelerated_buffered_client.rb b/test/rb/integration/accelerated_buffered_client.rb index 5a66cb8e..7cec1df5 100644 --- a/test/rb/integration/accelerated_buffered_client.rb +++ b/test/rb/integration/accelerated_buffered_client.rb @@ -20,7 +20,6 @@ require File.join(File.dirname(__FILE__), '../test_helper') require 'thrift' -require 'thrift/protocol/binaryprotocolaccelerated' require 'ThriftTest' class AcceleratedBufferedClientTest < Test::Unit::TestCase diff --git a/test/rb/integration/accelerated_buffered_server.rb b/test/rb/integration/accelerated_buffered_server.rb index 11e09df4..1ca66e54 100644 --- a/test/rb/integration/accelerated_buffered_server.rb +++ b/test/rb/integration/accelerated_buffered_server.rb @@ -22,7 +22,6 @@ $:.push File.join(File.dirname(__FILE__), '../../../lib/rb/lib') $:.push File.join(File.dirname(__FILE__), '../../../lib/rb/ext') require 'thrift' -require 'thrift/protocol/binaryprotocolaccelerated' require 'ThriftTest' class SimpleHandler diff --git a/test/rb/integration/buffered_client.rb b/test/rb/integration/buffered_client.rb index 50dac305..1a925ccf 100644 --- a/test/rb/integration/buffered_client.rb +++ b/test/rb/integration/buffered_client.rb @@ -20,7 +20,6 @@ require File.join(File.dirname(__FILE__), '../test_helper') require 'thrift' -require 'thrift/protocol/binaryprotocol' require 'ThriftTest' class BufferedClientTest < Test::Unit::TestCase diff --git a/test/rb/integration/simple_client.rb b/test/rb/integration/simple_client.rb index 591cd45d..1064822a 100644 --- a/test/rb/integration/simple_client.rb +++ b/test/rb/integration/simple_client.rb @@ -20,7 +20,6 @@ require File.join(File.dirname(__FILE__), '../test_helper') require 'thrift' -require 'thrift/protocol/binaryprotocol' require 'ThriftTest' class SimpleClientTest < Test::Unit::TestCase diff --git a/test/rb/integration/simple_server.rb b/test/rb/integration/simple_server.rb index 450704b2..3518d2e1 100644 --- a/test/rb/integration/simple_server.rb +++ b/test/rb/integration/simple_server.rb @@ -21,7 +21,6 @@ $:.push File.dirname(__FILE__) + '/../gen-rb' $:.push File.join(File.dirname(__FILE__), '../../../lib/rb/lib') require 'thrift' -require 'thrift/protocol/binaryprotocol' require 'ThriftTest' class SimpleHandler diff --git a/test/rb/integration/test_simple_handler.rb b/test/rb/integration/test_simple_handler.rb index 38945766..c34aa7e5 100644 --- a/test/rb/integration/test_simple_handler.rb +++ b/test/rb/integration/test_simple_handler.rb @@ -20,7 +20,6 @@ require File.join(File.dirname(__FILE__), '../test_helper') require 'thrift' -require 'thrift/protocol/binaryprotocol' require 'ThriftTest' class TestHandler diff --git a/tutorial/rb/RubyClient.rb b/tutorial/rb/RubyClient.rb index 623fde05..8971fed9 100755 --- a/tutorial/rb/RubyClient.rb +++ b/tutorial/rb/RubyClient.rb @@ -23,7 +23,6 @@ $:.push('../gen-rb') $:.unshift '../../lib/rb/lib' require 'thrift' -require 'thrift/protocol/binaryprotocol' require 'Calculator' diff --git a/tutorial/rb/RubyServer.rb b/tutorial/rb/RubyServer.rb index 4f8e4865..89eb3738 100755 --- a/tutorial/rb/RubyServer.rb +++ b/tutorial/rb/RubyServer.rb @@ -23,8 +23,6 @@ $:.push('../gen-rb') $:.unshift '../../lib/rb/lib' require 'thrift' -require 'thrift/protocol/binaryprotocol' -require 'thrift/server/tserver' require 'Calculator' require 'shared_types' -- 2.17.1