tapioca 0.11.0 → 0.11.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: f32d4fd559ee85f540926b3faa454aaf2ddd919b502438bf2deda24a4b04f855
4
- data.tar.gz: 9368c2329923554e639310003630d36f9bf7a2f895df619cfe844dacd9a2c176
3
+ metadata.gz: aa8f364e4169fb5f723942c3e96a7d4dc1790f59d64cb46cfc509ee55259f4cb
4
+ data.tar.gz: b49aa47178045a367967b8c0b0731270ea8bb008edd2815711cb4764ca6adda6
5
5
  SHA512:
6
- metadata.gz: c997e7598a5cef84e52935b0f9681ca636fef5fb866d30f1e6d19e2912ae38b5ec7499e69cde6cd147b4a723214d80abb109dbd523e48f143eae0b1edbefd46e
7
- data.tar.gz: 33882ab5de1b8b43d775bdb20b0fab39d97ebe2ce7b346bb9828b64e27dd99bb7d46814ac441dd1b6b7aadb3b4aa02f93a652d4e6fa42c34ac83241eb9eb78d7
6
+ metadata.gz: 0e21aaff68f12f20fcb844153b57bca75cf56765ab21ed1375a5b3c7d9610bc60c4e815b84522dbd27497699675ac27a7a4066e4032cb15b3d00355b5cc4b3d0
7
+ data.tar.gz: 87f26576c955e276801df3e8e00d3ed222374b430ea2012984127a10da0cc85ba0b166fa381bae6a627c5526d3af3079c63d22c3ef967a527df6b5502143c81e
@@ -145,7 +145,9 @@ module Tapioca
145
145
  klass.create_method("initialize", parameters: [kwargs_parameter], return_type: "void")
146
146
  end
147
147
  else
148
- raise TypeError, "Unexpected descriptor class: #{descriptor.class.name}"
148
+ add_error(<<~MSG.strip)
149
+ Unexpected descriptor class `#{descriptor.class.name}` for `#{constant}`
150
+ MSG
149
151
  end
150
152
  end
151
153
  end
@@ -162,7 +164,17 @@ module Tapioca
162
164
  T.cast(desc, Google::Protobuf::EnumDescriptor).enummodule
163
165
  end
164
166
 
165
- results = T.cast(ObjectSpace.each_object(marker).to_a, T::Array[Module]).concat(enum_modules)
167
+ results = if Google::Protobuf.const_defined?(:AbstractMessage)
168
+ abstract_message_const = ::Google::Protobuf.const_get(:AbstractMessage)
169
+ descendants_of(abstract_message_const) - [abstract_message_const]
170
+ else
171
+ T.cast(
172
+ ObjectSpace.each_object(marker).to_a,
173
+ T::Array[Module],
174
+ )
175
+ end
176
+
177
+ results = results.concat(enum_modules)
166
178
  results.any? ? results + [Google::Protobuf::RepeatedField, Google::Protobuf::Map] : []
167
179
  end
168
180
  end
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Tapioca
5
- VERSION = "0.11.0"
5
+ VERSION = "0.11.1"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tapioca
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ufuk Kayserilioglu
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2023-02-21 00:00:00.000000000 Z
14
+ date: 2023-02-23 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler