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