Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Requestor is a dynamic 'require' statement which reads ruby source code from a web server.

branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.md

Introducing the Requestor gem

require 'requestor'

code = Requestor.read('http://rorbuilder.info/ruby/') do |x|
  x.require 'helloworld'
end

eval code

HelloWorld.new
#=> hello world

The Requestor gem loads ruby source code from the web instead of from the local file system.

  • advantages: quicker than installing gems locally, the source is tamper-proof, no need to reinstall a gem since the latest gem is automatically downloaded
  • disadvantages: gems won't run without a web server, it's harder to maintain version control

Resources

update: 17-Feb-2011 @ 8:57pm The url can also point to a dynarex file containing links to ruby files. The schema for the dynarex file is 'files/file(name,url)'. The summary node must include ruby_files

Something went wrong with that request. Please try again.