protobuf 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +5 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +28 -0
- data/README.md +216 -0
- data/Rakefile +1 -0
- data/bin/rpc_server +117 -0
- data/bin/rprotoc +46 -0
- data/examples/addressbook.pb.rb +55 -0
- data/examples/addressbook.proto +24 -0
- data/examples/reading_a_message.rb +32 -0
- data/examples/writing_a_message.rb +46 -0
- data/lib/protobuf.rb +6 -0
- data/lib/protobuf/common/exceptions.rb +11 -0
- data/lib/protobuf/common/logger.rb +64 -0
- data/lib/protobuf/common/util.rb +59 -0
- data/lib/protobuf/common/wire_type.rb +10 -0
- data/lib/protobuf/compiler/compiler.rb +52 -0
- data/lib/protobuf/compiler/nodes.rb +323 -0
- data/lib/protobuf/compiler/proto.y +216 -0
- data/lib/protobuf/compiler/proto2.ebnf +79 -0
- data/lib/protobuf/compiler/proto_parser.rb +1425 -0
- data/lib/protobuf/compiler/template/rpc_bin.erb +4 -0
- data/lib/protobuf/compiler/template/rpc_client.erb +18 -0
- data/lib/protobuf/compiler/template/rpc_service.erb +25 -0
- data/lib/protobuf/compiler/template/rpc_service_implementation.erb +42 -0
- data/lib/protobuf/compiler/visitors.rb +302 -0
- data/lib/protobuf/descriptor/descriptor.proto +286 -0
- data/lib/protobuf/descriptor/descriptor.rb +55 -0
- data/lib/protobuf/descriptor/descriptor_builder.rb +143 -0
- data/lib/protobuf/descriptor/descriptor_proto.rb +138 -0
- data/lib/protobuf/descriptor/enum_descriptor.rb +33 -0
- data/lib/protobuf/descriptor/field_descriptor.rb +49 -0
- data/lib/protobuf/descriptor/file_descriptor.rb +37 -0
- data/lib/protobuf/message/decoder.rb +83 -0
- data/lib/protobuf/message/encoder.rb +46 -0
- data/lib/protobuf/message/enum.rb +62 -0
- data/lib/protobuf/message/extend.rb +8 -0
- data/lib/protobuf/message/field.rb +701 -0
- data/lib/protobuf/message/message.rb +402 -0
- data/lib/protobuf/message/protoable.rb +38 -0
- data/lib/protobuf/rpc/buffer.rb +74 -0
- data/lib/protobuf/rpc/client.rb +268 -0
- data/lib/protobuf/rpc/client_connection.rb +225 -0
- data/lib/protobuf/rpc/error.rb +34 -0
- data/lib/protobuf/rpc/error/client_error.rb +31 -0
- data/lib/protobuf/rpc/error/server_error.rb +43 -0
- data/lib/protobuf/rpc/rpc.pb.rb +107 -0
- data/lib/protobuf/rpc/server.rb +183 -0
- data/lib/protobuf/rpc/service.rb +244 -0
- data/lib/protobuf/rpc/stat.rb +70 -0
- data/lib/protobuf/version.rb +3 -0
- data/proto/rpc.proto +73 -0
- data/protobuf.gemspec +25 -0
- data/script/mk_parser +2 -0
- data/spec/functional/embedded_service_spec.rb +7 -0
- data/spec/proto/test.pb.rb +31 -0
- data/spec/proto/test.proto +31 -0
- data/spec/proto/test_service.rb +30 -0
- data/spec/proto/test_service_impl.rb +17 -0
- data/spec/spec_helper.rb +26 -0
- data/spec/unit/client_spec.rb +128 -0
- data/spec/unit/common/logger_spec.rb +121 -0
- data/spec/unit/enum_spec.rb +13 -0
- data/spec/unit/message_spec.rb +67 -0
- data/spec/unit/server_spec.rb +27 -0
- data/spec/unit/service_spec.rb +75 -0
- data/test/check_unbuild.rb +30 -0
- data/test/data/data.bin +3 -0
- data/test/data/data_source.py +14 -0
- data/test/data/types.bin +0 -0
- data/test/data/types_source.py +22 -0
- data/test/data/unk.png +0 -0
- data/test/proto/addressbook.pb.rb +66 -0
- data/test/proto/addressbook.proto +33 -0
- data/test/proto/addressbook_base.pb.rb +58 -0
- data/test/proto/addressbook_base.proto +26 -0
- data/test/proto/addressbook_ext.pb.rb +20 -0
- data/test/proto/addressbook_ext.proto +6 -0
- data/test/proto/collision.pb.rb +17 -0
- data/test/proto/collision.proto +5 -0
- data/test/proto/ext_collision.pb.rb +24 -0
- data/test/proto/ext_collision.proto +8 -0
- data/test/proto/ext_range.pb.rb +22 -0
- data/test/proto/ext_range.proto +7 -0
- data/test/proto/float_default.proto +10 -0
- data/test/proto/lowercase.pb.rb +30 -0
- data/test/proto/lowercase.proto +9 -0
- data/test/proto/merge.pb.rb +39 -0
- data/test/proto/merge.proto +15 -0
- data/test/proto/nested.pb.rb +30 -0
- data/test/proto/nested.proto +9 -0
- data/test/proto/optional_field.pb.rb +35 -0
- data/test/proto/optional_field.proto +12 -0
- data/test/proto/packed.pb.rb +22 -0
- data/test/proto/packed.proto +6 -0
- data/test/proto/rpc.proto +6 -0
- data/test/proto/types.pb.rb +84 -0
- data/test/proto/types.proto +37 -0
- data/test/test_addressbook.rb +56 -0
- data/test/test_compiler.rb +325 -0
- data/test/test_descriptor.rb +122 -0
- data/test/test_enum_value.rb +41 -0
- data/test/test_extension.rb +36 -0
- data/test/test_lowercase.rb +11 -0
- data/test/test_message.rb +128 -0
- data/test/test_optional_field.rb +103 -0
- data/test/test_packed_field.rb +40 -0
- data/test/test_parse.rb +15 -0
- data/test/test_repeated_types.rb +132 -0
- data/test/test_serialize.rb +61 -0
- data/test/test_standard_message.rb +96 -0
- data/test/test_types.rb +226 -0
- metadata +261 -0
metadata
ADDED
@@ -0,0 +1,261 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: protobuf
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 1.0.0
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- BJ Neilsen
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2011-11-06 00:00:00 -06:00
|
14
|
+
default_executable:
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: eventmachine
|
18
|
+
prerelease: false
|
19
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
|
+
none: false
|
21
|
+
requirements:
|
22
|
+
- - ~>
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: 0.12.10
|
25
|
+
type: :runtime
|
26
|
+
version_requirements: *id001
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
prerelease: false
|
30
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
31
|
+
none: false
|
32
|
+
requirements:
|
33
|
+
- - ~>
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: 0.8.7
|
36
|
+
type: :development
|
37
|
+
version_requirements: *id002
|
38
|
+
- !ruby/object:Gem::Dependency
|
39
|
+
name: rspec
|
40
|
+
prerelease: false
|
41
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ~>
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 2.7.0
|
47
|
+
type: :development
|
48
|
+
version_requirements: *id003
|
49
|
+
description: |-
|
50
|
+
Ruby implementation for Protocol Buffers. Works with other protobuf rpc implementations (e.g. Java, Python, C++).
|
51
|
+
|
52
|
+
This gem has diverged from https://github.com/macks/ruby-protobuf. All credit for serialization and rprotoc work most certainly goes to the original authors. All RPC implementation code (client/server/service) was written and is maintained by this author. Attempts to reconcile the original codebase with the current RPC implementation went unsuccessful.
|
53
|
+
email:
|
54
|
+
- bj.neilsen@gmail.com
|
55
|
+
executables:
|
56
|
+
- rpc_server
|
57
|
+
- rprotoc
|
58
|
+
extensions: []
|
59
|
+
|
60
|
+
extra_rdoc_files: []
|
61
|
+
|
62
|
+
files:
|
63
|
+
- .gitignore
|
64
|
+
- Gemfile
|
65
|
+
- Gemfile.lock
|
66
|
+
- README.md
|
67
|
+
- Rakefile
|
68
|
+
- bin/rpc_server
|
69
|
+
- bin/rprotoc
|
70
|
+
- examples/addressbook.pb.rb
|
71
|
+
- examples/addressbook.proto
|
72
|
+
- examples/reading_a_message.rb
|
73
|
+
- examples/writing_a_message.rb
|
74
|
+
- lib/protobuf.rb
|
75
|
+
- lib/protobuf/common/exceptions.rb
|
76
|
+
- lib/protobuf/common/logger.rb
|
77
|
+
- lib/protobuf/common/util.rb
|
78
|
+
- lib/protobuf/common/wire_type.rb
|
79
|
+
- lib/protobuf/compiler/compiler.rb
|
80
|
+
- lib/protobuf/compiler/nodes.rb
|
81
|
+
- lib/protobuf/compiler/proto.y
|
82
|
+
- lib/protobuf/compiler/proto2.ebnf
|
83
|
+
- lib/protobuf/compiler/proto_parser.rb
|
84
|
+
- lib/protobuf/compiler/template/rpc_bin.erb
|
85
|
+
- lib/protobuf/compiler/template/rpc_client.erb
|
86
|
+
- lib/protobuf/compiler/template/rpc_service.erb
|
87
|
+
- lib/protobuf/compiler/template/rpc_service_implementation.erb
|
88
|
+
- lib/protobuf/compiler/visitors.rb
|
89
|
+
- lib/protobuf/descriptor/descriptor.proto
|
90
|
+
- lib/protobuf/descriptor/descriptor.rb
|
91
|
+
- lib/protobuf/descriptor/descriptor_builder.rb
|
92
|
+
- lib/protobuf/descriptor/descriptor_proto.rb
|
93
|
+
- lib/protobuf/descriptor/enum_descriptor.rb
|
94
|
+
- lib/protobuf/descriptor/field_descriptor.rb
|
95
|
+
- lib/protobuf/descriptor/file_descriptor.rb
|
96
|
+
- lib/protobuf/message/decoder.rb
|
97
|
+
- lib/protobuf/message/encoder.rb
|
98
|
+
- lib/protobuf/message/enum.rb
|
99
|
+
- lib/protobuf/message/extend.rb
|
100
|
+
- lib/protobuf/message/field.rb
|
101
|
+
- lib/protobuf/message/message.rb
|
102
|
+
- lib/protobuf/message/protoable.rb
|
103
|
+
- lib/protobuf/rpc/buffer.rb
|
104
|
+
- lib/protobuf/rpc/client.rb
|
105
|
+
- lib/protobuf/rpc/client_connection.rb
|
106
|
+
- lib/protobuf/rpc/error.rb
|
107
|
+
- lib/protobuf/rpc/error/client_error.rb
|
108
|
+
- lib/protobuf/rpc/error/server_error.rb
|
109
|
+
- lib/protobuf/rpc/rpc.pb.rb
|
110
|
+
- lib/protobuf/rpc/server.rb
|
111
|
+
- lib/protobuf/rpc/service.rb
|
112
|
+
- lib/protobuf/rpc/stat.rb
|
113
|
+
- lib/protobuf/version.rb
|
114
|
+
- proto/rpc.proto
|
115
|
+
- protobuf.gemspec
|
116
|
+
- script/mk_parser
|
117
|
+
- spec/functional/embedded_service_spec.rb
|
118
|
+
- spec/proto/test.pb.rb
|
119
|
+
- spec/proto/test.proto
|
120
|
+
- spec/proto/test_service.rb
|
121
|
+
- spec/proto/test_service_impl.rb
|
122
|
+
- spec/spec_helper.rb
|
123
|
+
- spec/unit/client_spec.rb
|
124
|
+
- spec/unit/common/logger_spec.rb
|
125
|
+
- spec/unit/enum_spec.rb
|
126
|
+
- spec/unit/message_spec.rb
|
127
|
+
- spec/unit/server_spec.rb
|
128
|
+
- spec/unit/service_spec.rb
|
129
|
+
- test/check_unbuild.rb
|
130
|
+
- test/data/data.bin
|
131
|
+
- test/data/data_source.py
|
132
|
+
- test/data/types.bin
|
133
|
+
- test/data/types_source.py
|
134
|
+
- test/data/unk.png
|
135
|
+
- test/proto/addressbook.pb.rb
|
136
|
+
- test/proto/addressbook.proto
|
137
|
+
- test/proto/addressbook_base.pb.rb
|
138
|
+
- test/proto/addressbook_base.proto
|
139
|
+
- test/proto/addressbook_ext.pb.rb
|
140
|
+
- test/proto/addressbook_ext.proto
|
141
|
+
- test/proto/collision.pb.rb
|
142
|
+
- test/proto/collision.proto
|
143
|
+
- test/proto/ext_collision.pb.rb
|
144
|
+
- test/proto/ext_collision.proto
|
145
|
+
- test/proto/ext_range.pb.rb
|
146
|
+
- test/proto/ext_range.proto
|
147
|
+
- test/proto/float_default.proto
|
148
|
+
- test/proto/lowercase.pb.rb
|
149
|
+
- test/proto/lowercase.proto
|
150
|
+
- test/proto/merge.pb.rb
|
151
|
+
- test/proto/merge.proto
|
152
|
+
- test/proto/nested.pb.rb
|
153
|
+
- test/proto/nested.proto
|
154
|
+
- test/proto/optional_field.pb.rb
|
155
|
+
- test/proto/optional_field.proto
|
156
|
+
- test/proto/packed.pb.rb
|
157
|
+
- test/proto/packed.proto
|
158
|
+
- test/proto/rpc.proto
|
159
|
+
- test/proto/types.pb.rb
|
160
|
+
- test/proto/types.proto
|
161
|
+
- test/test_addressbook.rb
|
162
|
+
- test/test_compiler.rb
|
163
|
+
- test/test_descriptor.rb
|
164
|
+
- test/test_enum_value.rb
|
165
|
+
- test/test_extension.rb
|
166
|
+
- test/test_lowercase.rb
|
167
|
+
- test/test_message.rb
|
168
|
+
- test/test_optional_field.rb
|
169
|
+
- test/test_packed_field.rb
|
170
|
+
- test/test_parse.rb
|
171
|
+
- test/test_repeated_types.rb
|
172
|
+
- test/test_serialize.rb
|
173
|
+
- test/test_standard_message.rb
|
174
|
+
- test/test_types.rb
|
175
|
+
has_rdoc: true
|
176
|
+
homepage: https://github.com/localshred/protobuf
|
177
|
+
licenses: []
|
178
|
+
|
179
|
+
post_install_message:
|
180
|
+
rdoc_options: []
|
181
|
+
|
182
|
+
require_paths:
|
183
|
+
- lib
|
184
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
185
|
+
none: false
|
186
|
+
requirements:
|
187
|
+
- - ">="
|
188
|
+
- !ruby/object:Gem::Version
|
189
|
+
version: "0"
|
190
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
191
|
+
none: false
|
192
|
+
requirements:
|
193
|
+
- - ">="
|
194
|
+
- !ruby/object:Gem::Version
|
195
|
+
version: "0"
|
196
|
+
requirements: []
|
197
|
+
|
198
|
+
rubyforge_project:
|
199
|
+
rubygems_version: 1.5.0
|
200
|
+
signing_key:
|
201
|
+
specification_version: 3
|
202
|
+
summary: Ruby implementation for Protocol Buffers. Works with other protobuf rpc implementations (e.g. Java, Python, C++).
|
203
|
+
test_files:
|
204
|
+
- spec/functional/embedded_service_spec.rb
|
205
|
+
- spec/proto/test.pb.rb
|
206
|
+
- spec/proto/test.proto
|
207
|
+
- spec/proto/test_service.rb
|
208
|
+
- spec/proto/test_service_impl.rb
|
209
|
+
- spec/spec_helper.rb
|
210
|
+
- spec/unit/client_spec.rb
|
211
|
+
- spec/unit/common/logger_spec.rb
|
212
|
+
- spec/unit/enum_spec.rb
|
213
|
+
- spec/unit/message_spec.rb
|
214
|
+
- spec/unit/server_spec.rb
|
215
|
+
- spec/unit/service_spec.rb
|
216
|
+
- test/check_unbuild.rb
|
217
|
+
- test/data/data.bin
|
218
|
+
- test/data/data_source.py
|
219
|
+
- test/data/types.bin
|
220
|
+
- test/data/types_source.py
|
221
|
+
- test/data/unk.png
|
222
|
+
- test/proto/addressbook.pb.rb
|
223
|
+
- test/proto/addressbook.proto
|
224
|
+
- test/proto/addressbook_base.pb.rb
|
225
|
+
- test/proto/addressbook_base.proto
|
226
|
+
- test/proto/addressbook_ext.pb.rb
|
227
|
+
- test/proto/addressbook_ext.proto
|
228
|
+
- test/proto/collision.pb.rb
|
229
|
+
- test/proto/collision.proto
|
230
|
+
- test/proto/ext_collision.pb.rb
|
231
|
+
- test/proto/ext_collision.proto
|
232
|
+
- test/proto/ext_range.pb.rb
|
233
|
+
- test/proto/ext_range.proto
|
234
|
+
- test/proto/float_default.proto
|
235
|
+
- test/proto/lowercase.pb.rb
|
236
|
+
- test/proto/lowercase.proto
|
237
|
+
- test/proto/merge.pb.rb
|
238
|
+
- test/proto/merge.proto
|
239
|
+
- test/proto/nested.pb.rb
|
240
|
+
- test/proto/nested.proto
|
241
|
+
- test/proto/optional_field.pb.rb
|
242
|
+
- test/proto/optional_field.proto
|
243
|
+
- test/proto/packed.pb.rb
|
244
|
+
- test/proto/packed.proto
|
245
|
+
- test/proto/rpc.proto
|
246
|
+
- test/proto/types.pb.rb
|
247
|
+
- test/proto/types.proto
|
248
|
+
- test/test_addressbook.rb
|
249
|
+
- test/test_compiler.rb
|
250
|
+
- test/test_descriptor.rb
|
251
|
+
- test/test_enum_value.rb
|
252
|
+
- test/test_extension.rb
|
253
|
+
- test/test_lowercase.rb
|
254
|
+
- test/test_message.rb
|
255
|
+
- test/test_optional_field.rb
|
256
|
+
- test/test_packed_field.rb
|
257
|
+
- test/test_parse.rb
|
258
|
+
- test/test_repeated_types.rb
|
259
|
+
- test/test_serialize.rb
|
260
|
+
- test/test_standard_message.rb
|
261
|
+
- test/test_types.rb
|