{"id":28512629,"url":"https://github.com/state-machines/state_machines-graphviz","last_synced_at":"2025-07-04T01:30:47.625Z","repository":{"id":16468104,"uuid":"19220220","full_name":"state-machines/state_machines-graphviz","owner":"state-machines","description":"Graphviz module for state machines","archived":false,"fork":false,"pushed_at":"2023-06-25T13:28:00.000Z","size":36,"stargazers_count":33,"open_issues_count":0,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-24T14:11:34.251Z","etag":null,"topics":["graphviz","ruby","state-machine"],"latest_commit_sha":null,"homepage":"https://github.com/state-machines/state_machines-graphviz","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"sdelements/lets-chat","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/state-machines.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2014-04-27T22:43:46.000Z","updated_at":"2025-04-29T09:47:00.000Z","dependencies_parsed_at":"2023-07-22T06:39:04.331Z","dependency_job_id":null,"html_url":"https://github.com/state-machines/state_machines-graphviz","commit_stats":null,"previous_names":["seuros/state_machines-graphviz"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/state-machines/state_machines-graphviz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/state-machines%2Fstate_machines-graphviz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/state-machines%2Fstate_machines-graphviz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/state-machines%2Fstate_machines-graphviz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/state-machines%2Fstate_machines-graphviz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/state-machines","download_url":"https://codeload.github.com/state-machines/state_machines-graphviz/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/state-machines%2Fstate_machines-graphviz/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261691885,"owners_count":23195059,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graphviz","ruby","state-machine"],"created_at":"2025-06-09T00:38:38.664Z","updated_at":"2025-07-04T01:30:47.618Z","avatar_url":"https://github.com/state-machines.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StateMachines::Graphviz\n\nThis adds support for generating di-graphs based on the\nevents, states, and transitions defined for a state machine using [GraphViz](http://www.graphviz.org).\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'state_machines-graphviz' , group: :development\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install state_machines-graphviz\n\n## Usage\n\nThe default output folder for the images is `doc/state_machines`.\n\n#### Examples\n\nTo generate a graph for a specific file / class:\n\n```bash\nrake state_machines:draw FILE=vehicle.rb CLASS=Vehicle\n```\nFrom a Rails app directory:\n\n```bash\nrake state_machines:draw CLASS=Vehicle\n```\n\nTo save files to a specific path:\n\n```bash\nrake state_machines:draw FILE=vehicle.rb CLASS=Vehicle TARGET=files\n```\n\nTo customize the image format / orientation:\n\n```bash\nrake state_machines:draw FILE=vehicle.rb CLASS=Vehicle FORMAT=jpg ORIENTATION=landscape\n```\n\nSee http://rdoc.info/github/glejeune/Ruby-Graphviz/GraphViz/Constants for the list of\nsupported image formats.  If resolution is an issue, the svg format may offer\nbetter results.\n\nTo generate multiple state machine graphs:\n\n```bash\nrake state_machines:draw FILE=vehicle.rb,car.rb CLASS=Vehicle,Car\n```\n\nTo use human state / event names:\n\n```bash\nrake state_machines:draw FILE=vehicle.rb CLASS=Vehicle HUMAN_NAMES=true\n```\n\n**Note** that this will generate a different file for every state machine defined\nin the class.  The generated files will use an output filename of the format\n`#{class_name}_#{machine_name}.#{format}`.\n\nFor examples of actual images generated using this task, see those under the\nexamples folder.\n\n### Interactive graphs\n\nJean Bovet's [Visual Automata Simulator](https://github.com/NimaGhaedsharafi/VAS)\nis a great tool for \"simulating, visualizing and transforming finite state\nautomata and Turing Machines\".  It can help in the creation of states and events\nfor your models.  It is cross-platform, written in Java.\n\n## Contributing\n\n1. Fork it ( https://github.com/state-machines/state_machines-graphviz/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstate-machines%2Fstate_machines-graphviz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstate-machines%2Fstate_machines-graphviz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstate-machines%2Fstate_machines-graphviz/lists"}