iron_warbler 2.0.7.16 → 2.0.7.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/iro/alert.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9a1d4d1eda9f6a71ac418d24a0e8588efbbe3d8d0c145964f55feef14393aed
|
4
|
+
data.tar.gz: 30c1242bfd9f12e1809a8fb2aa4289057aa8b1cc336e3e7020d98c9f98c84768
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db2fcb877e026eabbb1786607e5c64256946f029f8d5175e53cb2295f8b8adf262222ca1af39810bc68aed6ce6953f78c716bf7985bb3d24b92c0d1d907af90f
|
7
|
+
data.tar.gz: 4020c6358719dea41655172bbc96d3fbc15124a2af4797ceeaa24bb76d8b36cea199c6dfa3cf1c3a63982f83fde03aa4930eeeb011f73014c7bcd3d559d37cd9
|
data/app/models/iro/alert.rb
CHANGED
@@ -37,13 +37,13 @@ class Iro::Alert
|
|
37
37
|
begin
|
38
38
|
price = Tda::Stock.get_quote( alert.symbol ).last
|
39
39
|
|
40
|
-
if alert.direction ==
|
41
|
-
alert.direction ==
|
40
|
+
if alert.direction == alert.class::DIRECTION_ABOVE && price >= alert.strike ||
|
41
|
+
alert.direction == alert.class::DIRECTION_BELOW && price <= alert.strike
|
42
42
|
|
43
43
|
|
44
44
|
|
45
45
|
Iro::AlertMailer.stock_alert( alert.id.to_s ).deliver_later
|
46
|
-
alert.update({ status:
|
46
|
+
alert.update({ status: alert.class::STATUS_INACTIVE })
|
47
47
|
print '^'
|
48
48
|
|
49
49
|
end
|