protobuf 2.8.4 → 2.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +5 -0
- data/lib/protobuf/rpc/service_directory.rb +2 -2
- data/lib/protobuf/version.rb +1 -1
- data/spec/lib/protobuf/rpc/service_directory_spec.rb +9 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a856318d0dafa9da5a88d40dcc319c500e766a13
|
4
|
+
data.tar.gz: 868ee8f458233c1bf2e62a9db3371a4b0f698391
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 138f5e2b81b0c2375012bbc6ee4bae97a2af3e53cb83e5f348ee407544c29628a6b4bbc6cdef95f44467ed9180a23ad93a148f6f3b8e2f00bd2768455ea89335
|
7
|
+
data.tar.gz: 3775fad99cbc871003c146c8c86cc2a2e1a9ab29f439bfd5b12e0e0c115fd18ba4f70558095f1b48a3a54910361c47e6de20fcb6c514e3ae0ab470a510217aaa
|
data/CHANGES.md
CHANGED
@@ -91,8 +91,8 @@ module Protobuf
|
|
91
91
|
|
92
92
|
def lookup(service)
|
93
93
|
if running?
|
94
|
-
if @listings_by_service.key?(service)
|
95
|
-
@listings_by_service[service].entries.sample
|
94
|
+
if @listings_by_service.key?(service.to_s)
|
95
|
+
@listings_by_service[service.to_s].entries.sample
|
96
96
|
end
|
97
97
|
end
|
98
98
|
end
|
data/lib/protobuf/version.rb
CHANGED
@@ -49,6 +49,7 @@ describe ::Protobuf::Rpc::ServiceDirectory do
|
|
49
49
|
@address = "127.0.0.1"
|
50
50
|
@port = 33333
|
51
51
|
@socket = UDPSocket.new
|
52
|
+
EchoService = Class.new
|
52
53
|
|
53
54
|
described_class.address = @address
|
54
55
|
described_class.port = @port
|
@@ -202,6 +203,13 @@ describe ::Protobuf::Rpc::ServiceDirectory do
|
|
202
203
|
|
203
204
|
subject.lookup("EchoService").port.should eq "7777"
|
204
205
|
end
|
206
|
+
|
207
|
+
context 'when given service identifier is a class name' do
|
208
|
+
it 'returns the listing corresponding to the class name' do
|
209
|
+
send_beacon(:heartbeat, echo_server)
|
210
|
+
subject.lookup(EchoService).uuid.should eq echo_server.uuid
|
211
|
+
end
|
212
|
+
end
|
205
213
|
end
|
206
214
|
|
207
215
|
describe "#restart" do
|
@@ -239,7 +247,7 @@ describe ::Protobuf::Rpc::ServiceDirectory do
|
|
239
247
|
let(:servers) {
|
240
248
|
100.times.collect do |x|
|
241
249
|
::Protobuf::Rpc::DynamicDiscovery::Server.new(
|
242
|
-
:uuid =>
|
250
|
+
:uuid => "performance_server#{x + 1}",
|
243
251
|
:address => '127.0.0.1',
|
244
252
|
:port => (5555 + x).to_s,
|
245
253
|
:ttl => rand(1..5),
|
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: 2.8.
|
4
|
+
version: 2.8.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BJ Neilsen
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-09-
|
13
|
+
date: 2013-09-10 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|