Browse Source

dotenv

main
pvincent 3 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 group :development do
gem 'amazing_print' gem 'amazing_print'
gem 'debug' gem 'debug'
gem 'dotenv-rails'
gem 'error_highlight' gem 'error_highlight'
gem 'htmlbeautifier' gem 'htmlbeautifier'
gem 'rails_live_reload' gem 'rails_live_reload'

5
Gemfile.lock

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

2
config/database.yml

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

5
lib/formatters/ansi_formatter.rb

@ -30,7 +30,6 @@ class AnsiFormatter < SemanticLogger::Formatters::Color
end end
def call(log, logger) def call(log, logger)
# puts caller_locations(1, 15)
log = alter(log) log = alter(log)
self.log = log self.log = log
@ -41,7 +40,9 @@ class AnsiFormatter < SemanticLogger::Formatters::Color
end end
def reject(log) 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 end
private private

Loading…
Cancel
Save