thrift 0.11.0.0 → 0.14.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/thrift/protocol/base_protocol.rb +11 -3
- data/lib/thrift/protocol/binary_protocol.rb +8 -1
- data/lib/thrift/protocol/binary_protocol_accelerated.rb +8 -0
- data/lib/thrift/protocol/compact_protocol.rb +8 -0
- data/lib/thrift/protocol/json_protocol.rb +8 -0
- data/lib/thrift/protocol/multiplexed_protocol.rb +5 -1
- data/lib/thrift/server/base_server.rb +8 -2
- data/lib/thrift/server/simple_server.rb +5 -1
- data/lib/thrift/server/thread_pool_server.rb +5 -1
- data/lib/thrift/server/threaded_server.rb +5 -1
- data/lib/thrift/transport/base_server_transport.rb +1 -1
- data/lib/thrift/transport/base_transport.rb +8 -0
- data/lib/thrift/transport/buffered_transport.rb +9 -1
- data/lib/thrift/transport/framed_transport.rb +9 -1
- data/lib/thrift/transport/http_client_transport.rb +6 -0
- data/lib/thrift/transport/io_stream_transport.rb +4 -1
- data/lib/thrift/transport/memory_buffer_transport.rb +4 -0
- data/lib/thrift/transport/server_socket.rb +6 -1
- data/lib/thrift/transport/socket.rb +4 -2
- data/lib/thrift/transport/ssl_server_socket.rb +4 -0
- data/lib/thrift/transport/ssl_socket.rb +4 -0
- data/lib/thrift/transport/unix_server_socket.rb +5 -1
- data/lib/thrift/transport/unix_socket.rb +5 -1
- data/spec/base_protocol_spec.rb +79 -71
- data/spec/base_transport_spec.rb +155 -117
- data/spec/binary_protocol_accelerated_spec.rb +6 -2
- data/spec/binary_protocol_spec.rb +16 -8
- data/spec/binary_protocol_spec_shared.rb +73 -70
- data/spec/bytes_spec.rb +38 -38
- data/spec/client_spec.rb +41 -42
- data/spec/compact_protocol_spec.rb +23 -8
- data/spec/exception_spec.rb +54 -54
- data/spec/flat_spec.rb +5 -5
- data/spec/http_client_spec.rb +64 -38
- data/spec/json_protocol_spec.rb +146 -138
- data/spec/namespaced_spec.rb +5 -5
- data/spec/nonblocking_server_spec.rb +16 -16
- data/spec/processor_spec.rb +26 -26
- data/spec/serializer_spec.rb +20 -20
- data/spec/server_socket_spec.rb +27 -22
- data/spec/server_spec.rb +91 -52
- data/spec/socket_spec.rb +23 -16
- data/spec/socket_spec_shared.rb +31 -31
- data/spec/ssl_server_socket_spec.rb +34 -0
- data/spec/ssl_socket_spec.rb +26 -22
- data/spec/struct_nested_containers_spec.rb +24 -24
- data/spec/struct_spec.rb +120 -120
- data/spec/thin_http_server_spec.rb +18 -18
- data/spec/types_spec.rb +56 -53
- data/spec/union_spec.rb +42 -43
- data/spec/unix_socket_spec.rb +43 -34
- metadata +138 -158
- data/benchmark/gen-rb/benchmark_constants.rb +0 -11
- data/benchmark/gen-rb/benchmark_service.rb +0 -80
- data/benchmark/gen-rb/benchmark_types.rb +0 -10
- data/spec/gen-rb/base/base_service.rb +0 -80
- data/spec/gen-rb/base/base_service_constants.rb +0 -11
- data/spec/gen-rb/base/base_service_types.rb +0 -26
- data/spec/gen-rb/extended/extended_service.rb +0 -78
- data/spec/gen-rb/extended/extended_service_constants.rb +0 -11
- data/spec/gen-rb/extended/extended_service_types.rb +0 -12
- data/spec/gen-rb/flat/namespaced_nonblocking_service.rb +0 -272
- data/spec/gen-rb/flat/referenced_constants.rb +0 -11
- data/spec/gen-rb/flat/referenced_types.rb +0 -17
- data/spec/gen-rb/flat/thrift_namespaced_spec_constants.rb +0 -11
- data/spec/gen-rb/flat/thrift_namespaced_spec_types.rb +0 -28
- data/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb +0 -272
- data/spec/gen-rb/namespaced_spec_namespace/thrift_namespaced_spec_constants.rb +0 -11
- data/spec/gen-rb/namespaced_spec_namespace/thrift_namespaced_spec_types.rb +0 -28
- data/spec/gen-rb/nonblocking_service.rb +0 -272
- data/spec/gen-rb/other_namespace/referenced_constants.rb +0 -11
- data/spec/gen-rb/other_namespace/referenced_types.rb +0 -17
- data/spec/gen-rb/thrift_spec_constants.rb +0 -11
- data/spec/gen-rb/thrift_spec_types.rb +0 -538
- data/test/debug_proto/gen-rb/debug_proto_test_constants.rb +0 -278
- data/test/debug_proto/gen-rb/debug_proto_test_types.rb +0 -781
- data/test/debug_proto/gen-rb/empty_service.rb +0 -28
- data/test/debug_proto/gen-rb/inherited.rb +0 -83
- data/test/debug_proto/gen-rb/reverse_order_service.rb +0 -86
- data/test/debug_proto/gen-rb/service_for_exception_with_a_map.rb +0 -85
- data/test/debug_proto/gen-rb/srv.rb +0 -395
@@ -1,278 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Autogenerated by Thrift Compiler (0.11.0)
|
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 Thrift
|
11
|
-
module Test
|
12
|
-
COMPACT_TEST = ::Thrift::Test::CompactProtoTestStruct.new({
|
13
|
-
%q"a_byte" => 127,
|
14
|
-
%q"a_i16" => 32000,
|
15
|
-
%q"a_i32" => 1000000000,
|
16
|
-
%q"a_i64" => 1099511627775,
|
17
|
-
%q"a_double" => 5.6789,
|
18
|
-
%q"a_string" => %q"my string",
|
19
|
-
%q"true_field" => true,
|
20
|
-
%q"false_field" => false,
|
21
|
-
%q"empty_struct_field" => ::Thrift::Test::Empty.new({
|
22
|
-
}),
|
23
|
-
%q"byte_list" => [
|
24
|
-
-127,
|
25
|
-
-1,
|
26
|
-
0,
|
27
|
-
1,
|
28
|
-
127,
|
29
|
-
],
|
30
|
-
%q"i16_list" => [
|
31
|
-
-1,
|
32
|
-
0,
|
33
|
-
1,
|
34
|
-
32767,
|
35
|
-
],
|
36
|
-
%q"i32_list" => [
|
37
|
-
-1,
|
38
|
-
0,
|
39
|
-
255,
|
40
|
-
65535,
|
41
|
-
16777215,
|
42
|
-
2147483647,
|
43
|
-
],
|
44
|
-
%q"i64_list" => [
|
45
|
-
-1,
|
46
|
-
0,
|
47
|
-
255,
|
48
|
-
65535,
|
49
|
-
16777215,
|
50
|
-
4294967295,
|
51
|
-
1099511627775,
|
52
|
-
281474976710655,
|
53
|
-
72057594037927935,
|
54
|
-
9223372036854775807,
|
55
|
-
],
|
56
|
-
%q"double_list" => [
|
57
|
-
0.1,
|
58
|
-
0.2,
|
59
|
-
0.3,
|
60
|
-
],
|
61
|
-
%q"string_list" => [
|
62
|
-
%q"first",
|
63
|
-
%q"second",
|
64
|
-
%q"third",
|
65
|
-
],
|
66
|
-
%q"boolean_list" => [
|
67
|
-
true,
|
68
|
-
true,
|
69
|
-
true,
|
70
|
-
false,
|
71
|
-
false,
|
72
|
-
false,
|
73
|
-
],
|
74
|
-
%q"struct_list" => [
|
75
|
-
::Thrift::Test::Empty.new({
|
76
|
-
}),
|
77
|
-
::Thrift::Test::Empty.new({
|
78
|
-
}),
|
79
|
-
],
|
80
|
-
%q"byte_set" => Set.new([
|
81
|
-
-127,
|
82
|
-
-1,
|
83
|
-
0,
|
84
|
-
1,
|
85
|
-
127,
|
86
|
-
]),
|
87
|
-
%q"i16_set" => Set.new([
|
88
|
-
-1,
|
89
|
-
0,
|
90
|
-
1,
|
91
|
-
32767,
|
92
|
-
]),
|
93
|
-
%q"i32_set" => Set.new([
|
94
|
-
1,
|
95
|
-
2,
|
96
|
-
3,
|
97
|
-
]),
|
98
|
-
%q"i64_set" => Set.new([
|
99
|
-
-1,
|
100
|
-
0,
|
101
|
-
255,
|
102
|
-
65535,
|
103
|
-
16777215,
|
104
|
-
4294967295,
|
105
|
-
1099511627775,
|
106
|
-
281474976710655,
|
107
|
-
72057594037927935,
|
108
|
-
9223372036854775807,
|
109
|
-
]),
|
110
|
-
%q"double_set" => Set.new([
|
111
|
-
0.1,
|
112
|
-
0.2,
|
113
|
-
0.3,
|
114
|
-
]),
|
115
|
-
%q"string_set" => Set.new([
|
116
|
-
%q"first",
|
117
|
-
%q"second",
|
118
|
-
%q"third",
|
119
|
-
]),
|
120
|
-
%q"boolean_set" => Set.new([
|
121
|
-
true,
|
122
|
-
false,
|
123
|
-
]),
|
124
|
-
%q"struct_set" => Set.new([
|
125
|
-
::Thrift::Test::Empty.new({
|
126
|
-
}),
|
127
|
-
]),
|
128
|
-
%q"byte_byte_map" => {
|
129
|
-
1 => 2,
|
130
|
-
},
|
131
|
-
%q"i16_byte_map" => {
|
132
|
-
1 => 1,
|
133
|
-
-1 => 1,
|
134
|
-
32767 => 1,
|
135
|
-
},
|
136
|
-
%q"i32_byte_map" => {
|
137
|
-
1 => 1,
|
138
|
-
-1 => 1,
|
139
|
-
2147483647 => 1,
|
140
|
-
},
|
141
|
-
%q"i64_byte_map" => {
|
142
|
-
0 => 1,
|
143
|
-
1 => 1,
|
144
|
-
-1 => 1,
|
145
|
-
9223372036854775807 => 1,
|
146
|
-
},
|
147
|
-
%q"double_byte_map" => {
|
148
|
-
-1.1 => 1,
|
149
|
-
1.1 => 1,
|
150
|
-
},
|
151
|
-
%q"string_byte_map" => {
|
152
|
-
%q"first" => 1,
|
153
|
-
%q"second" => 2,
|
154
|
-
%q"third" => 3,
|
155
|
-
%q"" => 0,
|
156
|
-
},
|
157
|
-
%q"boolean_byte_map" => {
|
158
|
-
true => 1,
|
159
|
-
false => 0,
|
160
|
-
},
|
161
|
-
%q"byte_i16_map" => {
|
162
|
-
1 => 1,
|
163
|
-
2 => -1,
|
164
|
-
3 => 32767,
|
165
|
-
},
|
166
|
-
%q"byte_i32_map" => {
|
167
|
-
1 => 1,
|
168
|
-
2 => -1,
|
169
|
-
3 => 2147483647,
|
170
|
-
},
|
171
|
-
%q"byte_i64_map" => {
|
172
|
-
1 => 1,
|
173
|
-
2 => -1,
|
174
|
-
3 => 9223372036854775807,
|
175
|
-
},
|
176
|
-
%q"byte_double_map" => {
|
177
|
-
1 => 0.1,
|
178
|
-
2 => -0.1,
|
179
|
-
3 => 1e+06,
|
180
|
-
},
|
181
|
-
%q"byte_string_map" => {
|
182
|
-
1 => %q"",
|
183
|
-
2 => %q"blah",
|
184
|
-
3 => %q"loooooooooooooong string",
|
185
|
-
},
|
186
|
-
%q"byte_boolean_map" => {
|
187
|
-
1 => true,
|
188
|
-
2 => false,
|
189
|
-
},
|
190
|
-
%q"list_byte_map" => {
|
191
|
-
[
|
192
|
-
1,
|
193
|
-
2,
|
194
|
-
3,
|
195
|
-
] => 1,
|
196
|
-
[
|
197
|
-
0,
|
198
|
-
1,
|
199
|
-
] => 2,
|
200
|
-
[
|
201
|
-
] => 0,
|
202
|
-
},
|
203
|
-
%q"set_byte_map" => {
|
204
|
-
Set.new([
|
205
|
-
1,
|
206
|
-
2,
|
207
|
-
3,
|
208
|
-
]) => 1,
|
209
|
-
Set.new([
|
210
|
-
0,
|
211
|
-
1,
|
212
|
-
]) => 2,
|
213
|
-
Set.new([
|
214
|
-
]) => 0,
|
215
|
-
},
|
216
|
-
%q"map_byte_map" => {
|
217
|
-
{
|
218
|
-
1 => 1,
|
219
|
-
} => 1,
|
220
|
-
{
|
221
|
-
2 => 2,
|
222
|
-
} => 2,
|
223
|
-
{
|
224
|
-
} => 0,
|
225
|
-
},
|
226
|
-
%q"byte_map_map" => {
|
227
|
-
0 => {
|
228
|
-
},
|
229
|
-
1 => {
|
230
|
-
1 => 1,
|
231
|
-
},
|
232
|
-
2 => {
|
233
|
-
1 => 1,
|
234
|
-
2 => 2,
|
235
|
-
},
|
236
|
-
},
|
237
|
-
%q"byte_set_map" => {
|
238
|
-
0 => Set.new([
|
239
|
-
]),
|
240
|
-
1 => Set.new([
|
241
|
-
1,
|
242
|
-
]),
|
243
|
-
2 => Set.new([
|
244
|
-
1,
|
245
|
-
2,
|
246
|
-
]),
|
247
|
-
},
|
248
|
-
%q"byte_list_map" => {
|
249
|
-
0 => [
|
250
|
-
],
|
251
|
-
1 => [
|
252
|
-
1,
|
253
|
-
],
|
254
|
-
2 => [
|
255
|
-
1,
|
256
|
-
2,
|
257
|
-
],
|
258
|
-
},
|
259
|
-
})
|
260
|
-
|
261
|
-
MYCONST = 2
|
262
|
-
|
263
|
-
MY_SOME_ENUM = 1
|
264
|
-
|
265
|
-
MY_SOME_ENUM_1 = 1
|
266
|
-
|
267
|
-
MY_ENUM_MAP = {
|
268
|
-
1 => 2,
|
269
|
-
}
|
270
|
-
|
271
|
-
EXTRA_CRAZY_MAP = {
|
272
|
-
1 => ::Thrift::Test::StructWithSomeEnum.new({
|
273
|
-
%q"blah" => 2,
|
274
|
-
}),
|
275
|
-
}
|
276
|
-
|
277
|
-
end
|
278
|
-
end
|