aboutsummaryrefslogtreecommitdiff
path: root/ruby
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #4816 from hrsht/hrsht/zanker-proto2Joshua Haberman2018-09-2717-1454/+2930
|\ | | | | Basic Proto2 support for Ruby gem
| * Adds support for proto2 syntax for Ruby gem.Harshit Chopra2018-09-2717-1454/+2930
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Replace repo links.Feng Xiao2018-08-222-3/+3
| |
* | Merge branch '3.6.x' into merge-3-6-xAdam Cozzette2018-08-013-3/+3
|\ \
| * | Updated version numbers to 3.6.1Adam Cozzette2018-07-271-1/+1
| | |
| * | Check the message to be encoded is the wrong type. (#4885) (#4949)Paul Yang2018-07-232-0/+17
| | | | | | | | | | | | | | | | | | * Check the message to be encoded is the wrong type. (#4885) * Change TypeError to ArgumentError
| * | Add continuous test for ruby 2.3, 2.4 and 2.5 (#4829)Paul Yang2018-07-175-36/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add continuous test for ruby 2.3, 2.4 and 2.5 * Change ruby 2.5 to 2.5.0 * No need to provide argument to rb_funcall when argc is 0 * Fix tests for ruby 2.5 * Use rescue instead of assert_raise to accept subclass of error
* | | Check the message to be encoded is the wrong type. (#4885)Paul Yang2018-07-122-0/+17
| |/ |/|
* | Add continuous test for ruby 2.3, 2.4 and 2.5 (#4829)Paul Yang2018-07-025-36/+135
| | | | | | | | | | | | | | | | | | | | | | | | * Add continuous test for ruby 2.3, 2.4 and 2.5 * Change ruby 2.5 to 2.5.0 * No need to provide argument to rb_funcall when argc is 0 * Fix tests for ruby 2.5 * Use rescue instead of assert_raise to accept subclass of error
* | Merge pull request #4321 from devwout/ruby_json_omit_repeatedJoshua Haberman2018-07-022-1/+7
|\ \ | | | | | | Ruby JSON encoding omits zero-length repeated fields by default.
| * | Ruby JSON encoding omits zero-length repeated fields by default.Ewout2018-02-202-1/+7
| | | | | | | | | | | | | | | This makes it behave the same way as the other implementations. It is also nice to always encode an empty message as {}.
* | | Merge pull request #3847 from FX-HAO/masterJoshua Haberman2018-07-022-0/+12
|\ \ \ | | | | | | | | Google::Protobuf::Struct can access a missing key (#3846)
| * | | Google::Protobuf::Struct can access a missing key (#3846)parker2017-11-172-0/+12
| | | |
* | | | When initializing a message, skip a field if value is nil (#3693)Zachary Anker2018-06-263-0/+15
| | | |
* | | | Adds a base class for all explicitly raised TypeErrors (#4255)Erik Benoist2018-06-267-44/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * This allows for ruby code to catch and handle Protobuf TypeErrors separately from the standard Ruby TypeError * Maintains backwards compatibility by having the new Google::Protobuf::TypeError inherit from the base TypeError. Any code that was catching TypeError should continue to work.
* | | | Merge branch '3.6.x' into merge-3-6-xAdam Cozzette2018-06-252-2/+4
|\ \ \ \ | | |_|/ | |/| |
| * | | Build ruby gem on kokoro (#4819)Paul Yang2018-06-251-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Install rake compiler * Add kokoro config to build ruby gem on linux * Rename from linix to linux * Fix prepare_build.sh name * Clean up * Install bundler * Install bundler * Use c99 in order to build gem on mingw-32 on ruby 2.0.0 See https://github.com/rake-compiler/rake-compiler-dock/issues/4 * Move c99 config to extcofig.rb
| * | | Allows the json marshaller to be passed json marshal options (#4252)Erik Benoist2018-05-253-4/+28
| | | |
| * | | Adopt ruby_package in ruby generated code. (#4627)Paul Yang2018-05-253-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | * Adopt ruby_package in ruby generated code. * Add test for ruby_package
| * | | Update version number to 3.6.0Jisi Liu2018-05-141-1/+1
| | | |
* | | | Add Google::Protobuf::Any.pack convenience class method. (#4719)igorpeshansky2018-06-192-1/+13
| | | |
* | | | Allows the json marshaller to be passed json marshal options (#4252)Erik Benoist2018-05-223-4/+28
| | | |
* | | | Adopt ruby_package in ruby generated code. (#4627)Paul Yang2018-05-173-0/+14
|/ / / | | | | | | | | | | | | | | | * Adopt ruby_package in ruby generated code. * Add test for ruby_package
* | | Fix RepeatedField#delete_if (#4292)Stuart Campbell2018-04-302-2/+11
| | | | | | | | | Make RepeatedField#delete_if consistent with Array#delete_if.
* | | Set ext.no_native = true for non mac platformJisi Liu2018-04-251-0/+6
| | | | | | | | | | | | | | | From: https://github.com/rake-compiler/rake-compiler/issues/146#issuecomment-368539245
* | | Merge branch (#4466)Paul Yang2018-04-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * Fix setup.py for windows build. * Bump version number to 3.5.2 * Cat the test-suite.log on errors for presubits
* | | Merge pull request #4167 from mike9005/patch-1Joshua Haberman2018-03-131-2/+2
|\ \ \ | | | | | | | | Ruby: Fix scope resolution for MessageExts
| * | | Fix scope resolution for MessageExts in RubyMichael Collis2018-01-121-2/+2
| | |/ | |/|
* | | Merge pull request #4291 from google/3.5.xJisi Liu2018-02-262-3/+3
|\ \ \ | |/ / |/| | Merge 3.5.x to master
| * | Bumping number to fix ruby 2.1 on macJisi Liu2018-01-261-1/+1
| | |
| * | Update rake file to build of 2.1.6.Jisi Liu2018-01-171-2/+2
| | |
| * | Support ruby2.5Jisi Liu2018-01-172-3/+3
| | |
* | | Merge remote-tracking branch 'origin/3.5.x' into masterJisi Liu2018-01-039-14/+181
|\| |
| * | Update version number to 3.5.1Jisi Liu2017-12-191-1/+1
| | |
| * | Fix ruby gc_test in ruby 2.4 (#4011)Paul Yang2017-12-083-13/+13
| | | | | | | | | | | | | | | | | | * Fix ruby gc_test in ruby 2.4 * Initialize global variables to Qnil.
| * | Add discard unknown API in ruby. (#3990)Paul Yang2017-12-075-0/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add discard unknown API in ruby. * Add test for oneof message field. * Add TestUnknown to represent unknown field data clearly. * Only serialize the message with unknown fields itself in test. * Move discard_unknown from Message to Google.Protobuf
* | | --pre is not necessaryW2017-12-061-4/+0
| | | | | | | | | --pre was not necessary to install google-protobuf when I tried it today (2017-12-06).
* | | Merge branch '3.5.x' into 3.5.x-mergeAdam Cozzette2017-11-301-1/+1
|\| |
| * | Update version number to 3.5.0Jisi Liu2017-11-021-1/+1
| |/
* | Merge pull request #2519 from ↵Joshua Haberman2017-11-292-4/+18
|\ \ | |/ |/| | | | | rubynerd-forks/ruby-fix-repeated-message-type-field unwrap descriptor class before comparison of RepeatedField types
| * test for field reassignment@rubynerd2017-10-121-0/+6
| |
| * handle sanity check for repeating enums correctly@rubynerd2016-12-301-3/+11
| |
| * unwrap descriptor class before comparison of RepeatedField types@rubynerd2016-12-191-1/+1
| | | | | | | | | | | | | | self->field_type_class returns the correct Ruby class, get_def_obj returns the Descriptor object used to generate the Ruby class via msgclass, so to compare the two types we get the msgclass from the descriptor.
* | Reserve unknown in Ruby (#3763)Paul Yang2017-10-265-827/+1958
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Reserve unknown in ruby * Revert ruby tests. Wait for cpp impl for conformance test * Add conformance test for preserving unknown * Add unknown field conformance test to csharp failure list. * Fix comments * Fix comment * Fix comments * Fix typo * Use stringsink_string directly * Mark hd unused * Remove unused encodeunknown_handlerfunc
* | Merge remote-tracking branch 'origin/3.4.x' into masterJisi Liu2017-10-111-1/+1
|\ \
| * | Bumping minor version for ruby gemsJisi Liu2017-09-151-1/+1
| | |
| * | Bump version for minor releaseJisi Liu2017-09-141-1/+1
| | |
| * | Storing the frame on the map means we don't need the arrayAaron Patterson2017-09-133-14/+9
| | |
| * | Move parse frame array to the Map objectAaron Patterson2017-09-135-23/+42
| | | | | | | | | | | | This makes the frame stack per-parser, and per-thread. Fixes #3250
* | | Fix ruby segment fault (#3708)Paul Yang2017-10-036-9/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix ruby segment fault 1) rb_ary_new cannot be called during allocate function. During allocate fucntion, the containing object hasn't been marked and rb_ary_new may invoke gc to collect containing object. 2) The global map should be marked before allocating it. Otherwise it may be garbage collected. * Add test * Remove commented code * Fix grammer error