eba 1.10.0 → 1.10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/eba/bcb.rb +5 -7
  3. data/lib/eba/version.rb +4 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6c8f8bfc9230658756c334083f0d367a98bfd6ea
4
- data.tar.gz: 440a724553efb904de4814e2e6f10fea1774bc14
3
+ metadata.gz: 89151b822e3b3ef93c3facbab8b4bbc6c2909b5f
4
+ data.tar.gz: e1def1fd832d5c39ccb11bee0c71d08cfbc89e5f
5
5
  SHA512:
6
- metadata.gz: b4efdde2ef97014e1b721f6b7289169698fa95136e4c842b47a1b0af4041314f410c92ca7ecec9a4313945ac2e3b71844c52fd81f7d70e6c36a320838913638e
7
- data.tar.gz: 0ecf43867304d3234f38cf99db52ce327b7106314fa49702eb6f6e18d62063ff72901c2a4817ba364bbbdd015669935b395de6968191b20dde374f9ccb486d54
6
+ metadata.gz: 96fd12fab082a247e6200edae5836bebda1b818670364e0aa9034de16f0beee083f8dac97a0081a583367ce6938eff62e45f3950644a381fb229da99fe508efa
7
+ data.tar.gz: 0fb1a39bd65350a39912002c02a79f484998ee6eb3ff456e9fa0e4d5f9a4c54d0d6b172b8a09a778b7b7a08e2cf8c0f66db08e30cae7e2d8ec57c039ebae43e7
data/lib/eba/bcb.rb CHANGED
@@ -106,15 +106,15 @@ class BCB < Encoder
106
106
  begin
107
107
  response = @service.call(:get_ultimo_valor_xml, message: {in0: "#{series_code}"})
108
108
 
109
- rescue => e
109
+ rescue Exception => e
110
110
  if e.message.to_s["No such operation 'getUltimoValorXML'"] != nil ||
111
111
  e.message.to_s["Server.userException"] != nil then
112
112
  #This error is expetected, it only means that the code is invalid.
113
113
 
114
114
  elsif e.message.to_s["nil:NilClass"] != nil ||
115
- e.message.to_s["Connection reset by peer"] != nil then
116
- sleep(1)
117
- get_last_value(series_code)
115
+ e.message.to_s["Connection reset by peer"] != nil ||
116
+ e.message.to_s["Failed to open TCP connection"] != nil then
117
+ puts "Will have to try again, webservice dropped the ball.\nError: #{e.message}"
118
118
 
119
119
  else
120
120
  puts "Error requesting last value.\nMessage: #{e.message}\nTrace: #{e.backtrace}"
@@ -233,9 +233,7 @@ class BCB < Encoder
233
233
  return []
234
234
 
235
235
  elsif erro.message.to_s["Socket closed"] != nil then
236
- sleep(1)
237
- puts "\n\nSocket closed for message #{message[:in0][:long]}, trying again."
238
- send_message(message)
236
+ puts "\n\nSocket closed for message #{message[:in0][:long]}, try again."
239
237
 
240
238
  else
241
239
  puts "\n\nError requesting all data for the range [#{min_date}, #{max_date}] for codes #{message[:in0][:long]}! #{erro}\nTrace: #{erro.backtrace}\nMessage: #{erro.message}\n"
data/lib/eba/version.rb CHANGED
@@ -5,7 +5,7 @@ module Eba
5
5
  # ff - commits on feature
6
6
  # hh - commits on hotfix
7
7
 
8
- VERSION = "1.10.0"
8
+ VERSION = "1.10.1"
9
9
 
10
10
  #Version 1.0.1
11
11
  #
@@ -73,4 +73,7 @@ module Eba
73
73
  #Version 1.10.0
74
74
  # Agressively handles connection errors with BCB webservice, due to detecting a huge
75
75
  # ammount of hangups and such and such erros whilst using the gem.
76
+
77
+ #Version 1.10.1
78
+ # Rolling back on trying to retry every miss on the webservice and just handling errors apropriatelly.
76
79
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eba
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0
4
+ version: 1.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafael Campos Cruz