{"id":22981049,"url":"https://github.com/rubyworks/tomparse","last_synced_at":"2025-10-28T22:42:12.230Z","repository":{"id":2631430,"uuid":"3618973","full_name":"rubyworks/tomparse","owner":"rubyworks","description":"TomDoc Parser","archived":false,"fork":false,"pushed_at":"2015-07-23T19:05:24.000Z","size":325,"stargazers_count":6,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-17T12:55:49.648Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://rubyworks.github.com/tomparse","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rubyworks.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-03-04T15:29:16.000Z","updated_at":"2020-12-16T13:20:25.000Z","dependencies_parsed_at":"2022-08-29T18:41:03.180Z","dependency_job_id":null,"html_url":"https://github.com/rubyworks/tomparse","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/rubyworks/tomparse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Ftomparse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Ftomparse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Ftomparse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Ftomparse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rubyworks","download_url":"https://codeload.github.com/rubyworks/tomparse/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Ftomparse/sbom","scorecard":{"id":789047,"data":{"date":"2025-08-11","repo":{"name":"github.com/rubyworks/tomparse","commit":"ebc2c42c3169d57644f9c962610b29f43028c44b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":1,"reason":"Found 5/29 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 6 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T06:56:23.124Z","repository_id":2631430,"created_at":"2025-08-23T06:56:23.124Z","updated_at":"2025-08-23T06:56:23.124Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281185451,"owners_count":26457747,"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-26T02:00:06.575Z","response_time":61,"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":[],"created_at":"2024-12-15T01:46:50.964Z","updated_at":"2025-10-28T22:42:12.203Z","avatar_url":"https://github.com/rubyworks.png","language":"Ruby","readme":"# [TomParse](http://rubyworks.github.io//tomparse)\n\n[![Version](https://img.shields.io/gem/v/tomparse.svg)](https://rubygems.org/gems/tomparse)\n[![Build Status](https://travis-ci.org/rubyworks/tomparse.svg?branch=master)](https://travis-ci.org/rubyworks/tomparse)\n[![Issues](https://img.shields.io/github/issues-raw/rubyworks/tomparse.svg)](https://github.com/rubyworks/tomparse/issues)\n\nTomParse is a TomDoc parser for Ruby. It provides no other functionality than\nto take a code comment and parse it in to a convenient object-oriented\nstructure in accordance with the TomDoc standard. See [TomDoc](https://github.com/mojombo/tomdoc)\nfor more information about the TomDoc format.\n\n\n## Instructions\n\n### Usage\n\nThe primary interface is the `TomParse.parse` method. It will parse the\ncomment and return a `TomParse::TomDoc` instance.\n\n    TomParse.parse(comment)  #=\u003e TomParse::TomDoc\n\nThe comment string can have comment markers ('#') or not. The\nparse will remove them if present. The resulting TomDoc object\nthen has a selection of methods that provide information from\nthe comment, such as `#arguments`, `#examples`, etc.\n\nSee the [API documention](http://rubydoc.info/gems/tomparse/frames)\nfor more details on this.\n\n### Example\n\nIf you are unfamiliar with TomDoc, an example TomDoc comment for a method\nlooks something like this:\n\n    # Duplicate some text an arbitrary number of times.\n    #\n    # text  - The String to be duplicated.\n    # count - The Integer number of times to duplicate the text.\n    #\n    # Examples\n    #   multiplex('Tom', 4)\n    #   # =\u003e 'TomTomTomTom'\n    #\n    # Returns the duplicated String.\n    def multiplex(text, count)\n      text * count\n    end\n\n### Installation\n\nTomParse is available as a Ruby gem.\n\n    $ gem install tomparse\n\nUse with Bundler by adding to your Gemfile (gems.rb file in the future).\n\n    gem \"tomparse\"\n\n\n## Extra Features\n\nOkay, we told a little white lie in the description. TomParse does take some\nliberties with the specification to offer up some additional documentation\ngoodness.\n\n### Arguments\n\nThe TomDoc specification is rather strict about how arguments are written --they\nhave to be the second section just after the description. TomParse offers a little\nmore flexability by allowing for an `Arguments` header to be used.\n\n```ruby\n  # Method to do fooey.\n  #\n  # Examples\n  #   foo(name)\n  #\n  # Arguments\n  #   name - Name of the fooey.\n  #\n  # Returns nothing.\n  def foo(name)\n    ...\n```\n\nWe still recommend putting the arguments right after the desciption in most cases,\nbut there are times when its reads better to put them lower, such when using a\n`Signatures` section (see below).\n\n### Options\n\nRuby 2.0 finally introduces *keyword arguments* to the language. TomDoc's current\nsupport of argument options, as a secondary argument list of a Hash argument,\ndoesn't take keyword arguments into good account. To remedy this TomParse provides\nan `Options` section. It is written just like one would an `Arguments` section.\n\n```ruby\n  # Method to do fooey.\n  #\n  # Options\n  #   debug - Turn on debug mode? (default: false)\n  #\n  # Returns nothing.\n  def foo(**options)\n    ...\n```\n\n### Labels\n\nOne really nice new feature of TomParse is it's ability to recoginize sections\nstarting with a capitalized word followed by a colon and a space, as special\nsection *tags* or *labels* (call them what you will). Here is an example:\n\n```ruby\n  # Method to do something.\n  #\n  # TODO: This is a todo note.\n  #\n  # Returns nothing.\n  def dosomething\n    ...\n```\n\nWhen this is parsed, rather than lumping the TODO line in with the description,\nthe TomDoc instance will have a `tags`/`labels` entry containing `['TODO', 'This is a todo note.']`.\nIt is important for consumer applications to recognize this. They can either just\nadd the tags back into the description when generating documentation, or handle\nthem  separately. But tags don't have to occur right after the description. They\ncan occur any place in the documentation.\n\n### Signatures\n\nTomParse does not support the Signature sections in exactly the same fashion as\nthe TomDoc specification describes. Rather than define dynamic methods, signatures\nare used to specify alternate argument patterns, one signature per line.\n\n```ruby\n  # Method to do something.\n  #\n  # name - The name of the thing.\n  # pattern - The pattern of the thing.\n  #\n  # Signatures\n  #\n  #   dosomething(name)\n  #   dosomething(name=\u003epattern)\n  #\n  # Returns nothing.\n  def dosomething(*args)\n    ...\n```\n\nTechnically the Signatures section can still be used to designate a dynamic method,\nbut as you can see by the above example, TomParse does not support the *field* list.\nIf needed just use the arguments list for these as well.\n\nThis choice was made because support for signatures as defined by the spec\nleads to very non-optimal code. It requires scanning every chunk of documentation\nfor a `Signature` section in order to determine how to treat it. What is needed\nis a more universal syntax, that can be easily recognized by some clear identifier\nat the top of a comment --and one that doesn't confuse dynamic method definitions\nwith the more traditional concept of method signatures.\n\n\n## Resources\n\n* [Website](http://rubyworks.github.com/tomparse)\n* [Source Code](http://github.com/rubyworks/tomparse) (Github)\n* [API Reference](http://rubydoc.info/gems/tomparse/frames\")\n* [IRC Chat](http://chat.us.freenode.net/rubyworks)\n* [Upstream Repo](http://github.com/rubyworks/tomparse/tomparse.git)\n\n\n## Authors\n\n\u003cul\u003e\n\u003cli class=\"iauthor vcard\"\u003e\n  \u003cspan class=\"nickname\"\u003etrans\u003c/span\u003e\n  \u003cspan\u003e\u0026lt;\u003ca class=\"email\" href=\"mailto:transfire@gmail.com\"\u003etransfire@gmail.com\u003c/a\u003e\u0026gt;\u003c/span\u003e\n  \u003cbr/\u003e\u003ca class=\"url\" href=\"http://trans.github.com/\"\u003ehttp://trans.github.com/\u003c/a\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\n\n## Copyright \u0026 License\n\nTomParse is copyrighted open-source software.\n\nCopyright (c) 2012 [Rubyworks](http://rubyworks.github.com). All rights reserved.\n\nTomParse is distributable under the terms of the [BSD-2-Clause]((http://www.spdx.org/licenses/BSD-2-Clause) license.\n\nSee LICENSE.txt for details.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyworks%2Ftomparse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubyworks%2Ftomparse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyworks%2Ftomparse/lists"}