Require code directly from GitHub's Gists
JavaScript Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
spec
thirdparty
README.md
require_gist.gemspec

README.md

require_gist

Require code snippets from Gist directly from your Ruby code

gem install require_gist

require "require_gist"
require_gist "371861/ae8eb899fab486c99c423554b19ebdb40e37f021/shell_out.rb", "668ebf9fc9ed9fba98d1f44171cdfcb6dbccf3e3" # http://gist.github.com/371861

Comes with handy Greasemonkey extension. Install extension to generate require snippets like the one above directly on the Gist page.

Details

Caches required Gists per user (in ~/.gist directory), the second argument to require_gist is the SHA1 of the Gist content, if local copy has different SHA1 LoadError will be raised.