Fix up thrift/thrift to only require the the files that define the classes it used...
authorKevin Clark <kclark@apache.org>
Wed, 18 Jun 2008 00:56:48 +0000 (00:56 +0000)
committerKevin Clark <kclark@apache.org>
Wed, 18 Jun 2008 00:56:48 +0000 (00:56 +0000)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668912 13f79535-47bb-0310-9956-ffa450edef68

lib/rb/lib/thrift/deprecation.rb
lib/rb/lib/thrift/thrift.rb
test/rb/test_helper.rb

index 49324c8..2f7d898 100644 (file)
@@ -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
index 4cf5fc0..dfad650 100644 (file)
@@ -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')
index 9294c8f..125f52f 100644 (file)
@@ -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'