radiator 0.2.3rc3 → 0.2.3rc4

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
  SHA1:
3
- metadata.gz: e78f81905adcd6e53025310e30ad7565de743621
4
- data.tar.gz: 950ee3b476e2f2effd2fb46227b7d3e2f4febf21
3
+ metadata.gz: 5be0e8ac5298ce8b9ba8444bbaf18fa07cdef2f0
4
+ data.tar.gz: f69ed3441423a19dd03fffb9d15efb88fd4fc87e
5
5
  SHA512:
6
- metadata.gz: 67c4da518dd163f3d2b9b50f7c01bff39ded3ee0040f639a1024a39537d55e291675c558b447af553167fad97e796d44d9ba5a3836bf5f9b753eeab36dbaf0b4
7
- data.tar.gz: 3304790b68d3c98ff2bc6b2331732802caf150d7330a0789b98a844096606774a9ee84c9e23fcdfdc0acf0e4675f6537cf19f89edceb9952345de43bab97336d
6
+ metadata.gz: e297d9b05cdc2d15707d6cf9e6c90ae68cebb5e913382521254731d82561f5e538619d4ee145b57bae2ee7c29bb4d55fef90d37cc9d8775752b38c18ef849a1e
7
+ data.tar.gz: 8b0e555e7b9f79b1c08322561032f16255ab3d344fa34dc77cc04ac31eb03bd8dd6efb3ba08732f0ab12aadfbd54d03d93eaa664b8277e27e7ce367d1b196299
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- radiator (0.2.3rc3)
5
- bitcoin-ruby (= 0.0.10)
4
+ radiator (0.2.3rc4)
5
+ bitcoin-ruby (= 0.0.11)
6
6
  ffi (= 1.9.18)
7
7
  hashie (~> 3.5, >= 3.5.5)
8
8
  json (~> 1.8, >= 1.8.6)
@@ -12,13 +12,13 @@ PATH
12
12
  GEM
13
13
  remote: https://rubygems.org/
14
14
  specs:
15
- addressable (2.5.1)
16
- public_suffix (~> 2.0, >= 2.0.2)
17
- awesome_print (1.7.0)
18
- bitcoin-ruby (0.0.10)
15
+ addressable (2.5.2)
16
+ public_suffix (>= 2.0.2, < 4.0)
17
+ awesome_print (1.8.0)
18
+ bitcoin-ruby (0.0.11)
19
19
  codeclimate-test-reporter (0.5.2)
20
20
  simplecov (>= 0.7.1, < 1.0.0)
21
- coderay (1.1.1)
21
+ coderay (1.1.2)
22
22
  crack (0.4.3)
23
23
  safe_yaml (~> 1.0.0)
24
24
  docile (1.1.5)
@@ -27,7 +27,7 @@ GEM
27
27
  faraday (0.9.2)
28
28
  multipart-post (>= 1.2, < 3)
29
29
  ffi (1.9.18)
30
- hashdiff (0.3.4)
30
+ hashdiff (0.3.6)
31
31
  hashie (3.5.6)
32
32
  json (1.8.6)
33
33
  little-plugger (1.1.4)
@@ -35,26 +35,26 @@ GEM
35
35
  little-plugger (~> 1.1)
36
36
  multi_json (~> 1.10)
37
37
  method_source (0.8.2)
38
- minitest (5.10.2)
39
- minitest-line (0.6.3)
38
+ minitest (5.10.3)
39
+ minitest-line (0.6.4)
40
40
  minitest (~> 5.0)
41
- multi_json (1.12.1)
41
+ multi_json (1.12.2)
42
42
  multipart-post (2.0.0)
43
43
  net-http-persistent (2.9.4)
44
44
  pry (0.10.4)
45
45
  coderay (~> 1.1.0)
46
46
  method_source (~> 0.8.1)
47
47
  slop (~> 3.4)
48
- public_suffix (2.0.5)
48
+ public_suffix (3.0.0)
49
49
  rake (11.3.0)
50
50
  safe_yaml (1.0.4)
51
51
  simplecov (0.11.2)
52
52
  docile (~> 1.1.0)
53
53
  json (~> 1.8)
54
54
  simplecov-html (~> 0.10.0)
55
- simplecov-html (0.10.1)
55
+ simplecov-html (0.10.2)
56
56
  slop (3.6.0)
57
- typhoeus (1.1.2)
57
+ typhoeus (1.3.0)
58
58
  ethon (>= 0.9.0)
59
59
  vcr (2.9.3)
60
60
  webmock (2.3.2)
data/README.md CHANGED
@@ -11,6 +11,7 @@ Radiator is an API Client for interaction with the STEEM network using Ruby.
11
11
 
12
12
  #### Fixes in v0.2.3
13
13
 
14
+ * Gem updates
14
15
  * Added low-level support for persistence and retrying API requests.
15
16
  * Now using exponential back-off for retries.
16
17
  * Detecting presence of `transaction_ids` (if enabled by the node).
data/lib/radiator/api.rb CHANGED
@@ -122,23 +122,19 @@ module Radiator
122
122
  when '400'
123
123
  @logger.warn('Code 400: Bad Request, retrying ...')
124
124
  backoff
125
- redo
126
125
  when '502'
127
126
  @logger.warn('Code 502: Bad Gateway, retrying ...')
128
127
  backoff
129
- redo
130
128
  when '503'
131
129
  @logger.warn('Code 503: Service Unavailable, retrying ...')
132
130
  backoff
133
- redo
134
131
  when '504'
135
132
  @logger.warn('Code 504: Gateway Timeout, retrying ...')
136
133
  backoff
137
- redo
138
134
  else
139
135
  ap "Unknown code #{response.code}, retrying ..."
140
- backoff
141
136
  ap response
137
+ backoff
142
138
  end
143
139
  end
144
140
 
@@ -147,27 +143,28 @@ module Radiator
147
143
  rescue Errno::ECONNREFUSED => e
148
144
  @logger.warn('Connection refused, retrying ...')
149
145
  backoff
150
- redo
151
146
  rescue Errno::EADDRNOTAVAIL => e
152
147
  @logger.warn('Node not available, retrying ...')
153
148
  backoff
154
- redo
155
149
  rescue Net::ReadTimeout => e
156
150
  @logger.warn('Node read timeout, retrying ...')
157
151
  backoff
158
- redo
159
152
  rescue Net::OpenTimeout => e
160
153
  @logger.warn('Node timeout, retrying ...')
161
154
  backoff
162
- redo
163
155
  rescue RangeError => e
164
156
  @logger.warn('Range Error, retrying ...')
165
157
  backoff
166
- redo
158
+ rescue OpenSSL::SSL::SSLError => e
159
+ @logger.warn("SSL Error (#{e.message}), retrying ...")
160
+ backoff
161
+ rescue SocketError => e
162
+ @logger.warn("Socket Error (#{e.message}), retrying ...")
163
+ backoff
167
164
  rescue => e
168
165
  puts "Unknown exception from request ..."
169
- backoff
170
166
  ap e
167
+ backoff
171
168
  end
172
169
  end # loop
173
170
  end
@@ -223,7 +220,7 @@ module Radiator
223
220
  @logger.warn "Unexpeced response: #{response.inspect}; temporarily falling back to non-persistent-http"
224
221
  end
225
222
  rescue Net::HTTP::Persistent::Error => e
226
- @logger.warn "Unable to perform request: #{request} :: #{e}: #{e.backtrace}"
223
+ @logger.warn "Unable to perform request: #{request} :: #{e} :: #{!!e.cause ? "cause: #{e.cause.message}" : ''}; temporarily falling back to non-persistent-http"
227
224
  end
228
225
 
229
226
  @net_http_persistent_enabled = false
@@ -1,3 +1,3 @@
1
1
  module Radiator
2
- VERSION = '0.2.3rc3'
2
+ VERSION = '0.2.3rc4'
3
3
  end
data/radiator.gemspec CHANGED
@@ -37,6 +37,6 @@ Gem::Specification.new do |spec|
37
37
  spec.add_dependency('json', '~> 1.8', '>= 1.8.6')
38
38
  spec.add_dependency('logging', '~> 2.2', '>= 2.2.0')
39
39
  spec.add_dependency('hashie', '~> 3.5', '>= 3.5.5')
40
- spec.add_dependency('bitcoin-ruby', '0.0.10')
40
+ spec.add_dependency('bitcoin-ruby', '0.0.11')
41
41
  spec.add_dependency('ffi', '1.9.18')
42
42
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radiator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3rc3
4
+ version: 0.2.3rc4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anthony Martin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-20 00:00:00.000000000 Z
11
+ date: 2017-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -320,14 +320,14 @@ dependencies:
320
320
  requirements:
321
321
  - - '='
322
322
  - !ruby/object:Gem::Version
323
- version: 0.0.10
323
+ version: 0.0.11
324
324
  type: :runtime
325
325
  prerelease: false
326
326
  version_requirements: !ruby/object:Gem::Requirement
327
327
  requirements:
328
328
  - - '='
329
329
  - !ruby/object:Gem::Version
330
- version: 0.0.10
330
+ version: 0.0.11
331
331
  - !ruby/object:Gem::Dependency
332
332
  name: ffi
333
333
  requirement: !ruby/object:Gem::Requirement