Commit Graph

43 Commits

Author SHA1 Message Date
alto-ruby 401c382e8a
[Ruby] rubify type names start with lower case or non-alpha characters (#32604)
Copy `RubifyConstant` from [protobuf's ruby_generator.cc](

63895855d7/src/google/protobuf/compiler/ruby/ruby_generator.cc (L312))
and apply it to ruby type string.


Fixes [#3155](https://github.com/grpc/grpc/issues/31551)
`ruby -I. -e "require 'test_services_pb'"` succeeded with this PR.
2023-04-15 03:25:50 +00:00
Craig Tiller ea389c00c2
Adjust include order per style guide (#27175)
Introduce clang-format configuration to sort includes closer to our rules.
2021-09-08 12:14:44 -07:00
Nicolas Noble a325d7f77a
Pointing the protobuf submodule to the new URL (#26811)
* Pointing the protobuf submodule to the new URL

* Also changing WORKSPACE dependencies

* More references to the old URL...
2021-07-29 10:19:16 -07:00
Olivier Bellone 689b62e8cf
Include `GRPC::GenericService` from root namespace (#25153) 2021-03-18 15:54:27 -07:00
Stanley Cheung 0f34ccbfa8 Fix ruby protoc plugin when message is in another package 2020-07-16 14:02:05 -07:00
Esun Kim 165ee5007a Replaced grpc::string with std::string 2020-06-29 17:56:36 -07:00
Joe Bolinger f463965084 Allow :: in ruby_package 2019-08-15 09:45:47 -07:00
Nick Gordon 3fe2c98877 Updates to the ruby generator for protobuf 3.6.0 changes
test for verifying the ruby_package option
added WeWork to the AUTHORS file
2018-09-14 11:28:24 -04:00
Daniel Neighman 8b7007ad7b Updates the ruby generator RubyAsType to correctly account for underscores in packages
Prior to this change, when the ruby generator tried to reference an entity that was not part of the same package
(or a direct parent package) and the package contains underscores,
the result would simply uppercase the first character.
It should however uppercase each letter that proceeds an underscore and remove underscores.

i.e.

```
package my_package.service;

import "my_package/data.proto";

service MyService {
  rpc Test (data.Request) returns data.Response {}
}
```

Was

```ruby
   # ...
   rpc :Test, My_package::Data::REquest, My_package::Data::Response
   # ...
```

Should be:

```ruby
   # ...
   rpc :Test, MyPackage::Data::REquest, My_package::Data::Response
   # ...
```
2018-03-26 16:00:05 -07:00
Vijay Pai c04f4f16cd
Revert "Revert "Do not interpolate variables in leading comments."" 2017-11-27 13:08:01 -08:00
David G. Quintas 333dd3e1ad
Revert "Do not interpolate variables in leading comments." 2017-11-27 12:27:49 -08:00
Garret Kelly cf5a1f2c81 Do not interpolate variables in leading comments.
There is at least one well-known proto file (plugin.proto) with comments
that include variable-like strings that are not actual variables. This
leads to DFATAL log statements that clutter the output and don't provide
any benefit.
2017-11-06 16:45:13 -05:00
Craig Tiller baa14a975e Update clang-format to 5.0 2017-11-03 09:09:36 -07:00
Jan Tattermusch 4d5c3102a1 fix remaining license notices 2017-06-08 11:22:41 +02:00
murgatroid99 45096614fe Fix incorrect ruby_generator.cc merge 2016-10-28 12:53:59 -07:00
murgatroid99 5d6ae930ab Merge remote-tracking branch 'upstream/v1.0.x' into v1.0.1_upmerge 2016-10-28 11:48:22 -07:00
Alexander Polcyn 79a1375f2a fix type comparison in ruby plugin 2016-10-27 14:06:57 -07:00
Alexander Polcyn 2d056708fb convert uint to int in generator 2016-10-26 15:17:20 -07:00
Alexander Polcyn 5ba82e5d92 remove unused function and switch std::string to grpc::string 2016-10-03 16:31:14 -07:00
Alexander Polcyn c429d7830f change ruby proto plugin to copy package name conversion from protoc 2016-10-03 11:23:20 -07:00
Alexander Polcyn d69c0d34da convert snake case protos package names to camel case in ruby modules 2016-10-03 10:33:02 -07:00
Masood Malekghassemi ac59245624 Clang-format all the things 2016-07-12 13:20:39 -07:00
murgatroid99 b39ad701ea Added comments to ruby code generation 2016-05-20 13:27:33 -07:00
murgatroid99 dedae79cd4 Finished ruby generator change 2016-05-02 15:05:37 -07:00
murgatroid99 6a45e93407 Made ruby plugin support empty package names 2016-05-02 14:25:49 -07:00
Jun Mukai cac9ba4f22 ruby: Use fully-qualified type name when necessary
- Use full_name() instead of name(), otherwise package names
  are omitted.
- Fix a minor bug on RubyTypeOf(), to replace dotted protobuf
  package name by ruby's module names correctly.
2016-04-06 15:25:49 -07:00
Jan Tattermusch 5dcebd9015 make sure printers are properly flushed 2015-05-27 15:31:52 -07:00
Yang Gao 478568e7c9 Use grpc:: counterparts in ruby code generator 2015-03-23 22:09:22 -07:00
Craig Tiller 190d360def Add missing new-lines at end of file 2015-02-18 09:23:38 -08:00
Craig Tiller 0605995e55 Update copyright to 2015 2015-02-18 08:34:56 -08:00
Yang Gao 5fd0d29dfe run clang-format 2015-01-26 00:19:48 -08:00
Craig Tiller ecd49345b5 Use clang-format-3.5 2015-01-18 14:36:47 -08:00
Nicolas "Pixel" Noble 36f5323846 Fixing includes inconsistency. 2015-01-16 06:39:58 +01:00
Nicolas Noble f5c5d80968 Removing "using namespace std" everywhere. 2015-01-15 17:33:09 -08:00
Craig Tiller b5dcec5a2e clang-format codebase 2015-01-13 11:13:42 -08:00
temiola d6fd84aff8 Updates the generated ruby code to specify the service name.
Change on 2015/01/08 by temiola <temiola@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=83527066
2015-01-09 17:43:12 -08:00
ctiller e4b409364e Add a --forever flag, to continuously run tests as things change.
Change on 2015/01/07 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=83451760
2015-01-09 17:23:18 -08:00
temiola 5417edab2a Updates the generated ruby code to specify the service name.
Change on 2015/01/08 by temiola <temiola@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=83527066
2015-01-08 13:53:15 -08:00
temiola e5206aace9 Updates the ruby generator so that it does not create files for empty protos.
Previously, this alway generated a service file with a header.

However, this does not work well, it means whenver the ruby service plugin is
used, every proto file ends up with a service file.
	Change on 2015/01/07 by temiola <temiola@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=83448951
2015-01-08 12:44:01 -08:00
temiola 3d726cfcd2 bugfix: correct service include in ruby compiler
Change on 2015/01/06 by temiola <temiola@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=83393999
2015-01-07 01:16:47 -08:00
temiola 5453555255 bugfix: ruby code-gen capitalization
Change on 2015/01/06 by temiola <temiola@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=83391912
2015-01-06 18:17:10 -08:00
nnoble c78b34075d Fixing C++ and ruby code generators for the opensource build.
Change on 2014/12/11 by nnoble <nnoble@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=81921764
2014-12-12 16:10:46 -08:00
nnoble ebebb7e21c First pass at making the compilers open-sourcable.
Change on 2014/12/10 by nnoble <nnoble@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=81829127
2014-12-11 15:11:44 -08:00