thrift 0.15.0 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2f990b7528ad0c61eee1ef6fb2ff0cfc85c7f4912ec34eb6919e998f5dbbf016
4
- data.tar.gz: d6958229cbc05dbe919746ec9019823635a29018e8f6c6542c5698bc61d5444a
3
+ metadata.gz: 3eb9c3426244976ebdcb047b32fed76aef36e4baf8350e2a78f1dc0f9aee5c41
4
+ data.tar.gz: 869bad95ea16bd26756da4489781e5bda821ada062f8a51d3b9ff2d5f6a60aa4
5
5
  SHA512:
6
- metadata.gz: 649454979aca2efed3f750e6d81a5b4763e46d16ea2d7ae795401bca2ec94f4b4a93a8264bf010d3ff54674cb6f206d52a65a886b197dd9ae677a53ff835d79b
7
- data.tar.gz: 3b257ad43df2146a8ee1bc96d06142476004de18af38080799fe197864cda0858479e18955d20f9dc271f9c40ec106783e87ece7bbc0c3ccba6c32dafda34707
6
+ metadata.gz: 00ba40e87f27e68ef4402b4d994e33d20030dfcc2e021c2d922ec76bb7cdb30e1fafba4866b1d502570c4288cf9cafb6ae2f5975e374408d963923493e717293
7
+ data.tar.gz: 0ed16ee3ba0f6f6401c1822f4b645fb6882a793afaa0c257282b0e6715c6150b992f238776d47742b8404a19ae707e12876082f75030ee9f487335dee9aca15e
data/lib/thrift/client.rb CHANGED
@@ -50,9 +50,17 @@ module Thrift
50
50
  @oprot.trans.flush
51
51
  end
52
52
 
53
- def receive_message(result_klass)
53
+ def receive_message_begin()
54
54
  fname, mtype, rseqid = @iprot.read_message_begin
55
- handle_exception(mtype)
55
+ [fname, mtype, rseqid]
56
+ end
57
+
58
+ def reply_seqid(rseqid)
59
+ result = (rseqid==@seqid)?true:false
60
+ result
61
+ end
62
+
63
+ def receive_message(result_klass)
56
64
  result = result_klass.new
57
65
  result.read(@iprot)
58
66
  @iprot.read_message_end
data/spec/client_spec.rb CHANGED
@@ -69,6 +69,7 @@ describe 'Client' do
69
69
  expect(@prot).to receive(:read_message_end)
70
70
  mock_klass = double("#<MockClass:mock>")
71
71
  expect(mock_klass).to receive(:read).with(@prot)
72
+ @client.receive_message_begin()
72
73
  @client.receive_message(double("MockClass", :new => mock_klass))
73
74
  end
74
75
 
@@ -80,7 +81,8 @@ describe 'Client' do
80
81
  expect(mock_exc).to receive(:read).with(@prot)
81
82
  end
82
83
  end
83
- expect { @client.receive_message(nil) }.to raise_error(StandardError)
84
+ fname, mtype, sqeid = @client.receive_message_begin()
85
+ expect { @client.handle_exception(mtype) }.to raise_error(StandardError)
84
86
  end
85
87
 
86
88
  it "should close the transport if an error occurs while sending a message" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thrift
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Apache Thrift Developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-11 00:00:00.000000000 Z
11
+ date: 2024-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: 2.0.8
75
+ version: 2.2.6.4
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - '='
81
81
  - !ruby/object:Gem::Version
82
- version: 2.0.8
82
+ version: 2.2.6.4
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rack-test
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -158,65 +158,65 @@ extensions:
158
158
  - ext/extconf.rb
159
159
  extra_rdoc_files:
160
160
  - README.md
161
- - ext/thrift_native.c
161
+ - ext/binary_protocol_accelerated.c
162
162
  - ext/bytes.c
163
+ - ext/compact_protocol.c
164
+ - ext/memory_buffer.c
163
165
  - ext/protocol.c
164
166
  - ext/strlcpy.c
165
- - ext/memory_buffer.c
166
- - ext/binary_protocol_accelerated.c
167
167
  - ext/struct.c
168
- - ext/compact_protocol.c
168
+ - ext/thrift_native.c
169
+ - ext/binary_protocol_accelerated.h
170
+ - ext/bytes.h
171
+ - ext/compact_protocol.h
169
172
  - ext/constants.h
170
173
  - ext/macros.h
171
- - ext/strlcpy.h
172
- - ext/bytes.h
173
174
  - ext/memory_buffer.h
174
175
  - ext/protocol.h
175
- - ext/binary_protocol_accelerated.h
176
+ - ext/strlcpy.h
176
177
  - ext/struct.h
177
- - ext/compact_protocol.h
178
178
  - ext/extconf.rb
179
- - lib/thrift/struct_union.rb
180
- - lib/thrift/struct.rb
179
+ - lib/thrift/bytes.rb
180
+ - lib/thrift/client.rb
181
+ - lib/thrift/core_ext/fixnum.rb
182
+ - lib/thrift/core_ext.rb
183
+ - lib/thrift/exceptions.rb
184
+ - lib/thrift/multiplexed_processor.rb
181
185
  - lib/thrift/processor.rb
186
+ - lib/thrift/protocol/base_protocol.rb
187
+ - lib/thrift/protocol/binary_protocol.rb
188
+ - lib/thrift/protocol/binary_protocol_accelerated.rb
189
+ - lib/thrift/protocol/compact_protocol.rb
182
190
  - lib/thrift/protocol/json_protocol.rb
183
191
  - lib/thrift/protocol/multiplexed_protocol.rb
184
192
  - lib/thrift/protocol/protocol_decorator.rb
185
- - lib/thrift/protocol/compact_protocol.rb
186
- - lib/thrift/protocol/binary_protocol_accelerated.rb
187
- - lib/thrift/protocol/binary_protocol.rb
188
- - lib/thrift/protocol/base_protocol.rb
189
- - lib/thrift/types.rb
190
- - lib/thrift/thrift_native.rb
191
- - lib/thrift/union.rb
192
- - lib/thrift/bytes.rb
193
- - lib/thrift/client.rb
194
- - lib/thrift/multiplexed_processor.rb
195
- - lib/thrift/server/thin_http_server.rb
193
+ - lib/thrift/serializer/deserializer.rb
194
+ - lib/thrift/serializer/serializer.rb
195
+ - lib/thrift/server/base_server.rb
196
+ - lib/thrift/server/mongrel_http_server.rb
197
+ - lib/thrift/server/nonblocking_server.rb
196
198
  - lib/thrift/server/simple_server.rb
199
+ - lib/thrift/server/thin_http_server.rb
197
200
  - lib/thrift/server/thread_pool_server.rb
198
201
  - lib/thrift/server/threaded_server.rb
199
- - lib/thrift/server/mongrel_http_server.rb
200
- - lib/thrift/server/base_server.rb
201
- - lib/thrift/server/nonblocking_server.rb
202
- - lib/thrift/transport/ssl_socket.rb
203
- - lib/thrift/transport/memory_buffer_transport.rb
202
+ - lib/thrift/struct.rb
203
+ - lib/thrift/struct_union.rb
204
+ - lib/thrift/thrift_native.rb
205
+ - lib/thrift/transport/base_server_transport.rb
206
+ - lib/thrift/transport/base_transport.rb
204
207
  - lib/thrift/transport/buffered_transport.rb
205
- - lib/thrift/transport/socket.rb
206
208
  - lib/thrift/transport/framed_transport.rb
207
209
  - lib/thrift/transport/http_client_transport.rb
208
- - lib/thrift/transport/base_server_transport.rb
209
- - lib/thrift/transport/ssl_server_socket.rb
210
- - lib/thrift/transport/unix_server_socket.rb
211
- - lib/thrift/transport/base_transport.rb
212
210
  - lib/thrift/transport/io_stream_transport.rb
211
+ - lib/thrift/transport/memory_buffer_transport.rb
213
212
  - lib/thrift/transport/server_socket.rb
213
+ - lib/thrift/transport/socket.rb
214
+ - lib/thrift/transport/ssl_server_socket.rb
215
+ - lib/thrift/transport/ssl_socket.rb
216
+ - lib/thrift/transport/unix_server_socket.rb
214
217
  - lib/thrift/transport/unix_socket.rb
215
- - lib/thrift/exceptions.rb
216
- - lib/thrift/core_ext.rb
217
- - lib/thrift/core_ext/fixnum.rb
218
- - lib/thrift/serializer/deserializer.rb
219
- - lib/thrift/serializer/serializer.rb
218
+ - lib/thrift/types.rb
219
+ - lib/thrift/union.rb
220
220
  - lib/thrift.rb
221
221
  files:
222
222
  - README.md
@@ -345,48 +345,47 @@ required_rubygems_version: !ruby/object:Gem::Requirement
345
345
  - !ruby/object:Gem::Version
346
346
  version: '0'
347
347
  requirements: []
348
- rubyforge_project: thrift
349
- rubygems_version: 2.7.6.2
348
+ rubygems_version: 3.3.15
350
349
  signing_key:
351
350
  specification_version: 4
352
351
  summary: Ruby bindings for Apache Thrift
353
352
  test_files:
354
- - spec/types_spec.rb
355
- - spec/union_spec.rb
353
+ - spec/BaseService.thrift
354
+ - spec/ExtendedService.thrift
355
+ - spec/Referenced.thrift
356
+ - spec/ThriftNamespacedSpec.thrift
356
357
  - spec/ThriftSpec.thrift
357
- - spec/spec_helper.rb
358
+ - spec/base_protocol_spec.rb
359
+ - spec/base_transport_spec.rb
358
360
  - spec/binary_protocol_accelerated_spec.rb
359
- - spec/ssl_socket_spec.rb
360
- - spec/http_client_spec.rb
361
- - spec/flat_spec.rb
362
- - spec/server_socket_spec.rb
363
- - spec/bytes_spec.rb
364
361
  - spec/binary_protocol_spec.rb
365
- - spec/socket_spec.rb
366
- - spec/struct_spec.rb
367
- - spec/exception_spec.rb
368
- - spec/thin_http_server_spec.rb
369
- - spec/BaseService.thrift
362
+ - spec/binary_protocol_spec_shared.rb
363
+ - spec/bytes_spec.rb
364
+ - spec/client_spec.rb
370
365
  - spec/compact_protocol_spec.rb
366
+ - spec/exception_spec.rb
367
+ - spec/flat_spec.rb
368
+ - spec/http_client_spec.rb
369
+ - spec/json_protocol_spec.rb
371
370
  - spec/namespaced_spec.rb
371
+ - spec/nonblocking_server_spec.rb
372
372
  - spec/processor_spec.rb
373
+ - spec/serializer_spec.rb
374
+ - spec/server_socket_spec.rb
375
+ - spec/server_spec.rb
376
+ - spec/socket_spec.rb
377
+ - spec/socket_spec_shared.rb
378
+ - spec/spec_helper.rb
373
379
  - spec/ssl_server_socket_spec.rb
374
- - spec/ExtendedService.thrift
375
- - spec/binary_protocol_spec_shared.rb
380
+ - spec/ssl_socket_spec.rb
376
381
  - spec/struct_nested_containers_spec.rb
377
- - spec/base_protocol_spec.rb
378
- - spec/serializer_spec.rb
379
- - spec/json_protocol_spec.rb
380
- - spec/base_transport_spec.rb
381
- - spec/nonblocking_server_spec.rb
382
- - spec/Referenced.thrift
382
+ - spec/struct_spec.rb
383
+ - spec/thin_http_server_spec.rb
384
+ - spec/types_spec.rb
385
+ - spec/union_spec.rb
383
386
  - spec/unix_socket_spec.rb
384
- - spec/socket_spec_shared.rb
385
- - spec/ThriftNamespacedSpec.thrift
386
- - spec/server_spec.rb
387
- - spec/client_spec.rb
387
+ - benchmark/Benchmark.thrift
388
388
  - benchmark/benchmark.rb
389
+ - benchmark/client.rb
389
390
  - benchmark/server.rb
390
391
  - benchmark/thin_server.rb
391
- - benchmark/client.rb
392
- - benchmark/Benchmark.thrift