This is the source code behind Opal or Not. Read more about it in the FAQ.
Written with Sinatra because the application is essentially stateless, the fare comparison is done with a single backend call. The Postgres DB is used only for keeping statistics, and can be disabled by removing the call to .record from app.rb.
The following are what I develop with, but older/newer versions may well work.
- Ruby 2.1
- Postgres 9.3
- Bundler
Designed for easy hosting with Heroku. See the Rakefile for tests, running locally, deploying, database preparation etc.
This is licensed under GNU Affero GPL. Non-lawyerly TL;DR: You're welcome to use this as you wish, but if you modify this source code and you put your modified version up on the Internet, you have to make your modified source code available for download as well. (A public fork on Github will do nicely.)