no production ready yet

This commit is contained in:
pvincent
2023-05-29 21:14:13 +04:00
parent 4bd632cdb4
commit 49352e2d92
6 changed files with 25 additions and 14 deletions
+3 -1
View File
@@ -3,6 +3,8 @@
"rebornix.ruby", "rebornix.ruby",
"bung87.rails", "bung87.rails",
"aliariff.vscode-erb-beautify", "aliariff.vscode-erb-beautify",
"yzhang.markdown-all-in-one" "yzhang.markdown-all-in-one",
"arturock.gitstash",
"bradlc.vscode-tailwindcss"
] ]
} }
+2 -1
View File
@@ -8,13 +8,14 @@
* [x] Semantic Logging (efficient for dark theme) * [x] Semantic Logging (efficient for dark theme)
* [x] Max duration to complete in order to prevent long action * [x] Max duration to complete in order to prevent long action
* [x] tailwindcss-rails * [x] tailwindcss-rails
* [ ] PRODUCTION ready, not yet!!!
## Interesting Gems to try out ## Interesting Gems to try out
* [ ] ViewComponent ??
* [ ] Devise Vs Authentication-Zero * [ ] Devise Vs Authentication-Zero
* [ ] Devise * [ ] Devise
* [ ] **Noticed** * [ ] **Noticed**
* [ ] CANCANCAN * [ ] CANCANCAN
* [ ] ViewComponent ??
* [ ] AASM - State machines * [ ] AASM - State machines
* [ ] SimpleForm * [ ] SimpleForm
@@ -6,7 +6,6 @@ class ApplicationController < ActionController::Base
begin begin
action.call action.call
ensure ensure
ActionView::Base.logger.level = :info
duration = Process.clock_gettime(Process::CLOCK_MONOTONIC) - start duration = Process.clock_gettime(Process::CLOCK_MONOTONIC) - start
if duration > MAX_DURATION_TO_COMPLETE_IN_SECONDS if duration > MAX_DURATION_TO_COMPLETE_IN_SECONDS
logger.warn("processing took too long to complete, please review your code as asynchronous job!", duration: duration * 1_000) logger.warn("processing took too long to complete, please review your code as asynchronous job!", duration: duration * 1_000)
+8 -5
View File
@@ -5,11 +5,14 @@ class MainController < ApplicationController
def about def about
logger.debug "some debugging info" logger.debug "some debugging info"
logger.info "line1\nline2\nline3"
logger.warn "a warning"
logger.error "an error"
raise "this is an error" logger.info "relevant information"
sleep 3 logger.info "multiline\nline2\nline3"
logger.warn "a warning"
# logger.error "an error"
# raise "this is an error"
# sleep 3
end end
end end
+1 -1
View File
@@ -10,7 +10,7 @@
<%= javascript_importmap_tags %> <%= javascript_importmap_tags %>
</head> </head>
<body> <body>
<nav> <nav >
<%= link_to 'home', :root %> <%= link_to 'home', :root %>
<%= link_to 'about', main_about_path %> <%= link_to 'about', main_about_path %>
</nav> </nav>
+11 -5
View File
@@ -1,5 +1,11 @@
<h1>Main#home</h1> <div class="p-5">
<p>Find me in app/views/main/home.html.erb</p> <h1>Main#home</h1>
<h1 class="text-3xl font-bold underline text-red-400"> <p>Find me in app/views/main/home.html.erb</p>
Hello world! <h1 class="text-5xl font-bold underline text-yellow-400">
</h1> Hello world!
</h1>
<div class="bg-orange-300">
coucou
<%= @value %>
</div>
</div>