Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
This branch is 115 commits ahead of bf4:master.

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Pair Program With Me - Matcher

A sinatra app with github auth for Avdi

In a nutshell

As an Avdi
I want to promote pair programming
So that hackers will be happier

When I distribute cards at a conference which say:

Find your pair!
Go to:
Enter: ABC123

And every card has one identical twin
When Jane, the first recipient, follows the directions on her card
And she logs in with Github
And she enters her email address
Then she is told:

Your pair hasn't signed in yet. Keep your fingers crossed!"

When the second recipient, Bob, follows the directions on his card
Then he is told:

You've been matched with Jane! Click here to email her!


Why match based on fixed codes? Why not just randomly match people as they arrive?


  1. It's a fun twist; and
  2. It means if you don't sign in, someone out there doesn't have a pair. And who wants to leave their pair in the lurch?! Guilt FTW!


Check the issues first!

  • add pagination to code listing (/codes route)
  • fix deprecation warnings from github auth
  • anything else you can think of:
    • security
    • design
    • letting you know when your 'pair' signed in
    • letting an admin view a list of paired users and codes
    • maybe leave messages for avdi in some queue...
    • add admin links (need to create an admin user, user roles) e.g. to create codes etc
    • UX
    • analytics?


You'll want to have two github applications, one for development, and one for production.

For each app, Make a note of the client ID and secret.

For production, enter your application URL http://<domain>/ and set the callback URL should be http://<domain>/auth/github/callback.

For development, set your application URL to http://localhost/ and set your callback URL to http://localhost:9393/auth/github/callback

For development

Install the gems:


Then set up your the application config and database settings

./ setup

Update the GITHUB keys in your config/application.yml

Finally start the web server using thin:

./ start

If you want to daemonize your dev server

./ start -d
./ stop


Migrate your test database

RACK_ENV=test rake db:migrate

Run rspec


Deploying to heroku (production)

heroku addons:add heroku-postgresql:dev
heroku config:set GITHUB_CLIENT_ID="<from GH>" GITHUB_CLIENT_SECRET="<from GH>"
git push heroku master
heroku run rake db:migrate


Ask Avdi


No releases published


No packages published


  • Ruby 98.3%
  • Shell 1.7%