{"action":"created","issue":{"url":"https://api.github.com/repos/docopt/docopt.rb/issues/26","repository_url":"https://api.github.com/repos/docopt/docopt.rb","labels_url":"https://api.github.com/repos/docopt/docopt.rb/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/docopt/docopt.rb/issues/26/comments","events_url":"https://api.github.com/repos/docopt/docopt.rb/issues/26/events","html_url":"https://github.com/docopt/docopt.rb/pull/26","id":180586892,"number":26,"title":"Parity with 0.6.2","user":{"login":"ryanartecona","id":889991,"avatar_url":"https://avatars0.githubusercontent.com/u/889991?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanartecona","html_url":"https://github.com/ryanartecona","followers_url":"https://api.github.com/users/ryanartecona/followers","following_url":"https://api.github.com/users/ryanartecona/following{/other_user}","gists_url":"https://api.github.com/users/ryanartecona/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanartecona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanartecona/subscriptions","organizations_url":"https://api.github.com/users/ryanartecona/orgs","repos_url":"https://api.github.com/users/ryanartecona/repos","events_url":"https://api.github.com/users/ryanartecona/events{/privacy}","received_events_url":"https://api.github.com/users/ryanartecona/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-03T08:31:07Z","updated_at":"2017-03-20T11:31:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docopt/docopt.rb/pulls/26","html_url":"https://github.com/docopt/docopt.rb/pull/26","diff_url":"https://github.com/docopt/docopt.rb/pull/26.diff","patch_url":"https://github.com/docopt/docopt.rb/pull/26.patch"},"body":"I have a work project in Ruby I'd like to use docopt.rb for, but the current release of docopt.rb unfortunately won't cut it. Specifically, I need the `options_first` option so I can have subcommands with their own docopt texts (like [docopt/examples/git/git.py](https://github.com/docopt/docopt/blob/master/examples/git/git.py)).\n\nIt looks like this project hasn't been touched in quite some time. It's on version 0.5.0, and I don't see any evidence of it ever being tested against the reference testcases.docopt suite.\n\nI've taken the liberty of whipping docopt.rb into shape. With these changes, it is now fully up to parity with docopt at 0.6.2. I've copied the tests & test runner into this repo, and all the cases in testcases.docopt pass.\n\n<details>\n<summary>\n\ntestcases.docopt failures fixed by these changes</summary>\n\n\n\n```\n================================= 135: FAILED =================================\nr\"\"\"usage: prog [-]\"\"\"\n$ prog -\n\nresult> {\"-\":\"-\"}\n\nexpect> {\"-\": true}\n================================= 136: FAILED =================================\nr\"\"\"usage: prog [-]\"\"\"\n$ prog \n\nresult> {\"-\":null}\n\nexpect> {\"-\": false}\n================================= 158: FAILED =================================\nr\"\"\"usage: prog [options] -a\n\n-a\n\n\"\"\"\n$ prog -a\n\nresult> \"user-error\"\n\nexpect> {\"-a\": true}\n================================= 160: FAILED =================================\nr\"\"\"usage: prog [-o <o>]...\n\n-o <o>  [default: x]\n\n\"\"\"\n$ prog \n\nresult> {\"-o\":\"x\"}\n\nexpect> {\"-o\": [\"x\"]}\n================================= 162: FAILED =================================\nr\"\"\"usage: prog [-o <o>]...\n\n-o <o>  [default: x y]\n\n\"\"\"\n$ prog \n\nresult> {\"-o\":\"x y\"}\n\nexpect> {\"-o\": [\"x\", \"y\"]}\n================================= 164: FAILED =================================\nr\"\"\"Usage: foo (--xx=x|--yy=y)...\"\"\"\n$ prog --xx=1 --yy=2\n\nresult> {\"--xx\":[\"1\"],\"--yy\":[[\"2\"]]}\n\nexpect> {\"--xx\": [\"1\"], \"--yy\": [\"2\"]}\n================================== 158 / 164 ==================================\n......................................................................................................................................FF.....................F.F.F.F\n```\n\n</details>\n\nThis also introduces support for `options_first`.\n\nAssuming this repo is still without a maintainer, I hope we at least have someone with rubygems release creds. :)\n"},"comment":{"url":"https://api.github.com/repos/docopt/docopt.rb/issues/comments/287734824","html_url":"https://github.com/docopt/docopt.rb/pull/26#issuecomment-287734824","issue_url":"https://api.github.com/repos/docopt/docopt.rb/issues/26","id":287734824,"user":{"login":"sadovnik","id":5960795,"avatar_url":"https://avatars0.githubusercontent.com/u/5960795?v=3","gravatar_id":"","url":"https://api.github.com/users/sadovnik","html_url":"https://github.com/sadovnik","followers_url":"https://api.github.com/users/sadovnik/followers","following_url":"https://api.github.com/users/sadovnik/following{/other_user}","gists_url":"https://api.github.com/users/sadovnik/gists{/gist_id}","starred_url":"https://api.github.com/users/sadovnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sadovnik/subscriptions","organizations_url":"https://api.github.com/users/sadovnik/orgs","repos_url":"https://api.github.com/users/sadovnik/repos","events_url":"https://api.github.com/users/sadovnik/events{/privacy}","received_events_url":"https://api.github.com/users/sadovnik/received_events","type":"User","site_admin":false},"created_at":"2017-03-20T11:31:39Z","updated_at":"2017-03-20T11:31:39Z","body":"@alexspeller, @johari 👆?"}}
{"actor":{"display_login":"sadovnik"}}