Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: e419c4e064
Fetching contributors…

Cannot retrieve contributors at this time

32 lines (28 sloc) 1.101 kb
(ns cake-github.gists
(:use cake cake.core
(:import java.awt.Toolkit))
"Gist a file. Pass in the path to the file relative to where this task is called."
(let [gist-file (( *opts*) 0)]
(new-gist auth
(last (.split gist-file "/"))
(slurp (str (System/getProperty "user.dir") "/" gist-file))))))))
(deftask gists.contents
"Show the contents of a gist. Pass in the id of the gist and the file name."
{[one two] :gists.contents}
(format-result (show-gist auth one two)))
"Show metadata for another user's gists. Pass in the name of the user. Pass in --results
to limit results. The default limit is three."
(show-users-gists auth (( *opts*) 0))
:map-type :gist :max (:results *opts*)))
(deftask gists.meta
"Show a gist's metadata. Pass in the gist's ID."
(format-result (show-gist-meta auth ((:gists.meta *opts*) 0)) :map-type :gist))
Jump to Line
Something went wrong with that request. Please try again.