sibit 0.19.4 → 0.20.0

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
  SHA256:
3
- metadata.gz: ca53f721586f3a69839c0862f37fbb1d17cd06b880a6bfbe62d2df04b0f29e2e
4
- data.tar.gz: 33734496a83daed1b161675b095cf478f0b9af5e3c96fa9755055fc867d6e606
3
+ metadata.gz: 4b0e095b8a42b4036cc160bf0c7cd2d8d80801fb4aa609c34846fe42e711a9a8
4
+ data.tar.gz: 5da2b30520ff7ac48783d6a264c501b8b26dbbcf4934a2927e1b9252803f5666
5
5
  SHA512:
6
- metadata.gz: ee8ecc223c8f29ba5b3ca0c1666ec16ba50e3823dbb8b30ebb3a77f058311c2a81a3f84ce78af8101fa2061cf7a51690f41e1bf980fa994ec0ec415d1cb68ed8
7
- data.tar.gz: d2415fef9dcbf66038a3df1abd2ef70628049c3bb566d8229fd474a1d9f8ab12bc056f147020f0364400f6170db987740b8925c508fcc0a6314d753585c55830
6
+ metadata.gz: b60bbbaf728cc95fc71078096d850f675f2d933ee889a1edb38798f21267ad4e22b7904f786853bcb8c1507aac7a29c3fa195a56d7be5da41d067a6832983c69
7
+ data.tar.gz: fa7e0c793d4e21d151c1e5758b2c2c8f98fdd1aaa92368bf3c70527083185b85a6b2a769a51f56b9a5a24e6105e0fb6eac0cb0d78470d8de7f1eb236b0f46423
@@ -32,9 +32,10 @@ class Sibit
32
32
  # Best of API.
33
33
  class BestOf
34
34
  # Constructor.
35
- def initialize(list, log: Sibit::Log.new)
35
+ def initialize(list, log: Sibit::Log.new, verbose: false)
36
36
  @list = list
37
37
  @log = log
38
+ @verbose = verbose
38
39
  end
39
40
 
40
41
  # Current price of BTC in USD (float returned).
@@ -106,7 +107,7 @@ class Sibit
106
107
  begin
107
108
  results << yield(api)
108
109
  rescue Sibit::Error => e
109
- @log.info("The API #{api.class.name} failed at #{method}(): #{e.message}")
110
+ @log.info("The API #{api.class.name} failed at #{method}(): #{e.message}") if @verbose
110
111
  end
111
112
  end
112
113
  if results.empty?
@@ -32,9 +32,10 @@ class Sibit
32
32
  # First of API.
33
33
  class FirstOf
34
34
  # Constructor.
35
- def initialize(list, log: Sibit::Log.new)
35
+ def initialize(list, log: Sibit::Log.new, verbose: false)
36
36
  @list = list
37
37
  @log = log
38
+ @verbose = verbose
38
39
  end
39
40
 
40
41
  # Current price of BTC in USD (float returned).
@@ -109,7 +110,7 @@ class Sibit
109
110
  done = true
110
111
  break
111
112
  rescue Sibit::Error => e
112
- @log.info("The API #{api.class.name} failed at #{method}(): #{e.message}")
113
+ @log.info("The API #{api.class.name} failed at #{method}(): #{e.message}") if @verbose
113
114
  end
114
115
  end
115
116
  unless done
@@ -26,5 +26,5 @@
26
26
  # License:: MIT
27
27
  class Sibit
28
28
  # Current version of the library.
29
- VERSION = '0.19.4'
29
+ VERSION = '0.20.0'
30
30
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sibit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.4
4
+ version: 0.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko