From b672f01816686b4e08e7d0c5144cf5d430b3b53a Mon Sep 17 00:00:00 2001 From: Antibiotic Date: Mon, 11 Mar 2024 00:30:26 +0300 Subject: [PATCH] add bullet --- Gemfile | 1 + Gemfile.lock | 10 ++++++++++ config/environments/development.rb | 10 ++++++++++ config/environments/test.rb | 6 ++++++ 4 files changed, 27 insertions(+) diff --git a/Gemfile b/Gemfile index a85fd4e0f..7a91981e9 100644 --- a/Gemfile +++ b/Gemfile @@ -81,6 +81,7 @@ group :development, :staging, :test do end group :development, :test do + gem 'bullet' # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug', platforms: %i[mri mingw x64_mingw] # Use sqlite3 as the database for Active Record diff --git a/Gemfile.lock b/Gemfile.lock index cacde31cc..6a9a0c557 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -108,6 +108,9 @@ GEM popper_js (>= 2.11.8, < 3) browser (5.3.1) builder (3.2.4) + bullet (7.1.6) + activesupport (>= 3.0.0) + uniform_notifier (~> 1.11) byebug (11.1.3) capybara (3.40.0) addressable @@ -280,6 +283,8 @@ GEM net-smtp (0.4.0.1) net-protocol nio4r (2.7.0) + nokogiri (1.16.2-aarch64-linux) + racc (~> 1.4) nokogiri (1.16.2-arm64-darwin) racc (~> 1.4) nokogiri (1.16.2-x86_64-darwin) @@ -499,6 +504,7 @@ GEM sorbet (0.5.11284) sorbet-static (= 0.5.11284) sorbet-runtime (0.5.11284) + sorbet-static (0.5.11284-aarch64-linux) sorbet-static (0.5.11284-universal-darwin) sorbet-static (0.5.11284-x86_64-linux) spring (4.1.3) @@ -509,6 +515,7 @@ GEM actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) + sqlite3 (1.7.2-aarch64-linux) sqlite3 (1.7.2-arm64-darwin) sqlite3 (1.7.2-x86_64-darwin) sqlite3 (1.7.2-x86_64-linux) @@ -523,6 +530,7 @@ GEM tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (2.5.0) + uniform_notifier (1.16.0) uri (0.13.0) valid_email2 (5.2.1) activemodel (>= 3.2) @@ -556,6 +564,7 @@ GEM zeitwerk (2.6.13) PLATFORMS + aarch64-linux arm64-darwin-22 arm64-darwin-23 x86_64-darwin-21 @@ -570,6 +579,7 @@ DEPENDENCIES bootsnap bootstrap browser + bullet byebug capybara cocoon diff --git a/config/environments/development.rb b/config/environments/development.rb index e5fe9ce05..66cf45b40 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -50,6 +50,16 @@ # Highlight code that triggered database queries in logs. config.active_record.verbose_query_logs = true + config.after_initialize do + Bullet.enable = true + Bullet.alert = false + Bullet.bullet_logger = true + Bullet.console = false + Bullet.rails_logger = true + Bullet.sentry = true + Bullet.add_footer = false + end + # Debug mode disables concatenation and preprocessing of assets. # This option may cause significant delays in view rendering with a large # number of complex assets. diff --git a/config/environments/test.rb b/config/environments/test.rb index eb36dfc50..554ac024b 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -8,6 +8,12 @@ Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. + config.after_initialize do + Bullet.enable = true + Bullet.bullet_logger = true + Bullet.raise = true + end + config.cache_classes = false # Do not eager load code on boot. This avoids loading your whole application