Set up the class deprecations
authorKevin Clark <kclark@apache.org>
Wed, 18 Jun 2008 00:56:30 +0000 (00:56 +0000)
committerKevin Clark <kclark@apache.org>
Wed, 18 Jun 2008 00:56:30 +0000 (00:56 +0000)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668911 13f79535-47bb-0310-9956-ffa450edef68

lib/rb/lib/thrift/client.rb
lib/rb/lib/thrift/deprecation.rb
lib/rb/lib/thrift/exceptions.rb
lib/rb/lib/thrift/processor.rb
lib/rb/lib/thrift/protocol/tbinaryprotocol.rb
lib/rb/lib/thrift/protocol/tprotocol.rb
lib/rb/lib/thrift/struct.rb
lib/rb/lib/thrift/types.rb

index 7f1297c..55e72b3 100644 (file)
@@ -35,4 +35,5 @@ module Thrift
       end
     end
   end
+  deprecate_class! :ThriftClient => Client
 end
index f7221b4..49324c8 100644 (file)
@@ -42,14 +42,3 @@ module Kernel
     end
   end
 end
-
-# TProtocol = Thrift::Protocol
-# TProtocolException = Thrift::ProtocolException
-# ThriftStruct = Thrift::Struct
-# ThriftClient = Thrift::Client
-# TProcessor = Thrift::Processor
-# TType = Thrift::Types
-# TMessageType = Thrift::MessageTypes
-# TException = Thrift::Exception
-# TApplicationException = Thrift::ApplicationException
-# TBinaryProtocol = Thrift::BinaryProtocol
index 972d571..efaa805 100644 (file)
@@ -7,6 +7,7 @@ module Thrift
 
     attr_reader :message
   end
+  deprecate_class! :TException => Exception
 
   class ApplicationException < Exception
 
@@ -68,4 +69,5 @@ module Thrift
     end
 
   end
+  deprecate_class! :TApplicationException => ApplicationException
 end
\ No newline at end of file
index 5ec881f..d9d5a09 100644 (file)
@@ -35,4 +35,5 @@ module Thrift
       oprot.trans.flush()
     end
   end
+  deprecate_class! :TProcessor => Processor
 end
index a0618b6..adfeb81 100644 (file)
@@ -181,10 +181,7 @@ module Thrift
     end
 
   end
-end
-
-if Thrift::DEPRECATION
-  TBinaryProtocol = Thrift::BinaryProtocol
+  deprecate_class! :TBinaryProtocol => BinaryProtocol
 end
 
 class TBinaryProtocolFactory < TProtocolFactory
index 5d4e636..905b754 100644 (file)
@@ -26,6 +26,7 @@ module Thrift
     end
 
   end
+  deprecate_class! :TProtocolException => ProtocolException
 
   class Protocol
 
@@ -215,6 +216,7 @@ module Thrift
     end
 
   end
+  deprecate_class! :TProtocol => Protocol
 end
 
 class TProtocolFactory
index 35b3415..f1907a3 100644 (file)
@@ -134,4 +134,5 @@ module Thrift
         :element => field[:element] }
     end
   end
+    deprecate_class! :ThriftStruct => Struct
 end
index 2ff893f..b1fbb87 100644 (file)
@@ -14,10 +14,12 @@ module Thrift
     SET = 14
     LIST = 15
   end
+  deprecate_class! :TType => Types
 
   module MessageTypes
     CALL = 1
     REPLY = 2
     EXCEPTION = 3
   end
+  deprecate_class! :TMessageType => MessageTypes
 end
\ No newline at end of file