protip 0.37 → 0.37.1

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: b91d785c337df88feedaf062679787c1745e8e7ee420535549ccbd6e5f61fab1
4
- data.tar.gz: e897d6cda03fe31835f9a8e2243be0cb7f0875adbf590a05154d169e6252924b
3
+ metadata.gz: b29978429d180c9023e5b11f34c954942c7b3e020f2fff71dc492e603b7264af
4
+ data.tar.gz: 9e9a92cda97821f100f26d63267e33058f1f11e552ed17c65778f5530eda1973
5
5
  SHA512:
6
- metadata.gz: 84d548ff44b595968e6c05e7a794e2aca2bb9e51f4f3068615034de13bb2f2a02a0d94f3cfa1490c99b1856c5fc5c2c66661793b989c9f3430a891a445ad3a24
7
- data.tar.gz: d5e34084b562c4a3b424a94d1fe2a46926fd14a3c0e3da6b9f5bc0d335af24d824a0cbc0be3c30b8eedbcaba316b374d6372bd1caeb83a94290c540cc5f5b200
6
+ metadata.gz: a227d2e7c9737ab476b34147ed48b82923020f3bf91f6d9f2d03af2377b61dae50e942994b25f050fd45953a395ea6d35806c89c9ee5a1a1618700ebb4ab6615
7
+ data.tar.gz: 1d86e0454c130c97ab6c02fbbab114c8152b11cd29338064c23a460e96250bc70d488a2fe8a7b3d487315df9f075f4b70288991af95e64908cf9c3692578f4fe
@@ -228,9 +228,14 @@ module Protip
228
228
  def set(field, value)
229
229
  return if field.label == :optional && value.nil? && get(field).nil?
230
230
 
231
- return message[field.name].replace value.map{|v| to_protobuf_value field, v} if field.label == :repeated
231
+ if field.label == :repeated
232
+ new_values = value.map {|v| to_protobuf_value(field, v) }.compact
233
+
234
+ message[field.name].replace(new_values)
235
+ else
236
+ message[field.name] = to_protobuf_value(field, value)
237
+ end
232
238
 
233
- message[field.name] = to_protobuf_value(field, value)
234
239
  end
235
240
 
236
241
  # Helper for setting values - converts the value for the given
@@ -1,3 +1,3 @@
1
1
  module Protip
2
- VERSION = '0.37'
2
+ VERSION = '0.37.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protip
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.37'
4
+ version: 0.37.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - AngelList
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-10 00:00:00.000000000 Z
11
+ date: 2022-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel