forked from protocolbuffers/protobuf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Ruby module name generation when the ruby_package option is used (p…
…rotocolbuffers#5735) * fix module name generation and add tests * fix existing tests * support both package name styles
Showing
3 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
google/protobuf/compiler/ruby/ruby_generated_pkg_explicit.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
syntax = "proto3"; | ||
|
||
package one.two.a_three; | ||
|
||
option ruby_package = "A::B::C"; | ||
|
||
message Four { | ||
string a_string = 1; | ||
} |
9 changes: 9 additions & 0 deletions
9
google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_legacy.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
syntax = "proto3"; | ||
|
||
package one.two.a_three.and; | ||
|
||
option ruby_package = "AA.BB.CC"; | ||
|
||
message Four { | ||
string another_string = 1; | ||
} |
7 changes: 7 additions & 0 deletions
7
google/protobuf/compiler/ruby/ruby_generated_pkg_implicit.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
syntax = "proto3"; | ||
|
||
package one.two.a_three; | ||
|
||
message Four { | ||
string a_string = 1; | ||
} |