Furia
A tool for logging SQL requests in a part of the code
Installation
Add this line to your application's Gemfile:
gem 'furia'Create and run the migration:
bundle exec rake furia:install:migrations
bundle exec rake db:migrateMount the engine in your routes.rb:
MyApp::Application.routes.draw do
mount Furia::Engine => "/furia" unless Rails.env.production?
endUsage
Just wrap the code you want to monitor with the Furia.wrap:
Furia.wrap("users") do
User.all
endIt also supports nested scopes:
Furia.wrap("user") do
u = User.first
comments =
Furia.wrap("comments") do
u.comments
end
endThen open http://localhost:3000/furia and you'll see all the samples there.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Open a new Pull Request