ruby_skynet 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/ruby_skynet/client.rb +3 -3
- data/lib/ruby_skynet/doozer/client.rb +1 -1
- data/lib/ruby_skynet/version.rb +1 -1
- data/ruby_skynet-0.1.1.gem +0 -0
- data/test.log +0 -0
- data/test/doozer_client_test.rb +1 -1
- data/test/ruby_skynet_client_test.rb +1 -1
- metadata +4 -3
data/Gemfile.lock
CHANGED
data/lib/ruby_skynet/client.rb
CHANGED
@@ -127,7 +127,7 @@ module RubySkynet
|
|
127
127
|
client_handshake = { 'clientid' => @client_id }
|
128
128
|
@logger.debug "Sending Client Handshake"
|
129
129
|
@logger.trace 'Client Handshake', client_handshake
|
130
|
-
socket.
|
130
|
+
socket.write(BSON.serialize(client_handshake))
|
131
131
|
end
|
132
132
|
|
133
133
|
@socket = ResilientSocket::TCPClient.new(params)
|
@@ -164,7 +164,7 @@ module RubySkynet
|
|
164
164
|
}
|
165
165
|
@logger.debug "Sending Header"
|
166
166
|
@logger.trace 'Header', header
|
167
|
-
socket.
|
167
|
+
socket.write(BSON.serialize(header))
|
168
168
|
|
169
169
|
@logger.trace 'Parameters:', parameters
|
170
170
|
|
@@ -188,7 +188,7 @@ module RubySkynet
|
|
188
188
|
|
189
189
|
@logger.debug "Sending Request"
|
190
190
|
@logger.trace 'Request', request
|
191
|
-
socket.
|
191
|
+
socket.write(BSON.serialize(request))
|
192
192
|
end
|
193
193
|
|
194
194
|
# Once send is successful it could have been processed, so we can no
|
@@ -178,7 +178,7 @@ module RubySkynet
|
|
178
178
|
data = request.serialize_to_string
|
179
179
|
# An additional header is added to the request indicating the size of the request
|
180
180
|
head = [data.length].pack("N")
|
181
|
-
@socket.
|
181
|
+
@socket.write(head+data)
|
182
182
|
end
|
183
183
|
|
184
184
|
# Read the protobuf Response from Doozer
|
data/lib/ruby_skynet/version.rb
CHANGED
Binary file
|
data/test.log
CHANGED
Binary file
|
data/test/doozer_client_test.rb
CHANGED
@@ -25,7 +25,7 @@ class DoozerClientTest < Test::Unit::TestCase
|
|
25
25
|
:connect_retry_interval => 0.1,
|
26
26
|
:connect_retry_count => 5)
|
27
27
|
end
|
28
|
-
assert_match /After 5 attempts: Errno::ECONNREFUSED/, exception.message
|
28
|
+
assert_match /After 5 connection attempts to host 'localhost:9999': Errno::ECONNREFUSED/, exception.message
|
29
29
|
end
|
30
30
|
|
31
31
|
end
|
@@ -23,7 +23,7 @@ class RubySkynetClientTest < Test::Unit::TestCase
|
|
23
23
|
:connect_retry_interval => 0.1,
|
24
24
|
:connect_retry_count => 5)
|
25
25
|
end
|
26
|
-
assert_match /After 5 attempts: Errno::ECONNREFUSED/, exception.message
|
26
|
+
assert_match /After 5 connection attempts to host 'localhost:3300': Errno::ECONNREFUSED/, exception.message
|
27
27
|
end
|
28
28
|
|
29
29
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_skynet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: semantic_logger
|
@@ -117,6 +117,7 @@ files:
|
|
117
117
|
- Rakefile
|
118
118
|
- README.md
|
119
119
|
- ruby_skynet-0.1.0.gem
|
120
|
+
- ruby_skynet-0.1.1.gem
|
120
121
|
- test/doozer_client_test.rb
|
121
122
|
- test/ruby_skynet_client_test.rb
|
122
123
|
- test/simple_server.rb
|
@@ -135,7 +136,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
135
136
|
version: '0'
|
136
137
|
segments:
|
137
138
|
- 0
|
138
|
-
hash:
|
139
|
+
hash: 4150278993110980832
|
139
140
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
140
141
|
none: false
|
141
142
|
requirements:
|