From: Kevin Clark Date: Wed, 18 Jun 2008 00:56:48 +0000 (+0000) Subject: Fix up thrift/thrift to only require the the files that define the classes it used... X-Git-Tag: 0.2.0~637 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=f85e79349417c4a947dd01714fad3abdda840450;p=common%2Fthrift.git Fix up thrift/thrift to only require the the files that define the classes it used to hold. This fixes the existing tests git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668912 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/rb/lib/thrift/deprecation.rb b/lib/rb/lib/thrift/deprecation.rb index 49324c8c..2f7d8986 100644 --- a/lib/rb/lib/thrift/deprecation.rb +++ b/lib/rb/lib/thrift/deprecation.rb @@ -1,7 +1,9 @@ # provide a backwards-compatible wrapper API and deprecate it -unless Thrift.const_defined?(:DEPRECATION) - Thrift::DEPRECATION = true +module Thrift + unless const_defined?(:DEPRECATION) + DEPRECATION = true + end end class Module diff --git a/lib/rb/lib/thrift/thrift.rb b/lib/rb/lib/thrift/thrift.rb index 4cf5fc05..dfad6504 100644 --- a/lib/rb/lib/thrift/thrift.rb +++ b/lib/rb/lib/thrift/thrift.rb @@ -1,2 +1,8 @@ # This file kept for backwards compatability -require File.join(File.dirname(__FILE__), '../thrift') +# require File.join(File.dirname(__FILE__), '../thrift') +require File.join(File.dirname(__FILE__), 'deprecation') +require File.join(File.dirname(__FILE__), 'types') +require File.join(File.dirname(__FILE__), 'processor') +require File.join(File.dirname(__FILE__), 'exceptions') +require File.join(File.dirname(__FILE__), 'client') +require File.join(File.dirname(__FILE__), 'struct') diff --git a/test/rb/test_helper.rb b/test/rb/test_helper.rb index 9294c8fe..125f52f8 100644 --- a/test/rb/test_helper.rb +++ b/test/rb/test_helper.rb @@ -1,4 +1,4 @@ -$:.push File.dirname(__FILE__) + '/gen-rb' -$:.push File.join(File.dirname(__FILE__), '../../lib/rb/lib') +$:.unshift File.dirname(__FILE__) + '/gen-rb' +$:.unshift File.join(File.dirname(__FILE__), '../../lib/rb/lib') require 'test/unit'