protobuf 1.1.3 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/Gemfile.lock +44 -25
- data/README.md +2 -2
- data/Rakefile +15 -0
- data/bin/rpc_server +52 -11
- data/lib/protobuf.rb +22 -10
- data/lib/protobuf/common/logger.rb +26 -25
- data/lib/protobuf/descriptor/file_descriptor.rb +1 -1
- data/lib/protobuf/message/field.rb +2 -2
- data/lib/protobuf/rpc/buffer.rb +30 -25
- data/lib/protobuf/rpc/client.rb +8 -8
- data/lib/protobuf/rpc/connector.rb +2 -0
- data/lib/protobuf/rpc/connectors/base.rb +0 -1
- data/lib/protobuf/rpc/connectors/common.rb +48 -48
- data/lib/protobuf/rpc/connectors/em_client.rb +53 -27
- data/lib/protobuf/rpc/connectors/eventmachine.rb +14 -17
- data/lib/protobuf/rpc/connectors/socket.rb +23 -16
- data/lib/protobuf/rpc/connectors/zmq.rb +73 -0
- data/lib/protobuf/rpc/error.rb +1 -2
- data/lib/protobuf/rpc/error/client_error.rb +4 -4
- data/lib/protobuf/rpc/server.rb +31 -43
- data/lib/protobuf/rpc/servers/evented/server.rb +43 -0
- data/lib/protobuf/rpc/servers/evented_runner.rb +1 -1
- data/lib/protobuf/rpc/servers/socket/server.rb +108 -0
- data/lib/protobuf/rpc/servers/socket/worker.rb +59 -0
- data/lib/protobuf/rpc/servers/socket_runner.rb +3 -3
- data/lib/protobuf/rpc/servers/zmq/broker.rb +85 -0
- data/lib/protobuf/rpc/servers/zmq/server.rb +50 -0
- data/lib/protobuf/rpc/servers/zmq/util.rb +27 -0
- data/lib/protobuf/rpc/servers/zmq/worker.rb +72 -0
- data/lib/protobuf/rpc/servers/zmq_runner.rb +26 -0
- data/lib/protobuf/rpc/service.rb +5 -5
- data/lib/protobuf/version.rb +1 -1
- data/protobuf.gemspec +12 -10
- data/spec/benchmark/tasks.rb +37 -5
- data/spec/functional/evented_server_spec.rb +64 -0
- data/spec/functional/socket_server_spec.rb +63 -0
- data/spec/functional/zmq_server_spec.rb +63 -0
- data/spec/helper/server.rb +32 -12
- data/spec/lib/protobuf/message/encoder_spec.rb +19 -0
- data/spec/proto/test.pb.rb +3 -3
- data/spec/proto/test.proto +3 -3
- data/spec/proto/test_service.rb +1 -0
- data/spec/spec_helper.rb +6 -0
- data/spec/unit/message_spec.rb +1 -1
- data/spec/unit/rpc/client_spec.rb +11 -3
- data/spec/unit/rpc/connectors/common_spec.rb +0 -1
- data/spec/unit/rpc/connectors/eventmachine_client_spec.rb +32 -0
- data/spec/unit/rpc/connectors/socket_spec.rb +2 -4
- data/spec/unit/rpc/connectors/zmq_spec.rb +27 -0
- data/spec/unit/rpc/servers/evented_server_spec.rb +3 -3
- data/spec/unit/rpc/servers/socket_server_spec.rb +14 -13
- data/spec/unit/rpc/servers/zmq/broker_spec.rb +27 -0
- data/spec/unit/rpc/servers/zmq/server_spec.rb +37 -0
- data/spec/unit/rpc/servers/zmq/util_spec.rb +41 -0
- data/spec/unit/rpc/servers/zmq/worker_spec.rb +36 -0
- data/spec/unit/rpc/service_spec.rb +22 -18
- metadata +87 -40
- data/lib/protobuf/rpc/servers/evented_server.rb +0 -28
- data/lib/protobuf/rpc/servers/socket_server.rb +0 -146
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe ::Protobuf::Rpc::Connectors::Zmq do
|
4
|
+
let(:socket_mock) do
|
5
|
+
sm = mock(::ZMQ::Socket)
|
6
|
+
sm.stub(:connect).and_return(0)
|
7
|
+
sm
|
8
|
+
end
|
9
|
+
|
10
|
+
let(:zmq_context_mock) do
|
11
|
+
zc = mock(::ZMQ::Context)
|
12
|
+
zc.stub(:socket).and_return(socket_mock)
|
13
|
+
zc
|
14
|
+
end
|
15
|
+
|
16
|
+
before(:each) do
|
17
|
+
::ZMQ::Context.stub(:new).and_return(zmq_context_mock)
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'raises if async is true' do
|
21
|
+
expect {
|
22
|
+
described_class.new(async: true).send_request
|
23
|
+
}.to raise_error
|
24
|
+
end
|
25
|
+
|
26
|
+
|
27
|
+
end
|
@@ -2,15 +2,15 @@ require 'spec_helper'
|
|
2
2
|
require 'spec/proto/test_service_impl'
|
3
3
|
require 'protobuf/rpc/servers/evented_runner'
|
4
4
|
|
5
|
-
describe Protobuf::Rpc::
|
5
|
+
describe Protobuf::Rpc::Evented::Server do
|
6
6
|
|
7
7
|
it "provides a Runner class" do
|
8
|
-
runner_class = described_class.to_s.gsub(/Server/, "
|
8
|
+
runner_class = described_class.to_s.gsub(/Evented::Server/, "EventedRunner")
|
9
9
|
expect { Protobuf::Util.constantize(runner_class) }.to_not raise_error
|
10
10
|
end
|
11
11
|
|
12
12
|
it "Runner provides a stop method" do
|
13
|
-
runner_class = described_class.to_s.gsub(/Server/, "
|
13
|
+
runner_class = described_class.to_s.gsub(/Evented::Server/, "EventedRunner")
|
14
14
|
runner_class = Protobuf::Util.constantize(runner_class)
|
15
15
|
runner_class.respond_to?(:stop).should be_true
|
16
16
|
end
|
@@ -2,20 +2,21 @@ require 'spec_helper'
|
|
2
2
|
require 'spec/proto/test_service_impl'
|
3
3
|
require 'protobuf/rpc/servers/socket_runner'
|
4
4
|
|
5
|
-
describe Protobuf::Rpc::
|
6
|
-
before(:all) do
|
5
|
+
describe Protobuf::Rpc::Socket::Server do
|
6
|
+
before(:all) do
|
7
|
+
Thread.abort_on_exception = true
|
7
8
|
server = OpenStruct.new(:server => "127.0.0.1", :port => 9399, :backlog => 100, :threshold => 100)
|
8
9
|
@server_thread = Thread.new(server) { |s| Protobuf::Rpc::SocketRunner.run(s) }
|
9
|
-
Thread.pass until Protobuf::Rpc::
|
10
|
+
Thread.pass until Protobuf::Rpc::Socket::Server.running?
|
10
11
|
end
|
11
12
|
|
12
|
-
after(:all) do
|
13
|
+
after(:all) do
|
13
14
|
Protobuf::Rpc::SocketRunner.stop
|
14
|
-
|
15
|
+
@server_thread.join
|
15
16
|
end
|
16
17
|
|
17
18
|
it "Runner provides a stop method" do
|
18
|
-
runner_class = described_class.to_s.gsub(/Server/, "
|
19
|
+
runner_class = described_class.to_s.gsub(/Evented::Server/, "EventedRunner")
|
19
20
|
runner_class = Protobuf::Util.constantize(runner_class)
|
20
21
|
runner_class.respond_to?(:stop).should be_true
|
21
22
|
end
|
@@ -24,17 +25,17 @@ describe Protobuf::Rpc::SocketServer do
|
|
24
25
|
described_class.respond_to?(:stop).should be_true
|
25
26
|
end
|
26
27
|
|
27
|
-
it "provides a Runner class" do
|
28
|
-
runner_class = described_class.to_s.gsub(/Server/, "
|
29
|
-
expect { Protobuf::Util.constantize(runner_class) }.to_not raise_error
|
28
|
+
it "provides a Runner class" do
|
29
|
+
runner_class = described_class.to_s.gsub(/Evented::Server/, "EventedRunner")
|
30
|
+
expect { Protobuf::Util.constantize(runner_class) }.to_not raise_error
|
30
31
|
end
|
31
32
|
|
32
|
-
it "signals the Server is running" do
|
33
|
+
it "signals the Server is running" do
|
33
34
|
described_class.running?.should be_true
|
34
35
|
end
|
35
36
|
|
36
|
-
context "Eventmachine client" do
|
37
|
-
it "calls the service in the client request" do
|
37
|
+
context "Eventmachine client" do
|
38
|
+
it "calls the service in the client request" do
|
38
39
|
with_constants "Protobuf::ClientType" => "Evented" do
|
39
40
|
client = Spec::Proto::TestService.client(:async => false, :port => 9399, :host => "127.0.0.1")
|
40
41
|
|
@@ -50,7 +51,7 @@ describe Protobuf::Rpc::SocketServer do
|
|
50
51
|
end
|
51
52
|
end
|
52
53
|
end
|
53
|
-
|
54
|
+
|
54
55
|
end
|
55
56
|
|
56
57
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe ::Protobuf::Rpc::Zmq::Broker do
|
4
|
+
after(:each) do
|
5
|
+
subject.teardown
|
6
|
+
end
|
7
|
+
|
8
|
+
it 'sets up a context' do
|
9
|
+
subject.context.should be_a(::ZMQ::Context)
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'sets up a frontend socket' do
|
13
|
+
subject.frontend.should be_a(::ZMQ::Socket)
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'sets up a backend socket' do
|
17
|
+
subject.backend.should be_a(::ZMQ::Socket)
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'sets up a polling object' do
|
21
|
+
subject.poller.should be_a(::ZMQ::Poller)
|
22
|
+
end
|
23
|
+
|
24
|
+
describe '#poll' do
|
25
|
+
# no unit tests for this method
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'protobuf/rpc/servers/zmq/server'
|
3
|
+
|
4
|
+
describe Protobuf::Rpc::Zmq::Server do
|
5
|
+
describe '.running?' do
|
6
|
+
it 'returns true if running' do
|
7
|
+
described_class.instance_variable_set(:@running, true)
|
8
|
+
described_class.running?.should be_true
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'returns false if not running' do
|
12
|
+
described_class.instance_variable_set(:@running, false)
|
13
|
+
described_class.running?.should be_false
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
describe '.stop' do
|
18
|
+
# keep threads instance variable from retaining any thread mocks we've
|
19
|
+
# created (breaks tests down the line, otherwise)
|
20
|
+
after(:each) do
|
21
|
+
described_class.instance_variable_set(:@threads, [])
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'lets all threads stop' do
|
25
|
+
thread_mock = double(Thread)
|
26
|
+
thread_mock.should_receive(:join)
|
27
|
+
described_class.instance_variable_set(:@threads, [thread_mock])
|
28
|
+
described_class.stop
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'sets running to false' do
|
32
|
+
described_class.instance_variable_set(:@threads, [])
|
33
|
+
described_class.stop
|
34
|
+
described_class.instance_variable_get(:@running).should be_false
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
class UtilTest
|
4
|
+
include ::Protobuf::Rpc::Zmq::Util
|
5
|
+
end
|
6
|
+
|
7
|
+
describe ::Protobuf::Rpc::Zmq::Util do
|
8
|
+
subject { UtilTest.new }
|
9
|
+
describe '#zmq_error_check' do
|
10
|
+
it 'raises when the error code is less than 0' do
|
11
|
+
expect {
|
12
|
+
subject.zmq_error_check(-1)
|
13
|
+
}.to raise_error
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'retrieves the error string from ZeroMQ' do
|
17
|
+
ZMQ::Util.stub(:error_string).and_return('an error from zmq')
|
18
|
+
expect {
|
19
|
+
subject.zmq_error_check(-1)
|
20
|
+
}.to raise_error(RuntimeError, /an error from zmq/i)
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'does nothing if the error code is > 0' do
|
24
|
+
expect {
|
25
|
+
subject.zmq_error_check(1)
|
26
|
+
}.to_not raise_error
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'does nothing if the error code is == 0' do
|
30
|
+
expect {
|
31
|
+
subject.zmq_error_check(0)
|
32
|
+
}.to_not raise_error
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
describe '#log_signature' do
|
37
|
+
it 'returns the signature for the log' do
|
38
|
+
subject.log_signature.should include('server', 'UtilTest')
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe ::Protobuf::Rpc::Zmq::Worker do
|
4
|
+
after(:each) do
|
5
|
+
subject.instance_variable_get(:@socket).close
|
6
|
+
subject.instance_variable_get(:@zmq_context).terminate
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'sets the context' do
|
10
|
+
subject.instance_variable_get(:@zmq_context).should be_a(::ZMQ::Context)
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'sets the poller' do
|
14
|
+
subject.instance_variable_get(:@socket).should be_a(::ZMQ::Socket)
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'sets the socket' do
|
18
|
+
subject.instance_variable_get(:@poller).should be_a(::ZMQ::Poller)
|
19
|
+
end
|
20
|
+
|
21
|
+
describe '#run' do
|
22
|
+
# not tested via unit tests
|
23
|
+
end
|
24
|
+
|
25
|
+
describe '#handle_request' do
|
26
|
+
# not tested via unit tests
|
27
|
+
end
|
28
|
+
|
29
|
+
describe '#initialize_buffers' do
|
30
|
+
# not tested via unit tests
|
31
|
+
end
|
32
|
+
|
33
|
+
describe '#send_data' do
|
34
|
+
# not tested via unit tests
|
35
|
+
end
|
36
|
+
end
|
@@ -2,34 +2,38 @@ require 'spec_helper'
|
|
2
2
|
require 'spec/proto/test_service_impl'
|
3
3
|
|
4
4
|
describe Protobuf::Rpc::Service do
|
5
|
-
|
5
|
+
|
6
6
|
context 'when configuring' do
|
7
7
|
before :each do
|
8
8
|
reset_service_location Spec::Proto::TestService
|
9
9
|
end
|
10
|
-
|
10
|
+
|
11
11
|
it 'should have a default location configured' do
|
12
12
|
Spec::Proto::TestService.host.should == Protobuf::Rpc::Service::DEFAULT_LOCATION[:host]
|
13
13
|
Spec::Proto::TestService.port.should == Protobuf::Rpc::Service::DEFAULT_LOCATION[:port]
|
14
14
|
end
|
15
|
-
|
15
|
+
|
16
16
|
it "should be able to pre-configure a service location for clients" do
|
17
17
|
Spec::Proto::TestService.located_at 'google.com:12345'
|
18
18
|
client = Spec::Proto::TestService.client
|
19
19
|
client.options[:host].should == 'google.com'
|
20
20
|
client.options[:port].should == 12345
|
21
21
|
end
|
22
|
-
|
23
|
-
|
24
|
-
Spec::Proto::TestService.configure :host => 'somehost.com'
|
25
|
-
Spec::Proto::TestService.host
|
22
|
+
|
23
|
+
context 'configuring host' do
|
24
|
+
before(:each) { Spec::Proto::TestService.configure :host => 'somehost.com' }
|
25
|
+
after(:each) { Spec::Proto::TestService.configure :host => '127.0.0.1' }
|
26
|
+
|
27
|
+
it 'should be able to configure and read the host' do
|
28
|
+
Spec::Proto::TestService.host.should == 'somehost.com'
|
29
|
+
end
|
26
30
|
end
|
27
|
-
|
31
|
+
|
28
32
|
it 'should be able to configure and read the port' do
|
29
33
|
Spec::Proto::TestService.configure :port => 12345
|
30
34
|
Spec::Proto::TestService.port.should == 12345
|
31
35
|
end
|
32
|
-
|
36
|
+
|
33
37
|
it 'should skip configuring location if the location passed does not match host:port syntax' do
|
34
38
|
invalid_locations = [nil, 'myhost:', ':9939', 'badhost123']
|
35
39
|
invalid_locations.each do |location|
|
@@ -39,9 +43,9 @@ describe Protobuf::Rpc::Service do
|
|
39
43
|
end
|
40
44
|
end
|
41
45
|
end
|
42
|
-
|
46
|
+
|
43
47
|
context 'when server calls the service method' do
|
44
|
-
|
48
|
+
|
45
49
|
before(:all) do
|
46
50
|
class ::NewTestService < Protobuf::Rpc::Service
|
47
51
|
rpc :bad_method, Spec::Proto::ResourceFindRequest, Spec::Proto::Resource
|
@@ -55,21 +59,21 @@ describe Protobuf::Rpc::Service do
|
|
55
59
|
end
|
56
60
|
end
|
57
61
|
end
|
58
|
-
|
62
|
+
|
59
63
|
it 'raises an undefined method name error when calling a method on a non-existant object' do
|
60
64
|
expect {
|
61
|
-
req = mock('RequestWrapper', :request_proto => Spec::Proto::ResourceFindRequest.new.to_s)
|
65
|
+
req = mock('RequestWrapper', :request_proto => Spec::Proto::ResourceFindRequest.new(:name => 'mmeh').to_s)
|
62
66
|
::NewTestService.new.bad_method(req)
|
63
67
|
}.to raise_error(NoMethodError)
|
64
68
|
end
|
65
|
-
|
69
|
+
|
66
70
|
it 'raises a name error when accessing a non-existant object' do
|
67
71
|
expect {
|
68
|
-
req = mock('RequestWrapper', :request_proto => Spec::Proto::ResourceFindRequest.new.to_s)
|
72
|
+
req = mock('RequestWrapper', :request_proto => Spec::Proto::ResourceFindRequest.new(:name => 'mmeh').to_s)
|
69
73
|
::NewTestService.new.bad_var(req)
|
70
74
|
}.to raise_error(NameError)
|
71
75
|
end
|
72
|
-
|
76
|
+
|
73
77
|
end
|
74
|
-
|
75
|
-
end
|
78
|
+
|
79
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: protobuf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,96 +10,118 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-06-20 00:00:00.000000000Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: eventmachine
|
17
|
-
requirement: &
|
17
|
+
requirement: &2160220480 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
|
-
- -
|
20
|
+
- - ! '>='
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0
|
22
|
+
version: '0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *2160220480
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: eventually
|
28
|
-
requirement: &
|
28
|
+
requirement: &2160220060 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ! '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0
|
33
|
+
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *2160220060
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: json_pure
|
39
|
-
requirement: &
|
39
|
+
requirement: &2160219640 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
|
-
- -
|
42
|
+
- - ! '>='
|
43
43
|
- !ruby/object:Gem::Version
|
44
|
-
version:
|
44
|
+
version: '0'
|
45
45
|
type: :runtime
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *2160219640
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: ffi-rzmq
|
50
|
+
requirement: &2160219220 !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
type: :runtime
|
57
|
+
prerelease: false
|
58
|
+
version_requirements: *2160219220
|
48
59
|
- !ruby/object:Gem::Dependency
|
49
60
|
name: rake
|
50
|
-
requirement: &
|
61
|
+
requirement: &2160218800 !ruby/object:Gem::Requirement
|
51
62
|
none: false
|
52
63
|
requirements:
|
53
|
-
- -
|
64
|
+
- - ! '>='
|
54
65
|
- !ruby/object:Gem::Version
|
55
|
-
version: 0
|
66
|
+
version: '0'
|
56
67
|
type: :development
|
57
68
|
prerelease: false
|
58
|
-
version_requirements: *
|
69
|
+
version_requirements: *2160218800
|
59
70
|
- !ruby/object:Gem::Dependency
|
60
|
-
name:
|
61
|
-
requirement: &
|
71
|
+
name: pry
|
72
|
+
requirement: &2160218380 !ruby/object:Gem::Requirement
|
62
73
|
none: false
|
63
74
|
requirements:
|
64
|
-
- -
|
75
|
+
- - ! '>='
|
65
76
|
- !ruby/object:Gem::Version
|
66
|
-
version:
|
77
|
+
version: '0'
|
67
78
|
type: :development
|
68
79
|
prerelease: false
|
69
|
-
version_requirements: *
|
80
|
+
version_requirements: *2160218380
|
70
81
|
- !ruby/object:Gem::Dependency
|
71
|
-
name:
|
72
|
-
requirement: &
|
82
|
+
name: pry-nav
|
83
|
+
requirement: &2160217960 !ruby/object:Gem::Requirement
|
73
84
|
none: false
|
74
85
|
requirements:
|
75
|
-
- -
|
86
|
+
- - ! '>='
|
76
87
|
- !ruby/object:Gem::Version
|
77
|
-
version: 0
|
88
|
+
version: '0'
|
78
89
|
type: :development
|
79
90
|
prerelease: false
|
80
|
-
version_requirements: *
|
91
|
+
version_requirements: *2160217960
|
81
92
|
- !ruby/object:Gem::Dependency
|
82
|
-
name:
|
83
|
-
requirement: &
|
93
|
+
name: rspec
|
94
|
+
requirement: &2160217540 !ruby/object:Gem::Requirement
|
95
|
+
none: false
|
96
|
+
requirements:
|
97
|
+
- - ! '>='
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0'
|
100
|
+
type: :development
|
101
|
+
prerelease: false
|
102
|
+
version_requirements: *2160217540
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: yard
|
105
|
+
requirement: &2160217120 !ruby/object:Gem::Requirement
|
84
106
|
none: false
|
85
107
|
requirements:
|
86
|
-
- -
|
108
|
+
- - ! '>='
|
87
109
|
- !ruby/object:Gem::Version
|
88
|
-
version:
|
110
|
+
version: '0'
|
89
111
|
type: :development
|
90
112
|
prerelease: false
|
91
|
-
version_requirements: *
|
113
|
+
version_requirements: *2160217120
|
92
114
|
- !ruby/object:Gem::Dependency
|
93
115
|
name: simplecov
|
94
|
-
requirement: &
|
116
|
+
requirement: &2160216700 !ruby/object:Gem::Requirement
|
95
117
|
none: false
|
96
118
|
requirements:
|
97
|
-
- -
|
119
|
+
- - ! '>='
|
98
120
|
- !ruby/object:Gem::Version
|
99
|
-
version: 0
|
121
|
+
version: '0'
|
100
122
|
type: :development
|
101
123
|
prerelease: false
|
102
|
-
version_requirements: *
|
124
|
+
version_requirements: *2160216700
|
103
125
|
description: ! 'Ruby implementation for Protocol Buffers. Works with other protobuf
|
104
126
|
rpc implementations (e.g. Java, Python, C++).
|
105
127
|
|
@@ -165,15 +187,22 @@ files:
|
|
165
187
|
- lib/protobuf/rpc/connectors/em_client.rb
|
166
188
|
- lib/protobuf/rpc/connectors/eventmachine.rb
|
167
189
|
- lib/protobuf/rpc/connectors/socket.rb
|
190
|
+
- lib/protobuf/rpc/connectors/zmq.rb
|
168
191
|
- lib/protobuf/rpc/error.rb
|
169
192
|
- lib/protobuf/rpc/error/client_error.rb
|
170
193
|
- lib/protobuf/rpc/error/server_error.rb
|
171
194
|
- lib/protobuf/rpc/rpc.pb.rb
|
172
195
|
- lib/protobuf/rpc/server.rb
|
196
|
+
- lib/protobuf/rpc/servers/evented/server.rb
|
173
197
|
- lib/protobuf/rpc/servers/evented_runner.rb
|
174
|
-
- lib/protobuf/rpc/servers/
|
198
|
+
- lib/protobuf/rpc/servers/socket/server.rb
|
199
|
+
- lib/protobuf/rpc/servers/socket/worker.rb
|
175
200
|
- lib/protobuf/rpc/servers/socket_runner.rb
|
176
|
-
- lib/protobuf/rpc/servers/
|
201
|
+
- lib/protobuf/rpc/servers/zmq/broker.rb
|
202
|
+
- lib/protobuf/rpc/servers/zmq/server.rb
|
203
|
+
- lib/protobuf/rpc/servers/zmq/util.rb
|
204
|
+
- lib/protobuf/rpc/servers/zmq/worker.rb
|
205
|
+
- lib/protobuf/rpc/servers/zmq_runner.rb
|
177
206
|
- lib/protobuf/rpc/service.rb
|
178
207
|
- lib/protobuf/rpc/stat.rb
|
179
208
|
- lib/protobuf/version.rb
|
@@ -182,10 +211,14 @@ files:
|
|
182
211
|
- script/mk_parser
|
183
212
|
- spec/benchmark/tasks.rb
|
184
213
|
- spec/functional/embedded_service_spec.rb
|
214
|
+
- spec/functional/evented_server_spec.rb
|
215
|
+
- spec/functional/socket_server_spec.rb
|
216
|
+
- spec/functional/zmq_server_spec.rb
|
185
217
|
- spec/helper/all.rb
|
186
218
|
- spec/helper/server.rb
|
187
219
|
- spec/helper/silent_constants.rb
|
188
220
|
- spec/helper/tolerance_matcher.rb
|
221
|
+
- spec/lib/protobuf/message/encoder_spec.rb
|
189
222
|
- spec/proto/test.pb.rb
|
190
223
|
- spec/proto/test.proto
|
191
224
|
- spec/proto/test_service.rb
|
@@ -202,8 +235,13 @@ files:
|
|
202
235
|
- spec/unit/rpc/connectors/eventmachine_client_spec.rb
|
203
236
|
- spec/unit/rpc/connectors/eventmachine_spec.rb
|
204
237
|
- spec/unit/rpc/connectors/socket_spec.rb
|
238
|
+
- spec/unit/rpc/connectors/zmq_spec.rb
|
205
239
|
- spec/unit/rpc/servers/evented_server_spec.rb
|
206
240
|
- spec/unit/rpc/servers/socket_server_spec.rb
|
241
|
+
- spec/unit/rpc/servers/zmq/broker_spec.rb
|
242
|
+
- spec/unit/rpc/servers/zmq/server_spec.rb
|
243
|
+
- spec/unit/rpc/servers/zmq/util_spec.rb
|
244
|
+
- spec/unit/rpc/servers/zmq/worker_spec.rb
|
207
245
|
- spec/unit/rpc/service_spec.rb
|
208
246
|
- test/check_unbuild.rb
|
209
247
|
- test/data/data.bin
|
@@ -271,7 +309,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
271
309
|
version: '0'
|
272
310
|
requirements: []
|
273
311
|
rubyforge_project:
|
274
|
-
rubygems_version: 1.8.
|
312
|
+
rubygems_version: 1.8.15
|
275
313
|
signing_key:
|
276
314
|
specification_version: 3
|
277
315
|
summary: Ruby implementation for Protocol Buffers. Works with other protobuf rpc implementations
|
@@ -279,10 +317,14 @@ summary: Ruby implementation for Protocol Buffers. Works with other protobuf rpc
|
|
279
317
|
test_files:
|
280
318
|
- spec/benchmark/tasks.rb
|
281
319
|
- spec/functional/embedded_service_spec.rb
|
320
|
+
- spec/functional/evented_server_spec.rb
|
321
|
+
- spec/functional/socket_server_spec.rb
|
322
|
+
- spec/functional/zmq_server_spec.rb
|
282
323
|
- spec/helper/all.rb
|
283
324
|
- spec/helper/server.rb
|
284
325
|
- spec/helper/silent_constants.rb
|
285
326
|
- spec/helper/tolerance_matcher.rb
|
327
|
+
- spec/lib/protobuf/message/encoder_spec.rb
|
286
328
|
- spec/proto/test.pb.rb
|
287
329
|
- spec/proto/test.proto
|
288
330
|
- spec/proto/test_service.rb
|
@@ -299,8 +341,13 @@ test_files:
|
|
299
341
|
- spec/unit/rpc/connectors/eventmachine_client_spec.rb
|
300
342
|
- spec/unit/rpc/connectors/eventmachine_spec.rb
|
301
343
|
- spec/unit/rpc/connectors/socket_spec.rb
|
344
|
+
- spec/unit/rpc/connectors/zmq_spec.rb
|
302
345
|
- spec/unit/rpc/servers/evented_server_spec.rb
|
303
346
|
- spec/unit/rpc/servers/socket_server_spec.rb
|
347
|
+
- spec/unit/rpc/servers/zmq/broker_spec.rb
|
348
|
+
- spec/unit/rpc/servers/zmq/server_spec.rb
|
349
|
+
- spec/unit/rpc/servers/zmq/util_spec.rb
|
350
|
+
- spec/unit/rpc/servers/zmq/worker_spec.rb
|
304
351
|
- spec/unit/rpc/service_spec.rb
|
305
352
|
- test/check_unbuild.rb
|
306
353
|
- test/data/data.bin
|