added bullet for finding database optimizations

This commit is contained in:
Priit Tamboom 2014-10-09 17:39:54 +03:00
parent 825e4bc5c1
commit 7c748884f3
4 changed files with 24 additions and 0 deletions

View file

@ -128,4 +128,7 @@ group :development, :test do
# For code review
gem 'simplecov', '~> 0.9.1', :require => false
# for finding database optimizations
gem 'bullet', '~> 4.14.0'
end

View file

@ -37,6 +37,9 @@ GEM
bootstrap-sass (3.2.0.2)
sass (~> 3.2)
builder (3.2.2)
bullet (4.14.0)
activesupport (>= 3.0.0)
uniform_notifier (>= 1.6.0)
cancan (1.6.10)
capybara (2.4.1)
mime-types (>= 1.16)
@ -267,6 +270,7 @@ GEM
kgio (~> 2.6)
rack
raindrops (~> 0.7)
uniform_notifier (1.6.2)
uuidtools (2.1.5)
warden (1.2.3)
rack (>= 1.0)
@ -284,6 +288,7 @@ PLATFORMS
DEPENDENCIES
bootstrap-sass (~> 3.2.0.1)
bullet (~> 4.14.0)
cancan (~> 1.6.10)
capybara (~> 2.4.1)
coffee-rails (~> 4.0.0)

View file

@ -36,4 +36,13 @@ Rails.application.configure do
# config.action_view.raise_on_missing_translations = true
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
# for finding database optimization
config.after_initialize do
Bullet.enable = true
Bullet.bullet_logger = true
Bullet.console = true
Bullet.rails_logger = true
Bullet.add_footer = true
end
end

View file

@ -36,4 +36,11 @@ Rails.application.configure do
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
# for finding database optimization
config.after_initialize do
Bullet.enable = true
Bullet.bullet_logger = true
Bullet.raise = true # raise an error if n+1 query occurs
end
end