aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/compiler/ruby/ruby_generator.cc
Commit message (Collapse)AuthorAgeFilesLines
* Adds support for proto2 syntax for Ruby gem.Harshit Chopra2018-09-271-25/+114
| | | | | | | | | | | | | | | | | | | | | This change only adds basic proto2 support without advanced features like extensions, custom options, maps, etc. The protoc binary now generates ruby code for proto2 syntax. However, for now, it is restricted to proto2 files without advanced features like extensions, in which case it still errors out. This change also modifies the DSL to add proto messages to the DescriptorPool. There is a new DSL Builder#add_file to create a new FileDescriptor. With this, the generated ruby DSL looks something like: Google::Protobuf::DescriptorPool.generated_pool.build do add_file "test.proto" do add_message "foo" do optional :val, :int32, 1 end end end
* Adopt ruby_package in ruby generated code. (#4627)Paul Yang2018-05-171-3/+16
| | | | | | * Adopt ruby_package in ruby generated code. * Add test for ruby_package
* Deleted scoped_ptr.hAdam Cozzette2018-03-141-3/+1
| | | | | We no longer need this, now that we have finished the switch to C++11 and are using std::unique_ptr.
* Ruby: translate package names from snake_case -> PascalCase.Josh Haberman2016-07-251-6/+44
|
* Ruby: generated foo.proto -> foo_pb.rb instead of foo.rb.Josh Haberman2016-07-251-5/+5
| | | | | This brings us more into line with other langauges, and makes it more obvious when we are requiring protobuf generated code.
* Generate well-known types in Ruby extension and prune unneeded proto2 ↵Josh Haberman2016-03-031-11/+73
| | | | dependencies.
* Added Ruby to conformance tests.Josh Haberman2015-07-161-13/+21
| | | | | | | | | | | | | This involved fixing a few important bugs in the Ruby implementation -- mostly cases of mixing upb field types and descriptor types (upb field types do not distinguish between int/sint/fixed/sfixed like descriptor types do). Also added protobuf-specific exceptions so parse errors can be caught specifically. Change-Id: Ib49d3db976900b2c6f3455c8b88af52cfb86e036
* Merge branch 'master' of github.com:google/protobufJosh Haberman2015-02-171-9/+88
|\
| * Properly support maps in Ruby protoc and another bugfix.Chris Fallin2015-02-121-16/+59
| | | | | | | | | | | | | | | | | | | | Previously, we supported map fields in the Ruby DSL. However, we never connected the final link in the chain and generated `map` DSL commands for map fields in `.proto` files. My apologies -- I had been testing with the DSL directly so I missed this. Also fixed a handlerdata-setup-infinite-loop when a map value field's type is its containing message.
| * Merge pull request #186 from ennerf/win32-msvc-fixFeng Xiao2015-02-021-2/+2
| |\ | | | | | | MSVC protoc compiler fix
| | * removed accidental whitespaceFlorian Enner2015-02-021-1/+1
| | |
| | * replaced type fix with the recommended wayFlorian Enner2015-01-311-8/+2
| | |
| | * fixed MSVC compile errorFlorian Enner2015-01-311-0/+6
| | | | | | | | | | | | <stdint.h> is not part of the standard, so I've added a workaround.
| * | Support oneofs in the Ruby code generator.Chris Fallin2015-01-141-18/+46
| |/
| * Support Ruby code generation only for proto3.Chris Fallin2014-12-121-0/+8
| |
| * Rename protobuf Ruby module to google/protobuf and rework its buildChris Fallin2014-12-121-1/+1
| | | | | | | | | | | | system. The Ruby module build now uses an amalgamated distribution of upb, and successfully builds a Ruby gem called 'google-protobuf' with module 'google/protobuf'.
* | Integrate changes from Google open-source branch.Josh Haberman2015-02-171-3/+4
|/
* Provide a Ruby extension.Chris Fallin2014-12-091-0/+313
This adds a Ruby extension in ruby/ that is based on the 'upb' library (now included as a submodule), and adds support for Ruby code generation to the protoc compiler.