Manfred / cocoa_gist forked from alloy/cocoa_gist
- Source
- Commits
- Network (2)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
README
.- Cocoa Gist -' A simple Ruby library that uses RubyCocoa to create Gists. Cocoa Gist was originally written to be used in LimeChat [1], an awesome IRC client written in Ruby and RubyCocoa. [1] http://limechat.net/mac/ .- EXAMPLES -' If you want to post Gists without further configuration you can set your credentials in your git config (~/.gitconfig); [github] user = Octocat token = er987f316f7abd88ab1111114de65732 Otherwise you will have to set the credentials on the CocoaGist class; CocoaGist.set_credentials('Octocat', 'er987f316f7abd88ab1111114de65732') From there on out it's all butter; # Post a smiley to a private Gist gist = CocoaGist.alloc.init gist.start('(._o")', 'plain text', true) If you want to get updates about how your Gist creation went, you can set a delegate; class Putser < OSX::NSObject def pastie_on_success(gist, url) puts "{_} Your pastie is at: #{url}" end def pastie_on_error(gist, message) puts "{!} Your pastie failed!" puts " #{message}" end end gist.delegate = Putser.alloc.init Copyright © 2009 – E. Duran <eloy.de.enige@gmail.com>

