Project

furia

0.0
A long-lived project that still receives updates
An app for logging and investigating SQL queries
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

~> 4.2.11
 Project Readme

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:migrate

Mount the engine in your routes.rb:

MyApp::Application.routes.draw do
  mount Furia::Engine => "/furia" unless Rails.env.production?
end

Usage

Just wrap the code you want to monitor with the Furia.wrap:

Furia.wrap("users") do
  User.all
end

It also supports nested scopes:

Furia.wrap("user") do
  u = User.first

  comments =
    Furia.wrap("comments") do
      u.comments
    end
end

Then open http://localhost:3000/furia and you'll see all the samples there.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Open a new Pull Request