ish_manager 0.1.8.295 → 0.1.8.299

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: 710c42d5d4473bd16149b60411ed55e98aaed91ced010d090acd6c01a1023fa9
4
- data.tar.gz: 554ea35404e17e8b0a430c9cc6ed6ba360cdee0a3e9347a87ab142e576093e38
3
+ metadata.gz: a5b5503175831bc1ad3152b7ea208b2961ef8be8242d5a32bcf240a75e30b9b4
4
+ data.tar.gz: bdeba5e19637f4db67738be44cd8dc3ca6426aafd35fe6744e5d27d1b4f06888
5
5
  SHA512:
6
- metadata.gz: b33c41adf0b41179150e6f0e22f91a2fed188c48e6140962a0b6a999c33124de002ff4e6465406f88374207529a7e0b5d91cdcba9c2429e53c9d1675c8b635e0
7
- data.tar.gz: a90c79990151ac36beaeab25012473698e170eb763074b480af38cf798cad029e9486d3c68e856d6675431c49b5bf7a706d67f29f79c1bc0dcd1ea74348f2c86
6
+ metadata.gz: 7e53ea088e6ce4b5f154d7c0c6a2a6b9b07b747de6b751ce257a5cfdcb4344eb71e721572100481ec184fcec2c18e496b49df8430de0af9374cfef81c46e8c06
7
+ data.tar.gz: ee1bf5e5a30761cc854e5057fd4045e84189ca6f65211a94ec0e0c93277c6801e3577df5c677e63cdcfddd58a80e59538b3ccd0adfe590c480d1e952d905d476
@@ -91,7 +91,7 @@ class IshManager::VideosController < IshManager::ApplicationController
91
91
  end
92
92
 
93
93
  def show
94
- @video = Video.unscoped.where( :youtube_id => params[:youtube_id] ).first
94
+ @video = Video.unscoped.where( :youtube_id => params[:youtube_id] ).first if params[:youtube_id].present?
95
95
  @video ||= Video.unscoped.find params[:id]
96
96
  authorize! :show, @video
97
97
 
@@ -79,6 +79,18 @@
79
79
  description.collapsible: bool
80
80
  map_panel_type: "Equirectangular" |
81
81
  "MapPanel" | "MapPanelNoZoom" |
82
- "ThreePanelV1" | "ThreePanelV4"
82
+ "ThreePanelV1" | "ThreePanelV4" |
83
+ "GoogleMaps"
84
+ .row
85
+ .col.s6
86
+ .google-maps.row
87
+ .col.s4
88
+ = f.label "x, y"
89
+ .col.s4
90
+ = f.text_field :x
91
+ .col.s4
92
+ = f.text_field :y
93
+ .col.s6
94
+ unused
83
95
  .actions
84
96
  = f.submit 'Save'
@@ -81,5 +81,17 @@
81
81
  = f.check_box :is_active
82
82
  = f.label :is_active
83
83
  .col.s6
84
- .actions
85
- = f.submit 'Save'
84
+ unused
85
+ .row
86
+ .col.s6
87
+ .google-maps.row
88
+ .col.s4
89
+ = f.label "x, y"
90
+ .col.s4
91
+ = f.text_field :x
92
+ .col.s4
93
+ = f.text_field :y
94
+ .col.s6
95
+ unused
96
+ .actions
97
+ = f.submit 'Save'
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.295
4
+ version: 0.1.8.299
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-20 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