thrift 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/InstalledFiles +1 -0
- data/Makefile +512 -0
- data/Makefile.am +3 -1
- data/Makefile.in +117 -45
- data/Manifest +17 -0
- data/Rakefile +6 -8
- data/benchmark/gen-rb/benchmark_constants.rb +10 -0
- data/benchmark/gen-rb/benchmark_service.rb +80 -0
- data/benchmark/gen-rb/benchmark_types.rb +9 -0
- data/debug_proto_test/gen-rb/debug_proto_test_constants.rb +273 -0
- data/debug_proto_test/gen-rb/debug_proto_test_types.rb +705 -0
- data/debug_proto_test/gen-rb/empty_service.rb +24 -0
- data/debug_proto_test/gen-rb/inherited.rb +79 -0
- data/debug_proto_test/gen-rb/reverse_order_service.rb +82 -0
- data/debug_proto_test/gen-rb/service_for_exception_with_a_map.rb +81 -0
- data/debug_proto_test/gen-rb/srv.rb +330 -0
- data/ext/binary_protocol_accelerated.c +24 -11
- data/ext/compact_protocol.c +14 -11
- data/ext/constants.h +1 -0
- data/ext/memory_buffer.c +56 -1
- data/ext/struct.c +76 -19
- data/ext/thrift_native.c +2 -0
- data/lib/thrift/exceptions.rb +3 -1
- data/lib/thrift/protocol/binary_protocol.rb +14 -10
- data/lib/thrift/protocol/compact_protocol.rb +7 -4
- data/lib/thrift/server/nonblocking_server.rb +15 -5
- data/lib/thrift/struct.rb +9 -6
- data/lib/thrift/struct_union.rb +47 -14
- data/lib/thrift/transport/base_transport.rb +39 -2
- data/lib/thrift/transport/buffered_transport.rb +31 -0
- data/lib/thrift/transport/framed_transport.rb +26 -0
- data/lib/thrift/transport/memory_buffer_transport.rb +29 -0
- data/spec/binary_protocol_spec.rb +2 -4
- data/spec/gen-rb/nonblocking_service.rb +272 -0
- data/spec/gen-rb/thrift_spec_constants.rb +10 -0
- data/spec/gen-rb/thrift_spec_types.rb +345 -0
- data/spec/spec_helper.rb +1 -3
- data/thrift.gemspec +10 -11
- data/tmp/thrift-0.7.0.gem +0 -0
- metadata +22 -8
@@ -0,0 +1,273 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift Compiler (0.7.0)
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'debug_proto_test_types'
|
8
|
+
|
9
|
+
COMPACT_TEST = CompactProtoTestStruct.new({
|
10
|
+
%q"a_byte" => 127,
|
11
|
+
%q"a_i16" => 32000,
|
12
|
+
%q"a_i32" => 1000000000,
|
13
|
+
%q"a_i64" => 1099511627775,
|
14
|
+
%q"a_double" => 5.6789,
|
15
|
+
%q"a_string" => %q"my string",
|
16
|
+
%q"true_field" => true,
|
17
|
+
%q"false_field" => false,
|
18
|
+
%q"empty_struct_field" => Empty.new({
|
19
|
+
}),
|
20
|
+
%q"byte_list" => [
|
21
|
+
-127,
|
22
|
+
-1,
|
23
|
+
0,
|
24
|
+
1,
|
25
|
+
127,
|
26
|
+
],
|
27
|
+
%q"i16_list" => [
|
28
|
+
-1,
|
29
|
+
0,
|
30
|
+
1,
|
31
|
+
32767,
|
32
|
+
],
|
33
|
+
%q"i32_list" => [
|
34
|
+
-1,
|
35
|
+
0,
|
36
|
+
255,
|
37
|
+
65535,
|
38
|
+
16777215,
|
39
|
+
2147483647,
|
40
|
+
],
|
41
|
+
%q"i64_list" => [
|
42
|
+
-1,
|
43
|
+
0,
|
44
|
+
255,
|
45
|
+
65535,
|
46
|
+
16777215,
|
47
|
+
4294967295,
|
48
|
+
1099511627775,
|
49
|
+
281474976710655,
|
50
|
+
72057594037927935,
|
51
|
+
9223372036854775807,
|
52
|
+
],
|
53
|
+
%q"double_list" => [
|
54
|
+
0.1,
|
55
|
+
0.2,
|
56
|
+
0.3,
|
57
|
+
],
|
58
|
+
%q"string_list" => [
|
59
|
+
%q"first",
|
60
|
+
%q"second",
|
61
|
+
%q"third",
|
62
|
+
],
|
63
|
+
%q"boolean_list" => [
|
64
|
+
true,
|
65
|
+
true,
|
66
|
+
true,
|
67
|
+
false,
|
68
|
+
false,
|
69
|
+
false,
|
70
|
+
],
|
71
|
+
%q"struct_list" => [
|
72
|
+
Empty.new({
|
73
|
+
}),
|
74
|
+
Empty.new({
|
75
|
+
}),
|
76
|
+
],
|
77
|
+
%q"byte_set" => Set.new([
|
78
|
+
-127,
|
79
|
+
-1,
|
80
|
+
0,
|
81
|
+
1,
|
82
|
+
127,
|
83
|
+
]),
|
84
|
+
%q"i16_set" => Set.new([
|
85
|
+
-1,
|
86
|
+
0,
|
87
|
+
1,
|
88
|
+
32767,
|
89
|
+
]),
|
90
|
+
%q"i32_set" => Set.new([
|
91
|
+
1,
|
92
|
+
2,
|
93
|
+
3,
|
94
|
+
]),
|
95
|
+
%q"i64_set" => Set.new([
|
96
|
+
-1,
|
97
|
+
0,
|
98
|
+
255,
|
99
|
+
65535,
|
100
|
+
16777215,
|
101
|
+
4294967295,
|
102
|
+
1099511627775,
|
103
|
+
281474976710655,
|
104
|
+
72057594037927935,
|
105
|
+
9223372036854775807,
|
106
|
+
]),
|
107
|
+
%q"double_set" => Set.new([
|
108
|
+
0.1,
|
109
|
+
0.2,
|
110
|
+
0.3,
|
111
|
+
]),
|
112
|
+
%q"string_set" => Set.new([
|
113
|
+
%q"first",
|
114
|
+
%q"second",
|
115
|
+
%q"third",
|
116
|
+
]),
|
117
|
+
%q"boolean_set" => Set.new([
|
118
|
+
true,
|
119
|
+
false,
|
120
|
+
]),
|
121
|
+
%q"struct_set" => Set.new([
|
122
|
+
Empty.new({
|
123
|
+
}),
|
124
|
+
]),
|
125
|
+
%q"byte_byte_map" => {
|
126
|
+
1 => 2,
|
127
|
+
},
|
128
|
+
%q"i16_byte_map" => {
|
129
|
+
1 => 1,
|
130
|
+
-1 => 1,
|
131
|
+
32767 => 1,
|
132
|
+
},
|
133
|
+
%q"i32_byte_map" => {
|
134
|
+
1 => 1,
|
135
|
+
-1 => 1,
|
136
|
+
2147483647 => 1,
|
137
|
+
},
|
138
|
+
%q"i64_byte_map" => {
|
139
|
+
0 => 1,
|
140
|
+
1 => 1,
|
141
|
+
-1 => 1,
|
142
|
+
9223372036854775807 => 1,
|
143
|
+
},
|
144
|
+
%q"double_byte_map" => {
|
145
|
+
-1.1 => 1,
|
146
|
+
1.1 => 1,
|
147
|
+
},
|
148
|
+
%q"string_byte_map" => {
|
149
|
+
%q"first" => 1,
|
150
|
+
%q"second" => 2,
|
151
|
+
%q"third" => 3,
|
152
|
+
%q"" => 0,
|
153
|
+
},
|
154
|
+
%q"boolean_byte_map" => {
|
155
|
+
true => 1,
|
156
|
+
false => 0,
|
157
|
+
},
|
158
|
+
%q"byte_i16_map" => {
|
159
|
+
1 => 1,
|
160
|
+
2 => -1,
|
161
|
+
3 => 32767,
|
162
|
+
},
|
163
|
+
%q"byte_i32_map" => {
|
164
|
+
1 => 1,
|
165
|
+
2 => -1,
|
166
|
+
3 => 2147483647,
|
167
|
+
},
|
168
|
+
%q"byte_i64_map" => {
|
169
|
+
1 => 1,
|
170
|
+
2 => -1,
|
171
|
+
3 => 9223372036854775807,
|
172
|
+
},
|
173
|
+
%q"byte_double_map" => {
|
174
|
+
1 => 0.1,
|
175
|
+
2 => -0.1,
|
176
|
+
3 => 1e+06,
|
177
|
+
},
|
178
|
+
%q"byte_string_map" => {
|
179
|
+
1 => %q"",
|
180
|
+
2 => %q"blah",
|
181
|
+
3 => %q"loooooooooooooong string",
|
182
|
+
},
|
183
|
+
%q"byte_boolean_map" => {
|
184
|
+
1 => true,
|
185
|
+
2 => false,
|
186
|
+
},
|
187
|
+
%q"list_byte_map" => {
|
188
|
+
[
|
189
|
+
1,
|
190
|
+
2,
|
191
|
+
3,
|
192
|
+
] => 1,
|
193
|
+
[
|
194
|
+
0,
|
195
|
+
1,
|
196
|
+
] => 2,
|
197
|
+
[
|
198
|
+
] => 0,
|
199
|
+
},
|
200
|
+
%q"set_byte_map" => {
|
201
|
+
Set.new([
|
202
|
+
1,
|
203
|
+
2,
|
204
|
+
3,
|
205
|
+
]) => 1,
|
206
|
+
Set.new([
|
207
|
+
0,
|
208
|
+
1,
|
209
|
+
]) => 2,
|
210
|
+
Set.new([
|
211
|
+
]) => 0,
|
212
|
+
},
|
213
|
+
%q"map_byte_map" => {
|
214
|
+
{
|
215
|
+
1 => 1,
|
216
|
+
} => 1,
|
217
|
+
{
|
218
|
+
2 => 2,
|
219
|
+
} => 2,
|
220
|
+
{
|
221
|
+
} => 0,
|
222
|
+
},
|
223
|
+
%q"byte_map_map" => {
|
224
|
+
0 => {
|
225
|
+
},
|
226
|
+
1 => {
|
227
|
+
1 => 1,
|
228
|
+
},
|
229
|
+
2 => {
|
230
|
+
1 => 1,
|
231
|
+
2 => 2,
|
232
|
+
},
|
233
|
+
},
|
234
|
+
%q"byte_set_map" => {
|
235
|
+
0 => Set.new([
|
236
|
+
]),
|
237
|
+
1 => Set.new([
|
238
|
+
1,
|
239
|
+
]),
|
240
|
+
2 => Set.new([
|
241
|
+
1,
|
242
|
+
2,
|
243
|
+
]),
|
244
|
+
},
|
245
|
+
%q"byte_list_map" => {
|
246
|
+
0 => [
|
247
|
+
],
|
248
|
+
1 => [
|
249
|
+
1,
|
250
|
+
],
|
251
|
+
2 => [
|
252
|
+
1,
|
253
|
+
2,
|
254
|
+
],
|
255
|
+
},
|
256
|
+
})
|
257
|
+
|
258
|
+
MYCONST = 2
|
259
|
+
|
260
|
+
MY_SOME_ENUM = 1
|
261
|
+
|
262
|
+
MY_SOME_ENUM_1 = 1
|
263
|
+
|
264
|
+
MY_ENUM_MAP = {
|
265
|
+
1 => 2,
|
266
|
+
}
|
267
|
+
|
268
|
+
EXTRA_CRAZY_MAP = {
|
269
|
+
1 => StructWithSomeEnum.new({
|
270
|
+
%q"blah" => 2,
|
271
|
+
}),
|
272
|
+
}
|
273
|
+
|