Jist is a gem that allows you to publish a gist from Ruby.
Jist is a really simple library that wraps a single API call, you use it:
Jist.gist("Look.at(:my => 'awesome').code")
If you need more advanced features you can also pass:
:username
and:password
to log in and post an authenticated gist.:filename
to change the syntax highlighting (default isa.rb
).:public
if you want your hist to have a guessable url.:description
to add a description to your gist.
It'd be nice to add a binary so that you can use it from your terminal. In the meantime you can use:
$ ruby -rjist -e'puts Jist.gist(ARGF.read)["html_url"]' <<EOF
Look.at(:my => 'awesome').code
EOF
I wrote this because the gist
gem is out of action, and has been for many months.
It's licensed under the MIT license, and bug-reports, and pull requests are welcome.