1. Added ruby22 and jruby tests to jenkins.
2. Added javascript tests to jenkins.
3. Added golang tests to jenkins.
4. Removed ruby19/ruby20 tests from travis. Support for ruby 2.0 has
ended since 2016/02/24.
https://www.ruby-lang.org/en/news/2016/02/24/support-plan-of-ruby-2-0-0-and-2-1/
Change-Id: Ie984b06772335352a4be7067ab2485f923875685
This fixes the test_acts_likes_an_array test in RepeatedFieldTest, which
checks that repeated fields respond to the same methods as regular Ruby
arrays. The bsearch_index and dig array methods seem to be new in Ruby
2.3 and so we should support those.
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)
The flags are:
UPB_JSON_ACCEPT_LEGACY_FIELD_NAMES
UPB_JSON_WRITE_LEGACY_FIELD_NAMES
The first just allows the parser to accept the old field names.
The second makes the printer print the old field names.
These flags are intended to be temporary, as a migration aid
for users.
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
While we are C99 in general, the Ruby build system
for building C extensions enables several flags that
throw warnings for C89/C90 variable ordering rules.
To avoid spewing a million warnings (or trying to
specifically override these warnings with command-line
flags, which would be tricky and possibly fragile)
we conform to Ruby's world of C89/C90.
Change-Id: I0e03e62d95068dfdfde112df0fb16a248a2f32a0