aboutsummaryrefslogtreecommitdiff
path: root/ruby/tests/basic.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fixed Ruby tests for JRuby 1.7Adam Cozzette2016-11-231-2/+4
| | | | | | | | | This makes a couple of changes to fix the tests for JRuby 1.7: - Avoid using assert_false since that assertion seems not to exist in older versions - Disable a test related to respond_to? for JRuby. It's hard to tell what is going wrong here but it looks like probably a JRuby bug that has been fixed in more recent versions.
* Fix copy pasta in testMarcin Wyszynski2016-11-031-1/+1
|
* More Ruby-eqsue interfaceMarcin Wyszynski2016-11-031-0/+10
|
* failing test for #2036:Brendan Ribera2016-08-301-1/+4
| | | | | * add a repeated field to the tested hash * also assert that two messages with identical values produce identical hashes
* Fix for JRuby (assert_true is not present).Josh Haberman2016-07-281-2/+2
|
* Ruby: fixed string freezing for JRuby.Josh Haberman2016-07-251-2/+4
|
* Ruby: encode and freeze strings when the are assigned or decoded.Josh Haberman2016-07-211-18/+24
|
* Fixed oneof behavior for enums and fixed JRuby.Josh Haberman2016-05-181-5/+5
|
* Ruby oneofs: return default instead of nil for unset fields.Josh Haberman2016-05-181-19/+19
|
* Ruby JSON: always accept both camelCase and original field names.Josh Haberman2016-04-141-0/+5
| | | | | | | | For JSON encoding we provide a new option to decide at encode time whether to use camelCase or original proto field names: json = MapMessage.encode_json(m, :preserve_proto_fieldnames => true)
* Changed Ruby to properly camelCase its JSON by default.Josh Haberman2016-02-181-1/+1
|
* Add field name to initialization map exceptionsAnders Carling2015-11-201-0/+17
|
* Raise NoMethodError for unknown fieldsAnders Carling2015-11-201-0/+12
| | | | More informative and more ruby-like
* Merge pull request #338 from skippy/encode-decode-helpersChris Fallin2015-05-151-0/+61
|\ | | | | ruby: Encode decode cleanup and behavior normalization
| * adding and simplifying encoders/decodersAdam Greene2015-05-131-0/+61
| | | | | | | | | | | | * make consistent between mri and jruby * create a #to_h and have it use symbols for keys * add #to_json and #to_proto helpers on the Google::Protobuf message classes
* | make repeated_field quack like an arrayAdam Greene2015-05-141-2/+2
| |
* | Added Ruby to Travis testing.Chris Fallin2015-05-131-2/+4
|/ | | | | | | | | - Added RVM-based Ruby test driver that tests MRI and JRuby. - Fixed JRuby compilation (at least in my current setup): force source version to 1.6 (Java 6) to allow generics and annotations. - Modify the skipped JRuby JSON tests so that the exit code is 0 (skip() results in a failing exit code from `rake test`). An upcoming PR should fix JSON under JRuby in general soon.
* Merge pull request #334 from skippy/allow-msg-to-accept-nilChris Fallin2015-05-021-0/+2
|\ | | | | ruby: allow a message field to be unset
| * allow a message field to be unsetAdam Greene2015-05-021-0/+2
| |
* | return nil if array index indicie is out of boundsAdam Greene2015-05-011-4/+39
|/ | | | | | | ruby arrays don't throw an exception; they return nil. Lets do the same! this fix also includes the ability to use negative array indicies
* add size alias for lengthAdam Greene2015-05-011-2/+12
| | | | | | | | | | starting to make `RepeatedField` quack like an array additional changes: * make sure gemspec gets all ruby code files * add homepage in gem spec removes one of the warnings, and the gem spec authors are pushing everyone to include a homepage in the gem * remove excess whitespace in test suite to bring formatting inline with the rest of the file
* Fixed issue #283: crash in JSON handler cleanup.Chris Fallin2015-04-131-0/+24
| | | | Includes repro test case from @wfarr.
* add jruby support by protobuf-java reflection APIIsaiah Peng2015-03-101-0/+2
|
* Merge pull request #211 from isaiah/map_inspectChris Fallin2015-02-171-1/+1
|\ | | | | Ruby implementation Map#inspect should be consistent with Hash#inspect
| * Google::Protobuf::Map#inspect should be consistent with Hash#inspectIsaiah Peng2015-02-141-1/+1
| |
* | Merge pull request #189 from cfallin/update-ruby-upbJoshua Haberman2015-02-051-0/+8
|\ \ | |/ |/| Updated to latest upb and added test for JSON map operation.
| * Updated to latest upb and added test for JSON map operation.Chris Fallin2015-02-021-0/+8
| |
* | Merge pull request #190 from isaiah/to_aryChris Fallin2015-02-031-1/+2
|\ \ | |/ |/| add #to_ary to RepeatedField
| * add #to_ary to RepeatedFieldIsaiah Peng2015-02-031-1/+2
| |
* | Ruby extension: added oneof accessor.Chris Fallin2015-01-141-0/+6
| |
* | Addressed code-review comments.Chris Fallin2015-01-141-1/+6
| |
* | Support oneofs in MRI Ruby C extension.Chris Fallin2015-01-141-0/+92
|/
* Line-wraps at 80 chars.Chris Fallin2015-01-131-13/+18
|
* Support for maps in the MRI C Ruby extension.Chris Fallin2015-01-061-2/+256
| | | | | | | | This adds the Map container and support for parsing and serializing maps in the protobuf wire format (as defined by the C++ implementation, with MapEntry submessages in a repeated field). JSON map serialization/parsing are not yet supported as these will require some changes to upb as well.
* 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'.
* Provide a Ruby extension.Chris Fallin2014-12-091-0/+633
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.