protobuf-cucumber 3.10.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (204) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +21 -0
  3. data/.rubocop.yml +70 -0
  4. data/.rubocop_todo.yml +145 -0
  5. data/.travis.yml +40 -0
  6. data/.yardopts +5 -0
  7. data/CHANGES.md +344 -0
  8. data/CONTRIBUTING.md +16 -0
  9. data/Gemfile +3 -0
  10. data/LICENSE.txt +22 -0
  11. data/README.md +33 -0
  12. data/Rakefile +64 -0
  13. data/bin/protoc-gen-ruby +22 -0
  14. data/bin/rpc_server +5 -0
  15. data/install-protobuf.sh +28 -0
  16. data/lib/protobuf.rb +129 -0
  17. data/lib/protobuf/cli.rb +257 -0
  18. data/lib/protobuf/code_generator.rb +120 -0
  19. data/lib/protobuf/decoder.rb +28 -0
  20. data/lib/protobuf/deprecation.rb +117 -0
  21. data/lib/protobuf/descriptors.rb +3 -0
  22. data/lib/protobuf/descriptors/google/protobuf/compiler/plugin.pb.rb +62 -0
  23. data/lib/protobuf/descriptors/google/protobuf/descriptor.pb.rb +301 -0
  24. data/lib/protobuf/encoder.rb +11 -0
  25. data/lib/protobuf/enum.rb +365 -0
  26. data/lib/protobuf/exceptions.rb +9 -0
  27. data/lib/protobuf/field.rb +74 -0
  28. data/lib/protobuf/field/base_field.rb +380 -0
  29. data/lib/protobuf/field/base_field_object_definitions.rb +504 -0
  30. data/lib/protobuf/field/bool_field.rb +64 -0
  31. data/lib/protobuf/field/bytes_field.rb +78 -0
  32. data/lib/protobuf/field/double_field.rb +25 -0
  33. data/lib/protobuf/field/enum_field.rb +61 -0
  34. data/lib/protobuf/field/field_array.rb +104 -0
  35. data/lib/protobuf/field/field_hash.rb +122 -0
  36. data/lib/protobuf/field/fixed32_field.rb +25 -0
  37. data/lib/protobuf/field/fixed64_field.rb +28 -0
  38. data/lib/protobuf/field/float_field.rb +43 -0
  39. data/lib/protobuf/field/int32_field.rb +21 -0
  40. data/lib/protobuf/field/int64_field.rb +34 -0
  41. data/lib/protobuf/field/integer_field.rb +23 -0
  42. data/lib/protobuf/field/message_field.rb +51 -0
  43. data/lib/protobuf/field/sfixed32_field.rb +27 -0
  44. data/lib/protobuf/field/sfixed64_field.rb +28 -0
  45. data/lib/protobuf/field/signed_integer_field.rb +29 -0
  46. data/lib/protobuf/field/sint32_field.rb +21 -0
  47. data/lib/protobuf/field/sint64_field.rb +21 -0
  48. data/lib/protobuf/field/string_field.rb +51 -0
  49. data/lib/protobuf/field/uint32_field.rb +21 -0
  50. data/lib/protobuf/field/uint64_field.rb +21 -0
  51. data/lib/protobuf/field/varint_field.rb +77 -0
  52. data/lib/protobuf/generators/base.rb +85 -0
  53. data/lib/protobuf/generators/enum_generator.rb +39 -0
  54. data/lib/protobuf/generators/extension_generator.rb +27 -0
  55. data/lib/protobuf/generators/field_generator.rb +193 -0
  56. data/lib/protobuf/generators/file_generator.rb +262 -0
  57. data/lib/protobuf/generators/group_generator.rb +122 -0
  58. data/lib/protobuf/generators/message_generator.rb +104 -0
  59. data/lib/protobuf/generators/option_generator.rb +17 -0
  60. data/lib/protobuf/generators/printable.rb +160 -0
  61. data/lib/protobuf/generators/service_generator.rb +50 -0
  62. data/lib/protobuf/lifecycle.rb +33 -0
  63. data/lib/protobuf/logging.rb +39 -0
  64. data/lib/protobuf/message.rb +260 -0
  65. data/lib/protobuf/message/fields.rb +233 -0
  66. data/lib/protobuf/message/serialization.rb +85 -0
  67. data/lib/protobuf/optionable.rb +70 -0
  68. data/lib/protobuf/rpc/buffer.rb +78 -0
  69. data/lib/protobuf/rpc/client.rb +140 -0
  70. data/lib/protobuf/rpc/connectors/base.rb +221 -0
  71. data/lib/protobuf/rpc/connectors/ping.rb +89 -0
  72. data/lib/protobuf/rpc/connectors/socket.rb +78 -0
  73. data/lib/protobuf/rpc/connectors/zmq.rb +319 -0
  74. data/lib/protobuf/rpc/dynamic_discovery.pb.rb +50 -0
  75. data/lib/protobuf/rpc/env.rb +60 -0
  76. data/lib/protobuf/rpc/error.rb +28 -0
  77. data/lib/protobuf/rpc/error/client_error.rb +31 -0
  78. data/lib/protobuf/rpc/error/server_error.rb +43 -0
  79. data/lib/protobuf/rpc/middleware.rb +25 -0
  80. data/lib/protobuf/rpc/middleware/exception_handler.rb +40 -0
  81. data/lib/protobuf/rpc/middleware/logger.rb +95 -0
  82. data/lib/protobuf/rpc/middleware/request_decoder.rb +79 -0
  83. data/lib/protobuf/rpc/middleware/response_encoder.rb +83 -0
  84. data/lib/protobuf/rpc/middleware/runner.rb +18 -0
  85. data/lib/protobuf/rpc/rpc.pb.rb +64 -0
  86. data/lib/protobuf/rpc/rpc_method.rb +16 -0
  87. data/lib/protobuf/rpc/server.rb +39 -0
  88. data/lib/protobuf/rpc/servers/socket/server.rb +121 -0
  89. data/lib/protobuf/rpc/servers/socket/worker.rb +56 -0
  90. data/lib/protobuf/rpc/servers/socket_runner.rb +46 -0
  91. data/lib/protobuf/rpc/servers/zmq/broker.rb +194 -0
  92. data/lib/protobuf/rpc/servers/zmq/server.rb +321 -0
  93. data/lib/protobuf/rpc/servers/zmq/util.rb +48 -0
  94. data/lib/protobuf/rpc/servers/zmq/worker.rb +105 -0
  95. data/lib/protobuf/rpc/servers/zmq_runner.rb +70 -0
  96. data/lib/protobuf/rpc/service.rb +172 -0
  97. data/lib/protobuf/rpc/service_directory.rb +261 -0
  98. data/lib/protobuf/rpc/service_dispatcher.rb +45 -0
  99. data/lib/protobuf/rpc/service_filters.rb +250 -0
  100. data/lib/protobuf/rpc/stat.rb +119 -0
  101. data/lib/protobuf/socket.rb +21 -0
  102. data/lib/protobuf/tasks.rb +1 -0
  103. data/lib/protobuf/tasks/compile.rake +80 -0
  104. data/lib/protobuf/varint.rb +20 -0
  105. data/lib/protobuf/varint_pure.rb +31 -0
  106. data/lib/protobuf/version.rb +3 -0
  107. data/lib/protobuf/wire_type.rb +10 -0
  108. data/lib/protobuf/zmq.rb +21 -0
  109. data/profile.html +5103 -0
  110. data/proto/dynamic_discovery.proto +44 -0
  111. data/proto/google/protobuf/compiler/plugin.proto +147 -0
  112. data/proto/google/protobuf/descriptor.proto +779 -0
  113. data/proto/rpc.proto +69 -0
  114. data/protobuf-cucumber.gemspec +57 -0
  115. data/spec/benchmark/tasks.rb +143 -0
  116. data/spec/bin/protoc-gen-ruby_spec.rb +23 -0
  117. data/spec/encoding/all_types_spec.rb +103 -0
  118. data/spec/encoding/extreme_values_spec.rb +0 -0
  119. data/spec/functional/class_inheritance_spec.rb +52 -0
  120. data/spec/functional/code_generator_spec.rb +58 -0
  121. data/spec/functional/socket_server_spec.rb +59 -0
  122. data/spec/functional/zmq_server_spec.rb +105 -0
  123. data/spec/lib/protobuf/cli_spec.rb +317 -0
  124. data/spec/lib/protobuf/code_generator_spec.rb +87 -0
  125. data/spec/lib/protobuf/enum_spec.rb +307 -0
  126. data/spec/lib/protobuf/field/bool_field_spec.rb +91 -0
  127. data/spec/lib/protobuf/field/double_field_spec.rb +9 -0
  128. data/spec/lib/protobuf/field/enum_field_spec.rb +44 -0
  129. data/spec/lib/protobuf/field/field_array_spec.rb +105 -0
  130. data/spec/lib/protobuf/field/field_hash_spec.rb +168 -0
  131. data/spec/lib/protobuf/field/fixed32_field_spec.rb +7 -0
  132. data/spec/lib/protobuf/field/fixed64_field_spec.rb +7 -0
  133. data/spec/lib/protobuf/field/float_field_spec.rb +90 -0
  134. data/spec/lib/protobuf/field/int32_field_spec.rb +120 -0
  135. data/spec/lib/protobuf/field/int64_field_spec.rb +7 -0
  136. data/spec/lib/protobuf/field/message_field_spec.rb +132 -0
  137. data/spec/lib/protobuf/field/sfixed32_field_spec.rb +9 -0
  138. data/spec/lib/protobuf/field/sfixed64_field_spec.rb +9 -0
  139. data/spec/lib/protobuf/field/sint32_field_spec.rb +9 -0
  140. data/spec/lib/protobuf/field/sint64_field_spec.rb +9 -0
  141. data/spec/lib/protobuf/field/string_field_spec.rb +79 -0
  142. data/spec/lib/protobuf/field/uint32_field_spec.rb +7 -0
  143. data/spec/lib/protobuf/field/uint64_field_spec.rb +7 -0
  144. data/spec/lib/protobuf/field_spec.rb +192 -0
  145. data/spec/lib/protobuf/generators/base_spec.rb +154 -0
  146. data/spec/lib/protobuf/generators/enum_generator_spec.rb +82 -0
  147. data/spec/lib/protobuf/generators/extension_generator_spec.rb +42 -0
  148. data/spec/lib/protobuf/generators/field_generator_spec.rb +197 -0
  149. data/spec/lib/protobuf/generators/file_generator_spec.rb +119 -0
  150. data/spec/lib/protobuf/generators/message_generator_spec.rb +0 -0
  151. data/spec/lib/protobuf/generators/service_generator_spec.rb +99 -0
  152. data/spec/lib/protobuf/lifecycle_spec.rb +94 -0
  153. data/spec/lib/protobuf/message_spec.rb +944 -0
  154. data/spec/lib/protobuf/optionable_spec.rb +265 -0
  155. data/spec/lib/protobuf/rpc/client_spec.rb +66 -0
  156. data/spec/lib/protobuf/rpc/connectors/base_spec.rb +226 -0
  157. data/spec/lib/protobuf/rpc/connectors/ping_spec.rb +69 -0
  158. data/spec/lib/protobuf/rpc/connectors/socket_spec.rb +34 -0
  159. data/spec/lib/protobuf/rpc/connectors/zmq_spec.rb +110 -0
  160. data/spec/lib/protobuf/rpc/middleware/exception_handler_spec.rb +62 -0
  161. data/spec/lib/protobuf/rpc/middleware/logger_spec.rb +49 -0
  162. data/spec/lib/protobuf/rpc/middleware/request_decoder_spec.rb +115 -0
  163. data/spec/lib/protobuf/rpc/middleware/response_encoder_spec.rb +91 -0
  164. data/spec/lib/protobuf/rpc/servers/socket_server_spec.rb +38 -0
  165. data/spec/lib/protobuf/rpc/servers/zmq/server_spec.rb +43 -0
  166. data/spec/lib/protobuf/rpc/servers/zmq/util_spec.rb +55 -0
  167. data/spec/lib/protobuf/rpc/servers/zmq/worker_spec.rb +35 -0
  168. data/spec/lib/protobuf/rpc/service_directory_spec.rb +293 -0
  169. data/spec/lib/protobuf/rpc/service_dispatcher_spec.rb +35 -0
  170. data/spec/lib/protobuf/rpc/service_filters_spec.rb +517 -0
  171. data/spec/lib/protobuf/rpc/service_spec.rb +162 -0
  172. data/spec/lib/protobuf/rpc/stat_spec.rb +101 -0
  173. data/spec/lib/protobuf/varint_spec.rb +29 -0
  174. data/spec/lib/protobuf_spec.rb +105 -0
  175. data/spec/spec_helper.rb +42 -0
  176. data/spec/support/all.rb +6 -0
  177. data/spec/support/packed_field.rb +23 -0
  178. data/spec/support/protos/all_types.data.bin +0 -0
  179. data/spec/support/protos/all_types.data.txt +119 -0
  180. data/spec/support/protos/enum.pb.rb +63 -0
  181. data/spec/support/protos/enum.proto +37 -0
  182. data/spec/support/protos/extreme_values.data.bin +0 -0
  183. data/spec/support/protos/google_unittest.bin +0 -0
  184. data/spec/support/protos/google_unittest.pb.rb +798 -0
  185. data/spec/support/protos/google_unittest.proto +884 -0
  186. data/spec/support/protos/google_unittest_custom_options.bin +0 -0
  187. data/spec/support/protos/google_unittest_custom_options.pb.rb +361 -0
  188. data/spec/support/protos/google_unittest_custom_options.proto +424 -0
  189. data/spec/support/protos/google_unittest_import.pb.rb +55 -0
  190. data/spec/support/protos/google_unittest_import.proto +73 -0
  191. data/spec/support/protos/google_unittest_import_public.pb.rb +31 -0
  192. data/spec/support/protos/google_unittest_import_public.proto +41 -0
  193. data/spec/support/protos/map-test.bin +157 -0
  194. data/spec/support/protos/map-test.pb.rb +85 -0
  195. data/spec/support/protos/map-test.proto +68 -0
  196. data/spec/support/protos/multi_field_extensions.pb.rb +59 -0
  197. data/spec/support/protos/multi_field_extensions.proto +35 -0
  198. data/spec/support/protos/resource.pb.rb +172 -0
  199. data/spec/support/protos/resource.proto +137 -0
  200. data/spec/support/resource_service.rb +23 -0
  201. data/spec/support/server.rb +65 -0
  202. data/spec/support/test_app_file.rb +2 -0
  203. data/varint_prof.rb +82 -0
  204. metadata +579 -0
@@ -0,0 +1,23 @@
1
+ require PROTOS_PATH.join('resource.pb')
2
+
3
+ Test::ResourceService.class_eval do
4
+ # request -> Test::ResourceFindRequest
5
+ # response -> Test::Resource
6
+ def find
7
+ response.name = request.name
8
+ response.status = request.active ? 1 : 0
9
+ end
10
+
11
+ # request -> Test::ResourceSleepRequest
12
+ # response -> Test::Resource
13
+ def find_with_sleep
14
+ sleep(request.sleep || 1)
15
+ response.name = 'Request should have timed out'
16
+ end
17
+
18
+ # request -> Test::ResourceFindRequest
19
+ # response -> Test::Resource
20
+ def find_with_rpc_failed
21
+ rpc_failed('Find failed')
22
+ end
23
+ end
@@ -0,0 +1,65 @@
1
+ require 'ostruct'
2
+
3
+ require 'active_support/core_ext/hash/reverse_merge'
4
+
5
+ require 'spec_helper'
6
+ require 'protobuf/logging'
7
+ require 'protobuf/rpc/server'
8
+ require 'protobuf/rpc/servers/socket/server'
9
+ require 'protobuf/rpc/servers/socket_runner'
10
+ require 'protobuf/rpc/servers/zmq/server'
11
+ require 'protobuf/rpc/servers/zmq_runner'
12
+ require SUPPORT_PATH.join('resource_service')
13
+
14
+ # Want to abort if server dies?
15
+ Thread.abort_on_exception = true
16
+
17
+ class StubServer
18
+ include Protobuf::Logging
19
+
20
+ private
21
+
22
+ attr_accessor :options, :runner, :runner_thread
23
+
24
+ public
25
+
26
+ def initialize(options = {})
27
+ self.options = OpenStruct.new(
28
+ options.reverse_merge(
29
+ :host => '127.0.0.1',
30
+ :port => 9399,
31
+ :worker_port => 9400,
32
+ :delay => 0,
33
+ :server => Protobuf::Rpc::Socket::Server,
34
+ ),
35
+ )
36
+
37
+ start
38
+ yield self
39
+ ensure
40
+ stop
41
+ end
42
+
43
+ def start
44
+ runner_class = {
45
+ ::Protobuf::Rpc::Zmq::Server => ::Protobuf::Rpc::ZmqRunner,
46
+ ::Protobuf::Rpc::Socket::Server => ::Protobuf::Rpc::SocketRunner,
47
+ }.fetch(options.server)
48
+
49
+ self.runner = runner_class.new(options)
50
+ self.runner_thread = Thread.new(runner, &:run)
51
+ runner_thread.abort_on_exception = true # Set for testing purposes
52
+ Thread.pass until runner.running?
53
+
54
+ logger.debug { sign_message("Server started #{options.host}:#{options.port}") }
55
+ end
56
+
57
+ def stop
58
+ runner.stop
59
+ runner_thread.join
60
+ end
61
+
62
+ def log_signature
63
+ @_log_signature ||= "[stub-server]"
64
+ end
65
+ end
@@ -0,0 +1,2 @@
1
+ # For use in testing the rpc_server
2
+ ENV['TEST_APP_FILE_LOADED'] = 'true'
@@ -0,0 +1,82 @@
1
+ require 'base64'
2
+ require 'benchmark/ips'
3
+ require 'pry'
4
+ require "./spec/support/protos/resource.pb"
5
+ #require "jruby/profiler/flame_graph_profile_printer"
6
+
7
+ VALUES = {
8
+ 0 => "AA==",
9
+ 5 => "BQ==",
10
+ 51 => "Mw==",
11
+ 9_192 => "6Ec=",
12
+ 80_389 => "hfQE",
13
+ 913_389 => "7d83",
14
+ 516_192_829_912_693 => "9eyMkpivdQ==",
15
+ 9_999_999_999_999_999_999 => "//+fz8jgyOOKAQ==",
16
+ }.freeze
17
+
18
+ #DECODEME = ::Derp.encode_cache_hash(2576)
19
+ #DECODEME2 = ::Derp.encode_cache_hash(25763111)
20
+
21
+ 10_000.times do
22
+ t = ::Test::Resource.new(:name => "derp", :date_created => 123456789)
23
+ t.status = 3
24
+ ss = StringIO.new
25
+ ::Protobuf::Encoder.encode(t.to_proto, ss)
26
+ ss.rewind
27
+ t2 = ::Test::Resource.decode_from(ss)
28
+ end
29
+
30
+ if ENV["FLAME"]
31
+ result = JRuby::Profiler.profile do
32
+ 1_000_000.times do
33
+ t = ::Test::Resource.new(:name => "derp", :date_created => 123456789)
34
+ t.status = 3
35
+ ss = StringIO.new
36
+ ::Protobuf::Encoder.encode(t.to_proto, ss)
37
+ ss.rewind
38
+ t2 = ::Test::Resource.decode_from(ss)
39
+ #fail "derp" unless t == t2
40
+
41
+ #t = ::Test::Resource.new(:name => "derp", :date_created => 123456789)
42
+ #t.field?(:name)
43
+ #t.field?(:date_created)
44
+ #t.field?(:derp_derp)
45
+ #t.respond_to_has_and_present?(:name)
46
+ #t.respond_to_has_and_present?(:date_created)
47
+ #t.respond_to_has_and_present?(:derp_derp)
48
+ end
49
+ end
50
+
51
+ printer = JRuby::Profiler::FlameGraphProfilePrinter.new(result)
52
+ printer.printProfile(STDOUT)
53
+ else
54
+ TO_HASH = ::Test::Resource.new(:name => "derp", :date_created => 123456789)
55
+ ENCODE = ::Test::Resource.new(:name => "derp", :date_created => 123456789)
56
+ DECODE = begin
57
+ ss = StringIO.new
58
+ ::Protobuf::Encoder.encode(ENCODE.to_proto, ss)
59
+ ss.rewind
60
+ ss.string
61
+ end
62
+
63
+ Benchmark.ips do |x|
64
+ x.config(:time => 20, :warmup => 10)
65
+ x.report("to_hash") do
66
+ TO_HASH.to_hash
67
+ end
68
+
69
+ x.report("to_hash_with_string_keys") do
70
+ TO_HASH.to_hash_with_string_keys
71
+ end
72
+
73
+ x.report("encode") do
74
+ ss = StringIO.new
75
+ ::Protobuf::Encoder.encode(ENCODE.to_proto, ss)
76
+ end
77
+
78
+ x.report("decode") do
79
+ ::Test::Resource.decode_from(::StringIO.new(DECODE.dup))
80
+ end
81
+ end
82
+ end
metadata ADDED
@@ -0,0 +1,579 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: protobuf-cucumber
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.10.4
5
+ platform: ruby
6
+ authors:
7
+ - BJ Neilsen
8
+ - Brandon Dewitt
9
+ - Devin Christensen
10
+ - Adam Hutchison
11
+ autorequire:
12
+ bindir: bin
13
+ cert_chain: []
14
+ date: 2020-01-08 00:00:00.000000000 Z
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: activesupport
18
+ requirement: !ruby/object:Gem::Requirement
19
+ requirements:
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: '3.2'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '3.2'
30
+ - !ruby/object:Gem::Dependency
31
+ name: middleware
32
+ requirement: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: '0'
37
+ type: :runtime
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ - !ruby/object:Gem::Dependency
45
+ name: thor
46
+ requirement: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: '0'
51
+ type: :runtime
52
+ prerelease: false
53
+ version_requirements: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
58
+ - !ruby/object:Gem::Dependency
59
+ name: thread_safe
60
+ requirement: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: '0'
65
+ type: :runtime
66
+ prerelease: false
67
+ version_requirements: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
72
+ - !ruby/object:Gem::Dependency
73
+ name: benchmark-ips
74
+ requirement: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
79
+ type: :development
80
+ prerelease: false
81
+ version_requirements: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ - !ruby/object:Gem::Dependency
87
+ name: ffi-rzmq
88
+ requirement: !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: '0'
93
+ type: :development
94
+ prerelease: false
95
+ version_requirements: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ - !ruby/object:Gem::Dependency
101
+ name: rake
102
+ requirement: !ruby/object:Gem::Requirement
103
+ requirements:
104
+ - - "<"
105
+ - !ruby/object:Gem::Version
106
+ version: '11.0'
107
+ type: :development
108
+ prerelease: false
109
+ version_requirements: !ruby/object:Gem::Requirement
110
+ requirements:
111
+ - - "<"
112
+ - !ruby/object:Gem::Version
113
+ version: '11.0'
114
+ - !ruby/object:Gem::Dependency
115
+ name: rspec
116
+ requirement: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ version: '3.0'
121
+ type: :development
122
+ prerelease: false
123
+ version_requirements: !ruby/object:Gem::Requirement
124
+ requirements:
125
+ - - ">="
126
+ - !ruby/object:Gem::Version
127
+ version: '3.0'
128
+ - !ruby/object:Gem::Dependency
129
+ name: rubocop
130
+ requirement: !ruby/object:Gem::Requirement
131
+ requirements:
132
+ - - "~>"
133
+ - !ruby/object:Gem::Version
134
+ version: 0.38.0
135
+ type: :development
136
+ prerelease: false
137
+ version_requirements: !ruby/object:Gem::Requirement
138
+ requirements:
139
+ - - "~>"
140
+ - !ruby/object:Gem::Version
141
+ version: 0.38.0
142
+ - !ruby/object:Gem::Dependency
143
+ name: parser
144
+ requirement: !ruby/object:Gem::Requirement
145
+ requirements:
146
+ - - '='
147
+ - !ruby/object:Gem::Version
148
+ version: 2.3.0.6
149
+ type: :development
150
+ prerelease: false
151
+ version_requirements: !ruby/object:Gem::Requirement
152
+ requirements:
153
+ - - '='
154
+ - !ruby/object:Gem::Version
155
+ version: 2.3.0.6
156
+ - !ruby/object:Gem::Dependency
157
+ name: simplecov
158
+ requirement: !ruby/object:Gem::Requirement
159
+ requirements:
160
+ - - ">="
161
+ - !ruby/object:Gem::Version
162
+ version: '0'
163
+ type: :development
164
+ prerelease: false
165
+ version_requirements: !ruby/object:Gem::Requirement
166
+ requirements:
167
+ - - ">="
168
+ - !ruby/object:Gem::Version
169
+ version: '0'
170
+ - !ruby/object:Gem::Dependency
171
+ name: timecop
172
+ requirement: !ruby/object:Gem::Requirement
173
+ requirements:
174
+ - - ">="
175
+ - !ruby/object:Gem::Version
176
+ version: '0'
177
+ type: :development
178
+ prerelease: false
179
+ version_requirements: !ruby/object:Gem::Requirement
180
+ requirements:
181
+ - - ">="
182
+ - !ruby/object:Gem::Version
183
+ version: '0'
184
+ - !ruby/object:Gem::Dependency
185
+ name: yard
186
+ requirement: !ruby/object:Gem::Requirement
187
+ requirements:
188
+ - - ">="
189
+ - !ruby/object:Gem::Version
190
+ version: '0'
191
+ type: :development
192
+ prerelease: false
193
+ version_requirements: !ruby/object:Gem::Requirement
194
+ requirements:
195
+ - - ">="
196
+ - !ruby/object:Gem::Version
197
+ version: '0'
198
+ - !ruby/object:Gem::Dependency
199
+ name: pry-byebug
200
+ requirement: !ruby/object:Gem::Requirement
201
+ requirements:
202
+ - - ">="
203
+ - !ruby/object:Gem::Version
204
+ version: '0'
205
+ type: :development
206
+ prerelease: false
207
+ version_requirements: !ruby/object:Gem::Requirement
208
+ requirements:
209
+ - - ">="
210
+ - !ruby/object:Gem::Version
211
+ version: '0'
212
+ - !ruby/object:Gem::Dependency
213
+ name: pry-stack_explorer
214
+ requirement: !ruby/object:Gem::Requirement
215
+ requirements:
216
+ - - ">="
217
+ - !ruby/object:Gem::Version
218
+ version: '0'
219
+ type: :development
220
+ prerelease: false
221
+ version_requirements: !ruby/object:Gem::Requirement
222
+ requirements:
223
+ - - ">="
224
+ - !ruby/object:Gem::Version
225
+ version: '0'
226
+ - !ruby/object:Gem::Dependency
227
+ name: varint
228
+ requirement: !ruby/object:Gem::Requirement
229
+ requirements:
230
+ - - ">="
231
+ - !ruby/object:Gem::Version
232
+ version: '0'
233
+ type: :development
234
+ prerelease: false
235
+ version_requirements: !ruby/object:Gem::Requirement
236
+ requirements:
237
+ - - ">="
238
+ - !ruby/object:Gem::Version
239
+ version: '0'
240
+ - !ruby/object:Gem::Dependency
241
+ name: ruby-prof
242
+ requirement: !ruby/object:Gem::Requirement
243
+ requirements:
244
+ - - ">="
245
+ - !ruby/object:Gem::Version
246
+ version: '0'
247
+ type: :development
248
+ prerelease: false
249
+ version_requirements: !ruby/object:Gem::Requirement
250
+ requirements:
251
+ - - ">="
252
+ - !ruby/object:Gem::Version
253
+ version: '0'
254
+ description: Google Protocol Buffers serialization and RPC implementation for Ruby.
255
+ email:
256
+ - bj.neilsen+protobuf@gmail.com
257
+ - brandonsdewitt+protobuf@gmail.com
258
+ - quixoten@gmail.com
259
+ - liveh2o@gmail.com
260
+ executables:
261
+ - protoc-gen-ruby
262
+ - rpc_server
263
+ extensions: []
264
+ extra_rdoc_files: []
265
+ files:
266
+ - ".gitignore"
267
+ - ".rubocop.yml"
268
+ - ".rubocop_todo.yml"
269
+ - ".travis.yml"
270
+ - ".yardopts"
271
+ - CHANGES.md
272
+ - CONTRIBUTING.md
273
+ - Gemfile
274
+ - LICENSE.txt
275
+ - README.md
276
+ - Rakefile
277
+ - bin/protoc-gen-ruby
278
+ - bin/rpc_server
279
+ - install-protobuf.sh
280
+ - lib/protobuf.rb
281
+ - lib/protobuf/cli.rb
282
+ - lib/protobuf/code_generator.rb
283
+ - lib/protobuf/decoder.rb
284
+ - lib/protobuf/deprecation.rb
285
+ - lib/protobuf/descriptors.rb
286
+ - lib/protobuf/descriptors/google/protobuf/compiler/plugin.pb.rb
287
+ - lib/protobuf/descriptors/google/protobuf/descriptor.pb.rb
288
+ - lib/protobuf/encoder.rb
289
+ - lib/protobuf/enum.rb
290
+ - lib/protobuf/exceptions.rb
291
+ - lib/protobuf/field.rb
292
+ - lib/protobuf/field/base_field.rb
293
+ - lib/protobuf/field/base_field_object_definitions.rb
294
+ - lib/protobuf/field/bool_field.rb
295
+ - lib/protobuf/field/bytes_field.rb
296
+ - lib/protobuf/field/double_field.rb
297
+ - lib/protobuf/field/enum_field.rb
298
+ - lib/protobuf/field/field_array.rb
299
+ - lib/protobuf/field/field_hash.rb
300
+ - lib/protobuf/field/fixed32_field.rb
301
+ - lib/protobuf/field/fixed64_field.rb
302
+ - lib/protobuf/field/float_field.rb
303
+ - lib/protobuf/field/int32_field.rb
304
+ - lib/protobuf/field/int64_field.rb
305
+ - lib/protobuf/field/integer_field.rb
306
+ - lib/protobuf/field/message_field.rb
307
+ - lib/protobuf/field/sfixed32_field.rb
308
+ - lib/protobuf/field/sfixed64_field.rb
309
+ - lib/protobuf/field/signed_integer_field.rb
310
+ - lib/protobuf/field/sint32_field.rb
311
+ - lib/protobuf/field/sint64_field.rb
312
+ - lib/protobuf/field/string_field.rb
313
+ - lib/protobuf/field/uint32_field.rb
314
+ - lib/protobuf/field/uint64_field.rb
315
+ - lib/protobuf/field/varint_field.rb
316
+ - lib/protobuf/generators/base.rb
317
+ - lib/protobuf/generators/enum_generator.rb
318
+ - lib/protobuf/generators/extension_generator.rb
319
+ - lib/protobuf/generators/field_generator.rb
320
+ - lib/protobuf/generators/file_generator.rb
321
+ - lib/protobuf/generators/group_generator.rb
322
+ - lib/protobuf/generators/message_generator.rb
323
+ - lib/protobuf/generators/option_generator.rb
324
+ - lib/protobuf/generators/printable.rb
325
+ - lib/protobuf/generators/service_generator.rb
326
+ - lib/protobuf/lifecycle.rb
327
+ - lib/protobuf/logging.rb
328
+ - lib/protobuf/message.rb
329
+ - lib/protobuf/message/fields.rb
330
+ - lib/protobuf/message/serialization.rb
331
+ - lib/protobuf/optionable.rb
332
+ - lib/protobuf/rpc/buffer.rb
333
+ - lib/protobuf/rpc/client.rb
334
+ - lib/protobuf/rpc/connectors/base.rb
335
+ - lib/protobuf/rpc/connectors/ping.rb
336
+ - lib/protobuf/rpc/connectors/socket.rb
337
+ - lib/protobuf/rpc/connectors/zmq.rb
338
+ - lib/protobuf/rpc/dynamic_discovery.pb.rb
339
+ - lib/protobuf/rpc/env.rb
340
+ - lib/protobuf/rpc/error.rb
341
+ - lib/protobuf/rpc/error/client_error.rb
342
+ - lib/protobuf/rpc/error/server_error.rb
343
+ - lib/protobuf/rpc/middleware.rb
344
+ - lib/protobuf/rpc/middleware/exception_handler.rb
345
+ - lib/protobuf/rpc/middleware/logger.rb
346
+ - lib/protobuf/rpc/middleware/request_decoder.rb
347
+ - lib/protobuf/rpc/middleware/response_encoder.rb
348
+ - lib/protobuf/rpc/middleware/runner.rb
349
+ - lib/protobuf/rpc/rpc.pb.rb
350
+ - lib/protobuf/rpc/rpc_method.rb
351
+ - lib/protobuf/rpc/server.rb
352
+ - lib/protobuf/rpc/servers/socket/server.rb
353
+ - lib/protobuf/rpc/servers/socket/worker.rb
354
+ - lib/protobuf/rpc/servers/socket_runner.rb
355
+ - lib/protobuf/rpc/servers/zmq/broker.rb
356
+ - lib/protobuf/rpc/servers/zmq/server.rb
357
+ - lib/protobuf/rpc/servers/zmq/util.rb
358
+ - lib/protobuf/rpc/servers/zmq/worker.rb
359
+ - lib/protobuf/rpc/servers/zmq_runner.rb
360
+ - lib/protobuf/rpc/service.rb
361
+ - lib/protobuf/rpc/service_directory.rb
362
+ - lib/protobuf/rpc/service_dispatcher.rb
363
+ - lib/protobuf/rpc/service_filters.rb
364
+ - lib/protobuf/rpc/stat.rb
365
+ - lib/protobuf/socket.rb
366
+ - lib/protobuf/tasks.rb
367
+ - lib/protobuf/tasks/compile.rake
368
+ - lib/protobuf/varint.rb
369
+ - lib/protobuf/varint_pure.rb
370
+ - lib/protobuf/version.rb
371
+ - lib/protobuf/wire_type.rb
372
+ - lib/protobuf/zmq.rb
373
+ - profile.html
374
+ - proto/dynamic_discovery.proto
375
+ - proto/google/protobuf/compiler/plugin.proto
376
+ - proto/google/protobuf/descriptor.proto
377
+ - proto/rpc.proto
378
+ - protobuf-cucumber.gemspec
379
+ - spec/benchmark/tasks.rb
380
+ - spec/bin/protoc-gen-ruby_spec.rb
381
+ - spec/encoding/all_types_spec.rb
382
+ - spec/encoding/extreme_values_spec.rb
383
+ - spec/functional/class_inheritance_spec.rb
384
+ - spec/functional/code_generator_spec.rb
385
+ - spec/functional/socket_server_spec.rb
386
+ - spec/functional/zmq_server_spec.rb
387
+ - spec/lib/protobuf/cli_spec.rb
388
+ - spec/lib/protobuf/code_generator_spec.rb
389
+ - spec/lib/protobuf/enum_spec.rb
390
+ - spec/lib/protobuf/field/bool_field_spec.rb
391
+ - spec/lib/protobuf/field/double_field_spec.rb
392
+ - spec/lib/protobuf/field/enum_field_spec.rb
393
+ - spec/lib/protobuf/field/field_array_spec.rb
394
+ - spec/lib/protobuf/field/field_hash_spec.rb
395
+ - spec/lib/protobuf/field/fixed32_field_spec.rb
396
+ - spec/lib/protobuf/field/fixed64_field_spec.rb
397
+ - spec/lib/protobuf/field/float_field_spec.rb
398
+ - spec/lib/protobuf/field/int32_field_spec.rb
399
+ - spec/lib/protobuf/field/int64_field_spec.rb
400
+ - spec/lib/protobuf/field/message_field_spec.rb
401
+ - spec/lib/protobuf/field/sfixed32_field_spec.rb
402
+ - spec/lib/protobuf/field/sfixed64_field_spec.rb
403
+ - spec/lib/protobuf/field/sint32_field_spec.rb
404
+ - spec/lib/protobuf/field/sint64_field_spec.rb
405
+ - spec/lib/protobuf/field/string_field_spec.rb
406
+ - spec/lib/protobuf/field/uint32_field_spec.rb
407
+ - spec/lib/protobuf/field/uint64_field_spec.rb
408
+ - spec/lib/protobuf/field_spec.rb
409
+ - spec/lib/protobuf/generators/base_spec.rb
410
+ - spec/lib/protobuf/generators/enum_generator_spec.rb
411
+ - spec/lib/protobuf/generators/extension_generator_spec.rb
412
+ - spec/lib/protobuf/generators/field_generator_spec.rb
413
+ - spec/lib/protobuf/generators/file_generator_spec.rb
414
+ - spec/lib/protobuf/generators/message_generator_spec.rb
415
+ - spec/lib/protobuf/generators/service_generator_spec.rb
416
+ - spec/lib/protobuf/lifecycle_spec.rb
417
+ - spec/lib/protobuf/message_spec.rb
418
+ - spec/lib/protobuf/optionable_spec.rb
419
+ - spec/lib/protobuf/rpc/client_spec.rb
420
+ - spec/lib/protobuf/rpc/connectors/base_spec.rb
421
+ - spec/lib/protobuf/rpc/connectors/ping_spec.rb
422
+ - spec/lib/protobuf/rpc/connectors/socket_spec.rb
423
+ - spec/lib/protobuf/rpc/connectors/zmq_spec.rb
424
+ - spec/lib/protobuf/rpc/middleware/exception_handler_spec.rb
425
+ - spec/lib/protobuf/rpc/middleware/logger_spec.rb
426
+ - spec/lib/protobuf/rpc/middleware/request_decoder_spec.rb
427
+ - spec/lib/protobuf/rpc/middleware/response_encoder_spec.rb
428
+ - spec/lib/protobuf/rpc/servers/socket_server_spec.rb
429
+ - spec/lib/protobuf/rpc/servers/zmq/server_spec.rb
430
+ - spec/lib/protobuf/rpc/servers/zmq/util_spec.rb
431
+ - spec/lib/protobuf/rpc/servers/zmq/worker_spec.rb
432
+ - spec/lib/protobuf/rpc/service_directory_spec.rb
433
+ - spec/lib/protobuf/rpc/service_dispatcher_spec.rb
434
+ - spec/lib/protobuf/rpc/service_filters_spec.rb
435
+ - spec/lib/protobuf/rpc/service_spec.rb
436
+ - spec/lib/protobuf/rpc/stat_spec.rb
437
+ - spec/lib/protobuf/varint_spec.rb
438
+ - spec/lib/protobuf_spec.rb
439
+ - spec/spec_helper.rb
440
+ - spec/support/all.rb
441
+ - spec/support/packed_field.rb
442
+ - spec/support/protos/all_types.data.bin
443
+ - spec/support/protos/all_types.data.txt
444
+ - spec/support/protos/enum.pb.rb
445
+ - spec/support/protos/enum.proto
446
+ - spec/support/protos/extreme_values.data.bin
447
+ - spec/support/protos/google_unittest.bin
448
+ - spec/support/protos/google_unittest.pb.rb
449
+ - spec/support/protos/google_unittest.proto
450
+ - spec/support/protos/google_unittest_custom_options.bin
451
+ - spec/support/protos/google_unittest_custom_options.pb.rb
452
+ - spec/support/protos/google_unittest_custom_options.proto
453
+ - spec/support/protos/google_unittest_import.pb.rb
454
+ - spec/support/protos/google_unittest_import.proto
455
+ - spec/support/protos/google_unittest_import_public.pb.rb
456
+ - spec/support/protos/google_unittest_import_public.proto
457
+ - spec/support/protos/map-test.bin
458
+ - spec/support/protos/map-test.pb.rb
459
+ - spec/support/protos/map-test.proto
460
+ - spec/support/protos/multi_field_extensions.pb.rb
461
+ - spec/support/protos/multi_field_extensions.proto
462
+ - spec/support/protos/resource.pb.rb
463
+ - spec/support/protos/resource.proto
464
+ - spec/support/resource_service.rb
465
+ - spec/support/server.rb
466
+ - spec/support/test_app_file.rb
467
+ - varint_prof.rb
468
+ homepage: https://github.com/localshred/protobuf
469
+ licenses:
470
+ - MIT
471
+ metadata: {}
472
+ post_install_message:
473
+ rdoc_options: []
474
+ require_paths:
475
+ - lib
476
+ required_ruby_version: !ruby/object:Gem::Requirement
477
+ requirements:
478
+ - - ">="
479
+ - !ruby/object:Gem::Version
480
+ version: '0'
481
+ required_rubygems_version: !ruby/object:Gem::Requirement
482
+ requirements:
483
+ - - ">="
484
+ - !ruby/object:Gem::Version
485
+ version: '0'
486
+ requirements: []
487
+ rubygems_version: 3.0.3
488
+ signing_key:
489
+ specification_version: 4
490
+ summary: Google Protocol Buffers serialization and RPC implementation for Ruby.
491
+ test_files:
492
+ - spec/benchmark/tasks.rb
493
+ - spec/bin/protoc-gen-ruby_spec.rb
494
+ - spec/encoding/all_types_spec.rb
495
+ - spec/encoding/extreme_values_spec.rb
496
+ - spec/functional/class_inheritance_spec.rb
497
+ - spec/functional/code_generator_spec.rb
498
+ - spec/functional/socket_server_spec.rb
499
+ - spec/functional/zmq_server_spec.rb
500
+ - spec/lib/protobuf/cli_spec.rb
501
+ - spec/lib/protobuf/code_generator_spec.rb
502
+ - spec/lib/protobuf/enum_spec.rb
503
+ - spec/lib/protobuf/field/bool_field_spec.rb
504
+ - spec/lib/protobuf/field/double_field_spec.rb
505
+ - spec/lib/protobuf/field/enum_field_spec.rb
506
+ - spec/lib/protobuf/field/field_array_spec.rb
507
+ - spec/lib/protobuf/field/field_hash_spec.rb
508
+ - spec/lib/protobuf/field/fixed32_field_spec.rb
509
+ - spec/lib/protobuf/field/fixed64_field_spec.rb
510
+ - spec/lib/protobuf/field/float_field_spec.rb
511
+ - spec/lib/protobuf/field/int32_field_spec.rb
512
+ - spec/lib/protobuf/field/int64_field_spec.rb
513
+ - spec/lib/protobuf/field/message_field_spec.rb
514
+ - spec/lib/protobuf/field/sfixed32_field_spec.rb
515
+ - spec/lib/protobuf/field/sfixed64_field_spec.rb
516
+ - spec/lib/protobuf/field/sint32_field_spec.rb
517
+ - spec/lib/protobuf/field/sint64_field_spec.rb
518
+ - spec/lib/protobuf/field/string_field_spec.rb
519
+ - spec/lib/protobuf/field/uint32_field_spec.rb
520
+ - spec/lib/protobuf/field/uint64_field_spec.rb
521
+ - spec/lib/protobuf/field_spec.rb
522
+ - spec/lib/protobuf/generators/base_spec.rb
523
+ - spec/lib/protobuf/generators/enum_generator_spec.rb
524
+ - spec/lib/protobuf/generators/extension_generator_spec.rb
525
+ - spec/lib/protobuf/generators/field_generator_spec.rb
526
+ - spec/lib/protobuf/generators/file_generator_spec.rb
527
+ - spec/lib/protobuf/generators/message_generator_spec.rb
528
+ - spec/lib/protobuf/generators/service_generator_spec.rb
529
+ - spec/lib/protobuf/lifecycle_spec.rb
530
+ - spec/lib/protobuf/message_spec.rb
531
+ - spec/lib/protobuf/optionable_spec.rb
532
+ - spec/lib/protobuf/rpc/client_spec.rb
533
+ - spec/lib/protobuf/rpc/connectors/base_spec.rb
534
+ - spec/lib/protobuf/rpc/connectors/ping_spec.rb
535
+ - spec/lib/protobuf/rpc/connectors/socket_spec.rb
536
+ - spec/lib/protobuf/rpc/connectors/zmq_spec.rb
537
+ - spec/lib/protobuf/rpc/middleware/exception_handler_spec.rb
538
+ - spec/lib/protobuf/rpc/middleware/logger_spec.rb
539
+ - spec/lib/protobuf/rpc/middleware/request_decoder_spec.rb
540
+ - spec/lib/protobuf/rpc/middleware/response_encoder_spec.rb
541
+ - spec/lib/protobuf/rpc/servers/socket_server_spec.rb
542
+ - spec/lib/protobuf/rpc/servers/zmq/server_spec.rb
543
+ - spec/lib/protobuf/rpc/servers/zmq/util_spec.rb
544
+ - spec/lib/protobuf/rpc/servers/zmq/worker_spec.rb
545
+ - spec/lib/protobuf/rpc/service_directory_spec.rb
546
+ - spec/lib/protobuf/rpc/service_dispatcher_spec.rb
547
+ - spec/lib/protobuf/rpc/service_filters_spec.rb
548
+ - spec/lib/protobuf/rpc/service_spec.rb
549
+ - spec/lib/protobuf/rpc/stat_spec.rb
550
+ - spec/lib/protobuf/varint_spec.rb
551
+ - spec/lib/protobuf_spec.rb
552
+ - spec/spec_helper.rb
553
+ - spec/support/all.rb
554
+ - spec/support/packed_field.rb
555
+ - spec/support/protos/all_types.data.bin
556
+ - spec/support/protos/all_types.data.txt
557
+ - spec/support/protos/enum.pb.rb
558
+ - spec/support/protos/enum.proto
559
+ - spec/support/protos/extreme_values.data.bin
560
+ - spec/support/protos/google_unittest.bin
561
+ - spec/support/protos/google_unittest.pb.rb
562
+ - spec/support/protos/google_unittest.proto
563
+ - spec/support/protos/google_unittest_custom_options.bin
564
+ - spec/support/protos/google_unittest_custom_options.pb.rb
565
+ - spec/support/protos/google_unittest_custom_options.proto
566
+ - spec/support/protos/google_unittest_import.pb.rb
567
+ - spec/support/protos/google_unittest_import.proto
568
+ - spec/support/protos/google_unittest_import_public.pb.rb
569
+ - spec/support/protos/google_unittest_import_public.proto
570
+ - spec/support/protos/map-test.bin
571
+ - spec/support/protos/map-test.pb.rb
572
+ - spec/support/protos/map-test.proto
573
+ - spec/support/protos/multi_field_extensions.pb.rb
574
+ - spec/support/protos/multi_field_extensions.proto
575
+ - spec/support/protos/resource.pb.rb
576
+ - spec/support/protos/resource.proto
577
+ - spec/support/resource_service.rb
578
+ - spec/support/server.rb
579
+ - spec/support/test_app_file.rb