theodi / git-data-viewer

A viewer for Open Data sets stored in git repositories. In progress.
http://git-viewer.labs.theodi.org/
MIT License
22 stars 1 forks source link

Build Status Dependency Status Coverage Status Code Climate License Badges

Git Data Viewer

An experiment in displaying Open Data stored in Git in a nice way for non-developers.

Relies on a loading metadata from a DataPackage file contained in the repository.

For more details, see the sample repository.

Requirements

This uses Ruby 2 and Rails 4.0.0.

License

This code is open source under the MIT license. See the LICENSE.md file for full details.

Environment

The following environment variables should be set in a .env file in order to use this app.

GITHUB_OAUTH_TOKEN='your-oauth-token-for-your-app'

To get this token, create an application in Github/settings/applications and follow these instructions in irb:

require 'github_api'
github = Github.new :client_id => '...', :client_secret => '...'
github.authorize_url :redirect_uri => '...', :scope => 'repo'

Visit the URL it gives you. When you authorize it, it will send you to your redirect_uri with a token in the query string. Use this below:

token = github.get_token('<token from query string>')
puts token.token

This is the OAuth token you need in your environment.