From 8941458f721a1fcc4220adb7e8c14eddc77f8691 Mon Sep 17 00:00:00 2001 From: Jake Farrell Date: Thu, 10 Nov 2011 00:53:17 +0000 Subject: [PATCH] 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 --- lib/rb/spec/base_protocol_spec.rb | 2 +- lib/rb/spec/base_transport_spec.rb | 2 +- lib/rb/spec/binary_protocol_accelerated_spec.rb | 4 ++-- lib/rb/spec/binary_protocol_spec.rb | 4 ++-- lib/rb/spec/binary_protocol_spec_shared.rb | 2 +- lib/rb/spec/client_spec.rb | 2 +- lib/rb/spec/compact_protocol_spec.rb | 2 +- lib/rb/spec/exception_spec.rb | 2 +- lib/rb/spec/http_client_spec.rb | 2 +- lib/rb/spec/mongrel_http_server_spec.rb | 2 +- lib/rb/spec/nonblocking_server_spec.rb | 2 +- lib/rb/spec/processor_spec.rb | 2 +- lib/rb/spec/serializer_spec.rb | 2 +- lib/rb/spec/server_socket_spec.rb | 4 ++-- lib/rb/spec/server_spec.rb | 3 +-- lib/rb/spec/socket_spec.rb | 4 ++-- lib/rb/spec/socket_spec_shared.rb | 2 +- lib/rb/spec/struct_spec.rb | 2 +- lib/rb/spec/types_spec.rb | 2 +- lib/rb/spec/union_spec.rb | 2 +- lib/rb/spec/unix_socket_spec.rb | 4 ++-- 21 files changed, 26 insertions(+), 27 deletions(-) diff --git a/lib/rb/spec/base_protocol_spec.rb b/lib/rb/spec/base_protocol_spec.rb index efb16d8c..bd9b59b9 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 a29656f9..d91a1181 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 b8518c88..0653ba87 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 6da467e5..0edd9d9d 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 28da7608..0bc91c91 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 e707d816..1550e14b 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 a88a2ae6..2862afd5 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 fc321378..78ddb755 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 c919051c..959880c0 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 c994491c..5375bece 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 ead51d78..72005046 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 d35f6528..d78edac0 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 44339c0b..2ecb85b9 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 fce50134..071acba4 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 ffe9bffa..a6339562 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 dd8b0f92..18250512 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 6ed77fa4..8d2dae72 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 04f55ca6..12013bda 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 7999e92a..47a3db11 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 702e9200..fad649cb 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 df239d7a..43818e0f 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 -- 2.17.1