protobuf 3.5.4 → 3.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rubocop.yml +1 -1
- data/.rubocop_todo.yml +0 -6
- data/.travis.yml +1 -0
- data/lib/protobuf/cli.rb +22 -22
- data/lib/protobuf/decoder.rb +2 -9
- data/lib/protobuf/generators/printable.rb +1 -1
- data/lib/protobuf/message.rb +11 -0
- data/lib/protobuf/rpc/buffer.rb +1 -1
- data/lib/protobuf/rpc/connectors/common.rb +1 -1
- data/lib/protobuf/rpc/connectors/socket.rb +2 -2
- data/lib/protobuf/rpc/connectors/zmq.rb +2 -2
- data/lib/protobuf/rpc/servers/socket/server.rb +2 -4
- data/lib/protobuf/rpc/servers/socket_runner.rb +7 -7
- data/lib/protobuf/varint.rb +11 -0
- data/lib/protobuf/varint_pure.rb +13 -0
- data/lib/protobuf/version.rb +1 -1
- data/protobuf.gemspec +8 -7
- data/spec/encoding/all_types_spec.rb +1 -4
- data/spec/encoding/extreme_values_spec.rb +0 -0
- data/spec/functional/socket_server_spec.rb +1 -1
- data/spec/functional/zmq_server_spec.rb +1 -1
- data/spec/lib/protobuf/rpc/servers/socket_server_spec.rb +1 -1
- data/spec/lib/protobuf/rpc/service_directory_spec.rb +2 -2
- data/spec/lib/protobuf/varint_spec.rb +29 -0
- metadata +135 -80
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 37b8ae0a1e0e242f6e59627e2237e34e046e1ddc
|
4
|
+
data.tar.gz: 64fd74dede3374c1ca631e05f3cc9c2261e9f81d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 83f929f8fd8a65cfd6e2e5c77218b96df98220335063847b2c1bb7cd1c0cd2207ddc4b0a06781f3a5f915fbe882e352961e04b6244cc7228b3947557a7230316
|
7
|
+
data.tar.gz: 4cbc7cc6f211c1290aa9b7ff3a7477f8d503e79cf8a4b6530eeb48a1390538897ee22390a9b0adcbe8b81fdcc652789795d2694a4a3675e063c7001dfbeca07d
|
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
@@ -6,12 +6,6 @@
|
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count: 7
|
10
|
-
# Cop supports --auto-correct.
|
11
|
-
# Configuration parameters: AlignWith, SupportedStyles, AutoCorrect.
|
12
|
-
Lint/EndAlignment:
|
13
|
-
Enabled: false
|
14
|
-
|
15
9
|
# Offense count: 31
|
16
10
|
Metrics/AbcSize:
|
17
11
|
Max: 59
|
data/.travis.yml
CHANGED
data/lib/protobuf/cli.rb
CHANGED
@@ -114,21 +114,21 @@ module Protobuf
|
|
114
114
|
debug_say('Configuring runner mode')
|
115
115
|
|
116
116
|
self.mode = if multi_mode?
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
117
|
+
say('WARNING: You have provided multiple mode options. Defaulting to socket mode.', :yellow)
|
118
|
+
:socket
|
119
|
+
elsif options.zmq?
|
120
|
+
:zmq
|
121
|
+
else
|
122
|
+
case server_type = ENV["PB_SERVER_TYPE"]
|
123
|
+
when nil, /socket/i
|
124
|
+
:socket
|
125
|
+
when /zmq/i
|
126
|
+
:zmq
|
127
|
+
else
|
128
|
+
say "WARNING: You have provided incorrect option 'PB_SERVER_TYPE=#{server_type}'. Defaulting to socket mode.", :yellow
|
129
|
+
:socket
|
130
|
+
end
|
131
|
+
end
|
132
132
|
end
|
133
133
|
|
134
134
|
# Configure signal traps.
|
@@ -153,13 +153,13 @@ module Protobuf
|
|
153
153
|
def create_runner
|
154
154
|
debug_say("Creating #{mode} runner")
|
155
155
|
self.runner = case mode
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
156
|
+
when :zmq
|
157
|
+
create_zmq_runner
|
158
|
+
when :socket
|
159
|
+
create_socket_runner
|
160
|
+
else
|
161
|
+
say_and_exit("Unknown runner mode: #{mode}")
|
162
|
+
end
|
163
163
|
end
|
164
164
|
|
165
165
|
# Say something if we're in debug mode.
|
data/lib/protobuf/decoder.rb
CHANGED
@@ -16,7 +16,7 @@ module Protobuf
|
|
16
16
|
tag, wire_type = read_key(stream)
|
17
17
|
bytes = case wire_type
|
18
18
|
when ::Protobuf::WireType::VARINT then
|
19
|
-
|
19
|
+
Varint.decode(stream)
|
20
20
|
when ::Protobuf::WireType::FIXED64 then
|
21
21
|
read_fixed64(stream)
|
22
22
|
when ::Protobuf::WireType::LENGTH_DELIMITED then
|
@@ -60,14 +60,7 @@ module Protobuf
|
|
60
60
|
|
61
61
|
# Read varint integer value from +stream+.
|
62
62
|
def self.read_varint(stream)
|
63
|
-
|
64
|
-
begin
|
65
|
-
byte = stream.readbyte
|
66
|
-
value |= (byte & 0x7f) << (7 * index)
|
67
|
-
index += 1
|
68
|
-
end while (byte & 0x80).nonzero?
|
69
|
-
value
|
63
|
+
Varint.decode(stream)
|
70
64
|
end
|
71
|
-
|
72
65
|
end
|
73
66
|
end
|
data/lib/protobuf/message.rb
CHANGED
@@ -4,6 +4,17 @@ require 'protobuf/exceptions'
|
|
4
4
|
require 'protobuf/message/fields'
|
5
5
|
require 'protobuf/message/serialization'
|
6
6
|
|
7
|
+
# Under MRI, this optimizes proto decoding by around 15% in tests.
|
8
|
+
# When unavailable, we fall to pure Ruby.
|
9
|
+
# rubocop:disable Lint/HandleExceptions
|
10
|
+
begin
|
11
|
+
require 'varint/varint'
|
12
|
+
rescue LoadError
|
13
|
+
end
|
14
|
+
# rubocop:enable Lint/HandleExceptions
|
15
|
+
|
16
|
+
require 'protobuf/varint'
|
17
|
+
|
7
18
|
module Protobuf
|
8
19
|
class Message
|
9
20
|
|
data/lib/protobuf/rpc/buffer.rb
CHANGED
@@ -63,7 +63,7 @@ module Protobuf
|
|
63
63
|
def get_data_size # rubocop:disable Style/AccessorMethodName
|
64
64
|
if @size == 0 || @data.match(SIZE_REGEX)
|
65
65
|
sliced_size = @data.slice!(SIZE_REGEX)
|
66
|
-
@size = sliced_size.
|
66
|
+
@size = sliced_size.delete('-').to_i unless sliced_size.nil?
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
@@ -37,7 +37,7 @@ module Protobuf
|
|
37
37
|
# @param [Symbol] code The code we're using (see ::Protobuf::Socketrpc::ErrorReason)
|
38
38
|
# @param [String] message The error message
|
39
39
|
def failure(code, message)
|
40
|
-
@error =
|
40
|
+
@error = ClientError.new
|
41
41
|
@error.code = Protobuf::Socketrpc::ErrorReason.fetch(code)
|
42
42
|
@error.message = message
|
43
43
|
logger.debug { sign_message("Server failed request (invoking on_failure): #{@error.inspect}") }
|
@@ -24,7 +24,7 @@ module Protobuf
|
|
24
24
|
|
25
25
|
def close_connection
|
26
26
|
@socket.close
|
27
|
-
logger.debug { sign_message('Connector closed')
|
27
|
+
logger.debug { sign_message('Connector closed') }
|
28
28
|
end
|
29
29
|
|
30
30
|
def connect_to_rpc_server
|
@@ -35,7 +35,7 @@ module Protobuf
|
|
35
35
|
# Method to determine error state, must be used with Connector api
|
36
36
|
def error?
|
37
37
|
return true if @error
|
38
|
-
logger.debug { sign_message("Error state : #{@socket.closed?}")
|
38
|
+
logger.debug { sign_message("Error state : #{@socket.closed?}") }
|
39
39
|
@socket.closed?
|
40
40
|
end
|
41
41
|
|
@@ -220,9 +220,9 @@ module Protobuf
|
|
220
220
|
logger.debug { sign_message("Timed out waiting for response (attempt #{attempt}, #{socket})") }
|
221
221
|
raise RequestTimeout
|
222
222
|
ensure
|
223
|
-
logger.debug { sign_message("Closing Socket")
|
223
|
+
logger.debug { sign_message("Closing Socket") }
|
224
224
|
zmq_error_check(socket.close, :socket_close) if socket
|
225
|
-
logger.debug { sign_message("Socket closed")
|
225
|
+
logger.debug { sign_message("Socket closed") }
|
226
226
|
end
|
227
227
|
|
228
228
|
def server_lookup_attempts
|
@@ -60,9 +60,7 @@ module Protobuf
|
|
60
60
|
|
61
61
|
def new_worker(socket)
|
62
62
|
Thread.new(socket) do |sock|
|
63
|
-
::Protobuf::Rpc::Socket::Worker.new(sock)
|
64
|
-
s.close
|
65
|
-
end
|
63
|
+
::Protobuf::Rpc::Socket::Worker.new(sock, &:close)
|
66
64
|
end
|
67
65
|
end
|
68
66
|
|
@@ -97,7 +95,7 @@ module Protobuf
|
|
97
95
|
else
|
98
96
|
unless working.include?(client)
|
99
97
|
working << listen_fds.delete(client)
|
100
|
-
logger.debug { sign_message("Working")
|
98
|
+
logger.debug { sign_message("Working") }
|
101
99
|
threads << { :thread => new_worker(client), :socket => client }
|
102
100
|
|
103
101
|
cleanup_threads if cleanup?
|
@@ -10,13 +10,13 @@ module Protobuf
|
|
10
10
|
|
11
11
|
def initialize(options)
|
12
12
|
options = case
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
13
|
+
when options.is_a?(OpenStruct) then
|
14
|
+
options.marshal_dump
|
15
|
+
when options.respond_to?(:to_hash) then
|
16
|
+
options.to_hash.symbolize_keys
|
17
|
+
else
|
18
|
+
fail "Cannot parser Socket Server - server options"
|
19
|
+
end
|
20
20
|
|
21
21
|
self.server = ::Protobuf::Rpc::Socket::Server.new(options)
|
22
22
|
end
|
data/lib/protobuf/version.rb
CHANGED
data/protobuf.gemspec
CHANGED
@@ -27,7 +27,7 @@ require "protobuf/version"
|
|
27
27
|
s.add_development_dependency 'ffi-rzmq'
|
28
28
|
s.add_development_dependency 'rake'
|
29
29
|
s.add_development_dependency 'rspec', '>= 3.0'
|
30
|
-
s.add_development_dependency 'rubocop'
|
30
|
+
s.add_development_dependency 'rubocop', '0.34.2'
|
31
31
|
s.add_development_dependency 'simplecov'
|
32
32
|
s.add_development_dependency 'timecop'
|
33
33
|
s.add_development_dependency 'yard'
|
@@ -36,16 +36,17 @@ require "protobuf/version"
|
|
36
36
|
if RUBY_ENGINE.to_sym == :ruby
|
37
37
|
# we don't support MRI < 1.9.3
|
38
38
|
pry_debugger = if RUBY_VERSION < '2.0.0'
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
'pry-debugger'
|
40
|
+
else
|
41
|
+
'pry-byebug'
|
42
|
+
end
|
43
43
|
|
44
44
|
s.add_development_dependency pry_debugger
|
45
45
|
s.add_development_dependency 'pry-stack_explorer'
|
46
|
+
|
47
|
+
s.add_development_dependency 'varint'
|
48
|
+
s.add_development_dependency 'ruby-prof'
|
46
49
|
else
|
47
50
|
s.add_development_dependency 'pry'
|
48
51
|
end
|
49
|
-
|
50
|
-
s.add_development_dependency 'ruby-prof' if RUBY_ENGINE.to_sym == :ruby
|
51
52
|
end
|
@@ -96,10 +96,7 @@ RSpec.describe ::Protobuf do
|
|
96
96
|
)
|
97
97
|
|
98
98
|
data_file_path = File.expand_path('../../support/test/all_types.data.bin', __FILE__)
|
99
|
-
data = File.open(data_file_path, 'rb')
|
100
|
-
file.read
|
101
|
-
end
|
102
|
-
|
99
|
+
data = File.open(data_file_path, 'rb', &:read)
|
103
100
|
expect(data).to eq(message.serialize_to_string)
|
104
101
|
end
|
105
102
|
end
|
Binary file
|
@@ -6,7 +6,7 @@ RSpec.describe 'Functional Socket Client' do
|
|
6
6
|
load "protobuf/socket.rb"
|
7
7
|
@options = OpenStruct.new(:host => "127.0.0.1", :port => 9399, :backlog => 100, :threshold => 100)
|
8
8
|
@runner = ::Protobuf::Rpc::SocketRunner.new(@options)
|
9
|
-
@server_thread = Thread.new(@runner
|
9
|
+
@server_thread = Thread.new(@runner, &:run)
|
10
10
|
Thread.pass until @runner.running?
|
11
11
|
end
|
12
12
|
|
@@ -14,7 +14,7 @@ RSpec.describe Protobuf::Rpc::Socket::Server do
|
|
14
14
|
@options = OpenStruct.new(:host => "127.0.0.1", :port => 9399, :backlog => 100, :threshold => 100)
|
15
15
|
@runner = ::Protobuf::Rpc::SocketRunner.new(@options)
|
16
16
|
@server = @runner.instance_variable_get(:@server)
|
17
|
-
@server_thread = Thread.new(@runner
|
17
|
+
@server_thread = Thread.new(@runner, &:run)
|
18
18
|
Thread.pass until @server.running?
|
19
19
|
end
|
20
20
|
|
@@ -283,8 +283,8 @@ RSpec.describe ::Protobuf::Rpc::ServiceDirectory do
|
|
283
283
|
it "should perform lookups in constant time" do
|
284
284
|
print "\n\n"
|
285
285
|
Benchmark.bm(17) do |x|
|
286
|
-
x.report(" 1_000 lookups:") {
|
287
|
-
x.report(" 10_000 lookups:") {
|
286
|
+
x.report(" 1_000 lookups:") { 1_000.times { subject.lookup("PerformanceService#{rand(0..9)}") } }
|
287
|
+
x.report(" 10_000 lookups:") { 10_000.times { subject.lookup("PerformanceService#{rand(0..9)}") } }
|
288
288
|
x.report("100_000 lookups:") { 100_000.times { subject.lookup("PerformanceService#{rand(0..9)}") } }
|
289
289
|
end
|
290
290
|
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'base64'
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
RSpec.describe Protobuf::Varint do
|
5
|
+
VALUES = {
|
6
|
+
0 => "AA==",
|
7
|
+
5 => "BQ==",
|
8
|
+
51 => "Mw==",
|
9
|
+
9_192 => "6Ec=",
|
10
|
+
80_389 => "hfQE",
|
11
|
+
913_389 => "7d83",
|
12
|
+
516_192_829_912_693 => "9eyMkpivdQ==",
|
13
|
+
9_999_999_999_999_999_999 => "//+fz8jgyOOKAQ==",
|
14
|
+
}
|
15
|
+
|
16
|
+
[defined?(::Varint) ? ::Varint : nil, Protobuf::VarintPure].compact.each do |klass|
|
17
|
+
context "with #{klass}" do
|
18
|
+
before { described_class.extend(klass) }
|
19
|
+
after { load ::File.expand_path('../../../../lib/protobuf/varint.rb', __FILE__) }
|
20
|
+
|
21
|
+
VALUES.each do |number, encoded|
|
22
|
+
it "decodes #{number}" do
|
23
|
+
io = StringIO.new(Base64.decode64(encoded))
|
24
|
+
expect(described_class.decode(io)).to eq(number)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: protobuf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
5
|
-
prerelease:
|
4
|
+
version: 3.5.5
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- BJ Neilsen
|
@@ -12,230 +11,216 @@ authors:
|
|
12
11
|
autorequire:
|
13
12
|
bindir: bin
|
14
13
|
cert_chain: []
|
15
|
-
date: 2015-
|
14
|
+
date: 2015-10-01 00:00:00.000000000 Z
|
16
15
|
dependencies:
|
17
16
|
- !ruby/object:Gem::Dependency
|
18
17
|
name: activesupport
|
19
18
|
requirement: !ruby/object:Gem::Requirement
|
20
|
-
none: false
|
21
19
|
requirements:
|
22
|
-
- -
|
20
|
+
- - ">="
|
23
21
|
- !ruby/object:Gem::Version
|
24
22
|
version: '3.2'
|
25
23
|
type: :runtime
|
26
24
|
prerelease: false
|
27
25
|
version_requirements: !ruby/object:Gem::Requirement
|
28
|
-
none: false
|
29
26
|
requirements:
|
30
|
-
- -
|
27
|
+
- - ">="
|
31
28
|
- !ruby/object:Gem::Version
|
32
29
|
version: '3.2'
|
33
30
|
- !ruby/object:Gem::Dependency
|
34
31
|
name: middleware
|
35
32
|
requirement: !ruby/object:Gem::Requirement
|
36
|
-
none: false
|
37
33
|
requirements:
|
38
|
-
- -
|
34
|
+
- - ">="
|
39
35
|
- !ruby/object:Gem::Version
|
40
36
|
version: '0'
|
41
37
|
type: :runtime
|
42
38
|
prerelease: false
|
43
39
|
version_requirements: !ruby/object:Gem::Requirement
|
44
|
-
none: false
|
45
40
|
requirements:
|
46
|
-
- -
|
41
|
+
- - ">="
|
47
42
|
- !ruby/object:Gem::Version
|
48
43
|
version: '0'
|
49
44
|
- !ruby/object:Gem::Dependency
|
50
45
|
name: thor
|
51
46
|
requirement: !ruby/object:Gem::Requirement
|
52
|
-
none: false
|
53
47
|
requirements:
|
54
|
-
- -
|
48
|
+
- - ">="
|
55
49
|
- !ruby/object:Gem::Version
|
56
50
|
version: '0'
|
57
51
|
type: :runtime
|
58
52
|
prerelease: false
|
59
53
|
version_requirements: !ruby/object:Gem::Requirement
|
60
|
-
none: false
|
61
54
|
requirements:
|
62
|
-
- -
|
55
|
+
- - ">="
|
63
56
|
- !ruby/object:Gem::Version
|
64
57
|
version: '0'
|
65
58
|
- !ruby/object:Gem::Dependency
|
66
59
|
name: thread_safe
|
67
60
|
requirement: !ruby/object:Gem::Requirement
|
68
|
-
none: false
|
69
61
|
requirements:
|
70
|
-
- -
|
62
|
+
- - ">="
|
71
63
|
- !ruby/object:Gem::Version
|
72
64
|
version: '0'
|
73
65
|
type: :runtime
|
74
66
|
prerelease: false
|
75
67
|
version_requirements: !ruby/object:Gem::Requirement
|
76
|
-
none: false
|
77
68
|
requirements:
|
78
|
-
- -
|
69
|
+
- - ">="
|
79
70
|
- !ruby/object:Gem::Version
|
80
71
|
version: '0'
|
81
72
|
- !ruby/object:Gem::Dependency
|
82
73
|
name: ffi-rzmq
|
83
74
|
requirement: !ruby/object:Gem::Requirement
|
84
|
-
none: false
|
85
75
|
requirements:
|
86
|
-
- -
|
76
|
+
- - ">="
|
87
77
|
- !ruby/object:Gem::Version
|
88
78
|
version: '0'
|
89
79
|
type: :development
|
90
80
|
prerelease: false
|
91
81
|
version_requirements: !ruby/object:Gem::Requirement
|
92
|
-
none: false
|
93
82
|
requirements:
|
94
|
-
- -
|
83
|
+
- - ">="
|
95
84
|
- !ruby/object:Gem::Version
|
96
85
|
version: '0'
|
97
86
|
- !ruby/object:Gem::Dependency
|
98
87
|
name: rake
|
99
88
|
requirement: !ruby/object:Gem::Requirement
|
100
|
-
none: false
|
101
89
|
requirements:
|
102
|
-
- -
|
90
|
+
- - ">="
|
103
91
|
- !ruby/object:Gem::Version
|
104
92
|
version: '0'
|
105
93
|
type: :development
|
106
94
|
prerelease: false
|
107
95
|
version_requirements: !ruby/object:Gem::Requirement
|
108
|
-
none: false
|
109
96
|
requirements:
|
110
|
-
- -
|
97
|
+
- - ">="
|
111
98
|
- !ruby/object:Gem::Version
|
112
99
|
version: '0'
|
113
100
|
- !ruby/object:Gem::Dependency
|
114
101
|
name: rspec
|
115
102
|
requirement: !ruby/object:Gem::Requirement
|
116
|
-
none: false
|
117
103
|
requirements:
|
118
|
-
- -
|
104
|
+
- - ">="
|
119
105
|
- !ruby/object:Gem::Version
|
120
106
|
version: '3.0'
|
121
107
|
type: :development
|
122
108
|
prerelease: false
|
123
109
|
version_requirements: !ruby/object:Gem::Requirement
|
124
|
-
none: false
|
125
110
|
requirements:
|
126
|
-
- -
|
111
|
+
- - ">="
|
127
112
|
- !ruby/object:Gem::Version
|
128
113
|
version: '3.0'
|
129
114
|
- !ruby/object:Gem::Dependency
|
130
115
|
name: rubocop
|
131
116
|
requirement: !ruby/object:Gem::Requirement
|
132
|
-
none: false
|
133
117
|
requirements:
|
134
|
-
- -
|
118
|
+
- - '='
|
135
119
|
- !ruby/object:Gem::Version
|
136
|
-
version:
|
120
|
+
version: 0.34.2
|
137
121
|
type: :development
|
138
122
|
prerelease: false
|
139
123
|
version_requirements: !ruby/object:Gem::Requirement
|
140
|
-
none: false
|
141
124
|
requirements:
|
142
|
-
- -
|
125
|
+
- - '='
|
143
126
|
- !ruby/object:Gem::Version
|
144
|
-
version:
|
127
|
+
version: 0.34.2
|
145
128
|
- !ruby/object:Gem::Dependency
|
146
129
|
name: simplecov
|
147
130
|
requirement: !ruby/object:Gem::Requirement
|
148
|
-
none: false
|
149
131
|
requirements:
|
150
|
-
- -
|
132
|
+
- - ">="
|
151
133
|
- !ruby/object:Gem::Version
|
152
134
|
version: '0'
|
153
135
|
type: :development
|
154
136
|
prerelease: false
|
155
137
|
version_requirements: !ruby/object:Gem::Requirement
|
156
|
-
none: false
|
157
138
|
requirements:
|
158
|
-
- -
|
139
|
+
- - ">="
|
159
140
|
- !ruby/object:Gem::Version
|
160
141
|
version: '0'
|
161
142
|
- !ruby/object:Gem::Dependency
|
162
143
|
name: timecop
|
163
144
|
requirement: !ruby/object:Gem::Requirement
|
164
|
-
none: false
|
165
145
|
requirements:
|
166
|
-
- -
|
146
|
+
- - ">="
|
167
147
|
- !ruby/object:Gem::Version
|
168
148
|
version: '0'
|
169
149
|
type: :development
|
170
150
|
prerelease: false
|
171
151
|
version_requirements: !ruby/object:Gem::Requirement
|
172
|
-
none: false
|
173
152
|
requirements:
|
174
|
-
- -
|
153
|
+
- - ">="
|
175
154
|
- !ruby/object:Gem::Version
|
176
155
|
version: '0'
|
177
156
|
- !ruby/object:Gem::Dependency
|
178
157
|
name: yard
|
179
158
|
requirement: !ruby/object:Gem::Requirement
|
180
|
-
none: false
|
181
159
|
requirements:
|
182
|
-
- -
|
160
|
+
- - ">="
|
183
161
|
- !ruby/object:Gem::Version
|
184
162
|
version: '0'
|
185
163
|
type: :development
|
186
164
|
prerelease: false
|
187
165
|
version_requirements: !ruby/object:Gem::Requirement
|
188
|
-
none: false
|
189
166
|
requirements:
|
190
|
-
- -
|
167
|
+
- - ">="
|
191
168
|
- !ruby/object:Gem::Version
|
192
169
|
version: '0'
|
193
170
|
- !ruby/object:Gem::Dependency
|
194
|
-
name: pry-
|
171
|
+
name: pry-byebug
|
195
172
|
requirement: !ruby/object:Gem::Requirement
|
196
|
-
none: false
|
197
173
|
requirements:
|
198
|
-
- -
|
174
|
+
- - ">="
|
199
175
|
- !ruby/object:Gem::Version
|
200
176
|
version: '0'
|
201
177
|
type: :development
|
202
178
|
prerelease: false
|
203
179
|
version_requirements: !ruby/object:Gem::Requirement
|
204
|
-
none: false
|
205
180
|
requirements:
|
206
|
-
- -
|
181
|
+
- - ">="
|
207
182
|
- !ruby/object:Gem::Version
|
208
183
|
version: '0'
|
209
184
|
- !ruby/object:Gem::Dependency
|
210
185
|
name: pry-stack_explorer
|
211
186
|
requirement: !ruby/object:Gem::Requirement
|
212
|
-
none: false
|
213
187
|
requirements:
|
214
|
-
- -
|
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: varint
|
200
|
+
requirement: !ruby/object:Gem::Requirement
|
201
|
+
requirements:
|
202
|
+
- - ">="
|
215
203
|
- !ruby/object:Gem::Version
|
216
204
|
version: '0'
|
217
205
|
type: :development
|
218
206
|
prerelease: false
|
219
207
|
version_requirements: !ruby/object:Gem::Requirement
|
220
|
-
none: false
|
221
208
|
requirements:
|
222
|
-
- -
|
209
|
+
- - ">="
|
223
210
|
- !ruby/object:Gem::Version
|
224
211
|
version: '0'
|
225
212
|
- !ruby/object:Gem::Dependency
|
226
213
|
name: ruby-prof
|
227
214
|
requirement: !ruby/object:Gem::Requirement
|
228
|
-
none: false
|
229
215
|
requirements:
|
230
|
-
- -
|
216
|
+
- - ">="
|
231
217
|
- !ruby/object:Gem::Version
|
232
218
|
version: '0'
|
233
219
|
type: :development
|
234
220
|
prerelease: false
|
235
221
|
version_requirements: !ruby/object:Gem::Requirement
|
236
|
-
none: false
|
237
222
|
requirements:
|
238
|
-
- -
|
223
|
+
- - ">="
|
239
224
|
- !ruby/object:Gem::Version
|
240
225
|
version: '0'
|
241
226
|
description: Google Protocol Buffers serialization and RPC implementation for Ruby.
|
@@ -250,11 +235,11 @@ executables:
|
|
250
235
|
extensions: []
|
251
236
|
extra_rdoc_files: []
|
252
237
|
files:
|
253
|
-
- .gitignore
|
254
|
-
- .rubocop.yml
|
255
|
-
- .rubocop_todo.yml
|
256
|
-
- .travis.yml
|
257
|
-
- .yardopts
|
238
|
+
- ".gitignore"
|
239
|
+
- ".rubocop.yml"
|
240
|
+
- ".rubocop_todo.yml"
|
241
|
+
- ".travis.yml"
|
242
|
+
- ".yardopts"
|
258
243
|
- CHANGES.md
|
259
244
|
- CONTRIBUTING.md
|
260
245
|
- Gemfile
|
@@ -349,6 +334,8 @@ files:
|
|
349
334
|
- lib/protobuf/socket.rb
|
350
335
|
- lib/protobuf/tasks.rb
|
351
336
|
- lib/protobuf/tasks/compile.rake
|
337
|
+
- lib/protobuf/varint.rb
|
338
|
+
- lib/protobuf/varint_pure.rb
|
352
339
|
- lib/protobuf/version.rb
|
353
340
|
- lib/protobuf/wire_type.rb
|
354
341
|
- lib/protobuf/zmq.rb
|
@@ -404,6 +391,7 @@ files:
|
|
404
391
|
- spec/lib/protobuf/rpc/service_filters_spec.rb
|
405
392
|
- spec/lib/protobuf/rpc/service_spec.rb
|
406
393
|
- spec/lib/protobuf/rpc/stat_spec.rb
|
394
|
+
- spec/lib/protobuf/varint_spec.rb
|
407
395
|
- spec/lib/protobuf_spec.rb
|
408
396
|
- spec/spec_helper.rb
|
409
397
|
- spec/support/all.rb
|
@@ -433,33 +421,100 @@ files:
|
|
433
421
|
homepage: https://github.com/localshred/protobuf
|
434
422
|
licenses:
|
435
423
|
- MIT
|
424
|
+
metadata: {}
|
436
425
|
post_install_message:
|
437
426
|
rdoc_options: []
|
438
427
|
require_paths:
|
439
428
|
- lib
|
440
429
|
required_ruby_version: !ruby/object:Gem::Requirement
|
441
|
-
none: false
|
442
430
|
requirements:
|
443
|
-
- -
|
431
|
+
- - ">="
|
444
432
|
- !ruby/object:Gem::Version
|
445
433
|
version: '0'
|
446
|
-
segments:
|
447
|
-
- 0
|
448
|
-
hash: -840495438647296383
|
449
434
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
450
|
-
none: false
|
451
435
|
requirements:
|
452
|
-
- -
|
436
|
+
- - ">="
|
453
437
|
- !ruby/object:Gem::Version
|
454
438
|
version: '0'
|
455
|
-
segments:
|
456
|
-
- 0
|
457
|
-
hash: -840495438647296383
|
458
439
|
requirements: []
|
459
440
|
rubyforge_project:
|
460
|
-
rubygems_version:
|
441
|
+
rubygems_version: 2.2.2
|
461
442
|
signing_key:
|
462
|
-
specification_version:
|
443
|
+
specification_version: 4
|
463
444
|
summary: Google Protocol Buffers serialization and RPC implementation for Ruby.
|
464
|
-
test_files:
|
445
|
+
test_files:
|
446
|
+
- spec/benchmark/tasks.rb
|
447
|
+
- spec/bin/protoc-gen-ruby_spec.rb
|
448
|
+
- spec/data/data.bin
|
449
|
+
- spec/data/types.bin
|
450
|
+
- spec/encoding/all_types_spec.rb
|
451
|
+
- spec/encoding/extreme_values_spec.rb
|
452
|
+
- spec/functional/class_inheritance_spec.rb
|
453
|
+
- spec/functional/socket_server_spec.rb
|
454
|
+
- spec/functional/zmq_server_spec.rb
|
455
|
+
- spec/lib/protobuf/cli_spec.rb
|
456
|
+
- spec/lib/protobuf/code_generator_spec.rb
|
457
|
+
- spec/lib/protobuf/enum_spec.rb
|
458
|
+
- spec/lib/protobuf/field/bool_field_spec.rb
|
459
|
+
- spec/lib/protobuf/field/field_array_spec.rb
|
460
|
+
- spec/lib/protobuf/field/float_field_spec.rb
|
461
|
+
- spec/lib/protobuf/field/int32_field_spec.rb
|
462
|
+
- spec/lib/protobuf/field/string_field_spec.rb
|
463
|
+
- spec/lib/protobuf/field_spec.rb
|
464
|
+
- spec/lib/protobuf/generators/base_spec.rb
|
465
|
+
- spec/lib/protobuf/generators/enum_generator_spec.rb
|
466
|
+
- spec/lib/protobuf/generators/extension_generator_spec.rb
|
467
|
+
- spec/lib/protobuf/generators/field_generator_spec.rb
|
468
|
+
- spec/lib/protobuf/generators/file_generator_spec.rb
|
469
|
+
- spec/lib/protobuf/generators/message_generator_spec.rb
|
470
|
+
- spec/lib/protobuf/generators/service_generator_spec.rb
|
471
|
+
- spec/lib/protobuf/lifecycle_spec.rb
|
472
|
+
- spec/lib/protobuf/message_spec.rb
|
473
|
+
- spec/lib/protobuf/optionable_spec.rb
|
474
|
+
- spec/lib/protobuf/rpc/client_spec.rb
|
475
|
+
- spec/lib/protobuf/rpc/connector_spec.rb
|
476
|
+
- spec/lib/protobuf/rpc/connectors/base_spec.rb
|
477
|
+
- spec/lib/protobuf/rpc/connectors/common_spec.rb
|
478
|
+
- spec/lib/protobuf/rpc/connectors/socket_spec.rb
|
479
|
+
- spec/lib/protobuf/rpc/connectors/zmq_spec.rb
|
480
|
+
- spec/lib/protobuf/rpc/middleware/exception_handler_spec.rb
|
481
|
+
- spec/lib/protobuf/rpc/middleware/logger_spec.rb
|
482
|
+
- spec/lib/protobuf/rpc/middleware/request_decoder_spec.rb
|
483
|
+
- spec/lib/protobuf/rpc/middleware/response_encoder_spec.rb
|
484
|
+
- spec/lib/protobuf/rpc/servers/socket_server_spec.rb
|
485
|
+
- spec/lib/protobuf/rpc/servers/zmq/server_spec.rb
|
486
|
+
- spec/lib/protobuf/rpc/servers/zmq/util_spec.rb
|
487
|
+
- spec/lib/protobuf/rpc/servers/zmq/worker_spec.rb
|
488
|
+
- spec/lib/protobuf/rpc/service_directory_spec.rb
|
489
|
+
- spec/lib/protobuf/rpc/service_dispatcher_spec.rb
|
490
|
+
- spec/lib/protobuf/rpc/service_filters_spec.rb
|
491
|
+
- spec/lib/protobuf/rpc/service_spec.rb
|
492
|
+
- spec/lib/protobuf/rpc/stat_spec.rb
|
493
|
+
- spec/lib/protobuf/varint_spec.rb
|
494
|
+
- spec/lib/protobuf_spec.rb
|
495
|
+
- spec/spec_helper.rb
|
496
|
+
- spec/support/all.rb
|
497
|
+
- spec/support/packed_field.rb
|
498
|
+
- spec/support/server.rb
|
499
|
+
- spec/support/test/all_types.data.bin
|
500
|
+
- spec/support/test/all_types.data.txt
|
501
|
+
- spec/support/test/defaults.pb.rb
|
502
|
+
- spec/support/test/defaults.proto
|
503
|
+
- spec/support/test/enum.pb.rb
|
504
|
+
- spec/support/test/enum.proto
|
505
|
+
- spec/support/test/extended.pb.rb
|
506
|
+
- spec/support/test/extended.proto
|
507
|
+
- spec/support/test/extreme_values.data.bin
|
508
|
+
- spec/support/test/google_unittest.pb.rb
|
509
|
+
- spec/support/test/google_unittest.proto
|
510
|
+
- spec/support/test/google_unittest_import.pb.rb
|
511
|
+
- spec/support/test/google_unittest_import.proto
|
512
|
+
- spec/support/test/google_unittest_import_public.pb.rb
|
513
|
+
- spec/support/test/google_unittest_import_public.proto
|
514
|
+
- spec/support/test/multi_field_extensions.pb.rb
|
515
|
+
- spec/support/test/multi_field_extensions.proto
|
516
|
+
- spec/support/test/resource.pb.rb
|
517
|
+
- spec/support/test/resource.proto
|
518
|
+
- spec/support/test/resource_service.rb
|
519
|
+
- spec/support/test_app_file.rb
|
465
520
|
has_rdoc:
|