Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate module name: snake_case to CamelCase in case of package name. #403

Open
manhdaovan opened this issue Oct 7, 2019 · 2 comments · May be fixed by #405
Open

Generate module name: snake_case to CamelCase in case of package name. #403

manhdaovan opened this issue Oct 7, 2019 · 2 comments · May be fixed by #405

Comments

@manhdaovan
Copy link

manhdaovan commented Oct 7, 2019

For instance, i have:

# a.proto file
package abc_def;
message ghi {}

Then, when generating ruby source, i got:

# a.pb.rb
module Abc_def
  class Ghi {}
end

The package named abc_def should be generated to AbcDef module, instead of Abc_def, shouldn't it?

I checked this issue: #81 (comment), but the case of the package name was not mentioned there.

@manhdaovan manhdaovan changed the title snake_case to CamelCase in case of package name. Generate module name: snake_case to CamelCase in case of package name. Oct 7, 2019
@film42
Copy link
Member

film42 commented Oct 10, 2019

Good find. This is indeed a bug!

@film42
Copy link
Member

film42 commented Oct 10, 2019

Looking closer, we do have tests that enforce this behavior. That is, I see tests failing when I change the modulize helper method to use camelize. I still think we should fix this, though.

@film42 film42 linked a pull request Oct 10, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants