protobuf-cucumber 3.10.7 → 3.10.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e41726f108cc73083cf188a2997d7650e078bd2937aacc25786dfed436070e88
4
- data.tar.gz: 174470b2b60f9122466726ab6f1c7e8c41596392da429d08ce4280badaa37ef2
3
+ metadata.gz: 101f1a8da0a074c4c67d8de05ae0dabe18c5db8ca0abffe4535d69debf49cc2b
4
+ data.tar.gz: d78074675e8b5492287991e0f8511e046f9023d9b174038b2998dcfce2172ec2
5
5
  SHA512:
6
- metadata.gz: 9acdeea06bc6883cd72df58dcf2f9309ffe3d728ab56d3b19611e1c764c7422d0cd90c4256040ac9c19ee22ad935e03f139953c0dd5cfcb2a86de86fff0ce2b1
7
- data.tar.gz: c9b92ea42b796401e6613155d6ce2dd1f72165825db039f839548bcd7be38ec01707fbc634bf02514ff8de7ae87df4ad170181063e16551c600fc423b016d8fb
6
+ metadata.gz: 99a5b689627fe434fad7cc431eba2907730340adb38ee8877e4dfb40fd0130670e7116fd01de883cb331636a76939acd56edf3bf643722c754bab93d20849381
7
+ data.tar.gz: 8180a58b051d27a09dbd68e8a790e591f35d727d06f1bb84edddbcd13056a333618f8d0a0c7c66d36d6d578e1cf2e754d1330d2abbe2bdfa6f2a77c31115ca99
@@ -37,7 +37,7 @@ module Protobuf
37
37
  type_class.fetch(value) || fail(TypeError, "Invalid Enum value: #{value.inspect} for #{name}")
38
38
  end
39
39
 
40
- def json_encode(value)
40
+ def json_encode(value, options={})
41
41
  enum = type_class.enums.find { |e| e.to_i == value }
42
42
  enum.to_s(:name)
43
43
  end
@@ -174,7 +174,7 @@ module Protobuf
174
174
  value
175
175
  end
176
176
 
177
- if proto3 && (hashed_value.nil? || value == field.class.default)
177
+ if proto3 && (hashed_value.nil? || value == field.class.default rescue field.default rescue nil)
178
178
  result.delete(field.name)
179
179
  else
180
180
  key = proto3 ? field.name.to_s.camelize(:lower).to_sym : field.name
@@ -1,3 +1,3 @@
1
1
  module Protobuf
2
- VERSION = '3.10.7' # rubocop:disable Style/MutableConstant
2
+ VERSION = '3.10.8' # rubocop:disable Style/MutableConstant
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protobuf-cucumber
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.10.7
4
+ version: 3.10.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - BJ Neilsen