geekier_factory 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -63,11 +63,15 @@ module GeekierFactory
63
63
  rescue Retry => e
64
64
  retry
65
65
  end
66
+
67
+ def error_responses
68
+ (@structure['errorResponses'] || []) + @api.error_responses
69
+ end
66
70
 
67
71
  Retry = Class.new(Exception)
68
72
  ConnectionException = Class.new(Exception)
69
73
  def handle_response!(response)
70
- if (@structure['errorResponses'] + @api.error_responses).map{ |er| er['code'] }.include? response.status
74
+ if error_responses.map{ |er| er['code'] }.include? response.status
71
75
  ex = @structure['errorResponses'].select{ |er| er['code'] == response.status }
72
76
  if ex['retry'] == true && (@retries ||= 0) < ex['retry']
73
77
  @retries += 1
@@ -1,3 +1,3 @@
1
1
  module GeekierFactory
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geekier_factory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: