duckinator/sicuro — pull request #7 by bcluca (2012-06-08 18:51:11+00:00)
Title: External libs

Hi,

This pull request adds support for external libs. It's more a feature than a bugfix, so you may or may not want to merge it into master, but I thought it was worth sharing anyway.

Currently, using external gems as custom libs causes several problems, e.g. inability to locate gems (due to FakeFS stubbing), missing constants or even `stack level too deep` errors.

This should fix the issues without compromising the security of the sandbox. After requiring the custom libs, only trusted components from the same `$LOAD_PATH` are allowed to be required. Without this change only internal libs like `Set` (which are already in the current `$LOAD_PATH`) are available.

All tests passed on my Ubuntu box with the same Ruby versions used by Travis workers (including patch and revision numbers). I'm curious to see if any of these changes make Travis happier ;)

Thanks,
Luca