Browse Source

dotenv

main
pvincent 5 months ago
parent
commit
6f2bd11f63
  1. 1
      Gemfile
  2. 5
      Gemfile.lock
  3. 2
      config/database.yml
  4. 5
      lib/formatters/ansi_formatter.rb

1
Gemfile

@ -16,6 +16,7 @@ gem 'tailwindcss-rails'
group :development do
gem 'amazing_print'
gem 'debug'
gem 'dotenv-rails'
gem 'error_highlight'
gem 'htmlbeautifier'
gem 'rails_live_reload'

5
Gemfile.lock

@ -89,6 +89,10 @@ GEM
debug (1.9.2)
irb (~> 1.10)
reline (>= 0.3.8)
dotenv (3.1.2)
dotenv-rails (3.1.2)
dotenv (= 3.1.2)
railties (>= 6.1)
drb (2.2.1)
error_highlight (0.6.0)
erubi (1.12.0)
@ -308,6 +312,7 @@ DEPENDENCIES
amazing_print
bootsnap
debug
dotenv-rails
error_highlight
htmlbeautifier
importmap-rails

2
config/database.yml

@ -1,7 +1,7 @@
---
default: &default
host: <%= ENV.include?('container_hostname')? 'ct1.lxd':'localhost' %> # MIAOU awareness
host: <%= ENV.fetch("DB_HOST") { 'localhost' } %>
database: &db_name easy-going-rails
user: *db_name
password: *db_name

5
lib/formatters/ansi_formatter.rb

@ -30,7 +30,6 @@ class AnsiFormatter < SemanticLogger::Formatters::Color
end
def call(log, logger)
# puts caller_locations(1, 15)
log = alter(log)
self.log = log
@ -41,7 +40,9 @@ class AnsiFormatter < SemanticLogger::Formatters::Color
end
def reject(log)
true if log.name == 'ActionView::Base' && log.message.starts_with?(' Rendering')
return true if log.name == 'ActionView::Base' && log.message.starts_with?(' Rendering')
true if log.name == 'Rails' && log.message.starts_with?('Loaded')
end
private

Loading…
Cancel
Save