Update the tutorial files to stop using deprecated names
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668935 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/tutorial/rb/RubyClient.rb b/tutorial/rb/RubyClient.rb
index 69189ad..d2b9150 100755
--- a/tutorial/rb/RubyClient.rb
+++ b/tutorial/rb/RubyClient.rb
@@ -3,16 +3,16 @@
$:.push('../gen-rb')
$:.unshift '../../lib/rb/lib'
-require 'thrift/transport/tsocket'
-require 'thrift/protocol/tbinaryprotocol'
+require 'thrift'
+require 'thrift/protocol/binaryprotocol'
require 'Calculator'
begin
port = ARGV[0] || 9090
- transport = TBufferedTransport.new(TSocket.new('localhost', port))
- protocol = TBinaryProtocol.new(transport)
+ transport = Thrift::BufferedTransport.new(Thrift::Socket.new('localhost', port))
+ protocol = Thrift::BinaryProtocol.new(transport)
client = Calculator::Client.new(protocol)
transport.open()
diff --git a/tutorial/rb/RubyServer.rb b/tutorial/rb/RubyServer.rb
index d78c323..684d05a 100755
--- a/tutorial/rb/RubyServer.rb
+++ b/tutorial/rb/RubyServer.rb
@@ -3,8 +3,8 @@
$:.push('../gen-rb')
$:.unshift '../../lib/rb/lib'
-require 'thrift/transport/tsocket'
-require 'thrift/protocol/tbinaryprotocol'
+require 'thrift'
+require 'thrift/protocol/binaryprotocol'
require 'thrift/server/tserver'
require 'Calculator'
@@ -69,9 +69,9 @@
handler = CalculatorHandler.new()
processor = Calculator::Processor.new(handler)
-transport = TServerSocket.new(9090)
-transportFactory = TBufferedTransportFactory.new()
-server = TSimpleServer.new(processor, transport, transportFactory)
+transport = Thrift::ServerSocket.new(9090)
+transportFactory = Thrift::BufferedTransportFactory.new()
+server = Thrift::SimpleServer.new(processor, transport, transportFactory)
puts "Starting the server..."
server.serve()