ish_manager 0.1.8.239 → 0.1.8.241

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 208869e35c7304b99714faecff1b8635497a095e308a7399df41c1edd3984a81
4
- data.tar.gz: 8be22120c502b62a75c2fe6c6d22a0965f56e562e9ee1d52c236bb1a0250f6f3
3
+ metadata.gz: e18f6d5504242e811b32534479efbde484ba91474cd7e7593fdf92bc4416eff1
4
+ data.tar.gz: f0f52556505d23e95d00b2a5560142069d1fa801c821ba9e443ad6a8f521b2b6
5
5
  SHA512:
6
- metadata.gz: d1ba12ebbc738f2e4d0308100cba6a7bc3e67805bfe21bfd40d7254fbbd9fd92a49b31d12bc3969886a2934f0936bee55356d94fccc816dcf5fe2949cc1424ab
7
- data.tar.gz: d413b13bae7f33a29603bb8ec2adaeca6606f52bdfcc2d3e7502818ceaba6bc559a736e6fce52f6622c08c4caf55c80a8a940d8a18993ba00a4e24a4810f882e
6
+ metadata.gz: 3d44774fcd914ac3beb92afd360916f34dc2e7f2214433363c19e36dc536ec54f93c8f79d5ad9f5e59372164eae15affa2c7aa4c418e7fe8a019dd29486d6c93
7
+ data.tar.gz: cc2018aa43c15366480108791b094ae38f44a2f3953010d2163bc4a4745c933fe654c4a30145c5da0c1606d2666d542d7e67c288e33827063d94bd5eb8de0a2f
@@ -42,7 +42,7 @@ namespace :ish_manager do
42
42
  # stock.stock_actions.where( :is_active => true ).each do |action|
43
43
  # # @TODO: actions
44
44
  # end
45
-
45
+
46
46
  end
47
47
  end
48
48
  sleep 60
@@ -50,6 +50,28 @@ namespace :ish_manager do
50
50
  end
51
51
  =end
52
52
 
53
+ desc 'watch the stocks, and trigger actions - not alphavantage, tda now. 2021-08-08'
54
+ task :watch_stocks => :environment do
55
+ while true
56
+ stocks = Ish::StockWatch.where( :notification_type => :EMAIL )
57
+ stocks.each do |stock|
58
+ begin
59
+ Timeout::timeout( 10 ) do
60
+ out = Ish::Ameritrade::Api.get_quote({ symbol: stock.ticker })
61
+ r = out[:lastPrice]
62
+ if stock.direction == :ABOVE && r >= stock.price ||
63
+ stock.direction == :BELOW && r <= stock.price
64
+ IshManager::ApplicationMailer.stock_alert( stock ).deliver
65
+ end
66
+ end
67
+ rescue Exception => e
68
+ puts! e, 'e in :watch_stocks'
69
+ end
70
+ end
71
+ sleep 60
72
+ end
73
+ end
74
+
53
75
  desc 'watch condors'
54
76
  task watch_condors: :environment do
55
77
  watcher = ::Ish::IronCondorWatcher.new
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.239
4
+ version: 0.1.8.241
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-29 00:00:00.000000000 Z
11
+ date: 2021-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -333,14 +333,6 @@ files:
333
333
  - app/views/ish_manager/tags/index.haml
334
334
  - app/views/ish_manager/tags/new.haml
335
335
  - app/views/ish_manager/tags/show.haml
336
- - app/views/ish_manager/trash/ally/home.haml
337
- - app/views/ish_manager/trash/co_tailors/_product_form.haml
338
- - app/views/ish_manager/trash/co_tailors/home.haml
339
- - app/views/ish_manager/trash/covered_calls/index.haml
340
- - app/views/ish_manager/trash/friends/index.haml
341
- - app/views/ish_manager/trash/iron_condors/_form.haml
342
- - app/views/ish_manager/trash/iron_condors/index.haml
343
- - app/views/ish_manager/trash/orders/index.haml
344
336
  - app/views/ish_manager/user_profiles/_form.haml
345
337
  - app/views/ish_manager/user_profiles/edit.haml
346
338
  - app/views/ish_manager/user_profiles/index.haml
@@ -379,7 +371,7 @@ homepage: http://wasya.co
379
371
  licenses:
380
372
  - MIT
381
373
  metadata: {}
382
- post_install_message:
374
+ post_install_message:
383
375
  rdoc_options: []
384
376
  require_paths:
385
377
  - lib
@@ -394,8 +386,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
394
386
  - !ruby/object:Gem::Version
395
387
  version: '0'
396
388
  requirements: []
397
- rubygems_version: 3.0.6
398
- signing_key:
389
+ rubygems_version: 3.2.25
390
+ signing_key:
399
391
  specification_version: 4
400
392
  summary: Summary of IshManager.
401
393
  test_files: []
@@ -1,6 +0,0 @@
1
-
2
- %h5 Ally Home
3
-
4
- %ul
5
- %li= link_to 'Stock Options (positions)', stock_options_path
6
- %li= link_to 'Stock Watches', stock_watches_path
@@ -1,21 +0,0 @@
1
-
2
- .panel.dropShadow
3
- .panel-content
4
- = form_for product, :url => product.persisted? ? co_tailors_product_path(product) : co_tailors_products_path do |f|
5
- .row
6
- .col-xs-6
7
- .input-field
8
- = f.text_field :kind
9
- = f.label "kind (shirt, pants, suit)"
10
- .input-field
11
- = f.text_field :title
12
- = f.label "title"
13
- .input-field
14
- = f.number_field :cost
15
- = f.label "cost (cents)"
16
- = f.submit
17
- .col-xs-6
18
- .input-field
19
- = f.text_area :description, :style => "height: 200px;"
20
- = f.label "description"
21
-
@@ -1,12 +0,0 @@
1
-
2
- %h4 CoTailors Home
3
- %h5 Products
4
- = render 'ish_manager/co_tailors/product_form', :product => CoTailors::Product.new
5
- %hr
6
-
7
- %ul
8
- - @products.each do |product|
9
- %li
10
- = render 'ish_manager/co_tailors/product_form', :product => product
11
- %hr
12
-
@@ -1,2 +0,0 @@
1
-
2
- Covered Calls
@@ -1,20 +0,0 @@
1
-
2
- %h5 Friends
3
-
4
- .panel
5
- .panel-body
6
- = form_for @new_friend, :as => :friend, :url => friends_path do |f|
7
- .row
8
- .col-sm-6
9
- = f.text_field :email, :placeholder => 'email'
10
- .col-sm-6
11
- = f.submit 'Add Friend'
12
-
13
- - @friends.each do |friend|
14
- .panel
15
- .panel-body
16
- = friend.email
17
- .row
18
- .col-sm-6.description
19
- Galleries shared with them:
20
- = render 'ish_manager/galleries/index_title', :galleries => friend.shared_galleries.unscoped.where( :is_trash => false, :user_profile => current_user.profile )
@@ -1,41 +0,0 @@
1
-
2
- %div{ class: condor.persisted? ? 'card' : '' }
3
- - if condor.persisted?
4
- .float-left= button_to '[X]', iron_condor_path(condor.id), method: :delete, data: { confirm: 'Are you sure?' }
5
-
6
- - url = condor.persisted? ? iron_condor_path( condor ) : iron_condors_path
7
- = form_for condor, url: url, :html => { :class => 'form-inline well' } do |f|
8
- .row
9
- .col
10
- %label.control-label Ticker
11
- = f.text_field :ticker, :class => 'form-control', placeholder: 'QQQ'
12
- .col
13
- %label.control-label # Contracts
14
- = f.text_field :n_contracts, :class => 'form-control', placeholder: 1
15
- .col
16
- = f.label :status
17
- = f.select :status, options_for_select( ['']+::Ish::IronCondor::STATUSES, selected: condor.status )
18
- .col
19
- %label.control-label Expires on
20
- = f.text_field :expires_on, :class => 'form-control datepicker', placeholder: :expires_on, id: "expires_on_#{condor.id}"
21
- .row
22
- .col
23
- = f.label :iv_annual
24
- = f.number_field :iv_annual, placeholder: 18, step: :any
25
-
26
- - if condor.persisted?
27
- .col
28
- %ul
29
- %li <b>Call Sell Strike:</b> #{condor.call_sell_strike}
30
- %li <b>Call Buy Strike:</b> #{condor.call_buy_strike}
31
- %li <b>Put Sell Strike:</b> #{condor.put_sell_strike}
32
- %li <b>Put Buy Strike:</b> #{condor.put_buy_strike}
33
- .col
34
- %ul
35
- %li <b>Enter Price:</b> #{pp_amount condor.enter_price}
36
- %li <b>Upper Panic Therhold:</b> #{pp_amount condor.upper_panic_threshold}
37
- %li <b>Lower Panic Therhold:</b> #{pp_amount condor.lower_panic_threshold}
38
-
39
- .col
40
- = f.submit ">", :class => %w(btn blue)
41
- .c
@@ -1,10 +0,0 @@
1
-
2
- %h1
3
- Iron Condors
4
-
5
- - @condors.each do |condor|
6
- = render 'form', condor: condor
7
-
8
- %hr
9
- New:
10
- = render 'form', condor: ::Ish::IronCondor.new
@@ -1,7 +0,0 @@
1
-
2
- %h5 All Orders (#{@orders.length})
3
-
4
- %ul
5
- - @orders.each do |order|
6
- %li= order.inspect
7
-