aga-money 0.0.7 → 0.0.8

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: a7bcba80594c066f5756f04f600bb6ef54ebe60b83928651994c0ab5a84609b9
4
- data.tar.gz: b33b9948aa7fee08f10ed51d919b142004a10421506531de8290ac285f0a7611
3
+ metadata.gz: 100b17af0caedfc74dcc49e9925f122520e1970961b1f7e17a6b4493fa905248
4
+ data.tar.gz: 43938e39b726ca7dea621ade7067e79c39cb332fa15c4ee38711db1a1513007f
5
5
  SHA512:
6
- metadata.gz: 8548315504219dedc93fb1bfe4dfe31d2963cf55efc77070880355d96414a68316493f8eb745a1a38e28be0420d1fdee7d9b8a7992ac225d386f11db51f47e0d
7
- data.tar.gz: 675e7f89d4d010817f37002ee2592cf4b4f5eabc66499b7785faebed7a32965b39672aa7e5a9698350fc49dd934969641989f542f2e076553e6ad3d5237312db
6
+ metadata.gz: 7c96089fd8d90b800437b600d6e7ae27eca545edc5a7cfc1929ac338dfe1e7b05d280c4bf432e8b420406800cb2240779d668ac1307a7341cca7ed50a49db804
7
+ data.tar.gz: 49e9f1a699d244fc948504fb4c76108c0d2e1c1f3d14afb2339427d16c5b7e1f76c6f372e339e79b039ab2dbb325da636bce28f40d7dff06e0de1f5da6e27294
@@ -13,6 +13,7 @@ module Money
13
13
 
14
14
  def run
15
15
  data = cmc(joiner)
16
+ @log.info("Founded crypto: #{data.map { |item| item[:name] }.join(', ')}")
16
17
  validate(data)
17
18
  end
18
19
 
@@ -21,7 +22,7 @@ module Money
21
22
  def binance_request
22
23
  response = @http.bnb_request(start: @start)
23
24
  return nil unless @http.correct_response?(response)
24
-
25
+
25
26
  data = response.dig(:response, 'data', 'body', 'data')
26
27
  response(data)
27
28
  end
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'beacon'
4
+
3
5
  module Money
4
6
  class Common
5
7
  attr_reader :http
@@ -10,6 +12,7 @@ module Money
10
12
 
11
13
  @http = Money::Helpers::HttpRequest.new(service: @service)
12
14
  @form = Money::Helpers::Format.new
15
+ @log = Beacon::Service.instance
13
16
  end
14
17
 
15
18
  private
@@ -14,6 +14,7 @@ module Money
14
14
 
15
15
  def initialize(pairs)
16
16
  @pairs = pairs
17
+ @log = Beacon::Service.instance
17
18
  end
18
19
 
19
20
  def greater_difference
@@ -29,6 +30,7 @@ module Money
29
30
  return false if price.nil?
30
31
 
31
32
  percentage = percentage(detection).round(3)
33
+ @log.info("Percentage: #{percentage}")
32
34
  return false if percentage < SET_PERC
33
35
 
34
36
  true
@@ -14,6 +14,7 @@ module Money
14
14
 
15
15
  def initialize(data:)
16
16
  @data = data
17
+ @log = Beacon::Service.instance
17
18
  end
18
19
 
19
20
  # rubocop: disable Metrics/MethodLength, Lint/MissingCopEnableDirective
@@ -46,6 +47,7 @@ module Money
46
47
  cryptos = []
47
48
  @data&.map do |item|
48
49
  request = Money::Helpers::RequestApp.new.operation_exist(item)
50
+ @log.info("item: #{item[:name]} ,exist: #{request[:response]['exist']}")
49
51
  next if request[:response]['exist'] == true
50
52
 
51
53
  cryptos << item
data/lib/money/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Money
4
- VERSION = '0.0.7'
4
+ VERSION = '0.0.8'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aga-money
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefano Baldazzi
@@ -178,6 +178,20 @@ dependencies:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
180
  version: 0.0.2
181
+ - !ruby/object:Gem::Dependency
182
+ name: aga-beacon
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - "~>"
186
+ - !ruby/object:Gem::Version
187
+ version: 0.0.1
188
+ type: :runtime
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - "~>"
193
+ - !ruby/object:Gem::Version
194
+ version: 0.0.1
181
195
  - !ruby/object:Gem::Dependency
182
196
  name: activesupport
183
197
  requirement: !ruby/object:Gem::Requirement
@@ -263,5 +277,5 @@ requirements: []
263
277
  rubygems_version: 3.3.24
264
278
  signing_key:
265
279
  specification_version: 4
266
- summary: aga-money0.0.7
280
+ summary: aga-money0.0.8
267
281
  test_files: []