THRIFT-276. rb: Ruby libraries should have one class per file

This monster of a patch moves all the classes into their own files and specs as appropriate. Additionally, it concentrates all the requires into thrift.rb, removing the need to require any other file. (Changes were made to the compiler to reflect this reduced requirement.)

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@761849 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/rb/spec/compact_protocol_spec.rb b/lib/rb/spec/compact_protocol_spec.rb
index 9071fb1..78b1a2a 100644
--- a/lib/rb/spec/compact_protocol_spec.rb
+++ b/lib/rb/spec/compact_protocol_spec.rb
@@ -18,7 +18,6 @@
 #
 
 require File.dirname(__FILE__) + '/spec_helper'
-require "thrift/protocol/compact_protocol"
 
 describe Thrift::CompactProtocol do
   TESTS = {
@@ -36,7 +35,7 @@
     TESTS.each_pair do |primitive_type, test_values|
       test_values.each do |value|
         # puts "testing #{value}" if primitive_type == :i64
-        trans = Thrift::MemoryBuffer.new
+        trans = Thrift::MemoryBufferTransport.new
         proto = Thrift::CompactProtocol.new(trans)
         
         proto.send(writer(primitive_type), value)
@@ -53,7 +52,7 @@
       thrift_type = Thrift::Types.const_get(final_primitive_type.to_s.upcase)
       # puts primitive_type
       test_values.each do |value|
-        trans = Thrift::MemoryBuffer.new
+        trans = Thrift::MemoryBufferTransport.new
         proto = Thrift::CompactProtocol.new(trans)
 
         proto.write_field_begin(nil, thrift_type, 15)
@@ -72,7 +71,7 @@
   end
 
   it "should encode and decode a monster struct correctly" do
-    trans = Thrift::MemoryBuffer.new
+    trans = Thrift::MemoryBufferTransport.new
     proto = Thrift::CompactProtocol.new(trans)
 
     struct = CompactProtoTestStruct.new
@@ -96,10 +95,10 @@
   end
 
   it "should make method calls correctly" do
-    client_out_trans = Thrift::MemoryBuffer.new
+    client_out_trans = Thrift::MemoryBufferTransport.new
     client_out_proto = Thrift::CompactProtocol.new(client_out_trans)
     
-    client_in_trans = Thrift::MemoryBuffer.new
+    client_in_trans = Thrift::MemoryBufferTransport.new
     client_in_proto = Thrift::CompactProtocol.new(client_in_trans)
     
     processor = Srv::Processor.new(JankyHandler.new)