Thrift-1424:Ruby specs fail when run with rake
Client: ruby
Patch: Peter Sanford

Fixes specs failing to load the spec_helper in ruby 1.9.2



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1200070 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/rb/spec/base_protocol_spec.rb b/lib/rb/spec/base_protocol_spec.rb
index efb16d8..bd9b59b 100644
--- a/lib/rb/spec/base_protocol_spec.rb
+++ b/lib/rb/spec/base_protocol_spec.rb
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-require File.dirname(__FILE__) + '/spec_helper'
+require File.expand_path("#{File.dirname(__FILE__)}/spec_helper")
 
 class ThriftBaseProtocolSpec < Spec::ExampleGroup
   include Thrift
diff --git a/lib/rb/spec/base_transport_spec.rb b/lib/rb/spec/base_transport_spec.rb
index a29656f..d91a118 100644
--- a/lib/rb/spec/base_transport_spec.rb
+++ b/lib/rb/spec/base_transport_spec.rb
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-require File.dirname(__FILE__) + '/spec_helper'
+require File.expand_path("#{File.dirname(__FILE__)}/spec_helper")
 
 class ThriftBaseTransportSpec < Spec::ExampleGroup
   include Thrift
diff --git a/lib/rb/spec/binary_protocol_accelerated_spec.rb b/lib/rb/spec/binary_protocol_accelerated_spec.rb
index b8518c8..0653ba8 100644
--- a/lib/rb/spec/binary_protocol_accelerated_spec.rb
+++ b/lib/rb/spec/binary_protocol_accelerated_spec.rb
@@ -17,8 +17,8 @@
 # under the License.
 #
 
-require File.dirname(__FILE__) + '/spec_helper'
-require File.dirname(__FILE__) + '/binary_protocol_spec_shared'
+require File.expand_path("#{File.dirname(__FILE__)}/spec_helper")
+require File.expand_path("#{File.dirname(__FILE__)}/binary_protocol_spec_shared")
 
 if defined? Thrift::BinaryProtocolAccelerated
 
diff --git a/lib/rb/spec/binary_protocol_spec.rb b/lib/rb/spec/binary_protocol_spec.rb
index 6da467e..0edd9d9 100644
--- a/lib/rb/spec/binary_protocol_spec.rb
+++ b/lib/rb/spec/binary_protocol_spec.rb
@@ -17,8 +17,8 @@
 # under the License.
 #
 
-require File.dirname(__FILE__) + '/spec_helper'
-require File.dirname(__FILE__) + '/binary_protocol_spec_shared'
+require File.expand_path("#{File.dirname(__FILE__)}/spec_helper")
+require File.expand_path("#{File.dirname(__FILE__)}/binary_protocol_spec_shared")
 
 class ThriftBinaryProtocolSpec < Spec::ExampleGroup
   include Thrift
diff --git a/lib/rb/spec/binary_protocol_spec_shared.rb b/lib/rb/spec/binary_protocol_spec_shared.rb
index 28da760..0bc91c9 100644
--- a/lib/rb/spec/binary_protocol_spec_shared.rb
+++ b/lib/rb/spec/binary_protocol_spec_shared.rb
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-require File.dirname(__FILE__) + '/spec_helper'
+require File.expand_path("#{File.dirname(__FILE__)}/spec_helper")
 
 shared_examples_for 'a binary protocol' do
   before(:each) do
diff --git a/lib/rb/spec/client_spec.rb b/lib/rb/spec/client_spec.rb
index e707d81..1550e14 100644
--- a/lib/rb/spec/client_spec.rb
+++ b/lib/rb/spec/client_spec.rb
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-require File.dirname(__FILE__) + '/spec_helper'
+require File.expand_path("#{File.dirname(__FILE__)}/spec_helper")
 
 class ThriftClientSpec < Spec::ExampleGroup
   include Thrift
diff --git a/lib/rb/spec/compact_protocol_spec.rb b/lib/rb/spec/compact_protocol_spec.rb
index a88a2ae..2862afd 100644
--- a/lib/rb/spec/compact_protocol_spec.rb
+++ b/lib/rb/spec/compact_protocol_spec.rb
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-require File.dirname(__FILE__) + '/spec_helper'
+require File.expand_path("#{File.dirname(__FILE__)}/spec_helper")
 
 describe Thrift::CompactProtocol do
   TESTS = {
diff --git a/lib/rb/spec/exception_spec.rb b/lib/rb/spec/exception_spec.rb
index fc32137..78ddb75 100644
--- a/lib/rb/spec/exception_spec.rb
+++ b/lib/rb/spec/exception_spec.rb
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-require File.dirname(__FILE__) + '/spec_helper'
+require File.expand_path("#{File.dirname(__FILE__)}/spec_helper")
 
 class ThriftExceptionSpec < Spec::ExampleGroup
   include Thrift
diff --git a/lib/rb/spec/http_client_spec.rb b/lib/rb/spec/http_client_spec.rb
index c919051..959880c 100644
--- a/lib/rb/spec/http_client_spec.rb
+++ b/lib/rb/spec/http_client_spec.rb
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-require File.dirname(__FILE__) + '/spec_helper'
+require File.expand_path("#{File.dirname(__FILE__)}/spec_helper")
 
 class ThriftHTTPClientTransportSpec < Spec::ExampleGroup
   include Thrift
diff --git a/lib/rb/spec/mongrel_http_server_spec.rb b/lib/rb/spec/mongrel_http_server_spec.rb
index c994491..5375bec 100644
--- a/lib/rb/spec/mongrel_http_server_spec.rb
+++ b/lib/rb/spec/mongrel_http_server_spec.rb
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-require File.dirname(__FILE__) + '/spec_helper'
+require File.expand_path("#{File.dirname(__FILE__)}/spec_helper")
 require 'thrift/server/mongrel_http_server'
 
 class ThriftHTTPServerSpec < Spec::ExampleGroup
diff --git a/lib/rb/spec/nonblocking_server_spec.rb b/lib/rb/spec/nonblocking_server_spec.rb
index ead51d7..7200504 100644
--- a/lib/rb/spec/nonblocking_server_spec.rb
+++ b/lib/rb/spec/nonblocking_server_spec.rb
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-require File.dirname(__FILE__) + '/spec_helper'
+require File.expand_path("#{File.dirname(__FILE__)}/spec_helper")
 
 class ThriftNonblockingServerSpec < Spec::ExampleGroup
   include Thrift
diff --git a/lib/rb/spec/processor_spec.rb b/lib/rb/spec/processor_spec.rb
index d35f652..d78edac 100644
--- a/lib/rb/spec/processor_spec.rb
+++ b/lib/rb/spec/processor_spec.rb
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-require File.dirname(__FILE__) + '/spec_helper'
+require File.expand_path("#{File.dirname(__FILE__)}/spec_helper")
 
 class ThriftProcessorSpec < Spec::ExampleGroup
   include Thrift
diff --git a/lib/rb/spec/serializer_spec.rb b/lib/rb/spec/serializer_spec.rb
index 44339c0..2ecb85b 100644
--- a/lib/rb/spec/serializer_spec.rb
+++ b/lib/rb/spec/serializer_spec.rb
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-require File.dirname(__FILE__) + '/spec_helper'
+require File.expand_path("#{File.dirname(__FILE__)}/spec_helper")
 
 class ThriftSerializerSpec < Spec::ExampleGroup
   include Thrift
diff --git a/lib/rb/spec/server_socket_spec.rb b/lib/rb/spec/server_socket_spec.rb
index fce5013..071acba 100644
--- a/lib/rb/spec/server_socket_spec.rb
+++ b/lib/rb/spec/server_socket_spec.rb
@@ -17,8 +17,8 @@
 # under the License.
 #
 
-require File.dirname(__FILE__) + '/spec_helper'
-require File.dirname(__FILE__) + "/socket_spec_shared"
+require File.expand_path("#{File.dirname(__FILE__)}/spec_helper")
+require File.expand_path("#{File.dirname(__FILE__)}/socket_spec_shared")
 
 class ThriftServerSocketSpec < Spec::ExampleGroup
   include Thrift
diff --git a/lib/rb/spec/server_spec.rb b/lib/rb/spec/server_spec.rb
index ffe9bff..a633956 100644
--- a/lib/rb/spec/server_spec.rb
+++ b/lib/rb/spec/server_spec.rb
@@ -16,8 +16,7 @@
 # specific language governing permissions and limitations
 # under the License.
 #
-
-require File.dirname(__FILE__) + '/spec_helper'
+require File.expand_path("#{File.dirname(__FILE__)}/spec_helper")
 
 class ThriftServerSpec < Spec::ExampleGroup
   include Thrift
diff --git a/lib/rb/spec/socket_spec.rb b/lib/rb/spec/socket_spec.rb
index dd8b0f9..1825051 100644
--- a/lib/rb/spec/socket_spec.rb
+++ b/lib/rb/spec/socket_spec.rb
@@ -17,8 +17,8 @@
 # under the License.
 #
 
-require File.dirname(__FILE__) + '/spec_helper'
-require File.dirname(__FILE__) + "/socket_spec_shared"
+require File.expand_path("#{File.dirname(__FILE__)}/spec_helper")
+require File.expand_path("#{File.dirname(__FILE__)}/socket_spec_shared")
 
 class ThriftSocketSpec < Spec::ExampleGroup
   include Thrift
diff --git a/lib/rb/spec/socket_spec_shared.rb b/lib/rb/spec/socket_spec_shared.rb
index 6ed77fa..8d2dae7 100644
--- a/lib/rb/spec/socket_spec_shared.rb
+++ b/lib/rb/spec/socket_spec_shared.rb
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-require File.dirname(__FILE__) + '/spec_helper'
+require File.expand_path("#{File.dirname(__FILE__)}/spec_helper")
 
 shared_examples_for "a socket" do
   it "should open a socket" do
diff --git a/lib/rb/spec/struct_spec.rb b/lib/rb/spec/struct_spec.rb
index 04f55ca..12013bd 100644
--- a/lib/rb/spec/struct_spec.rb
+++ b/lib/rb/spec/struct_spec.rb
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-require File.dirname(__FILE__) + '/spec_helper'
+require File.expand_path("#{File.dirname(__FILE__)}/spec_helper")
 
 class ThriftStructSpec < Spec::ExampleGroup
   include Thrift
diff --git a/lib/rb/spec/types_spec.rb b/lib/rb/spec/types_spec.rb
index 7999e92..47a3db1 100644
--- a/lib/rb/spec/types_spec.rb
+++ b/lib/rb/spec/types_spec.rb
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-require File.dirname(__FILE__) + '/spec_helper'
+require File.expand_path("#{File.dirname(__FILE__)}/spec_helper")
 
 class ThriftTypesSpec < Spec::ExampleGroup
   include Thrift
diff --git a/lib/rb/spec/union_spec.rb b/lib/rb/spec/union_spec.rb
index 702e920..fad649c 100644
--- a/lib/rb/spec/union_spec.rb
+++ b/lib/rb/spec/union_spec.rb
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-require File.dirname(__FILE__) + '/spec_helper'
+require File.expand_path("#{File.dirname(__FILE__)}/spec_helper")
 
 class ThriftUnionSpec < Spec::ExampleGroup
   include Thrift
diff --git a/lib/rb/spec/unix_socket_spec.rb b/lib/rb/spec/unix_socket_spec.rb
index df239d7..43818e0 100644
--- a/lib/rb/spec/unix_socket_spec.rb
+++ b/lib/rb/spec/unix_socket_spec.rb
@@ -17,8 +17,8 @@
 # under the License.
 #
 
-require File.dirname(__FILE__) + '/spec_helper'
-require File.dirname(__FILE__) + "/socket_spec_shared"
+require File.expand_path("#{File.dirname(__FILE__)}/spec_helper")
+require File.expand_path("#{File.dirname(__FILE__)}/socket_spec_shared")
 
 class ThriftUNIXSocketSpec < Spec::ExampleGroup
   include Thrift