watchcow 0.1.10 → 0.1.11

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: b4573a11d59d17d89bda6f6afbea3c964112612da2974cf12f42fea503043fc0
4
- data.tar.gz: cb7ad9c20387b773747ad38d0b8cab922276994f0f34782b1f3adc81154ae293
3
+ metadata.gz: 4152adcf0ced5a26e3befac32831afde5897b5addcb9e05270e57980148448e1
4
+ data.tar.gz: 7704db9e1dd1fcf40ef75ef7324375f17e75382369f0c3172bd15ce242ebf206
5
5
  SHA512:
6
- metadata.gz: 309ff205f70ba3c7158a5d3d72260e7df6a2824ff376ecb51f611a67eba154ed7234eacbcd15fccdd2be01d66c672187829c5cb65e5c5d46862b6aff3231e44e
7
- data.tar.gz: bb042886d415016609c1e2e642030481fb7dbff7d8cdeb2f33154456145beb785a5ad49ddff21f785b91149e35dd5418d61b878e4f3e9a674dfea12ea936aa84
6
+ metadata.gz: bbae037e0d859d8fe567485effdfbf9e53b9408715aaa27706c250c4fb7eef8645e646ec9215636af1212b8ef01c363fb0127b9f0a6d5e659ceaf0f41b35d226
7
+ data.tar.gz: 2d6ec45fc468831b5c82da5d1bb694b972ef633c2d96e7f5914bf57eea57f48bc39d0e97d8f4e542cdc71f852cf415ffe10633e902da945f6078f06621f4a523
data/lib/watchcow/rate.rb CHANGED
@@ -33,7 +33,7 @@ module Watchcow
33
33
  margin_expect = margin_annual / 365 * days_remain
34
34
  base_gap = dm_first_bid - spot_first_bid
35
35
  gap_rate = base_gap / dm_first_bid * 100
36
-
36
+ binding.pry if days_remain <= 0
37
37
  real_margin_expect = (1.0 / spot_first_bid - 1.0 / dm_first_bid) * spot_first_bid * 100
38
38
  result = {
39
39
  coin: "#{coin}_#{t}",
@@ -62,7 +62,7 @@ module Watchcow
62
62
  end
63
63
 
64
64
  def days_remain_of symbol, t
65
- @contract_info ||= Watchcow::ContractInfo.call
65
+ @contract_info = Watchcow::ContractInfo.call
66
66
  line = @contract_info.dig('data').select do |h|
67
67
  h.dig('symbol') == symbol.upcase && h.dig('contract_type') == KEYS[t]
68
68
  end.first
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Watchcow
4
- VERSION = "0.1.10"
4
+ VERSION = "0.1.11"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watchcow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - DrinE Liu
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-05-27 00:00:00.000000000 Z
11
+ date: 2021-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty