This library provides Ruby object access to the GitHub v3 API. It’s designed to play friendly with web apps that use OAuth2 via GitHub and need to access github repositories without needing to configure or store a specific user’s GitHub credentials in the application itself.
Because this library requires an OAuth2 access token from GitHub, you will need to obtain such a token in order to do command-line testing of the library via IRB. To that end, a template sinatra application is included in the source at get_access_token_sinatra_app.rb.template
. You will need to copy that file to get_access_token_sinatra_app.rb
(drop the .template) and replace YOUR_APP_ID and YOUR_APP_SECRET with the values for a GitHub application that you can create at github.com/account/applications/new (for the URL and Callback URL options, enter localhost:4567 and localhost:4567/auth/github/callback respectively.)
Then just run ruby get_access_token_sinatra_app.rb
and point your web browser at localhost:4567 whereupon you will be prompted to authorize your app at GitHub. If you allow it, you will be presented with an access token that you can then copy and paste in where needed.
-
Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet
-
Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it
-
Fork the project
-
Start a feature/bugfix branch
-
Commit and push until you are happy with your contribution
-
Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.
-
Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
Copyright © 2011 John Wilger. See LICENSE.txt for further details.