{"id":18564811,"url":"https://github.com/snasirca/mikado-graph-generator","last_synced_at":"2025-10-14T18:40:41.856Z","repository":{"id":16790532,"uuid":"80650502","full_name":"snasirca/mikado-graph-generator","owner":"snasirca","description":"Provides a simple DSL for generating Mikado Graphs using GraphViz.","archived":false,"fork":false,"pushed_at":"2025-09-26T10:01:16.000Z","size":210,"stargazers_count":5,"open_issues_count":5,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-26T15:21:40.104Z","etag":null,"topics":["graphviz","ruby"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/snasirca.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-02-01T18:31:03.000Z","updated_at":"2025-04-24T02:14:24.000Z","dependencies_parsed_at":"2025-04-10T18:42:31.994Z","dependency_job_id":"d7cd57cc-3cbe-4232-a73f-e76880e80eeb","html_url":"https://github.com/snasirca/mikado-graph-generator","commit_stats":null,"previous_names":["snasirca/mikado_graph_generator"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/snasirca/mikado-graph-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snasirca%2Fmikado-graph-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snasirca%2Fmikado-graph-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snasirca%2Fmikado-graph-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snasirca%2Fmikado-graph-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snasirca","download_url":"https://codeload.github.com/snasirca/mikado-graph-generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snasirca%2Fmikado-graph-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278861029,"owners_count":26058632,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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"],"created_at":"2024-11-06T22:16:25.604Z","updated_at":"2025-10-14T18:40:41.841Z","avatar_url":"https://github.com/snasirca.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mikado Graph Generator [![Gem Version](https://badge.fury.io/rb/mikado_graph_generator.svg)](https://badge.fury.io/rb/mikado_graph_generator) [![Build Status](https://github.com/snasirca/mikado-graph-generator/actions/workflows/ci.yml/badge.svg)](https://github.com/snasirca/mikado-graph-generator/actions/workflows/ci.yml) [![Maintainability](https://api.codeclimate.com/v1/badges/d748f762abb3995c15eb/maintainability)](https://codeclimate.com/github/snasirca/mikado-graph-generator/maintainability)\n\nWelcome to a DSL for creating Mikado Graphs using *GraphViz*.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem \"mikado_graph\"\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install mikado_graph\n\n### Prerequisites\n\nEnsure you have *GraphViz* installed. On macOS you can install it using Homebrew with the following command:\n\n```bash\nbrew install graphviz\n```\n\n## Usage\n\nYou can use this gem's DSL in the following way to create a Mikado Graph generator definition file:\n\n```ruby\nrequire \"mikado_graph\"\n\nMikadoGraph::Generator.define do\n  state(\"State A\").with_prerequisites do\n    state(\"State B\").with_prerequisites do\n      state(\"State D\")\n      state(\"State E\")\n    end\n    state(\"State C\").with_prerequisites do\n      state(\"State F\")\n      state(\"State G\")\n    end\n  end\nend.generate(\"png\", \"img/example_usage_vertical.png\") # generate takes GraphViz format and output path\n```\n\n\u003e You can also use the shorthand `with_prereqs` instead of `with_prerequisites` for defining prerequisite \ndependencies between states.\n\nSave this file to `example_usage_vertical.rb` and then you can then execute this file in the terminal using:\n\n```bash\nruby example_usage_vertical.rb\n```\n\nThis will utilize *GraphViz* to create this PNG output of the above Mikado Graph generator definition:\n\n![Example Usage Vertical](img/example_usage_vertical.png)\n\nNOTE: If you don't provide any parameters to `generate`, it'll default to a `dot` output in the STDOUT.\n\nIf you want to instead do a horizontal orientation of your graph, simply provide the direction flag to `#generate` like so:\n\n```ruby\ngenerate(direction: :horizontal)\n```\n\nHere is an example usage:\n\n```ruby\nrequire \"mikado_graph\"\n\nMikadoGraph::Generator.define do\n  state(\"State A\").with_prerequisites do\n    state(\"State B\").with_prerequisites do\n      state(\"State D\")\n      state(\"State E\")\n    end\n    state(\"State C\").with_prerequisites do\n      state(\"State F\")\n      state(\"State G\")\n    end\n  end\nend.generate(format: \"png\", path: \"img/example_usage_horizontal.png\", direction: :horizontal)\n```\n\nThis will generate this graph:\n\n![Example Usage Horizontal](img/example_usage_horizontal.png)\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nUse `direnv` to speed development.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/snasirca/mikado-graph-generator. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnasirca%2Fmikado-graph-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnasirca%2Fmikado-graph-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnasirca%2Fmikado-graph-generator/lists"}