iron_warbler 2.0.7.17 → 2.0.7.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/app/models/iro/alert.rb +5 -7
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a9a1d4d1eda9f6a71ac418d24a0e8588efbbe3d8d0c145964f55feef14393aed
4
- data.tar.gz: 30c1242bfd9f12e1809a8fb2aa4289057aa8b1cc336e3e7020d98c9f98c84768
3
+ metadata.gz: b6b3c19fdfe0c9cd47b253a92b6065f067d3004022865d700059ad3190287f35
4
+ data.tar.gz: abd93b990583e6ab2c644b74647014767a43947d81fdf7f1b15abf198efad96c
5
5
  SHA512:
6
- metadata.gz: db2fcb877e026eabbb1786607e5c64256946f029f8d5175e53cb2295f8b8adf262222ca1af39810bc68aed6ce6953f78c716bf7985bb3d24b92c0d1d907af90f
7
- data.tar.gz: 4020c6358719dea41655172bbc96d3fbc15124a2af4797ceeaa24bb76d8b36cea199c6dfa3cf1c3a63982f83fde03aa4930eeeb011f73014c7bcd3d559d37cd9
6
+ metadata.gz: 106e70eda991a01d9ce69a265958ea2dbe25fb27a0b316297b303ec97c5cffb6cb274b78a4ceb827d107f7644122947038c8cce696fcd8f8240cffb6cfe9e28f
7
+ data.tar.gz: 3b51d655011169c98ef738174c054733aaa4ebe737ebd53b0725f4f062e7b939bc4d72e3561a8c12d309240b68ded7d311ac91819da0b74d21f411240a249987
@@ -23,13 +23,13 @@ class Iro::Alert
23
23
  field :class_name, default: 'Iro::Stock'
24
24
  validates :class_name, presence: true
25
25
 
26
- field :symbol
26
+ field :symbol, type: String
27
27
  validates :symbol, presence: true
28
28
 
29
- field :direction
29
+ field :direction, type: String
30
30
  validates :direction, presence: true
31
31
 
32
- field :strike
32
+ field :strike, type: Float
33
33
  validates :strike, presence: true
34
34
 
35
35
  def do_run
@@ -37,10 +37,8 @@ class Iro::Alert
37
37
  begin
38
38
  price = Tda::Stock.get_quote( alert.symbol ).last
39
39
 
40
- if alert.direction == alert.class::DIRECTION_ABOVE && price >= alert.strike ||
41
- alert.direction == alert.class::DIRECTION_BELOW && price <= alert.strike
42
-
43
-
40
+ if ( alert.direction == alert.class::DIRECTION_ABOVE && price >= alert.strike ) ||
41
+ ( alert.direction == alert.class::DIRECTION_BELOW && price <= alert.strike )
44
42
 
45
43
  Iro::AlertMailer.stock_alert( alert.id.to_s ).deliver_later
46
44
  alert.update({ status: alert.class::STATUS_INACTIVE })
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iron_warbler
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.7.17
4
+ version: 2.0.7.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev