fastbeans 0.3.4 → 0.3.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/.travis.yml +2 -0
- data/README.md +1 -1
- data/Rakefile +1 -0
- data/lib/fastbeans/connection.rb +1 -1
- data/lib/fastbeans/version.rb +1 -1
- data/test/client_test.rb +0 -2
- data/test/connection_test.rb +2 -3
- data/test/fastbeans_test.rb +0 -2
- data/test/request_test.rb +0 -2
- data/test/response_test.rb +0 -2
- data/test/test_helper.rb +21 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 009d4f46bbf878b1cdbb7dd9306e900fdf6b7383
|
4
|
+
data.tar.gz: 5e3b72f8623a07078a0703e40659151ed52bcc5b
|
5
5
|
!binary "U0hBNTEy":
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4975abf1d69929357b03767b035c787bd7d9d3795bbcca059253e66954c7851e62ae6bc3592f6f822ea5f0131cfbffc211098643816933bc0d985ecb83bd3f9
|
7
|
+
data.tar.gz: fbacfa11add60048ab93d02ed27c9252f7b2cad2a4d4889eb783e900880f3512e43639579484e4aff0fe8aeb5e0b245543c85382f273b72cee37301c52aa8778
|
data/.travis.yml
ADDED
data/README.md
CHANGED
data/Rakefile
CHANGED
data/lib/fastbeans/connection.rb
CHANGED
@@ -59,7 +59,7 @@ module Fastbeans
|
|
59
59
|
def call_without_retries(data)
|
60
60
|
perform(data)
|
61
61
|
|
62
|
-
rescue IOError, Errno::EPIPE, MessagePack::MalformedFormatError => e
|
62
|
+
rescue IOError, Errno::EPIPE, Errno::ECONNREFUSED, Errno::ECONNRESET, MessagePack::MalformedFormatError => e
|
63
63
|
disconnect!
|
64
64
|
ne = RemoteConnectionFailed.new(e.message)
|
65
65
|
ne.orig_exc = e
|
data/lib/fastbeans/version.rb
CHANGED
data/test/client_test.rb
CHANGED
data/test/connection_test.rb
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
require_relative 'test_helper'
|
2
|
-
|
3
1
|
class ConnectionTest < MiniTest::Unit::TestCase
|
4
2
|
|
5
3
|
def setup
|
@@ -51,7 +49,8 @@ class ConnectionTest < MiniTest::Unit::TestCase
|
|
51
49
|
end
|
52
50
|
|
53
51
|
def test_io_exceptions_during_call
|
54
|
-
ioexcs = [IOError, Errno::EPIPE, MessagePack::MalformedFormatError
|
52
|
+
ioexcs = [IOError, Errno::EPIPE, MessagePack::MalformedFormatError,
|
53
|
+
Errno::ECONNREFUSED, Errno::ECONNRESET]
|
55
54
|
ioexcs.each do |exc|
|
56
55
|
@conn.expects(:perform).with(@test_msg).raises(exc)
|
57
56
|
@conn.expects(:disconnect!)
|
data/test/fastbeans_test.rb
CHANGED
data/test/request_test.rb
CHANGED
data/test/response_test.rb
CHANGED
data/test/test_helper.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'minitest/unit'
|
2
|
+
require 'minitest/autorun'
|
3
|
+
require 'minitest/pride'
|
4
|
+
|
5
|
+
require 'mocha/setup'
|
6
|
+
|
7
|
+
require 'fastbeans'
|
8
|
+
|
9
|
+
class MockConnection
|
10
|
+
def initialize(*any); end
|
11
|
+
|
12
|
+
def call(*data)
|
13
|
+
data
|
14
|
+
end
|
15
|
+
|
16
|
+
attr_accessor :socket
|
17
|
+
|
18
|
+
def with_socket
|
19
|
+
yield(socket)
|
20
|
+
end
|
21
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastbeans
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dima Sabanin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-06-
|
11
|
+
date: 2013-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msgpack
|
@@ -102,6 +102,7 @@ extensions: []
|
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
104
|
- .gitignore
|
105
|
+
- .travis.yml
|
105
106
|
- Gemfile
|
106
107
|
- LICENSE.txt
|
107
108
|
- README.md
|
@@ -119,6 +120,7 @@ files:
|
|
119
120
|
- test/fastbeans_test.rb
|
120
121
|
- test/request_test.rb
|
121
122
|
- test/response_test.rb
|
123
|
+
- test/test_helper.rb
|
122
124
|
homepage: https://github.com/dsabanin/fastbeans-rb
|
123
125
|
licenses:
|
124
126
|
- MIT
|
@@ -149,4 +151,5 @@ test_files:
|
|
149
151
|
- test/fastbeans_test.rb
|
150
152
|
- test/request_test.rb
|
151
153
|
- test/response_test.rb
|
154
|
+
- test/test_helper.rb
|
152
155
|
has_rdoc:
|