ish_manager 0.1.8.296 → 0.1.8.298

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: '0900762368466c418a8408b768fbe394d12e7f44f7a52a3cb0f976c36fc38d39'
4
- data.tar.gz: ade02a4092251747453c5cda8681d24b35eed5844d96d4dc3da364d981cefb95
3
+ metadata.gz: 633c637aedac1a994211764707c2ebad1b69cd97410a1c90451f77c8a1cc3485
4
+ data.tar.gz: b4ca5ba260cb3476de1f41c5b2cce4d0bf70c4bb92cf632b297a17cd1af61e21
5
5
  SHA512:
6
- metadata.gz: 7b543d8120e6317b6b51ad4d9a8a42ef4213f54097301d9066911433da8d3b6b45dacbf457b2156c593a15651c27b09af400ba9980553ab33fea10751b45e5a4
7
- data.tar.gz: 0ee35c37737ee2c9380455f0776852ab58b4de4a585b238c2fca6129b76a1045771e24412a1900ca55f4c066d3a70b561a4e9694efbbe616a44d21e87b90a878
6
+ metadata.gz: b5ebf371b3be78b358e86b7b9745e8bb8d939eecf0bc34b3ef8248fbe5e8cf33844fa66947ac65e68ecc39000ff67eb9bc6b1e1b1d37a2ad31b3c21805b56452
7
+ data.tar.gz: c9cf963d8c86ae4e06dfd9067dd7d7a19decfe0aac69ea56f70ed7eb7ff59deea83f9326bc6f8d55edd6bb06d3bcedc77d9ccf95dfe55d4cdaa15025a36c6aa0
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.296
4
+ version: 0.1.8.298
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-21 00:00:00.000000000 Z
11
+ date: 2022-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -205,7 +205,6 @@ files:
205
205
  - app/assets/images/bg/gplaypattern.png
206
206
  - app/assets/images/bg/triangular.png
207
207
  - app/assets/images/bg/weather-development.png
208
- - app/assets/images/bg/weather-development.png~
209
208
  - app/assets/images/bg/weather.png
210
209
  - app/assets/images/favicon.gif
211
210
  - app/assets/images/icons/10x10_red-cross.png
@@ -409,13 +408,6 @@ files:
409
408
  - app/views/ish_manager/tags/index.haml
410
409
  - app/views/ish_manager/tags/new.haml
411
410
  - app/views/ish_manager/tags/show.haml
412
- - app/views/ish_manager/trash/option_watches-trash/_form.haml
413
- - app/views/ish_manager/trash/stock_actions/_form.haml
414
- - app/views/ish_manager/trash/stock_actions/index.haml
415
- - app/views/ish_manager/trash/stock_options/_form.haml
416
- - app/views/ish_manager/trash/stock_options/index.haml
417
- - app/views/ish_manager/trash/stock_watches/_form.haml
418
- - app/views/ish_manager/trash/stock_watches/index.haml
419
411
  - app/views/ish_manager/user_profiles/_form.haml
420
412
  - app/views/ish_manager/user_profiles/edit.haml
421
413
  - app/views/ish_manager/user_profiles/index.haml
@@ -447,7 +439,6 @@ files:
447
439
  - app/views/ish_manager/videos/show.haml
448
440
  - app/views/layouts/ish_manager/README.txt
449
441
  - app/views/layouts/ish_manager/application.haml
450
- - app/views/layouts/ish_manager/application.haml-trash
451
442
  - app/views/layouts/ish_manager/application2.haml
452
443
  - app/views/layouts/ish_manager/application_no_material.haml
453
444
  - config/routes.rb
@@ -459,7 +450,6 @@ files:
459
450
  - lib/ish_manager/version.rb
460
451
  - lib/tasks/ish_manager_tasks.rake
461
452
  - lib/tasks/migrate.rake
462
- - lib/tasks/warbler_tasks.rake-trash
463
453
  homepage: http://wasya.co
464
454
  licenses:
465
455
  - MIT
@@ -1,37 +0,0 @@
1
-
2
- - if option_watch.persisted?
3
- .float-left= button_to '[X]', option_watch_path(option_watch.id), method: :delete, data: { confirm: 'Are you sure?' }
4
-
5
-
6
- - url = option_watches_path if !option_watch.persisted?
7
- - url = option_watch_path( option_watch ) if option_watch.persisted?
8
-
9
- = form_for option_watch, :url => url, :html => { :class => 'form-inline well' } do |f|
10
- .flex-row
11
- .form-group
12
- = f.label :action
13
- = f.select :action, options_for_select( Warbler::StockWatch::ACTIONS.map{|a|[a,a]}, :selected => option_watch.action )
14
- .form-group
15
- = f.label :profile
16
- = f.select :profile, options_for_select( [[nil,nil]]+@profiles.map{|p|[p.email,p.id]}, :selected => option_watch.profile ? option_watch.profile.id : nil )
17
- .form-group
18
- %label.control-label When
19
- = f.text_field :ticker, :class => 'form-control', :placeholder => 'ticker'
20
- .form-group
21
- %label.control-label Type
22
- = f.select :contractType, options_for_select( [['none',nil],['PUT', 'PUT'], ['CALL', 'CALL']], :selected => option_watch.contractType )
23
- .form-group
24
- %label.control-label On date
25
- = f.text_field :date, :class => 'form-control', :placeholder => 'date'
26
- .form-group
27
- %label.control-label Strike
28
- = f.number_field :strike, :step => 0.01, :placeholder => "0.01"
29
- .form-group
30
- %label.control-label Is
31
- = f.select :direction, options_for_select( Warbler::StockWatch::DIRECTIONS.map{|d|[d,d]}, :selected => option_watch.direction )
32
- .form-group
33
- %label.control-label Price
34
- = f.number_field :price, :step => 0.01, :placeholder => "0.01"
35
- .form-group
36
- = f.submit ">", :class => %w(btn blue)
37
-
@@ -1,27 +0,0 @@
1
-
2
- -#
3
- -# ish_manager / stock_actions / _form
4
- -#
5
-
6
- - url = stock_actions_path if !stock_action.persisted?
7
- - url = stock_action_path( stock_action ) if stock_action.persisted?
8
-
9
- - if stock_action.profile
10
- Belongs to #{stock_action.profile.email}
11
- = form_for stock_action, :url => url, :html => { :class => 'form-inline well' } do |f|
12
- .form-group
13
- %label.control-label Active?
14
- = f.check_box :is_active
15
- .form-group
16
- - which_selected = stock_action.stock_watch ? stock_action.stock_watch.id : nil
17
- %label.control-label When stock watch
18
- = f.select :stock_watch, options_for_select( @stock_watches_list, :selected => which_selected )
19
- .form-group
20
- %label.control-label Sell options
21
- - @stock_options_list.each do |item|
22
- - checked = stock_action.stock_options.map(&:id).include?(item[1])
23
- .stock-option
24
- = f.check_box :stock_options, { :multiple => true, :checked => checked }, item[1], nil
25
- = item[0]
26
- .form-group
27
- = f.submit ">", :class => %w(btn blue)
@@ -1,13 +0,0 @@
1
-
2
- %h4 Stock Actions
3
-
4
- %p <b>Note:</b> a stock option cannot belong to two actions.
5
-
6
- %hr
7
- - @stock_actions.each do |stock_action|
8
- = render 'form', :stock_action => stock_action
9
-
10
- %hr
11
- %h5 New
12
- = render 'form', :stock_action => @stock_action
13
-
@@ -1,22 +0,0 @@
1
-
2
- - url = stock_options_path if !stock_option.persisted?
3
- - url = stock_options_path( stock_option ) if stock_option.persisted?
4
-
5
- - if stock_option.profile
6
- Belongs to #{stock_option.profile.email}
7
- = form_for stock_option, :url => url, :html => { :class => 'form-inline well' } do |f|
8
- .form-group
9
- = f.text_field :ticker, :class => 'form-control', :placeholder => 'ticker'
10
- .form-group
11
- = f.text_field :expires_on, :class => 'form-control', :placeholder => 'YYYYMMDD' # :placeholder => 'MON(TH) DD YYYY'
12
- .form-group
13
- %label.control-label $
14
- = f.number_field :strike, :step => 0.01, :class => 'form-control', :placeholder => '0.01'
15
- .form-group
16
- %label.control-label CALL/PUT?
17
- = f.select :direction, options_for_select( Ish::StockOption::DIRECTIONS.map{|d|[d,d]}, :selected => stock_option.direction )
18
- .form-group
19
- %label.control-label quantity:
20
- = f.number_field :quantity, :placeholder => 0
21
- .form-group
22
- = f.submit ">", :class => %w(btn blue)
@@ -1,11 +0,0 @@
1
-
2
- %h4 Stock Options Index
3
-
4
- %hr
5
- - @stock_options.each do |stock_option|
6
- = render 'form', :stock_option => stock_option
7
-
8
- %hr
9
- %h5 New
10
- = render 'form', :stock_option => @stock_option
11
-
@@ -1,28 +0,0 @@
1
-
2
- - if stock_watch.persisted?
3
- .float-left= button_to '[X]', stock_watch_path(stock_watch.id), method: :delete, data: { confirm: 'Are you sure?' }
4
-
5
-
6
- - url = stock_watches_path if !stock_watch.persisted?
7
- - url = stock_watch_path( stock_watch ) if stock_watch.persisted?
8
-
9
- = form_for stock_watch, :url => url, :html => { :class => 'form-inline well' } do |f|
10
- .flex-row
11
- .form-group
12
- = f.label :action
13
- = f.select :action, options_for_select( Warbler::StockWatch::ACTIONS.map{|a|[a,a]}, :selected => stock_watch.action )
14
- .form-group
15
- = f.label :profile
16
- = f.select :profile, options_for_select( [[nil,nil]]+@profiles.map{|p|[p.email,p.id]}, :selected => stock_watch.profile ? stock_watch.profile.id : nil )
17
- .form-group
18
- %label.control-label When
19
- = f.text_field :ticker, :class => 'form-control', :placeholder => 'ticker'
20
- .form-group
21
- %label.control-label Price
22
- = f.select :direction, options_for_select( Warbler::StockWatch::DIRECTIONS.map{|d|[d,d]}, :selected => stock_watch.direction )
23
- .form-group
24
- %label.control-label $
25
- = f.number_field :price, :step => 0.01, :placeholder => "0.01"
26
- .form-group
27
- = f.submit ">", :class => %w(btn blue)
28
-
@@ -1,24 +0,0 @@
1
-
2
- %h4 Stock Watches
3
-
4
- - @stock_watches.each do |stock|
5
- %hr
6
- = render 'form', :stock_watch => stock
7
-
8
- %hr
9
- %h5 New
10
- = render 'form', :stock_watch => @stock_watch
11
-
12
-
13
- %hr
14
- %hr
15
-
16
- %h4 Option Watches
17
-
18
- - @option_watches.each do |option|
19
- %hr
20
- = render 'ish_manager/option_watches/form', option_watch: option
21
-
22
- %hr
23
- %h5 New
24
- = render 'ish_manager/option_watches/form', option_watch: @option_watch
@@ -1,40 +0,0 @@
1
- !!!
2
- %html
3
- %head
4
- %title Ish Manager
5
- %link{ :rel => 'icon', :href => "/favicon_#{ENV['RAILS_ENV']}.gif" }
6
- %meta{ :name => :viewport, :content => 'width=device-width, initial-scale=1.0' }
7
- %meta{ :charset => 'UTF-8' }
8
- %meta{ :description => 'some description' }
9
- %script{ :src => "//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js" }
10
- %script{ :src => "//cdnjs.cloudflare.com/ajax/libs/tinymce/4.6.3/jquery.tinymce.min.js" }
11
- %script{ :src => "//cdnjs.cloudflare.com/ajax/libs/tinymce/4.6.3/tinymce.min.js" }
12
- %script{ :src => "//cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js" }
13
- = stylesheet_link_tag "//cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css"
14
- = stylesheet_link_tag "//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css", :media => 'all'
15
- = stylesheet_link_tag "//fonts.googleapis.com/icon?family=Material+Icons"
16
-
17
- = stylesheet_link_tag "ish_manager/materialize", media: "all"
18
- = stylesheet_link_tag "ish_manager/application", media: "all"
19
-
20
- = javascript_include_tag "ish_manager/application"
21
- = javascript_include_tag "ish_manager/materialize"
22
-
23
- = csrf_meta_tags
24
- %body{ class: [ params[:controller].gsub("ish_manager/",""), "#{params[:controller].gsub("ish_manager/","")}-#{params[:action]}", params[:action]] }
25
- .bg-white
26
- - role = current_user ? current_user.profile.role_name : ''
27
- = render :partial => "ish_manager/application/main_header_#{role}"
28
- .container
29
- .row
30
- .col.s12
31
- - if notice
32
- %p.notice= notice
33
- - if alert
34
- %p.alert= alert
35
- .container
36
- = yield
37
- = render 'ish_manager/application/main_footer'
38
- = render 'analytics' unless Rails.env.development?
39
- = render 'debug' if Rails.env.development?
40
-
@@ -1,69 +0,0 @@
1
-
2
- def puts! a, b=''
3
- puts "+++ +++ #{b}:"
4
- pp a
5
- end
6
-
7
- namespace :warbler do
8
-
9
- desc 'test placing orders for stock' do
10
- task place_order_stock: :environment do
11
- opts = {
12
- "instruction": "BUY",
13
- "price": "1.10",
14
- "quantity": 1,
15
- "symbol": "BAC",
16
- }
17
- out = Warbler::Ameritrade::Api.place_stock_limit_order opts
18
- puts! out, 'out'
19
- end
20
-
21
- ## @TODO: this is still in ish_manager namespace, need to actually move it here.
22
- desc 'watch the stocks, and trigger actions - not alphavantage, tda now. 2021-08-08'
23
- task watch_stocks: :environment do
24
- while true
25
- stocks = Warbler::StockWatch.where( notification_type: :EMAIL )
26
- stocks.each do |stock|
27
- begin
28
- Timeout::timeout( 10 ) do
29
- out = Warbler::Ameritrade::Api.get_quote({ symbol: stock.ticker })
30
- r = out[:lastPrice]
31
- if stock.direction == :ABOVE && r >= stock.price ||
32
- stock.direction == :BELOW && r <= stock.price
33
- IshManager::ApplicationMailer.stock_alert( stock ).deliver
34
- end
35
- end
36
- rescue Exception => e
37
- puts! e, 'Error in ish_manager:watch_stocks :'
38
- end
39
- end
40
- print '.'
41
- sleep Warbler::StockWatch::SLEEP_TIME_SECONDS
42
- end
43
- end
44
-
45
- desc 'watch option: contractType=PUT|CALL strike symbol date=yyyy-mm-dd'
46
- task watch_options: :environment do
47
- while true
48
- option_watches = Warbler::OptionWatch.where( notification_type: :EMAIL )
49
- option_watches.each do |option|
50
- begin
51
- Timeout::timeout( 10 ) do
52
- ## opts = { contractType: 'PUT', strike: 355.0, symbol: 'NVDA', date: '2022-02-18' }
53
- out = Warbler::Ameritrade::Api.get_option( option )
54
- r = out[:last]
55
- if option.direction == :ABOVE && r >= option.price ||
56
- option.direction == :BELOW && r <= option.price
57
- IshManager::ApplicationMailer.option_alert( option ).deliver
58
- end
59
- end
60
- rescue Exception => e
61
- puts! e, 'Error in ish_manager:watch_options :'
62
- end
63
- end
64
- print '.'
65
- sleep Warbler::OptionWatch::SLEEP_TIME_SECONDS
66
- end
67
- end
68
-
69
- end