Set up the class deprecations
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668911 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/rb/lib/thrift/client.rb b/lib/rb/lib/thrift/client.rb
index 7f1297c..55e72b3 100644
--- a/lib/rb/lib/thrift/client.rb
+++ b/lib/rb/lib/thrift/client.rb
@@ -35,4 +35,5 @@
end
end
end
+ deprecate_class! :ThriftClient => Client
end
diff --git a/lib/rb/lib/thrift/deprecation.rb b/lib/rb/lib/thrift/deprecation.rb
index f7221b4..49324c8 100644
--- a/lib/rb/lib/thrift/deprecation.rb
+++ b/lib/rb/lib/thrift/deprecation.rb
@@ -42,14 +42,3 @@
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
diff --git a/lib/rb/lib/thrift/exceptions.rb b/lib/rb/lib/thrift/exceptions.rb
index 972d571..efaa805 100644
--- a/lib/rb/lib/thrift/exceptions.rb
+++ b/lib/rb/lib/thrift/exceptions.rb
@@ -7,6 +7,7 @@
attr_reader :message
end
+ deprecate_class! :TException => Exception
class ApplicationException < Exception
@@ -68,4 +69,5 @@
end
end
+ deprecate_class! :TApplicationException => ApplicationException
end
\ No newline at end of file
diff --git a/lib/rb/lib/thrift/processor.rb b/lib/rb/lib/thrift/processor.rb
index 5ec881f..d9d5a09 100644
--- a/lib/rb/lib/thrift/processor.rb
+++ b/lib/rb/lib/thrift/processor.rb
@@ -35,4 +35,5 @@
oprot.trans.flush()
end
end
+ deprecate_class! :TProcessor => Processor
end
diff --git a/lib/rb/lib/thrift/protocol/tbinaryprotocol.rb b/lib/rb/lib/thrift/protocol/tbinaryprotocol.rb
index a0618b6..adfeb81 100644
--- a/lib/rb/lib/thrift/protocol/tbinaryprotocol.rb
+++ b/lib/rb/lib/thrift/protocol/tbinaryprotocol.rb
@@ -181,10 +181,7 @@
end
end
-end
-
-if Thrift::DEPRECATION
- TBinaryProtocol = Thrift::BinaryProtocol
+ deprecate_class! :TBinaryProtocol => BinaryProtocol
end
class TBinaryProtocolFactory < TProtocolFactory
diff --git a/lib/rb/lib/thrift/protocol/tprotocol.rb b/lib/rb/lib/thrift/protocol/tprotocol.rb
index 5d4e636..905b754 100644
--- a/lib/rb/lib/thrift/protocol/tprotocol.rb
+++ b/lib/rb/lib/thrift/protocol/tprotocol.rb
@@ -26,6 +26,7 @@
end
end
+ deprecate_class! :TProtocolException => ProtocolException
class Protocol
@@ -215,6 +216,7 @@
end
end
+ deprecate_class! :TProtocol => Protocol
end
class TProtocolFactory
diff --git a/lib/rb/lib/thrift/struct.rb b/lib/rb/lib/thrift/struct.rb
index 35b3415..f1907a3 100644
--- a/lib/rb/lib/thrift/struct.rb
+++ b/lib/rb/lib/thrift/struct.rb
@@ -134,4 +134,5 @@
:element => field[:element] }
end
end
+ deprecate_class! :ThriftStruct => Struct
end
diff --git a/lib/rb/lib/thrift/types.rb b/lib/rb/lib/thrift/types.rb
index 2ff893f..b1fbb87 100644
--- a/lib/rb/lib/thrift/types.rb
+++ b/lib/rb/lib/thrift/types.rb
@@ -14,10 +14,12 @@
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