Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Web app for indexing OpenFrameworks addons
Ruby JavaScript HTML CSS CoffeeScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app
bin
config
db
lib
log
public
test
vendor/assets
.gitignore
Gemfile
Gemfile.lock
Procfile
Rakefile
Readme.md
config.ru

Readme.md

ofxAddons

The central place to discover openFrameworks addons.

Running app locally

Prerequisites

  1. Ruby 2.1.3 or greater
  2. Bundler
  3. PostgreSQL 9.x (recommend using homebrew or mac ports to install)
  4. Heroku Toolbelt

Setup

  1. Clone the repository:

    $ git clone https://github.com/atduskgreg/ofxaddons.com

  2. Change directories in to the cloned repository:

    $ cd ofxaddons.com

  3. Install the gems dependencies

    $ bundle install

  4. Set up the database.

    You have two basic options: start with an empty database, or grab a backup from heroku.

    Start with an empty database

    $ rake db:setup
    

    Copy the production database to your local machine

    WARNING: the database ofxaddons must not exist locally before you do this!

    $ heroku login
    
    $ rake db:drop
    
    $ heroku pg:pull DATABASE_URL ofxaddons --app ofxaddons-cedar
    
    $ rake db:migrate
    
  5. Launch the server:

    $ foreman start

    You should now be able to navigate to load the web site at http://localhost:5000

Crawling

API Keys

If you want to avoid rate limiting (hint: you do) with the Github API then you need to register a new application and get some API keys.

API keys are strictly optional. If you don't use them, the app will run fine, but you'll be subject to rate limiting. After you make a few thousand requests Github will start rejecting your requests.

Once you've got your API keys, there are several ways to set up your environment, but here's one way using Foreman.

  1. Create a .env file in the repository root

    $ touch .env

    WARNING: Never check in the .env file. It will screw up the production environment.

  2. Add your API key and secret to the file:

    GITHUB_CLIENT_ID=xxxxxxxxxxxxxxxxxxxx GITHUB_CLIENT_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

  3. Restart Foreman

Further reading on using foreman for config vars.

Running a Crawl

Crawling and updating is all run through a series of rake tasks defined in Rakefile. To run the master task:

$ bundle exec rake cron
Something went wrong with that request. Please try again.