Author: kclark
Date: Mon Jun 23 18:05:51 2008
New Revision: 670979

URL: http://svn.apache.org/viewvc?rev=670979&view=rev
Log:
rb: require 'thrift' first in generated service definitions [THRIFT-38]

>From [EMAIL PROTECTED]

Modified:
    incubator/thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc
    incubator/thrift/trunk/lib/rb/benchmark/gen-rb/BenchmarkService.rb
    incubator/thrift/trunk/lib/rb/spec/gen-rb/NonblockingService.rb

Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc?rev=670979&r1=670978&r2=670979&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc 
(original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc Mon Jun 
23 18:05:51 2008
@@ -581,6 +581,7 @@
 
   f_service_ <<
     rb_autogen_comment() << endl <<
+    "require 'thrift'" << endl <<
     rb_imports() << endl;
 
   if (tservice->get_extends() != NULL) {
@@ -589,7 +590,6 @@
   }
 
   f_service_ <<
-    "require 'thrift'" << endl <<
     "require '" << program_name_ << "_types'" << endl <<
     endl;
 

Modified: incubator/thrift/trunk/lib/rb/benchmark/gen-rb/BenchmarkService.rb
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/benchmark/gen-rb/BenchmarkService.rb?rev=670979&r1=670978&r2=670979&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/benchmark/gen-rb/BenchmarkService.rb 
(original)
+++ incubator/thrift/trunk/lib/rb/benchmark/gen-rb/BenchmarkService.rb Mon Jun 
23 18:05:51 2008
@@ -4,8 +4,8 @@
 # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 #
 
-require 'thrift/protocol'
 require 'thrift'
+require 'thrift/protocol'
 require 'Benchmark_types'
 
     module ThriftBenchmark

Modified: incubator/thrift/trunk/lib/rb/spec/gen-rb/NonblockingService.rb
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/spec/gen-rb/NonblockingService.rb?rev=670979&r1=670978&r2=670979&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/spec/gen-rb/NonblockingService.rb (original)
+++ incubator/thrift/trunk/lib/rb/spec/gen-rb/NonblockingService.rb Mon Jun 23 
18:05:51 2008
@@ -4,8 +4,8 @@
 # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 #
 
-require 'thrift/protocol'
 require 'thrift'
+require 'thrift/protocol'
 require 'ThriftSpec_types'
 
     module SpecNamespace


Reply via email to