conduit 0.5.2 → 0.5.3

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: 79b0558f4a466e870ea67825457ed8ae91647f46
4
- data.tar.gz: 87551ddb25ea4751e5f37fb201e6ebe1c56be6de
3
+ metadata.gz: 74042f34cbbd0e62cd7b38412d5aee3188dd2f0c
4
+ data.tar.gz: 070cdb6f7cebfc9d53013bc21b95b35acb3d72c7
5
5
  SHA512:
6
- metadata.gz: fd2c2ead47d482ede912f7d76f3eac0c720523d3357392b1a1e73263368f778b9b118e0a6cc065064fd47f4df8ba5efc3eddfac7938c7b05da295c83646d3ee9
7
- data.tar.gz: f21aedcb004d732a730861162a0d9fe78eb9cd780d6cb7dfc584cb500f74202ac5b1ddc535df157e12032ebf7b9e1101bd87b16b3a5f997b7fa38124075457b9
6
+ metadata.gz: 9e9166923c8f53dda87b9b8df3e307e8acc98231b16c3f9b9902d9db8ef98f095d60d796a51e9a99dbe5057340d3db31e5f57121416a15410b4afeb558c6b5d0
7
+ data.tar.gz: a298a62148b83b3fdbb2dffc983a909744a24926cfffdf44bd3f8095d69c83cef7d1ae8592e551b2502db58fd5c4ed7f7859998e3b122360b6159076360c8973
data/lib/conduit.rb CHANGED
@@ -8,10 +8,11 @@ module Conduit
8
8
  # NOTE: Autoloading should be
9
9
  # concurrency-safe
10
10
  #
11
- autoload :Storage, 'conduit/storage'
12
- autoload :Util, 'conduit/util'
13
- autoload :ApiResponse, 'conduit/api_response'
14
- autoload :TimeOut, 'conduit/time_out'
11
+ autoload :Storage, 'conduit/storage'
12
+ autoload :Util, 'conduit/util'
13
+ autoload :ApiResponse, 'conduit/api_response'
14
+ autoload :ConnectionError, 'conduit/connection_error'
15
+ autoload :TimeOut, 'conduit/time_out'
15
16
 
16
17
  module Core
17
18
 
@@ -19,11 +20,11 @@ module Conduit
19
20
  # NOTE: Autoloading should be
20
21
  # concurrency-safe
21
22
  #
22
- autoload :Connection, 'conduit/core/connection'
23
- autoload :Render, 'conduit/core/render'
24
- autoload :Action, 'conduit/core/action'
25
- autoload :Parser, 'conduit/core/parser'
26
- autoload :Driver, 'conduit/core/driver'
23
+ autoload :Connection, 'conduit/core/connection'
24
+ autoload :Render, 'conduit/core/render'
25
+ autoload :Action, 'conduit/core/action'
26
+ autoload :Parser, 'conduit/core/parser'
27
+ autoload :Driver, 'conduit/core/driver'
27
28
  end
28
29
 
29
30
  module Driver
@@ -0,0 +1,4 @@
1
+ module Conduit
2
+ class ConnectionError < StandardError
3
+ end
4
+ end
@@ -51,7 +51,9 @@ module Conduit
51
51
  params[:headers]['User-Agent'] ||= "conduit/#{Conduit::VERSION}"
52
52
  connection.request(params, &block)
53
53
  rescue Excon::Errors::Timeout => timeout
54
- raise(Conduit::Errors::Timeout, timeout.message)
54
+ raise(Conduit::Timeout, timeout.message)
55
+ rescue Excon::Errors::Error => error
56
+ raise(Conduit::ConnectionError, error.message)
55
57
  end
56
58
 
57
59
  private
@@ -1,3 +1,3 @@
1
1
  module Conduit
2
- VERSION = '0.5.2'
2
+ VERSION = '0.5.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conduit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Kelley
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-08 00:00:00.000000000 Z
11
+ date: 2014-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -131,6 +131,7 @@ extra_rdoc_files: []
131
131
  files:
132
132
  - lib/conduit/api_response.rb
133
133
  - lib/conduit/configuration.rb
134
+ - lib/conduit/connection_error.rb
134
135
  - lib/conduit/core/action.rb
135
136
  - lib/conduit/core/connection.rb
136
137
  - lib/conduit/core/driver.rb