A summary of data about the Ruby ecosystem.

https://github.com/glejeune/Ruby-Graphviz

[MIRROR] Ruby interface to the GraphViz graphing tool
https://github.com/glejeune/Ruby-Graphviz

Keywords from Contributors

activejob activerecord mvc rubygems rspec rubocop deployment rdoc devise ruby-documentation

Last synced: about 15 hours ago
JSON representation

Repository metadata

[MIRROR] Ruby interface to the GraphViz graphing tool

README.md

Ruby/GraphViz

All Contributors
Travis CI build
Gem Version

Copyright (C) 2004-2018 Gregoire Lejeune

INSTALLATION

Add this line to your application's Gemfile:

gem 'ruby-graphviz'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ruby-graphviz

DESCRIPTION

Interface to the GraphViz graphing tool

TODO

  • New FamilyTree

SYNOPSIS

A basic example

require 'ruby-graphviz'

# Create a new graph
g = GraphViz.new( :G, :type => :digraph )

# Create two nodes
hello = g.add_nodes( "Hello" )
world = g.add_nodes( "World" )

# Create an edge between the two nodes
g.add_edges( hello, world )

# Generate output image
g.output( :png => "hello_world.png" )

The same but with a block

require 'ruby-graphviz'

GraphViz::new( :G, :type => :digraph ) { |g|
  g.world( :label => "World" ) << g.hello( :label => "Hello" )
}.output( :png => "hello_world.png" )

Or with the DSL

    require 'ruby-graphviz/dsl'
    digraph :G do
      world[:label => "World"] << hello[:label => "Hello"]

      output :png => "hello_world.png"
    end

Create a graph from a file

    require 'ruby-graphviz'

    # In this example, hello.dot is :
    #   digraph G {Hello->World;}

    GraphViz.parse( "hello.dot", :path => "/usr/local/bin" ) { |g|
      g.get_node("Hello") { |n|
        n[:label] = "Bonjour"
      }
      g.get_node("World") { |n|
        n[:label] = "Le Monde"
      }
    }.output(:png => "sample.png")

GraphML support

    require 'ruby-graphviz/graphml'

    g = GraphViz::GraphML.new( "graphml/cluster.graphml" )
    g.graph.output( :path => "/usr/local/bin", :png => "#{$0}.png" )

TOOLS

Ruby/GraphViz also includes :

  • ruby2gv, a simple tool that allows you to create a dependency graph from a ruby script. Example : http://drp.ly/dShaZ
ruby2gv -Tpng -oruby2gv.png ruby2gv
  • gem2gv, a tool that allows you to create a dependency graph between gems. Example : http://drp.ly/dSj9Y
gem2gv -Tpng -oruby-graphviz.png ruby-graphviz
  • dot2ruby, a tool that allows you to create a ruby script from a graphviz script
$ cat hello.dot
digraph G {Hello->World;}

$ dot2ruby hello.dot
# This code was generated by dot2ruby.g

require 'rubygems'
require 'ruby-graphviz'
graph_g = GraphViz.digraph( "G" ) { |graph_g|
  graph_g[:bb] = '0,0,70,108'
  node_hello = graph_g.add_nodes( "Hello", :height => '0.5', :label => '\N', :pos => '35,90', :width => '0.88889' )
  graph_g.add_edges( "Hello", "World", :pos => 'e,35,36.413 35,71.831 35,64.131 35,54.974 35,46.417' )
  node_world = graph_g.add_nodes( "World", :height => '0.5', :label => '\N', :pos => '35,18', :width => '0.97222' )
}
puts graph_g.output( :canon => String )
  • git2gv, a tool that allows you to show your git commits

  • xml2gv, a tool that allows you to show a xml file as graph.

GRAPH THEORY

require 'ruby-graphviz'
require 'ruby-graphviz/theory'

g = GraphViz.new( :G ) { ... }

t = GraphViz::Theory.new( g )

puts "Adjancy matrix : "
puts t.adjancy_matrix

puts "Symmetric ? #{t.symmetric?}"

puts "Incidence matrix :"
puts t.incidence_matrix

g.each_node do |name, node|
  puts "Degree of node `#{name}' = #{t.degree(node)}"
end

puts "Laplacian matrix :"
puts t.laplacian_matrix

puts "Dijkstra between a and f"
r = t.moore_dijkstra(g.a, g.f)
if r.nil?
  puts "No way !"
else
  print "\tPath : "; p r[:path]
  puts "\tDistance : #{r[:distance]}"
end

print "Ranges : "
rr = t.range
p rr
puts "Your graph contains circuits" if rr.include?(nil)

puts "Critical path : "
rrr = t.critical_path
print "\tPath "; p rrr[:path]
puts "\tDistance : #{rrr[:distance]}"

INSTALLATION

sudo gem install ruby-graphviz

You also need to install GraphViz

On Windows you also need to install win32-open3. This is not an absolute
requirement.

LICENCES

Ruby/GraphViz

Ruby/GraphViz is freely distributable according to the terms of the GNU
General Public License (see the file 'COPYING').

This program is distributed without any warranty. See the file 'COPYING' for
details.

GNU General Public Licence: https://en.wikipedia.org/wiki/Gpl

nothugly.xsl

By Vidar Hokstad and Ryan Shea; Contributions by Jonas Tingborn, Earl
Cummings, Michael Kennedy (Graphviz 2.20.2 compatibility, bug fixes, testing,
lots of gradients)

Copyright (c) 2009 Vidar Hokstad

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

MIT license: https://en.wikipedia.org/wiki/MIT_License

Contributors

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: about 17 hours ago

Total Commits: 439
Total Committers: 39
Avg Commits per committer: 11.256
Development Distribution Score (DDS): 0.267

Commits in past year: 1
Committers in past year: 1
Avg Commits per committer in past year: 1.0
Development Distribution Score (DDS) in past year: 0.0

Name Email Commits
glejeune g****e@f****r 322
greg g****g@c****l 18
Markus Hauck m****9@g****m 10
Khalil Fazal k****l@u****t 9
oupo o****i@g****m 9
Kenichi Kamiya k****1@g****m 8
David Rodríguez d****z@r****t 7
Neven Has n****s@g****m 5
Andrew Kvalheim A****w@K****m 4
Oliver Bruening o****g@y****m 4
dznz k****8@s****m 4
Guilherme Simoes g****s@g****m 3
Orel Sokolov o****v@g****m 3
Joao Guilherme Zeni z****j@i****r 2
Gabe Kopley g****e@c****m 2
Dave Burt d****t@a****u 2
Jake Goulding s****r@m****m 2
Larry Reaves r****l@l****m 2
hirochachacha h****a@g****m 2
ronen barzel r****n@b****g 2
moracca m****a@g****m 1
coding46 c****g@4****e 1
Villu Orav v****v 1
Joao Sa j****a@i****r 1
Rolf Timmermans r****s@v****m 1
TPei 4****i 1
Stefan Huber m****r@g****m 1
SHIBATA Hiroshi h****t@r****g 1
Robert Reiz r****1@g****m 1
Postmodern p****3@g****m 1
and 9 more...

Committer domains:


Issue and Pull Request metadata

Last synced: 19 days ago

Total issues: 44
Total pull requests: 65
Average time to close issues: over 1 year
Average time to close pull requests: 3 months
Total issue authors: 41
Total pull request authors: 48
Average comments per issue: 1.59
Average comments per pull request: 0.78
Merged pull request: 41
Bot issues: 0
Bot pull requests: 0

Past year issues: 1
Past year pull requests: 3
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 1
Past year pull request authors: 2
Past year average comments per issue: 0.0
Past year average comments per pull request: 0.0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/glejeune/Ruby-Graphviz

Top Issue Authors

  • alxx (2)
  • ioquatix (2)
  • mooreniemi (2)
  • courtneymiller2010 (1)
  • andresgutgon (1)
  • n-rodriguez (1)
  • hedgehog (1)
  • tmzhuang (1)
  • dorneanu (1)
  • taketo1113 (1)
  • tetraf (1)
  • roolo (1)
  • beingmattlevy (1)
  • nathanl (1)
  • ftaebi (1)

Top Pull Request Authors

  • deivid-rodriguez (4)
  • markus1189 (4)
  • jqr (3)
  • guilhermesimoes (2)
  • dznz (2)
  • kachick (2)
  • yuuu (2)
  • khalilfazal (2)
  • ghost (2)
  • ronen (2)
  • seuros (2)
  • shepmaster (2)
  • yrral86 (1)
  • josephholsten (1)
  • miketheman (1)

Top Issue Labels

  • Bug (3)
  • Improvement (3)
  • Question (3)
  • Resolved (2)
  • Unreproducible (1)
  • New Feature (1)

Top Pull Request Labels

  • Improvement (2)

Package metadata

gem.coop: ruby-graphviz

Ruby/Graphviz provides an interface to layout and generate images of directed graphs in a variety of formats (PostScript, PNG, etc.) using GraphViz.

  • Homepage: https://github.com/glejeune/Ruby-Graphviz
  • Documentation: http://www.rubydoc.info/gems/ruby-graphviz/
  • Licenses: GPL-2.0
  • Latest release: 1.2.5 (published almost 6 years ago)
  • Last Synced: 2026-03-02T11:31:33.815Z (1 day ago)
  • Versions: 43
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 65,960,659 Total
  • Docker Downloads: 14,466,310
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 0.369%
    • Downloads: 0.435%
    • Docker downloads count: 1.04%
  • Maintainers (5)
rubygems.org: ruby-graphviz

Ruby/Graphviz provides an interface to layout and generate images of directed graphs in a variety of formats (PostScript, PNG, etc.) using GraphViz.

  • Homepage: https://github.com/glejeune/Ruby-Graphviz
  • Documentation: http://www.rubydoc.info/gems/ruby-graphviz/
  • Licenses: GPL-2.0
  • Latest release: 1.2.5 (published almost 6 years ago)
  • Last Synced: 2026-03-02T18:32:09.591Z (about 20 hours ago)
  • Versions: 43
  • Dependent Packages: 166
  • Dependent Repositories: 8,095
  • Downloads: 65,972,675 Total
  • Docker Downloads: 14,466,310
  • Rankings:
    • Dependent packages count: 0.21%
    • Dependent repos count: 0.361%
    • Downloads: 0.442%
    • Average: 1.284%
    • Docker downloads count: 1.946%
    • Stargazers count: 2.324%
    • Forks count: 2.42%
  • Maintainers (5)
proxy.golang.org: github.com/glejeune/ruby-graphviz

proxy.golang.org: github.com/glejeune/Ruby-graphviz

proxy.golang.org: github.com/glejeune/Ruby-Graphviz

ubuntu-24.04: ruby-graphviz

  • Homepage: https://github.com/glejeune/Ruby-Graphviz
  • Licenses:
  • Latest release: 1.2.5-2ubuntu1 (published 25 days ago)
  • Last Synced: 2026-02-06T15:17:22.596Z (25 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
debian-10: ruby-graphviz

  • Homepage: https://github.com/glejeune/Ruby-Graphviz
  • Documentation: https://packages.debian.org/buster/ruby-graphviz
  • Licenses:
  • Latest release: 1.2.3-1 (published 20 days ago)
  • Last Synced: 2026-02-13T04:22:03.724Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-23.04: ruby-graphviz

  • Homepage: https://github.com/glejeune/Ruby-Graphviz
  • Licenses:
  • Latest release: 1.2.5-2ubuntu1 (published 20 days ago)
  • Last Synced: 2026-02-11T06:40:29.469Z (20 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-20.04: ruby-graphviz

  • Homepage: https://github.com/glejeune/Ruby-Graphviz
  • Licenses:
  • Latest release: 1.2.3-1ubuntu1 (published 18 days ago)
  • Last Synced: 2026-02-13T07:14:38.864Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
debian-11: ruby-graphviz

  • Homepage: https://github.com/glejeune/Ruby-Graphviz
  • Documentation: https://packages.debian.org/bullseye/ruby-graphviz
  • Licenses:
  • Latest release: 1.2.5-2 (published 21 days ago)
  • Last Synced: 2026-02-13T08:20:55.986Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-23.10: ruby-graphviz

  • Homepage: https://github.com/glejeune/Ruby-Graphviz
  • Licenses:
  • Latest release: 1.2.5-2ubuntu1 (published 18 days ago)
  • Last Synced: 2026-02-13T18:21:29.662Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-24.10: ruby-graphviz

  • Homepage: https://github.com/glejeune/Ruby-Graphviz
  • Licenses:
  • Latest release: 1.2.5-3 (published 22 days ago)
  • Last Synced: 2026-02-09T16:40:24.878Z (22 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
ubuntu-22.04: ruby-graphviz

  • Homepage: https://github.com/glejeune/Ruby-Graphviz
  • Licenses:
  • Latest release: 1.2.5-2ubuntu1 (published 18 days ago)
  • Last Synced: 2026-02-13T13:17:51.951Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
debian-12: ruby-graphviz

  • Homepage: https://github.com/glejeune/Ruby-Graphviz
  • Documentation: https://packages.debian.org/bookworm/ruby-graphviz
  • Licenses:
  • Latest release: 1.2.5-3 (published 19 days ago)
  • Last Synced: 2026-02-12T23:31:21.363Z (19 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
debian-13: ruby-graphviz

  • Homepage: https://github.com/glejeune/Ruby-Graphviz
  • Documentation: https://packages.debian.org/trixie/ruby-graphviz
  • Licenses:
  • Latest release: 1.2.5-3 (published 19 days ago)
  • Last Synced: 2026-02-13T13:16:11.013Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%

Dependencies

ruby-graphviz.gemspec rubygems
  • bundler >= 0 development
  • github_changelog_generator >= 0 development
  • rake >= 0 development
  • rdoc >= 0 development
  • test-unit >= 0 development
  • yard >= 0 development
  • rexml >= 0
Gemfile rubygems

Score: 29.048900823083635