From 49352e2d9258299868df7d5556b17907c2e7ef8d Mon Sep 17 00:00:00 2001 From: pvincent Date: Mon, 29 May 2023 21:14:13 +0400 Subject: [PATCH] no production ready yet --- .vscode/extensions.json | 4 +++- README.md | 3 ++- app/controllers/application_controller.rb | 1 - app/controllers/main_controller.rb | 11 +++++++---- app/views/layouts/application.html.erb | 2 +- app/views/main/home.html.erb | 16 +++++++++++----- 6 files changed, 24 insertions(+), 13 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index e25aa52..5213159 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -3,6 +3,8 @@ "rebornix.ruby", "bung87.rails", "aliariff.vscode-erb-beautify", - "yzhang.markdown-all-in-one" + "yzhang.markdown-all-in-one", + "arturock.gitstash", + "bradlc.vscode-tailwindcss" ] } \ No newline at end of file diff --git a/README.md b/README.md index 9a8c89b..f1be400 100644 --- a/README.md +++ b/README.md @@ -8,13 +8,14 @@ * [x] Semantic Logging (efficient for dark theme) * [x] Max duration to complete in order to prevent long action * [x] tailwindcss-rails +* [ ] PRODUCTION ready, not yet!!! ## Interesting Gems to try out -* [ ] ViewComponent ?? * [ ] Devise Vs Authentication-Zero * [ ] Devise * [ ] **Noticed** * [ ] CANCANCAN +* [ ] ViewComponent ?? * [ ] AASM - State machines * [ ] SimpleForm diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 1e9b560..e0f9ee7 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -6,7 +6,6 @@ class ApplicationController < ActionController::Base begin action.call ensure - ActionView::Base.logger.level = :info duration = Process.clock_gettime(Process::CLOCK_MONOTONIC) - start 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) diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb index 57e99fd..0607a46 100644 --- a/app/controllers/main_controller.rb +++ b/app/controllers/main_controller.rb @@ -5,11 +5,14 @@ class MainController < ApplicationController def about logger.debug "some debugging info" - logger.info "line1\nline2\nline3" + + logger.info "relevant information" + logger.info "multiline\nline2\nline3" + logger.warn "a warning" - logger.error "an error" + # logger.error "an error" - raise "this is an error" - sleep 3 + # raise "this is an error" + # sleep 3 end end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index a20b992..fc13620 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -10,7 +10,7 @@ <%= javascript_importmap_tags %> -