0.0
No commit activity in last 3 years
No release in over 3 years
Simple DSL for generating Gliffy diagrams in ruby and exporting in .gliffy format. Includes some basic shapes from the UML library
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

= 10.4.2
= 3.4.0
 Project Readme

Gliffynator

Gem Version Build Status

make gliffy diagrams in ruby!

simple DSL

diagram = Gliffynator::Diagram.new do
  add_arrow 50, 50, 100, :right, "Some Text"
end

diagram.render

or

diagram = Gliffynator::Diagram.new
diagram.add_arrow 50, 50, 100, :right, "Some Text"

diagram.render

the DSL will keep track of some basic housekeeping, like unique IDs for most objects and their children. If this isn't done, your document may appear correctly until you try and edit it, when moving one thing might cause other side effects!

Usage

you can save a diagram to a file, just make sure it ends in .gliffy

diagram.render "example.gliffy"

or you can get at the raw text (which is just json). this is useful for downloading a file from a Sinatra application, for example

get '/example.gliffy' do
  header 'Content-Type', 'text/plain'
  header 'Content-Disposition', 'attachment'
  body diagram.render
end

Contributing

tests are in spec/ and are run with rake. Feel free to add some tests :)