Skip to content

alex-kovshovik/the-anchorman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Code Climate Test Coverage

Take Dat Shit

This is a Rails application inspired by the long toilet wait times and uncertainty about taking a crap on a certain floor in some building at some state on the continental United States.

As Brits often say:

Everybody poops... but the queen.

Installation instructions

  1. Install Postgres
  2. Install Ruby 2.2.2
  3. Install bundler
  4. Run "bundle"
  5. Run "rake db:create"
  6. Run "rake db:migrate"
  7. Run "rake db:seed" to seed the database with the default group, user and a toilet.
  8. Run "rails s"
  9. Go take dat shit.

Research queries

To calculate the length of all "transactions", run the following SQL:

select
  id, event,
  case when event = 'available' then to_char(created_at - lag(created_at) over (order by created_at), 'MI:SS') else '' end as shitting,
  case when event = 'occupied' then to_char(created_at - lag(created_at) over (order by created_at), 'HH24:MI:SS') else '' end as idling
from toilet_transactions
where toilet_id = 1
and created_at > '2015-08-20 14:00:00';

License

WTFPL

About

Small Rails app to make toilet reservations for #2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published