iron_warbler 2.0.3 → 2.0.5

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: 21fb14313fb6fac805d8a6b5fa809ebf33e69910bd3af4a606adfa01e730a3f7
4
- data.tar.gz: c3dbdb60b7ca43273dd0a84a54de5cf764a27f43a6f2b854fa5fa4dcdbec9521
3
+ metadata.gz: ee44d7269a1e1932765a2577c25e5791f8d36c42061c02a4c2064cee0133020a
4
+ data.tar.gz: 502906c975878f1d179b1bce1b1a484dc8dd533b4733d5b244e32a4554232c32
5
5
  SHA512:
6
- metadata.gz: a53d3e8f3d7881bd233ea5835d895ac484dfc7e03f3fdfb80fdc14aeffea4e04b50f890605efec3601c15d0839dd7945b9cc13b9476941c46b80909911002f15
7
- data.tar.gz: e4a84ab9d23e5ff20bfbd938f62cfa8781094b2e0103ef8fb0634c4ab9e6a532f7ecef5843355662849258cbeac4d7a742b9275c6898ea944d2da61c374c313d
6
+ metadata.gz: 6dcb2bdf90e1ac9c62bb8de1ac81b25e9e792002e8c2d72ee19d5edba930819617882e707271098b92c2303e7e1fb2aafe21660e42df19bddb3ebfc5b4bccc09
7
+ data.tar.gz: edc749b0b0a325a906ff4beaee9383cc1f98e341ab4572fd9c4fa821b9d9004860afc93a8f14fb67ee8047b5d488e9d76cb2024a8a3877f81620c5fdf8f3dec3
@@ -4,27 +4,22 @@ require_dependency "iro/application_controller"
4
4
  class Iro::AlertsController < ApplicationController
5
5
  before_action :set_alert, only: [:show, :edit, :update, :destroy]
6
6
 
7
- # GET /alerts
8
7
  def index
9
- @alerts = Alert.all
8
+ @alerts = Iro::Alert.all
10
9
  end
11
10
 
12
- # GET /alerts/1
13
11
  def show
14
12
  end
15
13
 
16
- # GET /alerts/new
17
14
  def new
18
- @alert = Alert.new
15
+ @alert = Iro::Alert.new
19
16
  end
20
17
 
21
- # GET /alerts/1/edit
22
18
  def edit
23
19
  end
24
20
 
25
- # POST /alerts
26
21
  def create
27
- @alert = Alert.new(alert_params)
22
+ @alert = Iro::Alert.new(alert_params)
28
23
 
29
24
  if @alert.save
30
25
  redirect_to @alert, notice: 'Alert was successfully created.'
@@ -33,7 +28,6 @@ class Iro::AlertsController < ApplicationController
33
28
  end
34
29
  end
35
30
 
36
- # PATCH/PUT /alerts/1
37
31
  def update
38
32
  if @alert.update(alert_params)
39
33
  redirect_to @alert, notice: 'Alert was successfully updated.'
@@ -42,21 +36,23 @@ class Iro::AlertsController < ApplicationController
42
36
  end
43
37
  end
44
38
 
45
- # DELETE /alerts/1
46
39
  def destroy
47
40
  @alert.destroy
48
41
  redirect_to alerts_url, notice: 'Alert was successfully destroyed.'
49
42
  end
50
43
 
44
+ ##
45
+ ## private
46
+ ##
51
47
  private
52
- # Use callbacks to share common setup or constraints between actions.
53
- def set_alert
54
- @alert = Alert.find(params[:id])
55
- end
56
48
 
57
- # Only allow a list of trusted parameters through.
58
- def alert_params
59
- params.require(:alert).permit(:class_name, :kind, :symbol, :direction, :strike, :profile_id)
60
- end
49
+ def set_alert
50
+ @alert = Iro::Alert.find(params[:id])
51
+ end
52
+
53
+ def alert_params
54
+ params.require(:alert).permit(:class_name, :kind, :symbol, :direction, :strike, :profile_id)
55
+ end
56
+
61
57
  end
62
58
 
@@ -1,4 +1,5 @@
1
1
 
2
+
2
3
  class Iro::ApplicationController < ActionController::Base
3
4
 
4
5
  def home
@@ -0,0 +1,18 @@
1
+ !!!
2
+ %html
3
+ %head
4
+ %meta{content: "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/
5
+ %title Iron Warbler
6
+ = csrf_meta_tags
7
+ = csp_meta_tag
8
+ = stylesheet_link_tag "iro/application", media: "all"
9
+ %body
10
+ .main-menu
11
+ %h5 Main Menu
12
+ %ul
13
+ %li= link_to 'Home - Dashboard', root_path
14
+ %li= link_to 'Stock Watches', stock_watches_path
15
+ %li= link_to 'Option Watches', option_watches_path
16
+ %li Max Pain
17
+ %li= link_to 'Alerts', alerts_path
18
+ = yield
data/config/routes.rb CHANGED
@@ -1,6 +1,10 @@
1
1
  IronWarbler::Engine.routes.draw do
2
- resources :alerts
2
+
3
3
  root to: 'application#home'
4
4
 
5
+ resources :alerts
6
+ resources :option_watches
5
7
  resources :profiles
8
+ resources :stock_watches
9
+
6
10
  end
data/lib/iron_warbler.rb CHANGED
@@ -1,3 +1,6 @@
1
+
2
+ require 'haml'
3
+
1
4
  require "iro/version"
2
5
  require "iro/engine"
3
6
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iron_warbler
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev
@@ -142,7 +142,7 @@ files:
142
142
  - app/views/iro/profiles/index.html.erb
143
143
  - app/views/iro/profiles/new.html.erb
144
144
  - app/views/iro/profiles/show.html.erb
145
- - app/views/layouts/iro/application.html.erb
145
+ - app/views/layouts/iro/application.haml
146
146
  - config/routes.rb
147
147
  - db/migrate/20231210204830_create_iro_profiles.rb
148
148
  - db/migrate/20231210205837_create_iro_alerts.rb
@@ -1,15 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Iro</title>
5
- <%= csrf_meta_tags %>
6
- <%= csp_meta_tag %>
7
-
8
- <%= stylesheet_link_tag "iro/application", media: "all" %>
9
- </head>
10
- <body>
11
-
12
- <%= yield %>
13
-
14
- </body>
15
- </html>