diff --git a/Rakefile b/Rakefile index 8df9895f..590ad9fe 100644 --- a/Rakefile +++ b/Rakefile @@ -22,7 +22,7 @@ namespace :compile do task :spec do proto_path = ::File.expand_path('../spec/support/', __FILE__) proto_files = Dir[File.join(proto_path, '**', '*.proto')] - cmd = %(protoc --plugin=./bin/protoc-gen-ruby --ruby_out=#{proto_path} -I #{proto_path} #{proto_files.join(' ')}) + cmd = %(protoc --plugin=protoc-gen-ruby-protobuf=./bin/protoc-gen-ruby --ruby-protobuf_out=#{proto_path} -I #{proto_path} #{proto_files.join(' ')}) puts cmd system(cmd) @@ -35,7 +35,7 @@ namespace :compile do output_dir = ::File.expand_path('../tmp/rpc', __FILE__) ::FileUtils.mkdir_p(output_dir) - cmd = %(protoc --plugin=./bin/protoc-gen-ruby --ruby_out=#{output_dir} -I #{proto_path} #{proto_files.join(' ')}) + cmd = %(protoc --plugin=protoc-gen-ruby-protobuf=./bin/protoc-gen-ruby --ruby-protobuf_out=#{output_dir} -I #{proto_path} #{proto_files.join(' ')}) puts cmd system(cmd) diff --git a/lib/protobuf/generators/printable.rb b/lib/protobuf/generators/printable.rb index 3d8fe770..8fe0443e 100644 --- a/lib/protobuf/generators/printable.rb +++ b/lib/protobuf/generators/printable.rb @@ -55,14 +55,13 @@ def indent # as a constant. Otherwise we do not attempt to change the # token's definition. # - # modulize("foo.bar.Baz") -> "::Foo::Bar::Baz" - # modulize("foo.bar.baz") -> "::Foo::Bar::Baz" - # modulize("foo.bar.BAZ") -> "::Foo::Bar::BAZ" + # modulize("foo.bar.Baz") -> "::Foo::Bar::Baz" + # modulize("foo.bar.baz") -> "::Foo::Bar::Baz" + # modulize("foo.bar.baz_boy") -> "::Foo::Bar::BazBoy" + # modulize("foo.bar.BAZ") -> "::Foo::Bar::BAZ" # def modulize(name) - name = name.gsub(/\./, '::') - name = name.gsub(/(^(?:::)?[a-z]|::[a-z])/, &:upcase) - name + name.split('.').map(&:camelize).join('::') end # Decrease the indent level. Cannot be negative. diff --git a/spec/encoding/all_types_spec.rb b/spec/encoding/all_types_spec.rb index fbd38b46..3de7dbbe 100644 --- a/spec/encoding/all_types_spec.rb +++ b/spec/encoding/all_types_spec.rb @@ -3,7 +3,7 @@ RSpec.describe ::Protobuf do it "correctly encodes all types" do - message = Protobuf_unittest::TestAllTypes.new( + message = ProtobufUnittest::TestAllTypes.new( :optional_int32 => 101, :optional_int64 => 102, :optional_uint32 => 103, @@ -19,16 +19,16 @@ :optional_bool => true, :optional_string => "115", :optional_bytes => "116", - :optional_nested_message => Protobuf_unittest::TestAllTypes::NestedMessage.new(:bb => 118), - :optional_foreign_message => Protobuf_unittest::ForeignMessage.new(:c => 119), - :optional_import_message => Protobuf_unittest_import::ImportMessage.new(:d => 120), - :optional_nested_enum => Protobuf_unittest::TestAllTypes::NestedEnum::BAZ, - :optional_foreign_enum => Protobuf_unittest::ForeignEnum::FOREIGN_BAZ, - :optional_import_enum => Protobuf_unittest_import::ImportEnum::IMPORT_BAZ, + :optional_nested_message => ProtobufUnittest::TestAllTypes::NestedMessage.new(:bb => 118), + :optional_foreign_message => ProtobufUnittest::ForeignMessage.new(:c => 119), + :optional_import_message => ProtobufUnittestImport::ImportMessage.new(:d => 120), + :optional_nested_enum => ProtobufUnittest::TestAllTypes::NestedEnum::BAZ, + :optional_foreign_enum => ProtobufUnittest::ForeignEnum::FOREIGN_BAZ, + :optional_import_enum => ProtobufUnittestImport::ImportEnum::IMPORT_BAZ, :optional_string_piece => "124", :optional_cord => "125", - :optional_public_import_message => Protobuf_unittest_import::PublicImportMessage.new(:e => 126), - :optional_lazy_message => Protobuf_unittest::TestAllTypes::NestedMessage.new(:bb => 127), + :optional_public_import_message => ProtobufUnittestImport::PublicImportMessage.new(:e => 126), + :optional_lazy_message => ProtobufUnittest::TestAllTypes::NestedMessage.new(:bb => 127), :repeated_int32 => [201, 301], :repeated_int64 => [202, 302], :repeated_uint32 => [203, 303], @@ -45,34 +45,34 @@ :repeated_string => ["215", "315"], :repeated_bytes => ["216", "316"], :repeated_nested_message => [ - ::Protobuf_unittest::TestAllTypes::NestedMessage.new(:bb => 218), - ::Protobuf_unittest::TestAllTypes::NestedMessage.new(:bb => 318), + ::ProtobufUnittest::TestAllTypes::NestedMessage.new(:bb => 218), + ::ProtobufUnittest::TestAllTypes::NestedMessage.new(:bb => 318), ], :repeated_foreign_message => [ - ::Protobuf_unittest::ForeignMessage.new(:c => 219), - ::Protobuf_unittest::ForeignMessage.new(:c => 319), + ::ProtobufUnittest::ForeignMessage.new(:c => 219), + ::ProtobufUnittest::ForeignMessage.new(:c => 319), ], :repeated_import_message => [ - ::Protobuf_unittest_import::ImportMessage.new(:d => 220), - ::Protobuf_unittest_import::ImportMessage.new(:d => 320), + ::ProtobufUnittestImport::ImportMessage.new(:d => 220), + ::ProtobufUnittestImport::ImportMessage.new(:d => 320), ], :repeated_nested_enum => [ - ::Protobuf_unittest::TestAllTypes::NestedEnum::BAR, - ::Protobuf_unittest::TestAllTypes::NestedEnum::BAZ, + ::ProtobufUnittest::TestAllTypes::NestedEnum::BAR, + ::ProtobufUnittest::TestAllTypes::NestedEnum::BAZ, ], :repeated_foreign_enum => [ - ::Protobuf_unittest::ForeignEnum::FOREIGN_BAR, - ::Protobuf_unittest::ForeignEnum::FOREIGN_BAZ, + ::ProtobufUnittest::ForeignEnum::FOREIGN_BAR, + ::ProtobufUnittest::ForeignEnum::FOREIGN_BAZ, ], :repeated_import_enum => [ - ::Protobuf_unittest_import::ImportEnum::IMPORT_BAR, - ::Protobuf_unittest_import::ImportEnum::IMPORT_BAZ, + ::ProtobufUnittestImport::ImportEnum::IMPORT_BAR, + ::ProtobufUnittestImport::ImportEnum::IMPORT_BAZ, ], :repeated_string_piece => ["224", "324"], :repeated_cord => ["225", "325"], :repeated_lazy_message => [ - ::Protobuf_unittest::TestAllTypes::NestedMessage.new(:bb => 227), - ::Protobuf_unittest::TestAllTypes::NestedMessage.new(:bb => 327), + ::ProtobufUnittest::TestAllTypes::NestedMessage.new(:bb => 227), + ::ProtobufUnittest::TestAllTypes::NestedMessage.new(:bb => 327), ], :default_int32 => 401, :default_int64 => 402, @@ -89,9 +89,9 @@ :default_bool => false, :default_string => "415", :default_bytes => "416", - :default_nested_enum => ::Protobuf_unittest::TestAllTypes::NestedEnum::FOO, - :default_foreign_enum => ::Protobuf_unittest::ForeignEnum::FOREIGN_FOO, - :default_import_enum => ::Protobuf_unittest_import::ImportEnum::IMPORT_FOO, + :default_nested_enum => ::ProtobufUnittest::TestAllTypes::NestedEnum::FOO, + :default_foreign_enum => ::ProtobufUnittest::ForeignEnum::FOREIGN_FOO, + :default_import_enum => ::ProtobufUnittestImport::ImportEnum::IMPORT_FOO, :default_string_piece => "424", :default_cord => "425", ) diff --git a/spec/encoding/extreme_values_spec.rb b/spec/encoding/extreme_values_spec.rb index 477e695a..038f594b 100644 Binary files a/spec/encoding/extreme_values_spec.rb and b/spec/encoding/extreme_values_spec.rb differ diff --git a/spec/lib/protobuf/generators/file_generator_spec.rb b/spec/lib/protobuf/generators/file_generator_spec.rb index 51a6156f..862ec0e4 100644 --- a/spec/lib/protobuf/generators/file_generator_spec.rb +++ b/spec/lib/protobuf/generators/file_generator_spec.rb @@ -95,7 +95,7 @@ module Foo module Test module Pkg - module File_generator_spec + module FileGeneratorSpec ::Protobuf::Optionable.inject(self) { ::Google::Protobuf::FileOptions } ## diff --git a/spec/support/google/protobuf/descriptor.pb.rb b/spec/support/google/protobuf/descriptor.pb.rb new file mode 100644 index 00000000..ed8b1661 --- /dev/null +++ b/spec/support/google/protobuf/descriptor.pb.rb @@ -0,0 +1,359 @@ +# encoding: utf-8 + +## +# This file is auto-generated. DO NOT EDIT! +# +require 'protobuf' + +module Google + module Protobuf + ::Protobuf::Optionable.inject(self) { ::Google::Protobuf::FileOptions } + + ## + # Message Classes + # + class FileDescriptorSet < ::Protobuf::Message; end + class FileDescriptorProto < ::Protobuf::Message; end + class DescriptorProto < ::Protobuf::Message + class ExtensionRange < ::Protobuf::Message; end + class ReservedRange < ::Protobuf::Message; end + + end + + class ExtensionRangeOptions < ::Protobuf::Message; end + class FieldDescriptorProto < ::Protobuf::Message + class Type < ::Protobuf::Enum + define :TYPE_DOUBLE, 1 + define :TYPE_FLOAT, 2 + define :TYPE_INT64, 3 + define :TYPE_UINT64, 4 + define :TYPE_INT32, 5 + define :TYPE_FIXED64, 6 + define :TYPE_FIXED32, 7 + define :TYPE_BOOL, 8 + define :TYPE_STRING, 9 + define :TYPE_GROUP, 10 + define :TYPE_MESSAGE, 11 + define :TYPE_BYTES, 12 + define :TYPE_UINT32, 13 + define :TYPE_ENUM, 14 + define :TYPE_SFIXED32, 15 + define :TYPE_SFIXED64, 16 + define :TYPE_SINT32, 17 + define :TYPE_SINT64, 18 + end + + class Label < ::Protobuf::Enum + define :LABEL_OPTIONAL, 1 + define :LABEL_REQUIRED, 2 + define :LABEL_REPEATED, 3 + end + + end + + class OneofDescriptorProto < ::Protobuf::Message; end + class EnumDescriptorProto < ::Protobuf::Message + class EnumReservedRange < ::Protobuf::Message; end + + end + + class EnumValueDescriptorProto < ::Protobuf::Message; end + class ServiceDescriptorProto < ::Protobuf::Message; end + class MethodDescriptorProto < ::Protobuf::Message; end + class FileOptions < ::Protobuf::Message + class OptimizeMode < ::Protobuf::Enum + define :SPEED, 1 + define :CODE_SIZE, 2 + define :LITE_RUNTIME, 3 + end + + end + + class MessageOptions < ::Protobuf::Message; end + class FieldOptions < ::Protobuf::Message + class CType < ::Protobuf::Enum + define :STRING, 0 + define :CORD, 1 + define :STRING_PIECE, 2 + end + + class JSType < ::Protobuf::Enum + define :JS_NORMAL, 0 + define :JS_STRING, 1 + define :JS_NUMBER, 2 + end + + end + + class OneofOptions < ::Protobuf::Message; end + class EnumOptions < ::Protobuf::Message; end + class EnumValueOptions < ::Protobuf::Message; end + class ServiceOptions < ::Protobuf::Message; end + class MethodOptions < ::Protobuf::Message + class IdempotencyLevel < ::Protobuf::Enum + define :IDEMPOTENCY_UNKNOWN, 0 + define :NO_SIDE_EFFECTS, 1 + define :IDEMPOTENT, 2 + end + + end + + class UninterpretedOption < ::Protobuf::Message + class NamePart < ::Protobuf::Message; end + + end + + class SourceCodeInfo < ::Protobuf::Message + class Location < ::Protobuf::Message; end + + end + + class GeneratedCodeInfo < ::Protobuf::Message + class Annotation < ::Protobuf::Message; end + + end + + + + ## + # File Options + # + set_option :java_package, "com.google.protobuf" + set_option :java_outer_classname, "DescriptorProtos" + set_option :optimize_for, ::Google::Protobuf::FileOptions::OptimizeMode::SPEED + set_option :go_package, "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor" + set_option :cc_enable_arenas, true + set_option :objc_class_prefix, "GPB" + set_option :csharp_namespace, "Google.Protobuf.Reflection" + + + ## + # Message Fields + # + class FileDescriptorSet + repeated ::Google::Protobuf::FileDescriptorProto, :file, 1 + end + + class FileDescriptorProto + optional :string, :name, 1 + optional :string, :package, 2 + repeated :string, :dependency, 3 + repeated :int32, :public_dependency, 10 + repeated :int32, :weak_dependency, 11 + repeated ::Google::Protobuf::DescriptorProto, :message_type, 4 + repeated ::Google::Protobuf::EnumDescriptorProto, :enum_type, 5 + repeated ::Google::Protobuf::ServiceDescriptorProto, :service, 6 + repeated ::Google::Protobuf::FieldDescriptorProto, :extension, 7 + optional ::Google::Protobuf::FileOptions, :options, 8 + optional ::Google::Protobuf::SourceCodeInfo, :source_code_info, 9 + optional :string, :syntax, 12 + end + + class DescriptorProto + class ExtensionRange + optional :int32, :start, 1 + optional :int32, :end, 2 + optional ::Google::Protobuf::ExtensionRangeOptions, :options, 3 + end + + class ReservedRange + optional :int32, :start, 1 + optional :int32, :end, 2 + end + + optional :string, :name, 1 + repeated ::Google::Protobuf::FieldDescriptorProto, :field, 2 + repeated ::Google::Protobuf::FieldDescriptorProto, :extension, 6 + repeated ::Google::Protobuf::DescriptorProto, :nested_type, 3 + repeated ::Google::Protobuf::EnumDescriptorProto, :enum_type, 4 + repeated ::Google::Protobuf::DescriptorProto::ExtensionRange, :extension_range, 5 + repeated ::Google::Protobuf::OneofDescriptorProto, :oneof_decl, 8 + optional ::Google::Protobuf::MessageOptions, :options, 7 + repeated ::Google::Protobuf::DescriptorProto::ReservedRange, :reserved_range, 9 + repeated :string, :reserved_name, 10 + end + + class ExtensionRangeOptions + repeated ::Google::Protobuf::UninterpretedOption, :uninterpreted_option, 999 + # Extension Fields + extensions 1000...536870912 + end + + class FieldDescriptorProto + optional :string, :name, 1 + optional :int32, :number, 3 + optional ::Google::Protobuf::FieldDescriptorProto::Label, :label, 4 + optional ::Google::Protobuf::FieldDescriptorProto::Type, :type, 5 + optional :string, :type_name, 6 + optional :string, :extendee, 2 + optional :string, :default_value, 7 + optional :int32, :oneof_index, 9 + optional :string, :json_name, 10 + optional ::Google::Protobuf::FieldOptions, :options, 8 + end + + class OneofDescriptorProto + optional :string, :name, 1 + optional ::Google::Protobuf::OneofOptions, :options, 2 + end + + class EnumDescriptorProto + class EnumReservedRange + optional :int32, :start, 1 + optional :int32, :end, 2 + end + + optional :string, :name, 1 + repeated ::Google::Protobuf::EnumValueDescriptorProto, :value, 2 + optional ::Google::Protobuf::EnumOptions, :options, 3 + repeated ::Google::Protobuf::EnumDescriptorProto::EnumReservedRange, :reserved_range, 4 + repeated :string, :reserved_name, 5 + end + + class EnumValueDescriptorProto + optional :string, :name, 1 + optional :int32, :number, 2 + optional ::Google::Protobuf::EnumValueOptions, :options, 3 + end + + class ServiceDescriptorProto + optional :string, :name, 1 + repeated ::Google::Protobuf::MethodDescriptorProto, :method, 2 + optional ::Google::Protobuf::ServiceOptions, :options, 3 + end + + class MethodDescriptorProto + optional :string, :name, 1 + optional :string, :input_type, 2 + optional :string, :output_type, 3 + optional ::Google::Protobuf::MethodOptions, :options, 4 + optional :bool, :client_streaming, 5, :default => false + optional :bool, :server_streaming, 6, :default => false + end + + class FileOptions + optional :string, :java_package, 1 + optional :string, :java_outer_classname, 8 + optional :bool, :java_multiple_files, 10, :default => false + optional :bool, :java_generate_equals_and_hash, 20, :deprecated => true + optional :bool, :java_string_check_utf8, 27, :default => false + optional ::Google::Protobuf::FileOptions::OptimizeMode, :optimize_for, 9, :default => ::Google::Protobuf::FileOptions::OptimizeMode::SPEED + optional :string, :go_package, 11 + optional :bool, :cc_generic_services, 16, :default => false + optional :bool, :java_generic_services, 17, :default => false + optional :bool, :py_generic_services, 18, :default => false + optional :bool, :php_generic_services, 42, :default => false + optional :bool, :deprecated, 23, :default => false + optional :bool, :cc_enable_arenas, 31, :default => false + optional :string, :objc_class_prefix, 36 + optional :string, :csharp_namespace, 37 + optional :string, :swift_prefix, 39 + optional :string, :php_class_prefix, 40 + optional :string, :php_namespace, 41 + optional :string, :php_metadata_namespace, 44 + optional :string, :ruby_package, 45 + repeated ::Google::Protobuf::UninterpretedOption, :uninterpreted_option, 999 + # Extension Fields + extensions 1000...536870912 + end + + class MessageOptions + optional :bool, :message_set_wire_format, 1, :default => false + optional :bool, :no_standard_descriptor_accessor, 2, :default => false + optional :bool, :deprecated, 3, :default => false + optional :bool, :map_entry, 7 + repeated ::Google::Protobuf::UninterpretedOption, :uninterpreted_option, 999 + # Extension Fields + extensions 1000...536870912 + end + + class FieldOptions + optional ::Google::Protobuf::FieldOptions::CType, :ctype, 1, :default => ::Google::Protobuf::FieldOptions::CType::STRING + optional :bool, :packed, 2 + optional ::Google::Protobuf::FieldOptions::JSType, :jstype, 6, :default => ::Google::Protobuf::FieldOptions::JSType::JS_NORMAL + optional :bool, :lazy, 5, :default => false + optional :bool, :deprecated, 3, :default => false + optional :bool, :weak, 10, :default => false + repeated ::Google::Protobuf::UninterpretedOption, :uninterpreted_option, 999 + # Extension Fields + extensions 1000...536870912 + end + + class OneofOptions + repeated ::Google::Protobuf::UninterpretedOption, :uninterpreted_option, 999 + # Extension Fields + extensions 1000...536870912 + end + + class EnumOptions + optional :bool, :allow_alias, 2 + optional :bool, :deprecated, 3, :default => false + repeated ::Google::Protobuf::UninterpretedOption, :uninterpreted_option, 999 + # Extension Fields + extensions 1000...536870912 + end + + class EnumValueOptions + optional :bool, :deprecated, 1, :default => false + repeated ::Google::Protobuf::UninterpretedOption, :uninterpreted_option, 999 + # Extension Fields + extensions 1000...536870912 + end + + class ServiceOptions + optional :bool, :deprecated, 33, :default => false + repeated ::Google::Protobuf::UninterpretedOption, :uninterpreted_option, 999 + # Extension Fields + extensions 1000...536870912 + end + + class MethodOptions + optional :bool, :deprecated, 33, :default => false + optional ::Google::Protobuf::MethodOptions::IdempotencyLevel, :idempotency_level, 34, :default => ::Google::Protobuf::MethodOptions::IdempotencyLevel::IDEMPOTENCY_UNKNOWN + repeated ::Google::Protobuf::UninterpretedOption, :uninterpreted_option, 999 + # Extension Fields + extensions 1000...536870912 + end + + class UninterpretedOption + class NamePart + required :string, :name_part, 1 + required :bool, :is_extension, 2 + end + + repeated ::Google::Protobuf::UninterpretedOption::NamePart, :name, 2 + optional :string, :identifier_value, 3 + optional :uint64, :positive_int_value, 4 + optional :int64, :negative_int_value, 5 + optional :double, :double_value, 6 + optional :bytes, :string_value, 7 + optional :string, :aggregate_value, 8 + end + + class SourceCodeInfo + class Location + repeated :int32, :path, 1, :packed => true + repeated :int32, :span, 2, :packed => true + optional :string, :leading_comments, 3 + optional :string, :trailing_comments, 4 + repeated :string, :leading_detached_comments, 6 + end + + repeated ::Google::Protobuf::SourceCodeInfo::Location, :location, 1 + end + + class GeneratedCodeInfo + class Annotation + repeated :int32, :path, 1, :packed => true + optional :string, :source_file, 2 + optional :int32, :begin, 3 + optional :int32, :end, 4 + end + + repeated ::Google::Protobuf::GeneratedCodeInfo::Annotation, :annotation, 1 + end + + end + +end + diff --git a/spec/support/protos/google_unittest.pb.rb b/spec/support/protos/google_unittest.pb.rb index c2c7d650..b149653c 100644 --- a/spec/support/protos/google_unittest.pb.rb +++ b/spec/support/protos/google_unittest.pb.rb @@ -12,7 +12,7 @@ # require 'protos/google_unittest_import.pb' -module Protobuf_unittest +module ProtobufUnittest ::Protobuf::Optionable.inject(self) { ::Google::Protobuf::FileOptions } ## @@ -67,8 +67,8 @@ class TestDeprecatedFields < ::Protobuf::Message; end class ForeignMessage < ::Protobuf::Message; end class TestReservedFields < ::Protobuf::Message; end class TestAllExtensions < ::Protobuf::Message; end - class OptionalGroup_extension < ::Protobuf::Message; end - class RepeatedGroup_extension < ::Protobuf::Message; end + class OptionalGroupExtension < ::Protobuf::Message; end + class RepeatedGroupExtension < ::Protobuf::Message; end class TestNestedExtension < ::Protobuf::Message; end class TestMoreNestedExtension < ::Protobuf::Message; end class TestRequired < ::Protobuf::Message; end @@ -217,17 +217,17 @@ class RepeatedGroup optional :bool, :optional_bool, 13 optional :string, :optional_string, 14 optional :bytes, :optional_bytes, 15 - optional ::Protobuf_unittest::TestAllTypes::OptionalGroup, :optionalgroup, 16 - optional ::Protobuf_unittest::TestAllTypes::NestedMessage, :optional_nested_message, 18 - optional ::Protobuf_unittest::ForeignMessage, :optional_foreign_message, 19 - optional ::Protobuf_unittest_import::ImportMessage, :optional_import_message, 20 - optional ::Protobuf_unittest::TestAllTypes::NestedEnum, :optional_nested_enum, 21 - optional ::Protobuf_unittest::ForeignEnum, :optional_foreign_enum, 22 - optional ::Protobuf_unittest_import::ImportEnum, :optional_import_enum, 23 + optional ::ProtobufUnittest::TestAllTypes::OptionalGroup, :optionalgroup, 16 + optional ::ProtobufUnittest::TestAllTypes::NestedMessage, :optional_nested_message, 18 + optional ::ProtobufUnittest::ForeignMessage, :optional_foreign_message, 19 + optional ::ProtobufUnittestImport::ImportMessage, :optional_import_message, 20 + optional ::ProtobufUnittest::TestAllTypes::NestedEnum, :optional_nested_enum, 21 + optional ::ProtobufUnittest::ForeignEnum, :optional_foreign_enum, 22 + optional ::ProtobufUnittestImport::ImportEnum, :optional_import_enum, 23 optional :string, :optional_string_piece, 24, :ctype => ::Google::Protobuf::FieldOptions::CType::STRING_PIECE optional :string, :optional_cord, 25, :ctype => ::Google::Protobuf::FieldOptions::CType::CORD - optional ::Protobuf_unittest_import::PublicImportMessage, :optional_public_import_message, 26 - optional ::Protobuf_unittest::TestAllTypes::NestedMessage, :optional_lazy_message, 27, :lazy => true + optional ::ProtobufUnittestImport::PublicImportMessage, :optional_public_import_message, 26 + optional ::ProtobufUnittest::TestAllTypes::NestedMessage, :optional_lazy_message, 27, :lazy => true repeated :int32, :repeated_int32, 31 repeated :int64, :repeated_int64, 32 repeated :uint32, :repeated_uint32, 33 @@ -243,16 +243,16 @@ class RepeatedGroup repeated :bool, :repeated_bool, 43 repeated :string, :repeated_string, 44 repeated :bytes, :repeated_bytes, 45 - repeated ::Protobuf_unittest::TestAllTypes::RepeatedGroup, :repeatedgroup, 46 - repeated ::Protobuf_unittest::TestAllTypes::NestedMessage, :repeated_nested_message, 48 - repeated ::Protobuf_unittest::ForeignMessage, :repeated_foreign_message, 49 - repeated ::Protobuf_unittest_import::ImportMessage, :repeated_import_message, 50 - repeated ::Protobuf_unittest::TestAllTypes::NestedEnum, :repeated_nested_enum, 51 - repeated ::Protobuf_unittest::ForeignEnum, :repeated_foreign_enum, 52 - repeated ::Protobuf_unittest_import::ImportEnum, :repeated_import_enum, 53 + repeated ::ProtobufUnittest::TestAllTypes::RepeatedGroup, :repeatedgroup, 46 + repeated ::ProtobufUnittest::TestAllTypes::NestedMessage, :repeated_nested_message, 48 + repeated ::ProtobufUnittest::ForeignMessage, :repeated_foreign_message, 49 + repeated ::ProtobufUnittestImport::ImportMessage, :repeated_import_message, 50 + repeated ::ProtobufUnittest::TestAllTypes::NestedEnum, :repeated_nested_enum, 51 + repeated ::ProtobufUnittest::ForeignEnum, :repeated_foreign_enum, 52 + repeated ::ProtobufUnittestImport::ImportEnum, :repeated_import_enum, 53 repeated :string, :repeated_string_piece, 54, :ctype => ::Google::Protobuf::FieldOptions::CType::STRING_PIECE repeated :string, :repeated_cord, 55, :ctype => ::Google::Protobuf::FieldOptions::CType::CORD - repeated ::Protobuf_unittest::TestAllTypes::NestedMessage, :repeated_lazy_message, 57, :lazy => true + repeated ::ProtobufUnittest::TestAllTypes::NestedMessage, :repeated_lazy_message, 57, :lazy => true optional :int32, :default_int32, 61, :default => 41 optional :int64, :default_int64, 62, :default => 42 optional :uint32, :default_uint32, 63, :default => 43 @@ -268,21 +268,21 @@ class RepeatedGroup optional :bool, :default_bool, 73, :default => true optional :string, :default_string, 74, :default => "hello" optional :bytes, :default_bytes, 75, :default => "world" - optional ::Protobuf_unittest::TestAllTypes::NestedEnum, :default_nested_enum, 81, :default => ::Protobuf_unittest::TestAllTypes::NestedEnum::BAR - optional ::Protobuf_unittest::ForeignEnum, :default_foreign_enum, 82, :default => ::Protobuf_unittest::ForeignEnum::FOREIGN_BAR - optional ::Protobuf_unittest_import::ImportEnum, :default_import_enum, 83, :default => ::Protobuf_unittest_import::ImportEnum::IMPORT_BAR + optional ::ProtobufUnittest::TestAllTypes::NestedEnum, :default_nested_enum, 81, :default => ::ProtobufUnittest::TestAllTypes::NestedEnum::BAR + optional ::ProtobufUnittest::ForeignEnum, :default_foreign_enum, 82, :default => ::ProtobufUnittest::ForeignEnum::FOREIGN_BAR + optional ::ProtobufUnittestImport::ImportEnum, :default_import_enum, 83, :default => ::ProtobufUnittestImport::ImportEnum::IMPORT_BAR optional :string, :default_string_piece, 84, :default => "abc", :ctype => ::Google::Protobuf::FieldOptions::CType::STRING_PIECE optional :string, :default_cord, 85, :default => "123", :ctype => ::Google::Protobuf::FieldOptions::CType::CORD optional :uint32, :oneof_uint32, 111 - optional ::Protobuf_unittest::TestAllTypes::NestedMessage, :oneof_nested_message, 112 + optional ::ProtobufUnittest::TestAllTypes::NestedMessage, :oneof_nested_message, 112 optional :string, :oneof_string, 113 optional :bytes, :oneof_bytes, 114 end class NestedTestAllTypes - optional ::Protobuf_unittest::NestedTestAllTypes, :child, 1 - optional ::Protobuf_unittest::TestAllTypes, :payload, 2 - repeated ::Protobuf_unittest::NestedTestAllTypes, :repeated_child, 3 + optional ::ProtobufUnittest::NestedTestAllTypes, :child, 1 + optional ::ProtobufUnittest::TestAllTypes, :payload, 2 + repeated ::ProtobufUnittest::NestedTestAllTypes, :repeated_child, 3 end class TestDeprecatedFields @@ -311,17 +311,17 @@ class TestAllExtensions optional :bool, :".protobuf_unittest.optional_bool_extension", 13, :extension => true optional :string, :".protobuf_unittest.optional_string_extension", 14, :extension => true optional :bytes, :".protobuf_unittest.optional_bytes_extension", 15, :extension => true - optional ::Protobuf_unittest::OptionalGroup_extension, :".protobuf_unittest.optionalgroup_extension", 16, :extension => true - optional ::Protobuf_unittest::TestAllTypes::NestedMessage, :".protobuf_unittest.optional_nested_message_extension", 18, :extension => true - optional ::Protobuf_unittest::ForeignMessage, :".protobuf_unittest.optional_foreign_message_extension", 19, :extension => true - optional ::Protobuf_unittest_import::ImportMessage, :".protobuf_unittest.optional_import_message_extension", 20, :extension => true - optional ::Protobuf_unittest::TestAllTypes::NestedEnum, :".protobuf_unittest.optional_nested_enum_extension", 21, :extension => true - optional ::Protobuf_unittest::ForeignEnum, :".protobuf_unittest.optional_foreign_enum_extension", 22, :extension => true - optional ::Protobuf_unittest_import::ImportEnum, :".protobuf_unittest.optional_import_enum_extension", 23, :extension => true + optional ::ProtobufUnittest::OptionalGroupExtension, :".protobuf_unittest.optionalgroup_extension", 16, :extension => true + optional ::ProtobufUnittest::TestAllTypes::NestedMessage, :".protobuf_unittest.optional_nested_message_extension", 18, :extension => true + optional ::ProtobufUnittest::ForeignMessage, :".protobuf_unittest.optional_foreign_message_extension", 19, :extension => true + optional ::ProtobufUnittestImport::ImportMessage, :".protobuf_unittest.optional_import_message_extension", 20, :extension => true + optional ::ProtobufUnittest::TestAllTypes::NestedEnum, :".protobuf_unittest.optional_nested_enum_extension", 21, :extension => true + optional ::ProtobufUnittest::ForeignEnum, :".protobuf_unittest.optional_foreign_enum_extension", 22, :extension => true + optional ::ProtobufUnittestImport::ImportEnum, :".protobuf_unittest.optional_import_enum_extension", 23, :extension => true optional :string, :".protobuf_unittest.optional_string_piece_extension", 24, :extension => true, :ctype => ::Google::Protobuf::FieldOptions::CType::STRING_PIECE optional :string, :".protobuf_unittest.optional_cord_extension", 25, :extension => true, :ctype => ::Google::Protobuf::FieldOptions::CType::CORD - optional ::Protobuf_unittest_import::PublicImportMessage, :".protobuf_unittest.optional_public_import_message_extension", 26, :extension => true - optional ::Protobuf_unittest::TestAllTypes::NestedMessage, :".protobuf_unittest.optional_lazy_message_extension", 27, :extension => true, :lazy => true + optional ::ProtobufUnittestImport::PublicImportMessage, :".protobuf_unittest.optional_public_import_message_extension", 26, :extension => true + optional ::ProtobufUnittest::TestAllTypes::NestedMessage, :".protobuf_unittest.optional_lazy_message_extension", 27, :extension => true, :lazy => true repeated :int32, :".protobuf_unittest.repeated_int32_extension", 31, :extension => true repeated :int64, :".protobuf_unittest.repeated_int64_extension", 32, :extension => true repeated :uint32, :".protobuf_unittest.repeated_uint32_extension", 33, :extension => true @@ -337,16 +337,16 @@ class TestAllExtensions repeated :bool, :".protobuf_unittest.repeated_bool_extension", 43, :extension => true repeated :string, :".protobuf_unittest.repeated_string_extension", 44, :extension => true repeated :bytes, :".protobuf_unittest.repeated_bytes_extension", 45, :extension => true - repeated ::Protobuf_unittest::RepeatedGroup_extension, :".protobuf_unittest.repeatedgroup_extension", 46, :extension => true - repeated ::Protobuf_unittest::TestAllTypes::NestedMessage, :".protobuf_unittest.repeated_nested_message_extension", 48, :extension => true - repeated ::Protobuf_unittest::ForeignMessage, :".protobuf_unittest.repeated_foreign_message_extension", 49, :extension => true - repeated ::Protobuf_unittest_import::ImportMessage, :".protobuf_unittest.repeated_import_message_extension", 50, :extension => true - repeated ::Protobuf_unittest::TestAllTypes::NestedEnum, :".protobuf_unittest.repeated_nested_enum_extension", 51, :extension => true - repeated ::Protobuf_unittest::ForeignEnum, :".protobuf_unittest.repeated_foreign_enum_extension", 52, :extension => true - repeated ::Protobuf_unittest_import::ImportEnum, :".protobuf_unittest.repeated_import_enum_extension", 53, :extension => true + repeated ::ProtobufUnittest::RepeatedGroupExtension, :".protobuf_unittest.repeatedgroup_extension", 46, :extension => true + repeated ::ProtobufUnittest::TestAllTypes::NestedMessage, :".protobuf_unittest.repeated_nested_message_extension", 48, :extension => true + repeated ::ProtobufUnittest::ForeignMessage, :".protobuf_unittest.repeated_foreign_message_extension", 49, :extension => true + repeated ::ProtobufUnittestImport::ImportMessage, :".protobuf_unittest.repeated_import_message_extension", 50, :extension => true + repeated ::ProtobufUnittest::TestAllTypes::NestedEnum, :".protobuf_unittest.repeated_nested_enum_extension", 51, :extension => true + repeated ::ProtobufUnittest::ForeignEnum, :".protobuf_unittest.repeated_foreign_enum_extension", 52, :extension => true + repeated ::ProtobufUnittestImport::ImportEnum, :".protobuf_unittest.repeated_import_enum_extension", 53, :extension => true repeated :string, :".protobuf_unittest.repeated_string_piece_extension", 54, :extension => true, :ctype => ::Google::Protobuf::FieldOptions::CType::STRING_PIECE repeated :string, :".protobuf_unittest.repeated_cord_extension", 55, :extension => true, :ctype => ::Google::Protobuf::FieldOptions::CType::CORD - repeated ::Protobuf_unittest::TestAllTypes::NestedMessage, :".protobuf_unittest.repeated_lazy_message_extension", 57, :extension => true, :lazy => true + repeated ::ProtobufUnittest::TestAllTypes::NestedMessage, :".protobuf_unittest.repeated_lazy_message_extension", 57, :extension => true, :lazy => true optional :int32, :".protobuf_unittest.default_int32_extension", 61, :default => 41, :extension => true optional :int64, :".protobuf_unittest.default_int64_extension", 62, :default => 42, :extension => true optional :uint32, :".protobuf_unittest.default_uint32_extension", 63, :default => 43, :extension => true @@ -362,27 +362,27 @@ class TestAllExtensions optional :bool, :".protobuf_unittest.default_bool_extension", 73, :default => true, :extension => true optional :string, :".protobuf_unittest.default_string_extension", 74, :default => "hello", :extension => true optional :bytes, :".protobuf_unittest.default_bytes_extension", 75, :default => "world", :extension => true - optional ::Protobuf_unittest::TestAllTypes::NestedEnum, :".protobuf_unittest.default_nested_enum_extension", 81, :default => ::Protobuf_unittest::TestAllTypes::NestedEnum::BAR, :extension => true - optional ::Protobuf_unittest::ForeignEnum, :".protobuf_unittest.default_foreign_enum_extension", 82, :default => ::Protobuf_unittest::ForeignEnum::FOREIGN_BAR, :extension => true - optional ::Protobuf_unittest_import::ImportEnum, :".protobuf_unittest.default_import_enum_extension", 83, :default => ::Protobuf_unittest_import::ImportEnum::IMPORT_BAR, :extension => true + optional ::ProtobufUnittest::TestAllTypes::NestedEnum, :".protobuf_unittest.default_nested_enum_extension", 81, :default => ::ProtobufUnittest::TestAllTypes::NestedEnum::BAR, :extension => true + optional ::ProtobufUnittest::ForeignEnum, :".protobuf_unittest.default_foreign_enum_extension", 82, :default => ::ProtobufUnittest::ForeignEnum::FOREIGN_BAR, :extension => true + optional ::ProtobufUnittestImport::ImportEnum, :".protobuf_unittest.default_import_enum_extension", 83, :default => ::ProtobufUnittestImport::ImportEnum::IMPORT_BAR, :extension => true optional :string, :".protobuf_unittest.default_string_piece_extension", 84, :default => "abc", :extension => true, :ctype => ::Google::Protobuf::FieldOptions::CType::STRING_PIECE optional :string, :".protobuf_unittest.default_cord_extension", 85, :default => "123", :extension => true, :ctype => ::Google::Protobuf::FieldOptions::CType::CORD optional :uint32, :".protobuf_unittest.oneof_uint32_extension", 111, :extension => true - optional ::Protobuf_unittest::TestAllTypes::NestedMessage, :".protobuf_unittest.oneof_nested_message_extension", 112, :extension => true + optional ::ProtobufUnittest::TestAllTypes::NestedMessage, :".protobuf_unittest.oneof_nested_message_extension", 112, :extension => true optional :string, :".protobuf_unittest.oneof_string_extension", 113, :extension => true optional :bytes, :".protobuf_unittest.oneof_bytes_extension", 114, :extension => true optional :string, :".protobuf_unittest.TestNestedExtension.test", 1002, :default => "test", :extension => true optional :string, :".protobuf_unittest.TestNestedExtension.nested_string_extension", 1003, :extension => true optional :string, :".protobuf_unittest.TestMoreNestedExtension.test", 1004, :default => "a different test", :extension => true - optional ::Protobuf_unittest::TestRequired, :".protobuf_unittest.TestRequired.single", 1000, :extension => true - repeated ::Protobuf_unittest::TestRequired, :".protobuf_unittest.TestRequired.multi", 1001, :extension => true + optional ::ProtobufUnittest::TestRequired, :".protobuf_unittest.TestRequired.single", 1000, :extension => true + repeated ::ProtobufUnittest::TestRequired, :".protobuf_unittest.TestRequired.multi", 1001, :extension => true end - class OptionalGroup_extension + class OptionalGroupExtension optional :int32, :a, 17 end - class RepeatedGroup_extension + class RepeatedGroupExtension optional :int32, :a, 47 end @@ -423,13 +423,13 @@ class TestRequired end class TestRequiredForeign - optional ::Protobuf_unittest::TestRequired, :optional_message, 1 - repeated ::Protobuf_unittest::TestRequired, :repeated_message, 2 + optional ::ProtobufUnittest::TestRequired, :optional_message, 1 + repeated ::ProtobufUnittest::TestRequired, :repeated_message, 2 optional :int32, :dummy, 3 end class TestForeignNested - optional ::Protobuf_unittest::TestAllTypes::NestedMessage, :foreign_nested, 1 + optional ::ProtobufUnittest::TestAllTypes::NestedMessage, :foreign_nested, 1 end class TestReallyLargeTagNumber @@ -438,16 +438,16 @@ class TestReallyLargeTagNumber end class TestRecursiveMessage - optional ::Protobuf_unittest::TestRecursiveMessage, :a, 1 + optional ::ProtobufUnittest::TestRecursiveMessage, :a, 1 optional :int32, :i, 2 end class TestMutualRecursionA - optional ::Protobuf_unittest::TestMutualRecursionB, :bb, 1 + optional ::ProtobufUnittest::TestMutualRecursionB, :bb, 1 end class TestMutualRecursionB - optional ::Protobuf_unittest::TestMutualRecursionA, :a, 1 + optional ::ProtobufUnittest::TestMutualRecursionA, :a, 1 optional :int32, :optional_int32, 2 end @@ -461,38 +461,38 @@ class Bar end optional :int32, :a, 1 - optional ::Protobuf_unittest::TestDupFieldNumber::Foo, :foo, 2 - optional ::Protobuf_unittest::TestDupFieldNumber::Bar, :bar, 3 + optional ::ProtobufUnittest::TestDupFieldNumber::Foo, :foo, 2 + optional ::ProtobufUnittest::TestDupFieldNumber::Bar, :bar, 3 end class TestEagerMessage - optional ::Protobuf_unittest::TestAllTypes, :sub_message, 1, :lazy => false + optional ::ProtobufUnittest::TestAllTypes, :sub_message, 1, :lazy => false end class TestLazyMessage - optional ::Protobuf_unittest::TestAllTypes, :sub_message, 1, :lazy => true + optional ::ProtobufUnittest::TestAllTypes, :sub_message, 1, :lazy => true end class TestNestedMessageHasBits class NestedMessage repeated :int32, :nestedmessage_repeated_int32, 1 - repeated ::Protobuf_unittest::ForeignMessage, :nestedmessage_repeated_foreignmessage, 2 + repeated ::ProtobufUnittest::ForeignMessage, :nestedmessage_repeated_foreignmessage, 2 end - optional ::Protobuf_unittest::TestNestedMessageHasBits::NestedMessage, :optional_nested_message, 1 + optional ::ProtobufUnittest::TestNestedMessageHasBits::NestedMessage, :optional_nested_message, 1 end class TestCamelCaseFieldNames optional :int32, :PrimitiveField, 1 optional :string, :StringField, 2 - optional ::Protobuf_unittest::ForeignEnum, :EnumField, 3 - optional ::Protobuf_unittest::ForeignMessage, :MessageField, 4 + optional ::ProtobufUnittest::ForeignEnum, :EnumField, 3 + optional ::ProtobufUnittest::ForeignMessage, :MessageField, 4 optional :string, :StringPieceField, 5, :ctype => ::Google::Protobuf::FieldOptions::CType::STRING_PIECE optional :string, :CordField, 6, :ctype => ::Google::Protobuf::FieldOptions::CType::CORD repeated :int32, :RepeatedPrimitiveField, 7 repeated :string, :RepeatedStringField, 8 - repeated ::Protobuf_unittest::ForeignEnum, :RepeatedEnumField, 9 - repeated ::Protobuf_unittest::ForeignMessage, :RepeatedMessageField, 10 + repeated ::ProtobufUnittest::ForeignEnum, :RepeatedEnumField, 9 + repeated ::ProtobufUnittest::ForeignMessage, :RepeatedMessageField, 10 repeated :string, :RepeatedStringPieceField, 11, :ctype => ::Google::Protobuf::FieldOptions::CType::STRING_PIECE repeated :string, :RepeatedCordField, 12, :ctype => ::Google::Protobuf::FieldOptions::CType::CORD end @@ -506,7 +506,7 @@ class NestedMessage optional :string, :my_string, 11 optional :int64, :my_int, 1 optional :float, :my_float, 101 - optional ::Protobuf_unittest::TestFieldOrderings::NestedMessage, :optional_nested_message, 200 + optional ::ProtobufUnittest::TestFieldOrderings::NestedMessage, :optional_nested_message, 200 # Extension Fields extensions 2...11 extensions 12...101 @@ -545,7 +545,7 @@ class TestExtremeDefaultValues end class SparseEnumMessage - optional ::Protobuf_unittest::TestSparseEnum, :sparse_enum, 1 + optional ::ProtobufUnittest::TestSparseEnum, :sparse_enum, 1 end class OneString @@ -592,8 +592,8 @@ class FooGroup optional :int32, :foo_int, 1 optional :string, :foo_string, 2 - optional ::Protobuf_unittest::TestAllTypes, :foo_message, 3 - optional ::Protobuf_unittest::TestOneof::FooGroup, :foogroup, 4 + optional ::ProtobufUnittest::TestAllTypes, :foo_message, 3 + optional ::ProtobufUnittest::TestOneof::FooGroup, :foogroup, 4 end class TestOneofBackwardsCompatible @@ -604,8 +604,8 @@ class FooGroup optional :int32, :foo_int, 1 optional :string, :foo_string, 2 - optional ::Protobuf_unittest::TestAllTypes, :foo_message, 3 - optional ::Protobuf_unittest::TestOneofBackwardsCompatible::FooGroup, :foogroup, 4 + optional ::ProtobufUnittest::TestAllTypes, :foo_message, 3 + optional ::ProtobufUnittest::TestOneofBackwardsCompatible::FooGroup, :foogroup, 4 end class TestOneof2 @@ -624,16 +624,16 @@ class NestedMessage optional :string, :foo_cord, 3, :ctype => ::Google::Protobuf::FieldOptions::CType::CORD optional :string, :foo_string_piece, 4, :ctype => ::Google::Protobuf::FieldOptions::CType::STRING_PIECE optional :bytes, :foo_bytes, 5 - optional ::Protobuf_unittest::TestOneof2::NestedEnum, :foo_enum, 6 - optional ::Protobuf_unittest::TestOneof2::NestedMessage, :foo_message, 7 - optional ::Protobuf_unittest::TestOneof2::FooGroup, :foogroup, 8 - optional ::Protobuf_unittest::TestOneof2::NestedMessage, :foo_lazy_message, 11, :lazy => true + optional ::ProtobufUnittest::TestOneof2::NestedEnum, :foo_enum, 6 + optional ::ProtobufUnittest::TestOneof2::NestedMessage, :foo_message, 7 + optional ::ProtobufUnittest::TestOneof2::FooGroup, :foogroup, 8 + optional ::ProtobufUnittest::TestOneof2::NestedMessage, :foo_lazy_message, 11, :lazy => true optional :int32, :bar_int, 12, :default => 5 optional :string, :bar_string, 13, :default => "STRING" optional :string, :bar_cord, 14, :default => "CORD", :ctype => ::Google::Protobuf::FieldOptions::CType::CORD optional :string, :bar_string_piece, 15, :default => "SPIECE", :ctype => ::Google::Protobuf::FieldOptions::CType::STRING_PIECE optional :bytes, :bar_bytes, 16, :default => "BYTES" - optional ::Protobuf_unittest::TestOneof2::NestedEnum, :bar_enum, 17, :default => ::Protobuf_unittest::TestOneof2::NestedEnum::BAR + optional ::ProtobufUnittest::TestOneof2::NestedEnum, :bar_enum, 17, :default => ::ProtobufUnittest::TestOneof2::NestedEnum::BAR optional :int32, :baz_int, 18 optional :string, :baz_string, 19, :default => "BAZ" end @@ -645,7 +645,7 @@ class NestedMessage optional :int32, :foo_int, 1 optional :string, :foo_string, 2 - optional ::Protobuf_unittest::TestRequiredOneof::NestedMessage, :foo_message, 3 + optional ::ProtobufUnittest::TestRequiredOneof::NestedMessage, :foo_message, 3 end class TestPackedTypes @@ -662,7 +662,7 @@ class TestPackedTypes repeated :float, :packed_float, 100, :packed => true repeated :double, :packed_double, 101, :packed => true repeated :bool, :packed_bool, 102, :packed => true - repeated ::Protobuf_unittest::ForeignEnum, :packed_enum, 103, :packed => true + repeated ::ProtobufUnittest::ForeignEnum, :packed_enum, 103, :packed => true end class TestUnpackedTypes @@ -679,7 +679,7 @@ class TestUnpackedTypes repeated :float, :unpacked_float, 100, :packed => false repeated :double, :unpacked_double, 101, :packed => false repeated :bool, :unpacked_bool, 102, :packed => false - repeated ::Protobuf_unittest::ForeignEnum, :unpacked_enum, 103, :packed => false + repeated ::ProtobufUnittest::ForeignEnum, :unpacked_enum, 103, :packed => false end class TestPackedExtensions @@ -698,7 +698,7 @@ class TestPackedExtensions repeated :float, :".protobuf_unittest.packed_float_extension", 100, :packed => true, :extension => true repeated :double, :".protobuf_unittest.packed_double_extension", 101, :packed => true, :extension => true repeated :bool, :".protobuf_unittest.packed_bool_extension", 102, :packed => true, :extension => true - repeated ::Protobuf_unittest::ForeignEnum, :".protobuf_unittest.packed_enum_extension", 103, :packed => true, :extension => true + repeated ::ProtobufUnittest::ForeignEnum, :".protobuf_unittest.packed_enum_extension", 103, :packed => true, :extension => true end class TestUnpackedExtensions @@ -717,7 +717,7 @@ class TestUnpackedExtensions repeated :float, :".protobuf_unittest.unpacked_float_extension", 100, :extension => true, :packed => false repeated :double, :".protobuf_unittest.unpacked_double_extension", 101, :extension => true, :packed => false repeated :bool, :".protobuf_unittest.unpacked_bool_extension", 102, :extension => true, :packed => false - repeated ::Protobuf_unittest::ForeignEnum, :".protobuf_unittest.unpacked_enum_extension", 103, :extension => true, :packed => false + repeated ::ProtobufUnittest::ForeignEnum, :".protobuf_unittest.unpacked_enum_extension", 103, :extension => true, :packed => false end class TestDynamicExtensions @@ -726,10 +726,10 @@ class DynamicMessageType end optional :fixed32, :scalar_extension, 2000 - optional ::Protobuf_unittest::ForeignEnum, :enum_extension, 2001 - optional ::Protobuf_unittest::TestDynamicExtensions::DynamicEnumType, :dynamic_enum_extension, 2002 - optional ::Protobuf_unittest::ForeignMessage, :message_extension, 2003 - optional ::Protobuf_unittest::TestDynamicExtensions::DynamicMessageType, :dynamic_message_extension, 2004 + optional ::ProtobufUnittest::ForeignEnum, :enum_extension, 2001 + optional ::ProtobufUnittest::TestDynamicExtensions::DynamicEnumType, :dynamic_enum_extension, 2002 + optional ::ProtobufUnittest::ForeignMessage, :message_extension, 2003 + optional ::ProtobufUnittest::TestDynamicExtensions::DynamicMessageType, :dynamic_message_extension, 2004 repeated :string, :repeated_extension, 2005 repeated :sint32, :packed_extension, 2006, :packed => true end @@ -746,39 +746,39 @@ class TestRepeatedScalarDifferentTagSizes class TestParsingMerge class RepeatedFieldsGenerator class Group1 - optional ::Protobuf_unittest::TestAllTypes, :field1, 11 + optional ::ProtobufUnittest::TestAllTypes, :field1, 11 end class Group2 - optional ::Protobuf_unittest::TestAllTypes, :field1, 21 + optional ::ProtobufUnittest::TestAllTypes, :field1, 21 end - repeated ::Protobuf_unittest::TestAllTypes, :field1, 1 - repeated ::Protobuf_unittest::TestAllTypes, :field2, 2 - repeated ::Protobuf_unittest::TestAllTypes, :field3, 3 - repeated ::Protobuf_unittest::TestParsingMerge::RepeatedFieldsGenerator::Group1, :group1, 10 - repeated ::Protobuf_unittest::TestParsingMerge::RepeatedFieldsGenerator::Group2, :group2, 20 - repeated ::Protobuf_unittest::TestAllTypes, :ext1, 1000 - repeated ::Protobuf_unittest::TestAllTypes, :ext2, 1001 + repeated ::ProtobufUnittest::TestAllTypes, :field1, 1 + repeated ::ProtobufUnittest::TestAllTypes, :field2, 2 + repeated ::ProtobufUnittest::TestAllTypes, :field3, 3 + repeated ::ProtobufUnittest::TestParsingMerge::RepeatedFieldsGenerator::Group1, :group1, 10 + repeated ::ProtobufUnittest::TestParsingMerge::RepeatedFieldsGenerator::Group2, :group2, 20 + repeated ::ProtobufUnittest::TestAllTypes, :ext1, 1000 + repeated ::ProtobufUnittest::TestAllTypes, :ext2, 1001 end class OptionalGroup - optional ::Protobuf_unittest::TestAllTypes, :optional_group_all_types, 11 + optional ::ProtobufUnittest::TestAllTypes, :optional_group_all_types, 11 end class RepeatedGroup - optional ::Protobuf_unittest::TestAllTypes, :repeated_group_all_types, 21 + optional ::ProtobufUnittest::TestAllTypes, :repeated_group_all_types, 21 end - required ::Protobuf_unittest::TestAllTypes, :required_all_types, 1 - optional ::Protobuf_unittest::TestAllTypes, :optional_all_types, 2 - repeated ::Protobuf_unittest::TestAllTypes, :repeated_all_types, 3 - optional ::Protobuf_unittest::TestParsingMerge::OptionalGroup, :optionalgroup, 10 - repeated ::Protobuf_unittest::TestParsingMerge::RepeatedGroup, :repeatedgroup, 20 + required ::ProtobufUnittest::TestAllTypes, :required_all_types, 1 + optional ::ProtobufUnittest::TestAllTypes, :optional_all_types, 2 + repeated ::ProtobufUnittest::TestAllTypes, :repeated_all_types, 3 + optional ::ProtobufUnittest::TestParsingMerge::OptionalGroup, :optionalgroup, 10 + repeated ::ProtobufUnittest::TestParsingMerge::RepeatedGroup, :repeatedgroup, 20 # Extension Fields extensions 1000...536870912 - optional ::Protobuf_unittest::TestAllTypes, :".protobuf_unittest.TestParsingMerge.optional_ext", 1000, :extension => true - repeated ::Protobuf_unittest::TestAllTypes, :".protobuf_unittest.TestParsingMerge.repeated_ext", 1001, :extension => true + optional ::ProtobufUnittest::TestAllTypes, :".protobuf_unittest.TestParsingMerge.optional_ext", 1000, :extension => true + repeated ::ProtobufUnittest::TestAllTypes, :".protobuf_unittest.TestParsingMerge.repeated_ext", 1001, :extension => true end class TestCommentInjectionMessage @@ -790,8 +790,8 @@ class TestCommentInjectionMessage # Service Classes # class TestService < ::Protobuf::Rpc::Service - rpc :foo, ::Protobuf_unittest::FooRequest, ::Protobuf_unittest::FooResponse - rpc :bar, ::Protobuf_unittest::BarRequest, ::Protobuf_unittest::BarResponse + rpc :foo, ::ProtobufUnittest::FooRequest, ::ProtobufUnittest::FooResponse + rpc :bar, ::ProtobufUnittest::BarRequest, ::ProtobufUnittest::BarResponse end end diff --git a/spec/support/protos/google_unittest_custom_options.pb.rb b/spec/support/protos/google_unittest_custom_options.pb.rb index 9ca77aee..1eaa728e 100644 --- a/spec/support/protos/google_unittest_custom_options.pb.rb +++ b/spec/support/protos/google_unittest_custom_options.pb.rb @@ -12,7 +12,7 @@ # require 'google/protobuf/descriptor.pb' -module Protobuf_unittest +module ProtobufUnittest ::Protobuf::Optionable.inject(self) { ::Google::Protobuf::FileOptions } ## @@ -157,7 +157,7 @@ class CustomOptionMaxIntegerValues class CustomOptionOtherValues # Message Options - set_option :".protobuf_unittest.enum_opt", ::Protobuf_unittest::DummyMessageContainingEnum::TestEnumType::TEST_OPTION_ENUM_TYPE2 + set_option :".protobuf_unittest.enum_opt", ::ProtobufUnittest::DummyMessageContainingEnum::TestEnumType::TEST_OPTION_ENUM_TYPE2 set_option :".protobuf_unittest.bytes_opt", "Hello\x00World" set_option :".protobuf_unittest.string_opt", "Hello, \"World\"" set_option :".protobuf_unittest.double_opt", 1.2345678901234567 @@ -188,7 +188,7 @@ class ComplexOptionType1 # Extension Fields extensions 100...536870912 optional :int32, :".protobuf_unittest.quux", 7663707, :extension => true - optional ::Protobuf_unittest::ComplexOptionType3, :".protobuf_unittest.corge", 7663442, :extension => true + optional ::ProtobufUnittest::ComplexOptionType3, :".protobuf_unittest.corge", 7663442, :extension => true end class ComplexOptionType2 @@ -196,14 +196,14 @@ class ComplexOptionType4 optional :int32, :waldo, 1 end - optional ::Protobuf_unittest::ComplexOptionType1, :bar, 1 + optional ::ProtobufUnittest::ComplexOptionType1, :bar, 1 optional :int32, :baz, 2 - optional ::Protobuf_unittest::ComplexOptionType2::ComplexOptionType4, :fred, 3 - repeated ::Protobuf_unittest::ComplexOptionType2::ComplexOptionType4, :barney, 4 + optional ::ProtobufUnittest::ComplexOptionType2::ComplexOptionType4, :fred, 3 + repeated ::ProtobufUnittest::ComplexOptionType2::ComplexOptionType4, :barney, 4 # Extension Fields extensions 100...536870912 optional :int32, :".protobuf_unittest.grault", 7650927, :extension => true - optional ::Protobuf_unittest::ComplexOptionType1, :".protobuf_unittest.garply", 7649992, :extension => true + optional ::ProtobufUnittest::ComplexOptionType1, :".protobuf_unittest.garply", 7649992, :extension => true end class ComplexOptionType3 @@ -227,7 +227,7 @@ class AggregateMessageSet # Extension Fields extensions 4...536870912 - optional ::Protobuf_unittest::AggregateMessageSetElement, :".protobuf_unittest.AggregateMessageSetElement.message_set_extension", 15447542, :extension => true + optional ::ProtobufUnittest::AggregateMessageSetElement, :".protobuf_unittest.AggregateMessageSetElement.message_set_extension", 15447542, :extension => true end class AggregateMessageSetElement @@ -237,9 +237,9 @@ class AggregateMessageSetElement class Aggregate optional :int32, :i, 1 optional :string, :s, 2 - optional ::Protobuf_unittest::Aggregate, :sub, 3 + optional ::ProtobufUnittest::Aggregate, :sub, 3 optional ::Google::Protobuf::FileOptions, :file, 4 - optional ::Protobuf_unittest::AggregateMessageSet, :mset, 5 + optional ::ProtobufUnittest::AggregateMessageSet, :mset, 5 end class AggregateMessage @@ -260,16 +260,16 @@ class NestedMessage end class OldOptionType - required ::Protobuf_unittest::OldOptionType::TestEnum, :value, 1 + required ::ProtobufUnittest::OldOptionType::TestEnum, :value, 1 end class NewOptionType - required ::Protobuf_unittest::NewOptionType::TestEnum, :value, 1 + required ::ProtobufUnittest::NewOptionType::TestEnum, :value, 1 end class TestMessageWithRequiredEnumOption # Message Options - set_option :".protobuf_unittest.required_enum_opt", { :value => ::Protobuf_unittest::OldOptionType::TestEnum::OLD_VALUE } + set_option :".protobuf_unittest.required_enum_opt", { :value => ::ProtobufUnittest::OldOptionType::TestEnum::OLD_VALUE } end @@ -279,8 +279,8 @@ class TestMessageWithRequiredEnumOption # class ::Google::Protobuf::FileOptions < ::Protobuf::Message optional :uint64, :".protobuf_unittest.file_opt1", 7736974, :extension => true - optional ::Protobuf_unittest::Aggregate, :".protobuf_unittest.fileopt", 15478479, :extension => true - optional ::Protobuf_unittest::Aggregate, :".protobuf_unittest.Aggregate.nested", 15476903, :extension => true + optional ::ProtobufUnittest::Aggregate, :".protobuf_unittest.fileopt", 15478479, :extension => true + optional ::ProtobufUnittest::Aggregate, :".protobuf_unittest.Aggregate.nested", 15476903, :extension => true optional :int32, :".protobuf_unittest.NestedOptionType.nested_extension", 7912573, :extension => true, :".protobuf_unittest.field_opt2" => 1005 end @@ -301,42 +301,42 @@ class ::Google::Protobuf::MessageOptions < ::Protobuf::Message optional :double, :".protobuf_unittest.double_opt", 7673293, :extension => true optional :string, :".protobuf_unittest.string_opt", 7673285, :extension => true optional :bytes, :".protobuf_unittest.bytes_opt", 7673238, :extension => true - optional ::Protobuf_unittest::DummyMessageContainingEnum::TestEnumType, :".protobuf_unittest.enum_opt", 7673233, :extension => true - optional ::Protobuf_unittest::DummyMessageInvalidAsOptionType, :".protobuf_unittest.message_type_opt", 7665967, :extension => true - optional ::Protobuf_unittest::ComplexOptionType1, :".protobuf_unittest.complex_opt1", 7646756, :extension => true - optional ::Protobuf_unittest::ComplexOptionType2, :".protobuf_unittest.complex_opt2", 7636949, :extension => true - optional ::Protobuf_unittest::ComplexOptionType3, :".protobuf_unittest.complex_opt3", 7636463, :extension => true + optional ::ProtobufUnittest::DummyMessageContainingEnum::TestEnumType, :".protobuf_unittest.enum_opt", 7673233, :extension => true + optional ::ProtobufUnittest::DummyMessageInvalidAsOptionType, :".protobuf_unittest.message_type_opt", 7665967, :extension => true + optional ::ProtobufUnittest::ComplexOptionType1, :".protobuf_unittest.complex_opt1", 7646756, :extension => true + optional ::ProtobufUnittest::ComplexOptionType2, :".protobuf_unittest.complex_opt2", 7636949, :extension => true + optional ::ProtobufUnittest::ComplexOptionType3, :".protobuf_unittest.complex_opt3", 7636463, :extension => true repeated :int32, :".protobuf_unittest.repeated_opt1", 7636464, :extension => true - repeated ::Protobuf_unittest::ComplexOptionType3, :".protobuf_unittest.repeated_opt2", 7636465, :extension => true - optional ::Protobuf_unittest::Aggregate, :".protobuf_unittest.msgopt", 15480088, :extension => true - optional ::Protobuf_unittest::OldOptionType, :".protobuf_unittest.required_enum_opt", 106161807, :extension => true - optional ::Protobuf_unittest::ComplexOptionType2::ComplexOptionType4, :".protobuf_unittest.ComplexOptionType2.ComplexOptionType4.complex_opt4", 7633546, :extension => true + repeated ::ProtobufUnittest::ComplexOptionType3, :".protobuf_unittest.repeated_opt2", 7636465, :extension => true + optional ::ProtobufUnittest::Aggregate, :".protobuf_unittest.msgopt", 15480088, :extension => true + optional ::ProtobufUnittest::OldOptionType, :".protobuf_unittest.required_enum_opt", 106161807, :extension => true + optional ::ProtobufUnittest::ComplexOptionType2::ComplexOptionType4, :".protobuf_unittest.ComplexOptionType2.ComplexOptionType4.complex_opt4", 7633546, :extension => true end class ::Google::Protobuf::FieldOptions < ::Protobuf::Message optional :fixed64, :".protobuf_unittest.field_opt1", 7740936, :extension => true optional :int32, :".protobuf_unittest.field_opt2", 7753913, :default => 42, :extension => true - optional ::Protobuf_unittest::Aggregate, :".protobuf_unittest.fieldopt", 15481374, :extension => true + optional ::ProtobufUnittest::Aggregate, :".protobuf_unittest.fieldopt", 15481374, :extension => true end class ::Google::Protobuf::EnumOptions < ::Protobuf::Message optional :sfixed32, :".protobuf_unittest.enum_opt1", 7753576, :extension => true - optional ::Protobuf_unittest::Aggregate, :".protobuf_unittest.enumopt", 15483218, :extension => true + optional ::ProtobufUnittest::Aggregate, :".protobuf_unittest.enumopt", 15483218, :extension => true end class ::Google::Protobuf::EnumValueOptions < ::Protobuf::Message optional :int32, :".protobuf_unittest.enum_value_opt1", 1560678, :extension => true - optional ::Protobuf_unittest::Aggregate, :".protobuf_unittest.enumvalopt", 15486921, :extension => true + optional ::ProtobufUnittest::Aggregate, :".protobuf_unittest.enumvalopt", 15486921, :extension => true end class ::Google::Protobuf::ServiceOptions < ::Protobuf::Message optional :sint64, :".protobuf_unittest.service_opt1", 7887650, :extension => true - optional ::Protobuf_unittest::Aggregate, :".protobuf_unittest.serviceopt", 15497145, :extension => true + optional ::ProtobufUnittest::Aggregate, :".protobuf_unittest.serviceopt", 15497145, :extension => true end class ::Google::Protobuf::MethodOptions < ::Protobuf::Message - optional ::Protobuf_unittest::MethodOpt1, :".protobuf_unittest.method_opt1", 7890860, :extension => true - optional ::Protobuf_unittest::Aggregate, :".protobuf_unittest.methodopt", 15512713, :extension => true + optional ::ProtobufUnittest::MethodOpt1, :".protobuf_unittest.method_opt1", 7890860, :extension => true + optional ::ProtobufUnittest::Aggregate, :".protobuf_unittest.methodopt", 15512713, :extension => true end @@ -345,14 +345,14 @@ class ::Google::Protobuf::MethodOptions < ::Protobuf::Message # class TestServiceWithCustomOptions < ::Protobuf::Rpc::Service set_option :".protobuf_unittest.service_opt1", -9876543210 - rpc :foo, ::Protobuf_unittest::CustomOptionFooRequest, ::Protobuf_unittest::CustomOptionFooResponse do - set_option :".protobuf_unittest.method_opt1", ::Protobuf_unittest::MethodOpt1::METHODOPT1_VAL2 + rpc :foo, ::ProtobufUnittest::CustomOptionFooRequest, ::ProtobufUnittest::CustomOptionFooResponse do + set_option :".protobuf_unittest.method_opt1", ::ProtobufUnittest::MethodOpt1::METHODOPT1_VAL2 end end class AggregateService < ::Protobuf::Rpc::Service set_option :".protobuf_unittest.serviceopt", { :s => "ServiceAnnotation" } - rpc :method, ::Protobuf_unittest::AggregateMessage, ::Protobuf_unittest::AggregateMessage do + rpc :method, ::ProtobufUnittest::AggregateMessage, ::ProtobufUnittest::AggregateMessage do set_option :".protobuf_unittest.methodopt", { :s => "MethodAnnotation" } end end diff --git a/spec/support/protos/google_unittest_import.pb.rb b/spec/support/protos/google_unittest_import.pb.rb index 99beaf06..1557cc79 100644 --- a/spec/support/protos/google_unittest_import.pb.rb +++ b/spec/support/protos/google_unittest_import.pb.rb @@ -11,7 +11,7 @@ # require 'protos/google_unittest_import_public.pb' -module Protobuf_unittest_import +module ProtobufUnittestImport ::Protobuf::Optionable.inject(self) { ::Google::Protobuf::FileOptions } ## diff --git a/spec/support/protos/google_unittest_import_public.pb.rb b/spec/support/protos/google_unittest_import_public.pb.rb index c6c295d2..6e95b72a 100644 --- a/spec/support/protos/google_unittest_import_public.pb.rb +++ b/spec/support/protos/google_unittest_import_public.pb.rb @@ -5,7 +5,7 @@ # require 'protobuf' -module Protobuf_unittest_import +module ProtobufUnittestImport ::Protobuf::Optionable.inject(self) { ::Google::Protobuf::FileOptions } ##