{"id":20298983,"url":"https://github.com/ktonon/code_node","last_synced_at":"2025-03-04T06:13:53.387Z","repository":{"id":5539533,"uuid":"6743062","full_name":"ktonon/code_node","owner":"ktonon","description":"Create Class and Module graphs for Ruby projects","archived":false,"fork":false,"pushed_at":"2012-12-30T04:19:06.000Z","size":2140,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-03-14T22:24:13.876Z","etag":null,"topics":[],"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/ktonon.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-11-18T03:22:37.000Z","updated_at":"2014-04-25T18:14:46.000Z","dependencies_parsed_at":"2022-07-16T18:46:13.940Z","dependency_job_id":null,"html_url":"https://github.com/ktonon/code_node","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktonon%2Fcode_node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktonon%2Fcode_node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktonon%2Fcode_node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktonon%2Fcode_node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ktonon","download_url":"https://codeload.github.com/ktonon/code_node/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241794138,"owners_count":20021192,"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":[],"created_at":"2024-11-14T16:13:01.985Z","updated_at":"2025-03-04T06:13:53.370Z","avatar_url":"https://github.com/ktonon.png","language":"Ruby","readme":"code_node\n=========\n\n[![Build Status](https://secure.travis-ci.org/ktonon/code_node.png?branch=master)](https://travis-ci.org/ktonon/code_node)\n[![Dependency Status](https://gemnasium.com/ktonon/code_node.png)](https://gemnasium.com/ktonon/code_node)\n[![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/ktonon/code_node)\n\nCreate graphs of the classes and modules in a Ruby project\n\nGet it\n------\n\nInstall the [gem][] from a terminal\n\n```bash\n$ gem install code_node\n```\n\nUse it\n------\n\ncode_node is a [cog][] plugin. To use it, you'll need to:\n\n* run `cog init` from a terminal in the root of your project\n* edit the `Cogfile` and change `project_path` to the root of your Ruby source.\n\nNow that your project is ready, create a `code_node` graph generator like this\n\n```bash\n$ cog gen new -p code_node my_graph\nCreated cog/generators/my_graph.rb\n```\n\nThe generator will look something like this\n\n```ruby\nCodeNode.graph 'my_graph' do |g|\n\n  # Ignore nodes with no relations to other nodes\n  g.ignore \u0026:island?\n\n  # Uncomment and change the value to ignore a specific node\n  # g.ignore 'Foo::Bar::Car'\n  \n  # Uncomment to ignore nodes named ClassMethods\n  # g.ignore /::ClassMethods$/\n\n  # Uncomment and change the value to ignore all nodes descending\n  # from a specific node\n  # g.ignore {|node| node.inherits_from? 'Foo::Bar::Car'}\n  \n  # Apply styles common to all classes\n  g.style :shape =\u003e 'ellipse', \u0026:class?\n\n  # Apply styles common to all nodes\n  g.style :shape =\u003e 'box', \u0026:module?\nend\n```\n\nCustomize the graph generator (see [GraphDefiner](http://ktonon.github.com/code_node/CodeNode/DSL/GraphDefiner.html) for help) and then run that generator\n\n```bash\n$ cog gen\n1st pass: find nodes\n2nd pass: find relations\nPruning nodes\nCreated lib/my_graph.dot\n```\n\nA [Graphviz][] dot file is created. [Get Graphviz][] and use the `dot` command\nline tool to turn your generated `my_graph.dot` file into an image. For example\n\n```bash\n$ dot -T png -o lib/my_graph.png lib/my_graph.dot\n```\n\n[cog]:https://github.com/ktonon/cog\n[gem]:https://rubygems.org/gems/code_node\n[Graphviz]:http://www.graphviz.org\n[Get Graphviz]:http://www.graphviz.org/Download.php\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fktonon%2Fcode_node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fktonon%2Fcode_node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fktonon%2Fcode_node/lists"}