Port of Gallery to Ruby