Thrift: Whitespace cleanup.

Summary:
- Expanded tabs to spaces where spaces were the norm.
- Deleted almost all trailing whitespace.
- Added newlines to the ends of a few files.
- Ran dos2unix on one file or two.

Reviewed By: mcslee

Test Plan: git diff -b

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665467 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/rb/COPYING b/lib/rb/COPYING
index 039f21e..0101a7d 100644
--- a/lib/rb/COPYING
+++ b/lib/rb/COPYING
@@ -1,5 +1,5 @@
 Thrift Software License
-Copyright (c) 2006- Facebook, Inc. 
+Copyright (c) 2006- Facebook, Inc.
 
 Permission is hereby granted, free of charge, to any person or organization
 obtaining a copy of the software and accompanying documentation covered by
diff --git a/lib/rb/LICENSE b/lib/rb/LICENSE
index 039f21e..0101a7d 100644
--- a/lib/rb/LICENSE
+++ b/lib/rb/LICENSE
@@ -1,5 +1,5 @@
 Thrift Software License
-Copyright (c) 2006- Facebook, Inc. 
+Copyright (c) 2006- Facebook, Inc.
 
 Permission is hereby granted, free of charge, to any person or organization
 obtaining a copy of the software and accompanying documentation covered by
diff --git a/lib/rb/lib/thrift/protocol/tbinaryprotocol.rb b/lib/rb/lib/thrift/protocol/tbinaryprotocol.rb
index a152bf2..ce0b1bb 100644
--- a/lib/rb/lib/thrift/protocol/tbinaryprotocol.rb
+++ b/lib/rb/lib/thrift/protocol/tbinaryprotocol.rb
@@ -29,7 +29,7 @@
     writeByte(type)
     writeI16(id)
   end
-  
+
   def writeFieldStop()
     writeByte(TType::STOP)
   end
@@ -39,17 +39,17 @@
     writeByte(vtype)
     writeI32(size)
   end
-  
+
   def writeListBegin(etype, size)
     writeByte(etype)
     writeI32(size)
   end
-  
+
   def writeSetBegin(etype, size)
     writeByte(etype)
     writeI32(size)
   end
-  
+
   def writeBool(bool)
     if (bool)
       writeByte(1)
@@ -69,7 +69,7 @@
   def writeI32(i32)
     trans.write([i32].pack('N'))
   end
-  
+
   def writeI64(i64)
     hi = i64 >> 32
     lo = i64 & 0xffffffff
@@ -79,7 +79,7 @@
   def writeDouble(dub)
     trans.write([dub].pack('G'))
   end
-  
+
   def writeString(str)
     writeI32(str.length)
     trans.write(str)
@@ -95,7 +95,7 @@
     seqid = readI32()
     return name, type, seqid
   end
-  
+
   def readFieldBegin()
     type = readByte()
     if (type === TType::STOP)
@@ -104,7 +104,7 @@
     id = readI16()
     return nil, type, id
   end
-  
+
   def readMapBegin()
     ktype = readByte()
     vtype = readByte()
@@ -122,8 +122,8 @@
     etype = readByte()
     size = readI32()
     return etype, size
-  end  
-  
+  end
+
   def readBool()
     byte = readByte()
     return byte != 0
@@ -146,7 +146,7 @@
     end
     return val
   end
-  
+
   def readI32()
     dat = trans.readAll(4)
     val, = dat.unpack('N')
diff --git a/lib/rb/lib/thrift/protocol/tprotocol.rb b/lib/rb/lib/thrift/protocol/tprotocol.rb
index fb43705..a06b4cd 100644
--- a/lib/rb/lib/thrift/protocol/tprotocol.rb
+++ b/lib/rb/lib/thrift/protocol/tprotocol.rb
@@ -29,7 +29,7 @@
 end
 
 class TProtocol
-  
+
   attr_reader :trans
 
   def initialize(trans)
@@ -39,87 +39,87 @@
   def writeMessageBegin(name, type, seqid); nil; end
 
   def writeMessageEnd; nil; end
-  
+
   def writeStructBegin(name); nil; end
-  
+
   def writeStructEnd(); nil; end
-  
+
   def writeFieldBegin(name, type, id); nil; end
-  
+
   def writeFieldEnd(); nil; end
-  
+
   def writeFieldStop(); nil; end
 
   def writeMapBegin(ktype, vtype, size); nil; end
-  
+
   def writeMapEnd(); nil; end
 
   def writeListBegin(etype, size); nil; end
-  
+
   def writeListEnd(); nil; end
-  
+
   def writeSetBegin(etype, size); nil; end
 
   def writeSetEnd(); nil; end
-  
+
   def writeBool(bool); nil; end
-  
+
   def writeByte(byte); nil; end
-  
+
   def writeI16(i16); nil; end
-  
+
   def writeI32(i32); nil; end
-  
+
   def writeI64(i64); nil; end
-  
+
   def writeDouble(dub); nil; end
-  
+
   def writeString(str); nil; end
-  
+
   def readMessageBegin(); nil; end
-  
+
   def readMessageEnd(); nil; end
-  
+
   def readStructBegin(); nil; end
-  
+
   def readStructEnd(); nil; end
-  
+
   def readFieldBegin(); nil; end
-  
+
   def readFieldEnd(); nil; end
-  
+
   def readMapBegin(); nil; end
-  
+
   def readMapEnd(); nil; end
-  
+
   def readListBegin(); nil; end
-  
+
   def readListEnd(); nil; end
 
   def readSetBegin(); nil; end
-  
+
   def readSetEnd(); nil; end
-  
+
   def readBool(); nil; end
-  
+
   def readByte(); nil; end
 
   def readI16(); nil; end
-  
+
   def readI32(); nil; end
-  
+
   def readI64(); nil; end
-  
+
   def readDouble(); nil; end
-  
+
   def readString(); nil; end
-  
+
   def write_field(name, type, fid, value)
     writeFieldBegin(name, type, fid)
     write_type(type, value)
     writeFieldEnd
   end
-  
+
   def write_type(type, value)
     case type
     when TType::BOOL
@@ -142,7 +142,7 @@
       raise NotImplementedError
     end
   end
-  
+
   def read_type(type)
     case type
     when TType::BOOL
@@ -163,7 +163,7 @@
       raise NotImplementedError
     end
   end
-  
+
   def skip(type)
     if type === TType::STOP
       nil
diff --git a/lib/rb/lib/thrift/server/tserver.rb b/lib/rb/lib/thrift/server/tserver.rb
index d9ff621..43b2bdd 100644
--- a/lib/rb/lib/thrift/server/tserver.rb
+++ b/lib/rb/lib/thrift/server/tserver.rb
@@ -20,7 +20,7 @@
     @transportFactory = transportFactory ? transportFactory : TTransportFactory.new()
     @protocolFactory = protocolFactory ? protocolFactory : TBinaryProtocolFactory.new()
   end
-  
+
   def serve(); nil; end
 
 end
diff --git a/lib/rb/setup.rb b/lib/rb/setup.rb
index 424a5f3..9f0c826 100644
--- a/lib/rb/setup.rb
+++ b/lib/rb/setup.rb
@@ -659,7 +659,7 @@
   def ruby(*args)
     command config('rubyprog'), *args
   end
-  
+
   def make(task = nil)
     command(*[config('makeprog'), task].compact)
   end
@@ -722,7 +722,7 @@
   def srcdirectory?(path)
     File.dir?(srcfile(path))
   end
-  
+
   def srcfile?(path)
     File.file?(srcfile(path))
   end
@@ -826,7 +826,7 @@
       __send__ "exec_#{task}"
     end
   end
-  
+
   def run_metaconfigs
     @config.load_script "#{@ardir}/metaconfig"
   end
@@ -1404,7 +1404,7 @@
   end
 
   # picked up many entries from cvs-1.11.1/src/ignore.c
-  JUNK_FILES = %w( 
+  JUNK_FILES = %w(
     core RCSLOG tags TAGS .make.state
     .nse_depinfo #* .#* cvslog.* ,* .del-* *.olb
     *~ *.old *.bak *.BAK *.orig *.rej _$* *$