Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 741 Bytes

README.md

File metadata and controls

19 lines (13 loc) · 741 Bytes

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.