fastbeans 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
- metadata.gz: 312e06026abba2de6506379c0ce7b496d6050f48
4
- data.tar.gz: 01a411d33a8728c17ef86d854cef7359d9c1586f
3
+ metadata.gz: 009d4f46bbf878b1cdbb7dd9306e900fdf6b7383
4
+ data.tar.gz: 5e3b72f8623a07078a0703e40659151ed52bcc5b
5
5
  !binary "U0hBNTEy":
6
- metadata.gz: 74751fce3ef36eca766f7e0fbd46548747d6918455d66c513259a5dc2fd8dfeb2b0f34c9c7bf06745c59101f07f235d4719521918c50c75ca3018fe841b7e02c
7
- data.tar.gz: 5d27cfbde3dbb30dcba38150571b6d36237011fbf1c1ad5ef78d1bb26d985d51f3221da10c3d927c6f1be75567f91c8a4025faa79534121ff3eeac5e59e9df51
6
+ metadata.gz: f4975abf1d69929357b03767b035c787bd7d9d3795bbcca059253e66954c7851e62ae6bc3592f6f822ea5f0131cfbffc211098643816933bc0d985ecb83bd3f9
7
+ data.tar.gz: fbacfa11add60048ab93d02ed27c9252f7b2cad2a4d4889eb783e900880f3512e43639579484e4aff0fe8aeb5e0b245543c85382f273b72cee37301c52aa8778
data/.travis.yml ADDED
@@ -0,0 +1,2 @@
1
+ rvm:
2
+ - "2.0.0"
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Fastbeans
1
+ # Fastbeans [![Build Status](https://travis-ci.org/dsabanin/fastbeans-rb.png)](https://travis-ci.org/dsabanin/fastbeans-rb)
2
2
 
3
3
  TODO: Write a gem description
4
4
 
data/Rakefile CHANGED
@@ -5,6 +5,7 @@ require 'rake/testtask'
5
5
  Rake::TestTask.new do |t|
6
6
  t.libs << 'lib/fastbeans'
7
7
  t.test_files = FileList['test/*_test.rb']
8
+ t.ruby_opts = ["-r./test/test_helper"]
8
9
  t.verbose = true
9
10
  end
10
11
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Fastbeans
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.5"
3
3
  end
data/test/client_test.rb CHANGED
@@ -1,5 +1,3 @@
1
- require_relative 'test_helper'
2
-
3
1
  class ClientTest < MiniTest::Unit::TestCase
4
2
 
5
3
  def setup
@@ -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!)
@@ -1,5 +1,3 @@
1
- require_relative 'test_helper'
2
-
3
1
  class FastbeansTest < MiniTest::Unit::TestCase
4
2
 
5
3
  def test_should_autocreate_exceptions
data/test/request_test.rb CHANGED
@@ -1,5 +1,3 @@
1
- require_relative 'test_helper'
2
-
3
1
  class RequestTest < MiniTest::Unit::TestCase
4
2
 
5
3
  def setup
@@ -1,5 +1,3 @@
1
- require_relative 'test_helper'
2
-
3
1
  class ResponseTest < MiniTest::Unit::TestCase
4
2
 
5
3
  def setup
@@ -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
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-12 00:00:00.000000000 Z
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: