{"id":13878044,"url":"https://github.com/ruby/optparse","last_synced_at":"2025-04-14T08:17:21.297Z","repository":{"id":37096406,"uuid":"266090757","full_name":"ruby/optparse","owner":"ruby","description":"OptionParser is a class for command-line option analysis. ","archived":false,"fork":false,"pushed_at":"2025-04-07T08:05:11.000Z","size":622,"stargazers_count":55,"open_issues_count":6,"forks_count":24,"subscribers_count":36,"default_branch":"master","last_synced_at":"2025-04-09T21:01:30.393Z","etag":null,"topics":["hacktoberfest","ruby"],"latest_commit_sha":null,"homepage":"","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/ruby.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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}},"created_at":"2020-05-22T11:10:25.000Z","updated_at":"2025-04-07T08:05:14.000Z","dependencies_parsed_at":"2023-02-12T07:55:11.098Z","dependency_job_id":"ef038134-f690-42e9-bdd3-501e2b82d2f1","html_url":"https://github.com/ruby/optparse","commit_stats":{"total_commits":345,"total_committers":36,"mean_commits":9.583333333333334,"dds":0.3884057971014493,"last_synced_commit":"d64869106f769e5ef559bac079a098a29a328981"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Foptparse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Foptparse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Foptparse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Foptparse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruby","download_url":"https://codeload.github.com/ruby/optparse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248301441,"owners_count":21080893,"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":["hacktoberfest","ruby"],"created_at":"2024-08-06T08:01:38.272Z","updated_at":"2025-04-14T08:17:21.272Z","avatar_url":"https://github.com/ruby.png","language":"Ruby","readme":"# OptionParser\n\nOptionParser is a class for command-line option analysis.  It is much more\nadvanced, yet also easier to use, than GetoptLong, and is a more Ruby-oriented\nsolution.\n\n## Features\n\n1. The argument specification and the code to handle it are written in the\n   same place.\n2. It can output an option summary; you don't need to maintain this string\n   separately.\n3. Optional and mandatory arguments are specified very gracefully.\n4. Arguments can be automatically converted to a specified class.\n5. Arguments can be restricted to a certain set.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'optparse'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install optparse\n\n## Usage\n\n```ruby\nrequire 'optparse'\n\noptions = {}\nOptionParser.new do |opts|\n  opts.banner = \"Usage: example.rb [options]\"\n\n  opts.on(\"-v\", \"--[no-]verbose\", \"Run verbosely\") do |v|\n    options[:verbose] = v\n  end\nend.parse!\n\np options\np ARGV\n```\n\n## Development\n\nAfter checking out the repo, run `bundle install` to install dependencies. Then, run `rake test` to run the tests.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/ruby/optparse.\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby%2Foptparse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruby%2Foptparse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby%2Foptparse/lists"}