Class | Isolate::Sandbox |
In: |
lib/isolate/sandbox.rb
|
Parent: | Object |
An isolated environment. This class exposes lifecycle events for extension, see Isolate::Events for more information.
Create a new Isolate::Sandbox instance. See Isolate.now! for the most common use of the API. You probably don‘t want to use this constructor directly. Fires :initializing and :initialized.
Activate this set of isolated entries, respecting an optional environment. Points RubyGems to a separate repository, messes with paths, auto-installs gems (if necessary), activates everything, and removes any superfluous gem (again, if necessary). If environment isn‘t specified, ISOLATE_ENV, RAILS_ENV, and RACK_ENV are checked before falling back to "development". Fires :activating and :activated.
Express a gem dependency. Works pretty much like RubyGems’ gem method, but respects environment and doesn‘t activate ‘til later.