value_field_typeclass should be a enum module, not EnumDescriptor
object.
Also expanding tests for enum valued maps.
Fixes#4580
Signed-off-by: Sorah Fukumori <her@sorah.jp>
In general, I think it will help us to debug issues if we have less C
code and more Ruby code. This method can be implemented in pure Ruby,
so this commit converts it to pure Ruby.
* add implicit time conversion
* add duration
* add init test
* more tests
* add type check and alternative c type check
* add rational and bigdecimal
* use rb_obj_is_kind_of
* use native time check
* chain implicit conversions
* remove unused variable
* Replace strptime with custom implementation
* Fix ruby strptime
* Fix test
* Fix ruby conformance test
* Use mktime
* Remove EmptyFieldMask from failed conformance test list
* Add conformance test for nested listvalue
* Fix upb for parsing repeated Value/ListValue
* Add failed repeated ListValue conformance test into php failure list
* add frozen checks
* Use rb_check_frozen
* Correct assertion on frozen error message
The second argument for the method assert_raise is the message
to show when the assertion fails. It does not check the error
object's message.
Add an additional assertion that does check the error's message.
* do frozen check first
* example with extra enum method
* update expected test output
* slight simplification
* add test for generated enum helpers
* move const helpers to c extension
* more explicit test
* more explicit test
* indent
* add foo test
* add check for _const suffix
* Use gnu for ruby build because strptime is provided by posix
* Move option to extconf.rb
* Remove unused code in Rakefile
* Add config files for kokoro test
* Use gnu 11
* Define _XOPEN_SOURCE
* Add gnu11 option
* Remove XOPEN
* Try base_cc_flags
* Try config_options
* Move time.h to top
* Try -D_XOPEN_SOURCE=700
* Define XOPEN_SOURCE directly
* Try extconf.rb
* Try CFLAGS
* Try ext.cross_config_options
* Make mac ruby release job fail on error
* Try again
* Try define _XOPEN_SOURCE in extconf.rb
* Try again
* Define __USE_XOPEN
* Remove 2.6.0
* No mingw
* Throw error on mingw
* Remove XOPEN_SOURCE in upb
* Add back mingw
* Remove comment
* Revert "Revert "Enable the ignore_unknown_field option in the Ruby unmarshal options" (#5511)"
This reverts commit be1716a6d0.
* Separate ruby conformance test on Mac
* Fix shell syntax
* Fix test
This adds the ability for the MRI Ruby library to optionally pass in a
ignore_unknown_fields option when decoding JSON. The functionality was
added upstream in upb, this change exposes that option.
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
* 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
* 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
* 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.
* 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