allq 0.2.3 → 0.2.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 61f2bf55a0e21039e218fb922eb5a1ccf02dcebb
4
- data.tar.gz: 4746eb4824f12221209fa1833b354d9159747996
3
+ metadata.gz: d4ff857d6bda5cfd924c2eb62558109943dca3c2
4
+ data.tar.gz: c9b4322c7c42267feb15d21e7c4727e0c49c27d3
5
5
  SHA512:
6
- metadata.gz: 5eb7263935e8037af6b736f5879ed13c18c971b09d81221b2159abc31c58d285a099be86ec58e336e700c73483972b32bae87d3c0a51b2122cb26ce666f5acf9
7
- data.tar.gz: 1a00c06edb846c5f22fa2c76165e7416f1434957597e35b8709324a336d4d860dbd7f9c977189788f18c03911710c5556ab8d02d2b10a88fd4c85ddd03079b73
6
+ metadata.gz: 5f20df44f27df123c4dd18985f8269dada9dc38843a958759b8679386f4cfe35cdb5686b5958521ec48ffa2d7ca1c65694df60df1a47d7635cadfad8a53f9bd2
7
+ data.tar.gz: bf00bb256bdce080556159f2b3ec1205d9456581247c3fa434f84debf63518082df4ec90d3c779a21b790f049a2e2841560f20fc0789053bdb035f426f5d2fa9
@@ -6,8 +6,10 @@ class AllQ
6
6
  include Singleton
7
7
 
8
8
  URL = ENV['ALLQ_CLIENT_URL'] || '127.0.0.1:7766'
9
- def initialize
10
- @connection = AllQ::Connection.new(URL)
9
+ def initialize(url)
10
+ url = URL if url.nil?
11
+
12
+ @connection = AllQ::Connection.new(url)
11
13
  @get_action = AllQ::Get.new(@connection)
12
14
  @put_action = AllQ::Put.new(@connection)
13
15
  @done_action = AllQ::Done.new(@connection)
@@ -106,9 +106,7 @@ class AllQ
106
106
  #
107
107
  def _with_retry(retry_interval, init=true, tries=MAX_RETRIES, &block)
108
108
  yield
109
- rescue EOFError, Errno::ECONNRESET, Errno::EPIPE,
110
- Errno::ECONNREFUSED => ex
111
-
109
+ rescue => ex
112
110
  _reconnect(ex, retry_interval)
113
111
  retry
114
112
  end
@@ -144,7 +142,7 @@ class AllQ
144
142
  # Raises an error to be triggered when the connection has failed
145
143
  # @raise [AllQ::NotConnected] AllQ is no longer connected
146
144
  def _raise_not_connected!
147
- raise AllQ::NotConnected, "Connection to allq '#{@host}:#{@port}' is closed!"
145
+ raise "Connection to allq '#{@host}:#{@port}' is closed!"
148
146
  end
149
147
 
150
148
  end # Connection
@@ -1,3 +1,3 @@
1
1
  module Allq
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: allq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-04 00:00:00.000000000 Z
11
+ date: 2018-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler