slayer-thrift 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. data/CHANGELOG +1 -0
  2. data/InstalledFiles +1 -0
  3. data/Makefile +512 -0
  4. data/Makefile.am +49 -0
  5. data/Makefile.in +512 -0
  6. data/Manifest +103 -0
  7. data/README +43 -0
  8. data/Rakefile +102 -0
  9. data/benchmark/Benchmark.thrift +24 -0
  10. data/benchmark/benchmark.rb +271 -0
  11. data/benchmark/client.rb +74 -0
  12. data/benchmark/gen-rb/benchmark_constants.rb +10 -0
  13. data/benchmark/gen-rb/benchmark_service.rb +80 -0
  14. data/benchmark/gen-rb/benchmark_types.rb +9 -0
  15. data/benchmark/server.rb +82 -0
  16. data/benchmark/thin_server.rb +44 -0
  17. data/debug_proto_test/gen-rb/debug_proto_test_constants.rb +273 -0
  18. data/debug_proto_test/gen-rb/debug_proto_test_types.rb +705 -0
  19. data/debug_proto_test/gen-rb/empty_service.rb +24 -0
  20. data/debug_proto_test/gen-rb/inherited.rb +79 -0
  21. data/debug_proto_test/gen-rb/reverse_order_service.rb +82 -0
  22. data/debug_proto_test/gen-rb/service_for_exception_with_a_map.rb +81 -0
  23. data/debug_proto_test/gen-rb/srv.rb +330 -0
  24. data/ext/binary_protocol_accelerated.c +441 -0
  25. data/ext/binary_protocol_accelerated.h +20 -0
  26. data/ext/compact_protocol.c +618 -0
  27. data/ext/compact_protocol.h +20 -0
  28. data/ext/constants.h +96 -0
  29. data/ext/extconf.rb +30 -0
  30. data/ext/macros.h +41 -0
  31. data/ext/memory_buffer.c +131 -0
  32. data/ext/memory_buffer.h +20 -0
  33. data/ext/protocol.c +185 -0
  34. data/ext/protocol.h +20 -0
  35. data/ext/struct.c +716 -0
  36. data/ext/struct.h +25 -0
  37. data/ext/thrift_native.c +196 -0
  38. data/lib/thrift.rb +64 -0
  39. data/lib/thrift/client.rb +62 -0
  40. data/lib/thrift/core_ext.rb +23 -0
  41. data/lib/thrift/core_ext/fixnum.rb +29 -0
  42. data/lib/thrift/exceptions.rb +84 -0
  43. data/lib/thrift/processor.rb +57 -0
  44. data/lib/thrift/protocol/base_protocol.rb +290 -0
  45. data/lib/thrift/protocol/binary_protocol.rb +229 -0
  46. data/lib/thrift/protocol/binary_protocol_accelerated.rb +39 -0
  47. data/lib/thrift/protocol/compact_protocol.rb +426 -0
  48. data/lib/thrift/serializer/deserializer.rb +33 -0
  49. data/lib/thrift/serializer/serializer.rb +34 -0
  50. data/lib/thrift/server/base_server.rb +31 -0
  51. data/lib/thrift/server/mongrel_http_server.rb +58 -0
  52. data/lib/thrift/server/nonblocking_server.rb +305 -0
  53. data/lib/thrift/server/simple_server.rb +43 -0
  54. data/lib/thrift/server/thread_pool_server.rb +75 -0
  55. data/lib/thrift/server/threaded_server.rb +47 -0
  56. data/lib/thrift/struct.rb +237 -0
  57. data/lib/thrift/struct_union.rb +192 -0
  58. data/lib/thrift/thrift_native.rb +24 -0
  59. data/lib/thrift/transport/base_server_transport.rb +37 -0
  60. data/lib/thrift/transport/base_transport.rb +107 -0
  61. data/lib/thrift/transport/buffered_transport.rb +108 -0
  62. data/lib/thrift/transport/framed_transport.rb +116 -0
  63. data/lib/thrift/transport/http_client_transport.rb +51 -0
  64. data/lib/thrift/transport/io_stream_transport.rb +39 -0
  65. data/lib/thrift/transport/memory_buffer_transport.rb +125 -0
  66. data/lib/thrift/transport/server_socket.rb +63 -0
  67. data/lib/thrift/transport/socket.rb +137 -0
  68. data/lib/thrift/transport/unix_server_socket.rb +60 -0
  69. data/lib/thrift/transport/unix_socket.rb +40 -0
  70. data/lib/thrift/types.rb +101 -0
  71. data/lib/thrift/union.rb +179 -0
  72. data/script/proto_benchmark.rb +121 -0
  73. data/script/read_struct.rb +43 -0
  74. data/script/write_struct.rb +30 -0
  75. data/setup.rb +1585 -0
  76. data/slayer-thrift.gemspec +30 -0
  77. data/spec/ThriftSpec.thrift +132 -0
  78. data/spec/base_protocol_spec.rb +160 -0
  79. data/spec/base_transport_spec.rb +351 -0
  80. data/spec/binary_protocol_accelerated_spec.rb +46 -0
  81. data/spec/binary_protocol_spec.rb +61 -0
  82. data/spec/binary_protocol_spec_shared.rb +375 -0
  83. data/spec/client_spec.rb +100 -0
  84. data/spec/compact_protocol_spec.rb +133 -0
  85. data/spec/exception_spec.rb +142 -0
  86. data/spec/gen-rb/nonblocking_service.rb +272 -0
  87. data/spec/gen-rb/thrift_spec_constants.rb +10 -0
  88. data/spec/gen-rb/thrift_spec_types.rb +345 -0
  89. data/spec/http_client_spec.rb +64 -0
  90. data/spec/mongrel_http_server_spec.rb +117 -0
  91. data/spec/nonblocking_server_spec.rb +265 -0
  92. data/spec/processor_spec.rb +83 -0
  93. data/spec/serializer_spec.rb +69 -0
  94. data/spec/server_socket_spec.rb +80 -0
  95. data/spec/server_spec.rb +160 -0
  96. data/spec/socket_spec.rb +61 -0
  97. data/spec/socket_spec_shared.rb +104 -0
  98. data/spec/spec_helper.rb +58 -0
  99. data/spec/struct_spec.rb +295 -0
  100. data/spec/types_spec.rb +116 -0
  101. data/spec/union_spec.rb +193 -0
  102. data/spec/unix_socket_spec.rb +108 -0
  103. data/thrift.gemspec +30 -0
  104. data/tmp/thrift-0.7.0.gem +0 -0
  105. metadata +207 -0
@@ -0,0 +1,74 @@
1
+ #
2
+ # Licensed to the Apache Software Foundation (ASF) under one
3
+ # or more contributor license agreements. See the NOTICE file
4
+ # distributed with this work for additional information
5
+ # regarding copyright ownership. The ASF licenses this file
6
+ # to you under the Apache License, Version 2.0 (the
7
+ # "License"); you may not use this file except in compliance
8
+ # with the License. You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing,
13
+ # software distributed under the License is distributed on an
14
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ # KIND, either express or implied. See the License for the
16
+ # specific language governing permissions and limitations
17
+ # under the License.
18
+ #
19
+
20
+ $:.unshift File.dirname(__FILE__) + '/../lib'
21
+ require 'thrift'
22
+ $:.unshift File.dirname(__FILE__) + "/gen-rb"
23
+ require 'benchmark_service'
24
+
25
+ class Client
26
+ def initialize(host, port, clients_per_process, calls_per_client, log_exceptions)
27
+ @host = host
28
+ @port = port
29
+ @clients_per_process = clients_per_process
30
+ @calls_per_client = calls_per_client
31
+ @log_exceptions = log_exceptions
32
+ end
33
+
34
+ def run
35
+ @clients_per_process.times do
36
+ socket = Thrift::Socket.new(@host, @port)
37
+ transport = Thrift::FramedTransport.new(socket)
38
+ protocol = Thrift::BinaryProtocol.new(transport)
39
+ client = ThriftBenchmark::BenchmarkService::Client.new(protocol)
40
+ begin
41
+ start = Time.now
42
+ transport.open
43
+ Marshal.dump [:start, start], STDOUT
44
+ rescue => e
45
+ Marshal.dump [:connection_failure, Time.now], STDOUT
46
+ print_exception e if @log_exceptions
47
+ else
48
+ begin
49
+ @calls_per_client.times do
50
+ Marshal.dump [:call_start, Time.now], STDOUT
51
+ client.fibonacci(15)
52
+ Marshal.dump [:call_end, Time.now], STDOUT
53
+ end
54
+ transport.close
55
+ Marshal.dump [:end, Time.now], STDOUT
56
+ rescue Thrift::TransportException => e
57
+ Marshal.dump [:connection_error, Time.now], STDOUT
58
+ print_exception e if @log_exceptions
59
+ end
60
+ end
61
+ end
62
+ end
63
+
64
+ def print_exception(e)
65
+ STDERR.puts "ERROR: #{e.message}"
66
+ STDERR.puts "\t#{e.backtrace * "\n\t"}"
67
+ end
68
+ end
69
+
70
+ log_exceptions = true if ARGV[0] == '-log-exceptions' and ARGV.shift
71
+
72
+ host, port, clients_per_process, calls_per_client = ARGV
73
+
74
+ Client.new(host, port.to_i, clients_per_process.to_i, calls_per_client.to_i, log_exceptions).run
@@ -0,0 +1,10 @@
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 'benchmark_types'
8
+
9
+ module ThriftBenchmark
10
+ end
@@ -0,0 +1,80 @@
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 'thrift'
8
+ require 'benchmark_types'
9
+
10
+ module ThriftBenchmark
11
+ module BenchmarkService
12
+ class Client
13
+ include ::Thrift::Client
14
+
15
+ def fibonacci(n)
16
+ send_fibonacci(n)
17
+ return recv_fibonacci()
18
+ end
19
+
20
+ def send_fibonacci(n)
21
+ send_message('fibonacci', Fibonacci_args, :n => n)
22
+ end
23
+
24
+ def recv_fibonacci()
25
+ result = receive_message(Fibonacci_result)
26
+ return result.success unless result.success.nil?
27
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'fibonacci failed: unknown result')
28
+ end
29
+
30
+ end
31
+
32
+ class Processor
33
+ include ::Thrift::Processor
34
+
35
+ def process_fibonacci(seqid, iprot, oprot)
36
+ args = read_args(iprot, Fibonacci_args)
37
+ result = Fibonacci_result.new()
38
+ result.success = @handler.fibonacci(args.n)
39
+ write_result(result, oprot, 'fibonacci', seqid)
40
+ end
41
+
42
+ end
43
+
44
+ # HELPER FUNCTIONS AND STRUCTURES
45
+
46
+ class Fibonacci_args
47
+ include ::Thrift::Struct, ::Thrift::Struct_Union
48
+ N = 1
49
+
50
+ FIELDS = {
51
+ N => {:type => ::Thrift::Types::BYTE, :name => 'n'}
52
+ }
53
+
54
+ def struct_fields; FIELDS; end
55
+
56
+ def validate
57
+ end
58
+
59
+ ::Thrift::Struct.generate_accessors self
60
+ end
61
+
62
+ class Fibonacci_result
63
+ include ::Thrift::Struct, ::Thrift::Struct_Union
64
+ SUCCESS = 0
65
+
66
+ FIELDS = {
67
+ SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success'}
68
+ }
69
+
70
+ def struct_fields; FIELDS; end
71
+
72
+ def validate
73
+ end
74
+
75
+ ::Thrift::Struct.generate_accessors self
76
+ end
77
+
78
+ end
79
+
80
+ end
@@ -0,0 +1,9 @@
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
+
8
+ module ThriftBenchmark
9
+ end
@@ -0,0 +1,82 @@
1
+ #
2
+ # Licensed to the Apache Software Foundation (ASF) under one
3
+ # or more contributor license agreements. See the NOTICE file
4
+ # distributed with this work for additional information
5
+ # regarding copyright ownership. The ASF licenses this file
6
+ # to you under the Apache License, Version 2.0 (the
7
+ # "License"); you may not use this file except in compliance
8
+ # with the License. You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing,
13
+ # software distributed under the License is distributed on an
14
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ # KIND, either express or implied. See the License for the
16
+ # specific language governing permissions and limitations
17
+ # under the License.
18
+ #
19
+
20
+ $:.unshift File.dirname(__FILE__) + '/../lib'
21
+ require 'thrift'
22
+ $:.unshift File.dirname(__FILE__) + "/gen-rb"
23
+ require 'benchmark_service'
24
+
25
+ module Server
26
+ include Thrift
27
+
28
+ class BenchmarkHandler
29
+ # 1-based index into the fibonacci sequence
30
+ def fibonacci(n)
31
+ seq = [1, 1]
32
+ 3.upto(n) do
33
+ seq << seq[-1] + seq[-2]
34
+ end
35
+ seq[n-1] # n is 1-based
36
+ end
37
+ end
38
+
39
+ def self.start_server(host, port, serverClass)
40
+ handler = BenchmarkHandler.new
41
+ processor = ThriftBenchmark::BenchmarkService::Processor.new(handler)
42
+ transport = ServerSocket.new(host, port)
43
+ transport_factory = FramedTransportFactory.new
44
+ args = [processor, transport, transport_factory, nil, 20]
45
+ if serverClass == NonblockingServer
46
+ logger = Logger.new(STDERR)
47
+ logger.level = Logger::WARN
48
+ args << logger
49
+ end
50
+ server = serverClass.new(*args)
51
+ @server_thread = Thread.new do
52
+ server.serve
53
+ end
54
+ @server = server
55
+ end
56
+
57
+ def self.shutdown
58
+ return if @server.nil?
59
+ if @server.respond_to? :shutdown
60
+ @server.shutdown
61
+ else
62
+ @server_thread.kill
63
+ end
64
+ end
65
+ end
66
+
67
+ def resolve_const(const)
68
+ const and const.split('::').inject(Object) { |k,c| k.const_get(c) }
69
+ end
70
+
71
+ host, port, serverklass = ARGV
72
+
73
+ Server.start_server(host, port.to_i, resolve_const(serverklass))
74
+
75
+ # let our host know that the interpreter has started
76
+ # ideally we'd wait until the server was serving, but we don't have a hook for that
77
+ Marshal.dump(:started, STDOUT)
78
+ STDOUT.flush
79
+
80
+ Marshal.load(STDIN) # wait until we're instructed to shut down
81
+
82
+ Server.shutdown
@@ -0,0 +1,44 @@
1
+ #
2
+ # Licensed to the Apache Software Foundation (ASF) under one
3
+ # or more contributor license agreements. See the NOTICE file
4
+ # distributed with this work for additional information
5
+ # regarding copyright ownership. The ASF licenses this file
6
+ # to you under the Apache License, Version 2.0 (the
7
+ # "License"); you may not use this file except in compliance
8
+ # with the License. You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing,
13
+ # software distributed under the License is distributed on an
14
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ # KIND, either express or implied. See the License for the
16
+ # specific language governing permissions and limitations
17
+ # under the License.
18
+ #
19
+
20
+ $:.unshift File.dirname(__FILE__) + '/../lib'
21
+ require 'thrift'
22
+ $:.unshift File.dirname(__FILE__) + "/gen-rb"
23
+ require 'benchmark_service'
24
+ HOST = 'localhost'
25
+ PORT = 42587
26
+
27
+ class BenchmarkHandler
28
+ # 1-based index into the fibonacci sequence
29
+ def fibonacci(n)
30
+ seq = [1, 1]
31
+ 3.upto(n) do
32
+ seq << seq[-1] + seq[-2]
33
+ end
34
+ seq[n-1] # n is 1-based
35
+ end
36
+ end
37
+
38
+ handler = BenchmarkHandler.new
39
+ processor = ThriftBenchmark::BenchmarkService::Processor.new(handler)
40
+ transport = Thrift::ServerSocket.new(HOST, PORT)
41
+ transport_factory = Thrift::FramedTransportFactory.new
42
+ logger = Logger.new(STDERR)
43
+ logger.level = Logger::WARN
44
+ Thrift::NonblockingServer.new(processor, transport, transport_factory, nil, 20, logger).serve
@@ -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
+