<img src=“https://travis-ci.org/codesy/patronage.png” />
<img src=“https://coveralls.io/repos/codesy/patronage/badge.png” alt=“Coverage Status” />
-
Install dependencies
$ sudo apt-get install libpq-dev (If installing a production environment) You will also need a javascript environment (like NodeJS) supported by execjs
-
Install rvm
$ \curl -L https://get.rvm.io | bash -s stable --rails
-
Clone your fork
$ git clone [email protected]:YOUR_USERNAME/patronage.git
-
Run bundler to install dependencies
$ cd patronage $ bundle
-
Run db migrations for tests
$ rake db:migrate db:test:prepare
-
Run tests
$ rspec spec
-
Register your app with github at github.com/settings/applications/new
Application name: patronage-dev Homepage URL: https://localhost:3000 Authorization callback URL: https://localhost:3000/users/auth/github/callback
-
Generate a signing key with any passphrase
$ openssl genrsa -des3 -out server.orig.key 2048
-
Convert the signing key to an RSA key, removing the passphrase
$ openssl rsa -in server.orig.key -out server.key
-
Create the certificate request. Set “common name” to ‘localhost`:
$ openssl req -new -key server.key -out server.csr
-
Create a self-signed certificate
$ openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
-
Create an executable script similar to the following:
$ cat > bin/runserver << EOF #!/bin/bash export GITHUB_OAUTH_CLIENT_ID=your_oauth_client_id export GITHUB_OAUTH_CLIENT_SECRET=your_oauth_client_secret bundle exec thin start –ssl –ssl-verify –ssl-key-file server.key –ssl-cert-file server.crt EOF
$ chmod 700 bin/runserver
-
Launch dev server
$ bin/runserver
-
Sign in to your dev server with your github account
-
???
-
Profit!