iron_warbler 2.0.7.4 → 2.0.7.6
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 +1 -0
- data/lib/tasks/iro_tasks.rake +9 -0
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22ae37cea1efb7bfb149dcf88ed26fc777ec0f0f63fbd0d1a46b6e94b6e24fae
|
4
|
+
data.tar.gz: e48a88e2717722d04de5acb67d7ad9fcb1cdcd09e711811c8c0cccaab0a267c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00d04ff69762f25603c60c768b08eddafc5e0b549ed88d4f75b43afc1140e2565ae9a2e667e4245c842a5742c37a8a1a0f9bffc71c29bde8ca788576e52d90c5
|
7
|
+
data.tar.gz: 7d5117e6349a34c6a303c3a60b5108820625123bb23bd27b409e2cb2ce1f09eaf38824d7519c5c92f142eab02cd5427b2a4ea73f2b13175f9a318fdb39cde42f
|
data/app/models/iro/alert.rb
CHANGED
data/lib/tasks/iro_tasks.rake
CHANGED
@@ -20,15 +20,24 @@ namespace :iro do
|
|
20
20
|
|
21
21
|
desc 'alerts'
|
22
22
|
task alerts: :environment do
|
23
|
+
print 'iro:alerts'
|
23
24
|
while true
|
24
25
|
Iro::Alert.active.each do |alert|
|
26
|
+
|
25
27
|
# price = Iro::Stock.latest( alert.ticker ).price
|
26
28
|
price = Tda::Api.get_quote( alert.symbol ).last
|
29
|
+
|
27
30
|
if alert.direction == Iro::Alert::DIRECTION_ABOVE && price >= alert.strike ||
|
28
31
|
alert.direction == Iro::Alert::DIRECTION_BELOW && price <= alert.strike
|
32
|
+
|
29
33
|
Iro::AlertMailer.stock_alert( alert ).deliver_later
|
34
|
+
alert.update_attributes({ status: Iro::Alert::STATUS_INACTIVE })
|
35
|
+
print '^'
|
36
|
+
|
30
37
|
end
|
31
38
|
end
|
39
|
+
|
40
|
+
print '.'
|
32
41
|
sleep Iro::Alert::SLEEP_TIME_SECONDS
|
33
42
|
end
|
34
43
|
end
|
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.
|
4
|
+
version: 2.0.7.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Pudeyev
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: 6.0.0
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: exception_notification
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 4.5.0
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 4.5.0
|
111
125
|
description: A stocks and Options Trading Bot.
|
112
126
|
email: victor@wasya.co
|
113
127
|
executables: []
|