ish_manager 0.1.8.237 → 0.1.8.242

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a27c48be69389414cbfa80ca2a2bfff757842d7d38af6d06a3b2dbe90098c394
4
- data.tar.gz: a1e4eacca1716263e6e7a410fc53fb388d3e60ef432c82f559784ae574eebb29
3
+ metadata.gz: 88548f8431389bfd9e6a8d5b43a296a568c06e7cb206e538ae4f8d67de587b08
4
+ data.tar.gz: ed96fb0dbf2dece997ccf6f379db6e77368b098e47bd335dd9bf628da5450945
5
5
  SHA512:
6
- metadata.gz: 96db46fcb806daff0b171d6b783e3b5f29c148ef0ffccddb6f4cbad6ea58eb756bc61094e56e2790e8d79b9cfcd0043dd693f4d3ce983f1a325cf77e79fe71ba
7
- data.tar.gz: 12fb8819adc15b8b8a47746866dbc4da6654a05498457e221a7bd8c46dbdcc25406706f15993fffb7fd81e9a3ef40ec3cac4a2f1b225fdcb18b8a4026d6b6098
6
+ metadata.gz: 44d4c096f4d35bf6978a19284a3a403f0addf5c4348edea44a8857a540ac5d3a970514a7e0cc25fbc863562d552cb055a946e24bd84b855fef5ff7cb544052e8
7
+ data.tar.gz: f77b85cb3a60045525f498278c492c7a92797c67ac2347875489eb9b922bbda71e40bd420b21875cf59325486fc8c61166d340d1efb518709e92856ffeaab210
@@ -10,7 +10,7 @@ class IshManager::GalleriesController < IshManager::ApplicationController
10
10
  @galleries = @galleries.where({ :name => /#{params[:q]}/i })
11
11
  @galleries.selector.delete('is_done')
12
12
  end
13
- @galleries = @galleries.page( params[:galleries_page] ).per( 20 )
13
+ @galleries = @galleries.page( params[:galleries_page] ).per( 10 )
14
14
 
15
15
  render params[:render_type]
16
16
  end
@@ -26,7 +26,7 @@ class IshManager::VideosController < IshManager::ApplicationController
26
26
  @videos = @videos.where({ :name => /#{params[:q]}/i })
27
27
  end
28
28
 
29
- @videos = @videos.page( params[:videos_page] )
29
+ @videos = @videos.page( params[:videos_page] ).per( 10 )
30
30
 
31
31
  respond_to do |format|
32
32
  format.html do
@@ -7,5 +7,9 @@
7
7
  (#{gallery.photos.length})
8
8
  = link_to '[~]', edit_gallery_path( gallery )
9
9
  [x]
10
+ - if gallery.is_public && !gallery.is_trash && !gallery.is_done
11
+ %i.material-icons visibility
12
+ - else
13
+ %i.material-icons visibility_off
10
14
  galleryname :: #{gallery.galleryname}
11
15
  = render 'meta', :item => gallery
@@ -3,15 +3,15 @@
3
3
 
4
4
  - if @site
5
5
  = render 'ish_manager/sites/header', :site => @site
6
-
6
+
7
7
  .row
8
8
  .large-12.columns
9
9
  %h3
10
10
  Reports (#{@reports.length})
11
11
  = link_to image_new, new_report_path
12
-
12
+
13
13
  = paginate @reports, :param_name => :reports_page, :views_prefix => 'ish_manager'
14
-
14
+
15
15
  - @reports.each do |report|
16
16
  .card
17
17
  .card-content
@@ -20,7 +20,7 @@
20
20
  - if report.is_public
21
21
  %i.material-icons visibility
22
22
  - else
23
- %i.material-icons visibility off
23
+ %i.material-icons visibility_off
24
24
  = link_to report.name, report_path( report )
25
25
  %br
26
26
  .gray
@@ -31,6 +31,6 @@
31
31
  = pp_date report.created_at
32
32
  - if report.photo
33
33
  = image_tag report.photo.photo.url :thumb
34
-
34
+
35
35
  = paginate @reports, :param_name => :reports_page, :views_prefix => 'ish_manager'
36
-
36
+
@@ -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
@@ -60,6 +82,7 @@ namespace :ish_manager do
60
82
  end
61
83
  end
62
84
 
85
+ =begin
63
86
  desc 'yahoo-watch the stocks'
64
87
  task :stockwatcher => :environment do
65
88
  watcher = YahooStockwatcher.new
@@ -69,5 +92,6 @@ namespace :ish_manager do
69
92
  sleep 60 # seconds
70
93
  end
71
94
  end
95
+ =end
72
96
 
73
97
  end
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.237
4
+ version: 0.1.8.242
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-27 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
-