Jump To …

Rstat.us Code Walkthrough

Welcome to rstat.us' code!

Rstat.us uses Ruby on Rails 3.2. It follows the structure of a standard Rails app, so if you have not used Rails before, you may want to take a look at the Getting Started Rails Guide. Or feel free to dive in to rstat.us!

You can skip to the documentation for any individual code file that has documentation by using the "Jump to..." menu in the upper right of any documentation page.

This page is an index of the directories in rstat.us' repository with a quick explanation of what each directory is responsible for.

Most of the code for the logic of rstat.us lives in the app directory. All of the files in the Jump To... menu are in here. There's so much that the app directory gets its own index page!

The config directory holds a lot of settings and configuration. A lot of this is standard Rails configuration. You probably won't have to change very much in here.


The docs directory is where this file lives! It's also where the documentation generated from the code ends up after you run rake rocco.


The lib directory contains classes that perform functions that are independent of Rails. It also contains a directory tasks that contains all the rstat.us-specific rake task definitions.


Rails creates log files when you run a server or the tests. The log directory is where they end up. .log files in here are ignored by git.


The public directory is where compiled assets end up. It also holds a few error pages, the site favicon, and the robots.txt.


The script directory just holds the script for the rails command. See the Rails Guide on command line tools for more information.


Tests are a very important part of rstat.us! The test directory is full of them. See the test directory index for more information.

The tmp directory contains temporary files like cache or capybara screenshots from the save_and_open_page method. Everything in here is ignored by git.