У этой страницы есть русская версия: «Headless — обертка над Xvfb для Ruby»
Headless, a Ruby wrapper for Xvfb
July 03, 2011
Description
Headless is a Ruby wrapper for Xvfb, the virtual framebuffer.
Virtual framebuffers are used to run graphical software on a “headless”, i.e. display-less, server.
Headless makes it possible to create and release framebuffers straight from Ruby code. This is useful if you only need the framebuffer for a certain part or branch of the script.
require 'rubygems'
require 'headless'
Object notation
headless = Headless.new
# ... code using the framebuffer
headless.destroy
Block notation
Headless.ly do |headless|
# ... code using the framebuffer
end
Examples
Acceptance tests with a real browser
TODO
PDF generation
TODO
Installation
Headless requires an installed xvfb.
Ubuntu
sudo apt-get install xvfb
All systems
gem install headless
