Skip to content
No description or website provided.
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
tasks
test
MIT-LICENSE
README.markdown
Rakefile
init.rb
install.rb
uninstall.rb

README.markdown

AppStats

A Sinatra-based plugin template for displaying a metrics dashboard in Rails applications.

This plugin provides a starting point for creating a dashboard to view important metrics about your application, inspired by other metrics dashboards.

In its current form, it is just a demo that assumes you are using Authlogic with a User model and shows some basic information about recent sign ups and, if your User model has a last_request_at attribute, information about active users. Edit the plugin as necessary for your application.

Installation

$ script/plugin install git://github.com/alphabetum/app_stats.git

Add the following to config/environment.rb

config.middleware.use "AppStats::Application"

AppStats depends on Haml and Sinatra:

# config/environment.rb
...
config.gem 'haml'
config.gem 'sinatra'
...

or if using Bundler

# Gemfile
gem 'haml'
gem 'sinatra'

Last, define a User#can_view_app_stats? instance method that returns a boolean indicating whether the user can view stats or not.

If you want to be able to reload the plugin's templates as you edit them, add the following to you development environment:

# config/environments/development.rb
config.reload_plugins = true

Usage

Run script/server and point your browser to http://localhost:3000/__app_stats

Copyright (c) 2010 William Melody, released under the MIT license

Something went wrong with that request. Please try again.