diff --git a/Procfile.dev b/Procfile.dev index b21e745..e8fbe3c 100644 --- a/Procfile.dev +++ b/Procfile.dev @@ -1,3 +1,3 @@ -web: TERMINAL_PREFIX=15 RUBY_DEBUG_OPEN=true bundle exec -- rails server --port "${RAILS_PORT:-7500}" +web: RUBY_DEBUG_OPEN=true bundle exec -- rails server --port "${RAILS_PORT:-7500}" css: BROWSERSLIST_IGNORE_OLD_DATA=true bundle exec -- rails tailwindcss:watch diff --git a/TODO.md b/TODO.md index b7fafa2..a23a33a 100644 --- a/TODO.md +++ b/TODO.md @@ -2,9 +2,6 @@ TODO ==== * [ ] Minitest -* [ ] Formatter - * [x] wrap warning containing \n - * [ ] "\e[0;35mhello".length => 12 instead of 5! * [ ] Tailwind * [ ] copy TailAdmin (or WindMill) layout * [ ] https://demo.tailadmin.com/crm @@ -16,6 +13,7 @@ TODO * [ ] smart filter search bar * [ ] build auto-release notes based from TODO and New Notes * [ ] semver_git_tag compatible +* [ ] Use hotwire_livereload instead of rails_live_reload * [ ] Ansi Formatter * [ ] fix: ``` @@ -25,4 +23,8 @@ TODO * `prefix` Completed should use `final` New Notes ---------- \ No newline at end of file +--------- + +* [x] Formatter + * [x] wrap warning containing \n + * [x] "\e[0;35mhello".length => 12 instead of 5! \ No newline at end of file diff --git a/app/controllers/scores_controller.rb b/app/controllers/scores_controller.rb index 8a9a8fc..b722272 100644 --- a/app/controllers/scores_controller.rb +++ b/app/controllers/scores_controller.rb @@ -46,7 +46,9 @@ class ScoresController < ApplicationController end # GET /scores/1 - def show; end + def show + logger.info(Rails.application.routes.url_helpers.root_url) + end # GET /scores/new def new diff --git a/config/environments/development.rb b/config/environments/development.rb index 3b7ab9e..b7c97c5 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -91,4 +91,8 @@ Rails.application.configure do # rubocop:disable Metrics/BlockLength # config.semantic_logger.add_appender(io: $stdout, # formatter: BasicFormatter.new, # filter: BasicFormatter::EXCLUDE_LAMBDA) + # + + routes.default_url_options[:host] = '127.0.0.1' + routes.default_url_options[:port] = ARGV[0] == '--port' ? ARGV[1] : 3000 # ie: Procfile.dev first two arguments end diff --git a/lib/formatters/ansi_formatter.rb b/lib/formatters/ansi_formatter.rb index 138c010..b288b55 100644 --- a/lib/formatters/ansi_formatter.rb +++ b/lib/formatters/ansi_formatter.rb @@ -85,7 +85,9 @@ class AnsiFormatter < SemanticLogger::Formatters::Color log.message = two_captures_last_as_bold(log.message, /(^Processing by \w*#\w* as )(.*)/) end elsif log.message =~ /Redirected/ - log.message = two_captures_last_as_bold(log.message, /^(Redirected to )http:.*:\d+(.*)/) + log.level = :debug + log.message = two_captures_last_as_bold(log.message, + /^(Redirected to )#{Rails.application.routes.url_helpers.root_url.chop}(.*)/) end elsif log.exception log.dimensions = AnsiDimensions.new(