Sha256: 1fa44f8c69a0b1ce78e0741ac70786dfea7421083de539fbe4b49591a2d5c335

Contents?: true

Size: 1.51 KB

Versions: 1

Compression:

Stored size: 1.51 KB

Contents

# OctocatNap

OctocatNap is a Ruby interface to the [GitHub API v2](http://develop.github.com/).

The source of it's power is [Weary](http://github.com/mwunsch/weary/).

## Install

	sudo gem sources -a http://gems.github.com  # If you haven't done that already
	sudo gem install mwunsch-octocatnap
	
_* Someday we can put this on Rubyforge_

### Requires

+ Weary >= 0.4.1

## Authenticating

When you instantiate OctocatNap, you can pass different types of arguments to pass your credentials to the methods.

#### Explicitly
	
	gh = OctocatNap.new("mwunsch", "my-super-secret-token")
	
or

	gh = OctocatNap.new(["mwunsch","my-super-secret-token"])
	
or

	gh = OctocatNap.new({:login => "mwunsch", :token => "my-super-secret-token"})
	
#### YAML

If you provide just one string when you instantiate, OctocatNap thinks that's the path to a file.

	gh = OctocatNap.new(File.join(File.dirname(__FILE__), '..', "config.yml"))
	
That file should look something like this:

	login: mwunsch
	token: my-super-secret-token
	
#### ~/.gitconfig

You can also get credentials from the global .gitconfig, as long as that is set up with your [GitHub credentials](http://github.com/guides/tell-git-your-user-name-and-email-address)

	gh = OctocatNap.new(true)
	
This assumes your gitconfig is in a standard place, as detailed here: http://github.com/blog/180-local-github-config

## API and Documentation

Coming soon. Keep an eye on the [Wiki](http://wiki.github.com/mwunsch/octocatnap).

## License

Copyright (c) 2009 Mark Wunsch. See LICENSE for details.	 

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mwunsch-octocatnap-0.7.0 README.md