Skip to content

shokai/sinatra-github-oauth-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sinatra GitHub OAuth Sample

Sinatra and OAuth Sample with GitHub API v3

Demo

Requirements

  • Ruby 1.8.7 ~ 2.0.0
  • memcached
  • GitHub

Install Dependencies

% brew install memcached
% gem install bundler
% bundle install

Config

GitHub Config

Register new Application on GitHub

% export GITHUB_APP_ID=abcd1234asdf
% export GITHUB_APP_SECRET=asdf135hujikohujiko71sdfcxvoip

Session Config

% export SESSION_SECRET=foobar1234

Run

start memcache

% memcached -vv -p 11211 -U 11211

set HTTP port 5000

% bundle exec rackup config.ru -p 5000

Deploy on Heroku

% heroku create --stack cedar YOUR-APP-NAME
% heroku addons:add memcachier:dev
% heroku config:set GITHUB_APP_ID=abcd1234asdf
% heroku config:set GITHUB_APP_SECRET=asdf135hujikohujiko71sdfcxvoip
% heroku config:set SESSION_SECRET=foobar1234
% git push heroku master
% heroku open

About

Sinatra and OAuth Sample with GitHub API v3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages