Skip to content

Commit

Permalink
Add bullet gem and config.
Browse files Browse the repository at this point in the history
  • Loading branch information
marcel-strzalka committed Oct 6, 2022
1 parent b0cae26 commit 22e117d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ group :development do

# Static analyzers, linters and similar
gem 'brakeman', '~> 5.3.1'
gem 'bullet', '~> 7.0.3'
gem 'lefthook', '~> 1.1.1'
gem 'rubocop', '~> 1.36.0'
gem 'rubocop-rails', '~> 2.16.0'
Expand Down
5 changes: 5 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ GEM
msgpack (~> 1.2)
brakeman (5.3.1)
builder (3.2.4)
bullet (7.0.3)
activesupport (>= 3.0.0)
uniform_notifier (~> 1.11)
concurrent-ruby (1.1.10)
crass (1.0.6)
debug (1.6.2)
Expand Down Expand Up @@ -214,6 +217,7 @@ GEM
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
unicode-display_width (2.3.0)
uniform_notifier (1.16.0)
warden (1.2.9)
rack (>= 2.0.9)
web-console (4.2.0)
Expand All @@ -233,6 +237,7 @@ PLATFORMS
DEPENDENCIES
bootsnap
brakeman (~> 5.3.1)
bullet (~> 7.0.3)
debug
devise (~> 4.8.1)
importmap-rails
Expand Down
9 changes: 9 additions & 0 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
require "active_support/core_ext/integer/time"

Rails.application.configure do
config.after_initialize do
Bullet.enable = true
Bullet.alert = true
Bullet.bullet_logger = true
Bullet.console = true
Bullet.rails_logger = true
Bullet.add_footer = true
end

# Settings specified here will take precedence over those in config/application.rb.

# In the development environment your application's code is reloaded any time
Expand Down
6 changes: 6 additions & 0 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
# and recreated between test runs. Don't rely on the data there!

Rails.application.configure do
config.after_initialize do
Bullet.enable = true
Bullet.bullet_logger = true
Bullet.raise = true # raise an error if n+1 query occurs
end

# Settings specified here will take precedence over those in config/application.rb.

# Turn false under Spring and add config.action_view.cache_template_loading = true.
Expand Down

0 comments on commit 22e117d

Please sign in to comment.