ish_manager 0.1.8.238 → 0.1.8.243

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: 678738da741a1dd3b80386026afeecb72a935cf1479837968bf7feb8f49ab4c9
4
- data.tar.gz: 129812b72fc5e1702facef8ded762b2fae8f34733a270523fd167de689542f41
3
+ metadata.gz: 9ea7280723a81047ae129c4bc0de3b3c3c0329aeb69f10c260ca8a9f5a159d27
4
+ data.tar.gz: 9319e58a879bc865678839607091684c5a529f2ab62788cbedc904ab14bc5e70
5
5
  SHA512:
6
- metadata.gz: 15f77d1da86334e408582f06714722eef70fd78cb79cf6f62622d5b90361cb4c70e3f878926b69e2e93f437baa28f351cf1eaa8a3f6cd85132edfb45f042524b
7
- data.tar.gz: ea92e1dd39be754881e73d606734247d78dbd58abb0d80c920864da8018dd6ff74132938d25b7a323d36368ef7edc0bc8fd83631d62bfc61d80415c1e76943aa
6
+ metadata.gz: d4ef061a68c19be3792a144506adbc1df91e8cfcf0e234ad3a7476391687a1baf34f46e960bbc7c0df03319b24abfb0a451e7d6b6c2155429363742350d95a84
7
+ data.tar.gz: d4049361f28d18b007f4fb042243d4b612e30bba6d81f75223874b76c64f2790147e7abd6fd77f8a4598e23e2a117f63815761d3c510526ad666cfd36713540e
@@ -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 2, 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.238
4
+ version: 0.1.8.243
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
-