You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by kc...@apache.org on 2009/03/04 22:32:56 UTC
svn commit: r750160 - in /incubator/thrift/trunk:
compiler/cpp/src/generate/t_rb_generator.cc
lib/rb/benchmark/gen-rb/BenchmarkService.rb
lib/rb/spec/gen-rb/NonblockingService.rb
lib/rb/spec/gen-rb/ThriftSpec_types.rb
Author: kclark
Date: Wed Mar 4 21:32:54 2009
New Revision: 750160
URL: http://svn.apache.org/viewvc?rev=750160&view=rev
Log:
THRIFT-353. rb: Capitalize module names on ruby generation
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
incubator/thrift/trunk/lib/rb/spec/gen-rb/ThriftSpec_types.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=750160&r1=750159&r2=750160&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 Wed Mar 4 21:32:54 2009
@@ -638,7 +638,7 @@
begin_namespace(f_service_, ruby_modules(tservice->get_program()));
- indent(f_service_) << "module " << tservice->get_name() << endl;
+ indent(f_service_) << "module " << capitalize(tservice->get_name()) << endl;
indent_up();
// Generate the three main parts of the service (well, two for now in PHP)
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=750160&r1=750159&r2=750160&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/benchmark/gen-rb/BenchmarkService.rb (original)
+++ incubator/thrift/trunk/lib/rb/benchmark/gen-rb/BenchmarkService.rb Wed Mar 4 21:32:54 2009
@@ -11,7 +11,7 @@
module ThriftBenchmark
module BenchmarkService
class Client
- include Thrift::Client
+ include ::Thrift::Client
def fibonacci(n)
send_fibonacci(n)
@@ -31,7 +31,7 @@
end
class Processor
- include Thrift::Processor
+ include ::Thrift::Processor
def process_fibonacci(seqid, iprot, oprot)
args = read_args(iprot, Fibonacci_args)
@@ -45,7 +45,7 @@
# HELPER FUNCTIONS AND STRUCTURES
class Fibonacci_args
- include Thrift::Struct
+ include ::Thrift::Struct
N = 1
Thrift::Struct.field_accessor self, :n
@@ -61,7 +61,7 @@
end
class Fibonacci_result
- include Thrift::Struct
+ include ::Thrift::Struct
SUCCESS = 0
Thrift::Struct.field_accessor self, :success
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=750160&r1=750159&r2=750160&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/spec/gen-rb/NonblockingService.rb (original)
+++ incubator/thrift/trunk/lib/rb/spec/gen-rb/NonblockingService.rb Wed Mar 4 21:32:54 2009
@@ -11,7 +11,7 @@
module SpecNamespace
module NonblockingService
class Client
- include Thrift::Client
+ include ::Thrift::Client
def greeting(english)
send_greeting(english)
@@ -74,7 +74,7 @@
end
class Processor
- include Thrift::Processor
+ include ::Thrift::Processor
def process_greeting(seqid, iprot, oprot)
args = read_args(iprot, Greeting_args)
@@ -114,7 +114,7 @@
# HELPER FUNCTIONS AND STRUCTURES
class Greeting_args
- include Thrift::Struct
+ include ::Thrift::Struct
ENGLISH = 1
Thrift::Struct.field_accessor self, :english
@@ -130,7 +130,7 @@
end
class Greeting_result
- include Thrift::Struct
+ include ::Thrift::Struct
SUCCESS = 0
Thrift::Struct.field_accessor self, :success
@@ -146,7 +146,7 @@
end
class Block_args
- include Thrift::Struct
+ include ::Thrift::Struct
FIELDS = {
@@ -160,7 +160,7 @@
end
class Block_result
- include Thrift::Struct
+ include ::Thrift::Struct
SUCCESS = 0
Thrift::Struct.field_accessor self, :success
@@ -176,7 +176,7 @@
end
class Unblock_args
- include Thrift::Struct
+ include ::Thrift::Struct
N = 1
Thrift::Struct.field_accessor self, :n
@@ -192,7 +192,7 @@
end
class Unblock_result
- include Thrift::Struct
+ include ::Thrift::Struct
FIELDS = {
@@ -206,7 +206,7 @@
end
class Shutdown_args
- include Thrift::Struct
+ include ::Thrift::Struct
FIELDS = {
@@ -220,7 +220,7 @@
end
class Shutdown_result
- include Thrift::Struct
+ include ::Thrift::Struct
FIELDS = {
@@ -234,7 +234,7 @@
end
class Sleep_args
- include Thrift::Struct
+ include ::Thrift::Struct
SECONDS = 1
Thrift::Struct.field_accessor self, :seconds
@@ -250,7 +250,7 @@
end
class Sleep_result
- include Thrift::Struct
+ include ::Thrift::Struct
FIELDS = {
Modified: incubator/thrift/trunk/lib/rb/spec/gen-rb/ThriftSpec_types.rb
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/spec/gen-rb/ThriftSpec_types.rb?rev=750160&r1=750159&r2=750160&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/spec/gen-rb/ThriftSpec_types.rb (original)
+++ incubator/thrift/trunk/lib/rb/spec/gen-rb/ThriftSpec_types.rb Wed Mar 4 21:32:54 2009
@@ -8,7 +8,7 @@
module SpecNamespace
class Hello
- include Thrift::Struct
+ include ::Thrift::Struct
GREETING = 1
Thrift::Struct.field_accessor self, :greeting
@@ -24,7 +24,7 @@
end
class Foo
- include Thrift::Struct
+ include ::Thrift::Struct
SIMPLE = 1
WORDS = 2
HELLO = 3
@@ -62,7 +62,7 @@
end
class BoolStruct
- include Thrift::Struct
+ include ::Thrift::Struct
YESNO = 1
Thrift::Struct.field_accessor self, :yesno
@@ -78,7 +78,7 @@
end
class SimpleList
- include Thrift::Struct
+ include ::Thrift::Struct
BOOLS = 1
BYTES = 2
I16S = 3
@@ -114,7 +114,7 @@
end
class Xception < Thrift::Exception
- include Thrift::Struct
+ include ::Thrift::Struct
MESSAGE = 1
CODE = 2