Dia is a project mainly written in ..., based on the MIT license.
Through the use of technology found on Apple's Leopard and Snow Leopard operating systems, Dia can create dynamic and robust sandbox environments for applications and for blocks of ruby code. The Ruby API was designed to be simple, and a joy
Through the use of technology found on Apple's Leopard and Snow Leopard operating systems, Dia can create dynamic and robust sandbox environments for applications and for blocks of ruby code. The Ruby API was designed to be simple, and a joy to use. I hope you feel the same way :-)
RubyBlock
require('rubygems')
require('dia')
require('open-uri')
sandbox = Dia::RubyBlock.new(Dia::Profiles::NO_INTERNET) do
open('http://www.google.com')
end
sandbox.rescue_exception = true
sandbox.run
puts "Exception : #{sandbox.exception.klass}"
puts "Message : #{sandbox.exception.message}"
Application
require('rubygems')
require('dia')
sandbox = Dia::Application.new(Dia::Profiles::NO_INTERNET,
'/path/to/firefox')
sandbox.run_nonblock
sandbox.terminate
API Documentation
Written using YARD, the API documentation makes a great reference.
The API documentation linked is for the latest stable release
Mailing list
Troubleshoot your problems with other Dia users on the Google Groups mailing list.
Wiki documentation
Work in progress
The following Ruby implementations have had the test suite run against them, and reported a 100% success rate.
MacRuby is not supported because it does not support Kernel.fork, and it won't add support
for fork anytime soon(if ever).
JRuby has experimental support for fork, but I haven't tried it.
Bug reports are very welcome, and can be reported through the issue tracker.