upfluence-thrift 2.3.1 → 2.4.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/benchmark/gen-rb/benchmark_constants.rb +11 -0
  3. data/benchmark/gen-rb/benchmark_service.rb +106 -0
  4. data/benchmark/gen-rb/benchmark_types.rb +10 -0
  5. data/lib/thrift/protocol/json_protocol.rb +65 -1
  6. data/spec/gen-rb/base/base_service.rb +106 -0
  7. data/spec/gen-rb/base/base_service_constants.rb +11 -0
  8. data/spec/gen-rb/base/base_service_types.rb +33 -0
  9. data/spec/gen-rb/extended/extended_service.rb +103 -0
  10. data/spec/gen-rb/extended/extended_service_constants.rb +11 -0
  11. data/spec/gen-rb/extended/extended_service_types.rb +12 -0
  12. data/spec/gen-rb/flat/namespaced_nonblocking_service.rb +343 -0
  13. data/spec/gen-rb/flat/referenced_constants.rb +11 -0
  14. data/spec/gen-rb/flat/referenced_types.rb +17 -0
  15. data/spec/gen-rb/flat/thrift_namespaced_spec_constants.rb +11 -0
  16. data/spec/gen-rb/flat/thrift_namespaced_spec_types.rb +35 -0
  17. data/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb +343 -0
  18. data/spec/gen-rb/namespaced_spec_namespace/thrift_namespaced_spec_constants.rb +11 -0
  19. data/spec/gen-rb/namespaced_spec_namespace/thrift_namespaced_spec_types.rb +35 -0
  20. data/spec/gen-rb/nonblocking_service.rb +343 -0
  21. data/spec/gen-rb/other_namespace/referenced_constants.rb +11 -0
  22. data/spec/gen-rb/other_namespace/referenced_types.rb +17 -0
  23. data/spec/gen-rb/thrift_spec_constants.rb +11 -0
  24. data/spec/gen-rb/thrift_spec_types.rb +699 -0
  25. data/spec/json_protocol_spec.rb +17 -0
  26. data/test/debug_proto/gen-rb/debug_proto_test_constants.rb +274 -0
  27. data/test/debug_proto/gen-rb/debug_proto_test_types.rb +936 -0
  28. data/test/debug_proto/gen-rb/empty_service.rb +39 -0
  29. data/test/debug_proto/gen-rb/inherited.rb +105 -0
  30. data/test/debug_proto/gen-rb/reverse_order_service.rb +107 -0
  31. data/test/debug_proto/gen-rb/service_for_exception_with_a_map.rb +106 -0
  32. data/test/debug_proto/gen-rb/srv.rb +410 -0
  33. metadata +60 -2
@@ -0,0 +1,410 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (2.4.0-upfluence)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+ require 'debug_proto_test_types'
9
+
10
+ module Srv
11
+ SERVICE = 'Srv'.freeze
12
+ NAMESPACE = ''.freeze
13
+
14
+ class Client
15
+ def initialize(client)
16
+ @client = ::Thrift.build_client(client)
17
+ end
18
+
19
+ def self.from_provider(provider)
20
+ Client.new(provider.build(NAMESPACE, SERVICE))
21
+ end
22
+
23
+ def Janky(arg)
24
+ result = @client.call_binary(
25
+ 'Janky',
26
+ Janky_args.new(arg: arg),
27
+ Janky_result
28
+ )
29
+
30
+ return result.success unless result.success.nil?
31
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'Janky failed: unknown result')
32
+ result
33
+ end
34
+
35
+ def voidMethod()
36
+ result = @client.call_binary(
37
+ 'voidMethod',
38
+ VoidMethod_args.new(),
39
+ VoidMethod_result
40
+ )
41
+
42
+ nil
43
+ end
44
+
45
+ def primitiveMethod()
46
+ result = @client.call_binary(
47
+ 'primitiveMethod',
48
+ PrimitiveMethod_args.new(),
49
+ PrimitiveMethod_result
50
+ )
51
+
52
+ return result.success unless result.success.nil?
53
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'primitiveMethod failed: unknown result')
54
+ result
55
+ end
56
+
57
+ def structMethod()
58
+ result = @client.call_binary(
59
+ 'structMethod',
60
+ StructMethod_args.new(),
61
+ StructMethod_result
62
+ )
63
+
64
+ return result.success unless result.success.nil?
65
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'structMethod failed: unknown result')
66
+ result
67
+ end
68
+
69
+ def methodWithDefaultArgs(something)
70
+ result = @client.call_binary(
71
+ 'methodWithDefaultArgs',
72
+ MethodWithDefaultArgs_args.new(something: something),
73
+ MethodWithDefaultArgs_result
74
+ )
75
+
76
+ nil
77
+ end
78
+
79
+ def onewayMethod()
80
+ @client.call_unary(
81
+ 'onewayMethod',
82
+ OnewayMethod_args.new()
83
+ )
84
+ end
85
+
86
+ end
87
+
88
+ class Processor
89
+ include ::Thrift::Processor
90
+
91
+ def self.from_provider(handler, provider)
92
+ provider.build(NAMESPACE, SERVICE, Processor, handler)
93
+ end
94
+
95
+ def process_Janky(seqid, iprot, oprot)
96
+ args = read_args(iprot, Janky_args)
97
+ result = @middleware.handle_binary('Janky', args) do |args|
98
+ result = Janky_result.new()
99
+ result.success = @handler.Janky(args.arg)
100
+ result
101
+ end
102
+
103
+ write_result(result, oprot, 'Janky', seqid)
104
+ end
105
+
106
+ def process_voidMethod(seqid, iprot, oprot)
107
+ args = read_args(iprot, VoidMethod_args)
108
+ result = @middleware.handle_binary('voidMethod', args) do |args|
109
+ result = VoidMethod_result.new()
110
+ @handler.voidMethod()
111
+ result
112
+ end
113
+
114
+ write_result(result, oprot, 'voidMethod', seqid)
115
+ end
116
+
117
+ def process_primitiveMethod(seqid, iprot, oprot)
118
+ args = read_args(iprot, PrimitiveMethod_args)
119
+ result = @middleware.handle_binary('primitiveMethod', args) do |args|
120
+ result = PrimitiveMethod_result.new()
121
+ result.success = @handler.primitiveMethod()
122
+ result
123
+ end
124
+
125
+ write_result(result, oprot, 'primitiveMethod', seqid)
126
+ end
127
+
128
+ def process_structMethod(seqid, iprot, oprot)
129
+ args = read_args(iprot, StructMethod_args)
130
+ result = @middleware.handle_binary('structMethod', args) do |args|
131
+ result = StructMethod_result.new()
132
+ result.success = @handler.structMethod()
133
+ result
134
+ end
135
+
136
+ write_result(result, oprot, 'structMethod', seqid)
137
+ end
138
+
139
+ def process_methodWithDefaultArgs(seqid, iprot, oprot)
140
+ args = read_args(iprot, MethodWithDefaultArgs_args)
141
+ result = @middleware.handle_binary('methodWithDefaultArgs', args) do |args|
142
+ result = MethodWithDefaultArgs_result.new()
143
+ @handler.methodWithDefaultArgs(args.something)
144
+ result
145
+ end
146
+
147
+ write_result(result, oprot, 'methodWithDefaultArgs', seqid)
148
+ end
149
+
150
+ def process_onewayMethod(seqid, iprot, oprot)
151
+ args = read_args(iprot, OnewayMethod_args)
152
+ @middleware.handle_unary('onewayMethod', args) do |args|
153
+ @handler.onewayMethod()
154
+ nil
155
+ end
156
+ end
157
+
158
+ end
159
+
160
+ # HELPER FUNCTIONS AND STRUCTURES
161
+
162
+ class Janky_args
163
+ include ::Thrift::Struct, ::Thrift::Struct_Union
164
+
165
+ NAME = 'Janky_args'.freeze
166
+ NAMESPACE = ''.freeze
167
+
168
+ THRIFT_FIELD_INDEX_ARG = 1
169
+
170
+ FIELDS = {
171
+ THRIFT_FIELD_INDEX_ARG => {type: ::Thrift::Types::I32, name: 'arg'}
172
+ }
173
+
174
+ def struct_fields; FIELDS; end
175
+
176
+ def validate
177
+ end
178
+
179
+ ::Thrift::Struct.generate_accessors self
180
+ ::Thrift.register_struct_type self
181
+ end
182
+
183
+ class Janky_result
184
+ include ::Thrift::Struct, ::Thrift::Struct_Union
185
+
186
+ NAME = 'Janky_result'.freeze
187
+ NAMESPACE = ''.freeze
188
+
189
+ THRIFT_FIELD_INDEX_SUCCESS = 0
190
+
191
+ FIELDS = {
192
+ THRIFT_FIELD_INDEX_SUCCESS => {type: ::Thrift::Types::I32, name: 'success'}
193
+ }
194
+
195
+ def struct_fields; FIELDS; end
196
+
197
+ def validate
198
+ end
199
+
200
+ ::Thrift::Struct.generate_accessors self
201
+ ::Thrift.register_struct_type self
202
+ end
203
+
204
+ class VoidMethod_args
205
+ include ::Thrift::Struct, ::Thrift::Struct_Union
206
+
207
+ NAME = 'voidMethod_args'.freeze
208
+ NAMESPACE = ''.freeze
209
+
210
+
211
+ FIELDS = {
212
+
213
+ }
214
+
215
+ def struct_fields; FIELDS; end
216
+
217
+ def validate
218
+ end
219
+
220
+ ::Thrift::Struct.generate_accessors self
221
+ ::Thrift.register_struct_type self
222
+ end
223
+
224
+ class VoidMethod_result
225
+ include ::Thrift::Struct, ::Thrift::Struct_Union
226
+
227
+ NAME = 'voidMethod_result'.freeze
228
+ NAMESPACE = ''.freeze
229
+
230
+
231
+ FIELDS = {
232
+
233
+ }
234
+
235
+ def struct_fields; FIELDS; end
236
+
237
+ def validate
238
+ end
239
+
240
+ ::Thrift::Struct.generate_accessors self
241
+ ::Thrift.register_struct_type self
242
+ end
243
+
244
+ class PrimitiveMethod_args
245
+ include ::Thrift::Struct, ::Thrift::Struct_Union
246
+
247
+ NAME = 'primitiveMethod_args'.freeze
248
+ NAMESPACE = ''.freeze
249
+
250
+
251
+ FIELDS = {
252
+
253
+ }
254
+
255
+ def struct_fields; FIELDS; end
256
+
257
+ def validate
258
+ end
259
+
260
+ ::Thrift::Struct.generate_accessors self
261
+ ::Thrift.register_struct_type self
262
+ end
263
+
264
+ class PrimitiveMethod_result
265
+ include ::Thrift::Struct, ::Thrift::Struct_Union
266
+
267
+ NAME = 'primitiveMethod_result'.freeze
268
+ NAMESPACE = ''.freeze
269
+
270
+ THRIFT_FIELD_INDEX_SUCCESS = 0
271
+
272
+ FIELDS = {
273
+ THRIFT_FIELD_INDEX_SUCCESS => {type: ::Thrift::Types::I32, name: 'success'}
274
+ }
275
+
276
+ def struct_fields; FIELDS; end
277
+
278
+ def validate
279
+ end
280
+
281
+ ::Thrift::Struct.generate_accessors self
282
+ ::Thrift.register_struct_type self
283
+ end
284
+
285
+ class StructMethod_args
286
+ include ::Thrift::Struct, ::Thrift::Struct_Union
287
+
288
+ NAME = 'structMethod_args'.freeze
289
+ NAMESPACE = ''.freeze
290
+
291
+
292
+ FIELDS = {
293
+
294
+ }
295
+
296
+ def struct_fields; FIELDS; end
297
+
298
+ def validate
299
+ end
300
+
301
+ ::Thrift::Struct.generate_accessors self
302
+ ::Thrift.register_struct_type self
303
+ end
304
+
305
+ class StructMethod_result
306
+ include ::Thrift::Struct, ::Thrift::Struct_Union
307
+
308
+ NAME = 'structMethod_result'.freeze
309
+ NAMESPACE = ''.freeze
310
+
311
+ THRIFT_FIELD_INDEX_SUCCESS = 0
312
+
313
+ FIELDS = {
314
+ THRIFT_FIELD_INDEX_SUCCESS => {type: ::Thrift::Types::STRUCT, name: 'success', class: ::CompactProtoTestStruct}
315
+ }
316
+
317
+ def struct_fields; FIELDS; end
318
+
319
+ def validate
320
+ end
321
+
322
+ ::Thrift::Struct.generate_accessors self
323
+ ::Thrift.register_struct_type self
324
+ end
325
+
326
+ class MethodWithDefaultArgs_args
327
+ include ::Thrift::Struct, ::Thrift::Struct_Union
328
+
329
+ NAME = 'methodWithDefaultArgs_args'.freeze
330
+ NAMESPACE = ''.freeze
331
+
332
+ THRIFT_FIELD_INDEX_SOMETHING = 1
333
+
334
+ FIELDS = {
335
+ THRIFT_FIELD_INDEX_SOMETHING => {type: ::Thrift::Types::I32, name: 'something', default: 2}
336
+ }
337
+
338
+ def struct_fields; FIELDS; end
339
+
340
+ def validate
341
+ end
342
+
343
+ ::Thrift::Struct.generate_accessors self
344
+ ::Thrift.register_struct_type self
345
+ end
346
+
347
+ class MethodWithDefaultArgs_result
348
+ include ::Thrift::Struct, ::Thrift::Struct_Union
349
+
350
+ NAME = 'methodWithDefaultArgs_result'.freeze
351
+ NAMESPACE = ''.freeze
352
+
353
+
354
+ FIELDS = {
355
+
356
+ }
357
+
358
+ def struct_fields; FIELDS; end
359
+
360
+ def validate
361
+ end
362
+
363
+ ::Thrift::Struct.generate_accessors self
364
+ ::Thrift.register_struct_type self
365
+ end
366
+
367
+ class OnewayMethod_args
368
+ include ::Thrift::Struct, ::Thrift::Struct_Union
369
+
370
+ NAME = 'onewayMethod_args'.freeze
371
+ NAMESPACE = ''.freeze
372
+
373
+
374
+ FIELDS = {
375
+
376
+ }
377
+
378
+ def struct_fields; FIELDS; end
379
+
380
+ def validate
381
+ end
382
+
383
+ ::Thrift::Struct.generate_accessors self
384
+ ::Thrift.register_struct_type self
385
+ end
386
+
387
+ class OnewayMethod_result
388
+ include ::Thrift::Struct, ::Thrift::Struct_Union
389
+
390
+ NAME = 'onewayMethod_result'.freeze
391
+ NAMESPACE = ''.freeze
392
+
393
+
394
+ FIELDS = {
395
+
396
+ }
397
+
398
+ def struct_fields; FIELDS; end
399
+
400
+ def validate
401
+ end
402
+
403
+ ::Thrift::Struct.generate_accessors self
404
+ ::Thrift.register_struct_type self
405
+ end
406
+
407
+ ::Thrift.register_service_type(self)
408
+
409
+ end
410
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: upfluence-thrift
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 2.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thrift Developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-11 00:00:00.000000000 Z
11
+ date: 2023-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -181,6 +181,9 @@ files:
181
181
  - benchmark/Benchmark.thrift
182
182
  - benchmark/benchmark.rb
183
183
  - benchmark/client.rb
184
+ - benchmark/gen-rb/benchmark_constants.rb
185
+ - benchmark/gen-rb/benchmark_service.rb
186
+ - benchmark/gen-rb/benchmark_types.rb
184
187
  - benchmark/server.rb
185
188
  - benchmark/thin_server.rb
186
189
  - ext/binary_protocol_accelerated.c
@@ -272,6 +275,25 @@ files:
272
275
  - spec/compact_protocol_spec.rb
273
276
  - spec/exception_spec.rb
274
277
  - spec/flat_spec.rb
278
+ - spec/gen-rb/base/base_service.rb
279
+ - spec/gen-rb/base/base_service_constants.rb
280
+ - spec/gen-rb/base/base_service_types.rb
281
+ - spec/gen-rb/extended/extended_service.rb
282
+ - spec/gen-rb/extended/extended_service_constants.rb
283
+ - spec/gen-rb/extended/extended_service_types.rb
284
+ - spec/gen-rb/flat/namespaced_nonblocking_service.rb
285
+ - spec/gen-rb/flat/referenced_constants.rb
286
+ - spec/gen-rb/flat/referenced_types.rb
287
+ - spec/gen-rb/flat/thrift_namespaced_spec_constants.rb
288
+ - spec/gen-rb/flat/thrift_namespaced_spec_types.rb
289
+ - spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb
290
+ - spec/gen-rb/namespaced_spec_namespace/thrift_namespaced_spec_constants.rb
291
+ - spec/gen-rb/namespaced_spec_namespace/thrift_namespaced_spec_types.rb
292
+ - spec/gen-rb/nonblocking_service.rb
293
+ - spec/gen-rb/other_namespace/referenced_constants.rb
294
+ - spec/gen-rb/other_namespace/referenced_types.rb
295
+ - spec/gen-rb/thrift_spec_constants.rb
296
+ - spec/gen-rb/thrift_spec_types.rb
275
297
  - spec/http_client_spec.rb
276
298
  - spec/json_protocol_spec.rb
277
299
  - spec/namespaced_spec.rb
@@ -294,6 +316,13 @@ files:
294
316
  - spec/types_spec.rb
295
317
  - spec/union_spec.rb
296
318
  - spec/unix_socket_spec.rb
319
+ - test/debug_proto/gen-rb/debug_proto_test_constants.rb
320
+ - test/debug_proto/gen-rb/debug_proto_test_types.rb
321
+ - test/debug_proto/gen-rb/empty_service.rb
322
+ - test/debug_proto/gen-rb/inherited.rb
323
+ - test/debug_proto/gen-rb/reverse_order_service.rb
324
+ - test/debug_proto/gen-rb/service_for_exception_with_a_map.rb
325
+ - test/debug_proto/gen-rb/srv.rb
297
326
  homepage: http://thrift.apache.org
298
327
  licenses:
299
328
  - Apache 2.0
@@ -325,6 +354,13 @@ signing_key:
325
354
  specification_version: 4
326
355
  summary: Ruby bindings for Apache Thrift
327
356
  test_files:
357
+ - test/debug_proto/gen-rb/debug_proto_test_constants.rb
358
+ - test/debug_proto/gen-rb/debug_proto_test_types.rb
359
+ - test/debug_proto/gen-rb/empty_service.rb
360
+ - test/debug_proto/gen-rb/inherited.rb
361
+ - test/debug_proto/gen-rb/reverse_order_service.rb
362
+ - test/debug_proto/gen-rb/service_for_exception_with_a_map.rb
363
+ - test/debug_proto/gen-rb/srv.rb
328
364
  - spec/BaseService.thrift
329
365
  - spec/ExtendedService.thrift
330
366
  - spec/Referenced.thrift
@@ -340,6 +376,25 @@ test_files:
340
376
  - spec/compact_protocol_spec.rb
341
377
  - spec/exception_spec.rb
342
378
  - spec/flat_spec.rb
379
+ - spec/gen-rb/base/base_service.rb
380
+ - spec/gen-rb/base/base_service_constants.rb
381
+ - spec/gen-rb/base/base_service_types.rb
382
+ - spec/gen-rb/extended/extended_service.rb
383
+ - spec/gen-rb/extended/extended_service_constants.rb
384
+ - spec/gen-rb/extended/extended_service_types.rb
385
+ - spec/gen-rb/flat/namespaced_nonblocking_service.rb
386
+ - spec/gen-rb/flat/referenced_constants.rb
387
+ - spec/gen-rb/flat/referenced_types.rb
388
+ - spec/gen-rb/flat/thrift_namespaced_spec_constants.rb
389
+ - spec/gen-rb/flat/thrift_namespaced_spec_types.rb
390
+ - spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb
391
+ - spec/gen-rb/namespaced_spec_namespace/thrift_namespaced_spec_constants.rb
392
+ - spec/gen-rb/namespaced_spec_namespace/thrift_namespaced_spec_types.rb
393
+ - spec/gen-rb/nonblocking_service.rb
394
+ - spec/gen-rb/other_namespace/referenced_constants.rb
395
+ - spec/gen-rb/other_namespace/referenced_types.rb
396
+ - spec/gen-rb/thrift_spec_constants.rb
397
+ - spec/gen-rb/thrift_spec_types.rb
343
398
  - spec/http_client_spec.rb
344
399
  - spec/json_protocol_spec.rb
345
400
  - spec/namespaced_spec.rb
@@ -365,5 +420,8 @@ test_files:
365
420
  - benchmark/Benchmark.thrift
366
421
  - benchmark/benchmark.rb
367
422
  - benchmark/client.rb
423
+ - benchmark/gen-rb/benchmark_constants.rb
424
+ - benchmark/gen-rb/benchmark_service.rb
425
+ - benchmark/gen-rb/benchmark_types.rb
368
426
  - benchmark/server.rb
369
427
  - benchmark/thin_server.rb