{"action":"created","comment":{"url":"https://api.github.com/repos/Test-More/Test-Stream/pulls/comments/46779530","id":46779530,"diff_hunk":"@@ -99,6 +116,193 @@ sub _autoflush {\n     select $old_fh;\n }\n \n+sub event_tap {\n+    my $self = shift;\n+    my ($e, $num) = @_;\n+\n+    my $converter = $CONVERTERS{ref($e)};\n+\n+    $num = undef if $self->{+NO_NUMBERS};\n+\n+    # Legacy Support for $e->to_tap\n+    unless ($converter) {\n+        my $legacy = $e->can('to_tap') or return;\n+        return if $legacy == \\&Test::Stream::Event::to_tap;\n+        warn \"'$e' implements 'to_tap'. to_tap methods on events are deprecated.\\n\";\n+        return $e->to_tap($num);\n+    }\n+\n+    return $self->$converter($e, $num);\n+}\n+\n+sub _ok_event {\n+    my $self = shift;\n+    my ($e, $num) = @_;\n+\n+    # We use direct hash access for performance. OK events are so common we\n+    # need this to be fast.\n+    my $name  = $e->{name};\n+    my $debug = $e->{debug};\n+    my $todo  = $e->{todo};\n+    $todo = $debug->{todo} unless defined $todo; # $debug->todo is deprecated\n+    my $skip  = $debug->{skip}; # Deprecated\n+\n+    my $out = \"\";\n+    $out .= \"not \" unless $e->{pass};\n+    $out .= \"ok\";\n+    $out .= \" $num\" if defined $num;\n+    $out .= \" - $name\" if $name;\n+\n+    if (defined $skip && defined $todo) {\n+        $out .= \" # TODO & SKIP\";\n+        $out .= \" $todo\" if length $todo;\n+    }\n+    elsif (defined $todo) {\n+        $out .= \" # TODO\";\n+        $out .= \" $todo\" if length $todo;\n+    }\n+    elsif (defined $skip) {\n+        $out .= \" # skip\";\n+        $out .= \" $skip\" if length $skip;\n+    }\n+\n+    my @out = [OUT_STD, \"$out\\n\"];\n+\n+    if ($e->{diag} && @{$e->{diag}}) {\n+        my $diag_handle = ($todo || $e->diag_todo || $debug->_no_diag) ? OUT_TODO : OUT_ERR;\n+\n+        for my $diag (@{$e->{diag}}) {\n+            chomp(my $msg = $diag);\n+\n+            $msg = \"# $msg\" unless $msg =~ m/^\\n/;\n+            $msg =~ s/\\n/\\n# /g;\n+            push @out => [$diag_handle, \"$msg\\n\"];\n+        }\n+    }\n+\n+    return @out;\n+}\n+\n+sub _skip_event {\n+    my $self = shift;\n+    my ($e, $num) = @_;\n+\n+    my $name  = $e->name;\n+    my $debug = $e->debug;\n+    my $skip  = $e->reason;\n+    my $todo  = $e->todo || $debug->_todo;\n+","path":"lib/Test/Stream/Formatter/TAP.pm","position":133,"original_position":133,"commit_id":"e69b5d0b6844a2a64f10d91d22fc08a3a40a42ac","original_commit_id":"e69b5d0b6844a2a64f10d91d22fc08a3a40a42ac","user":{"login":"exodist","id":73914,"avatar_url":"https://avatars.githubusercontent.com/u/73914?v=3","gravatar_id":"","url":"https://api.github.com/users/exodist","html_url":"https://github.com/exodist","followers_url":"https://api.github.com/users/exodist/followers","following_url":"https://api.github.com/users/exodist/following{/other_user}","gists_url":"https://api.github.com/users/exodist/gists{/gist_id}","starred_url":"https://api.github.com/users/exodist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exodist/subscriptions","organizations_url":"https://api.github.com/users/exodist/orgs","repos_url":"https://api.github.com/users/exodist/repos","events_url":"https://api.github.com/users/exodist/events{/privacy}","received_events_url":"https://api.github.com/users/exodist/received_events","type":"User","site_admin":false},"body":"good eye!","created_at":"2015-12-07T00:42:28Z","updated_at":"2015-12-07T00:42:28Z","html_url":"https://github.com/Test-More/Test-Stream/pull/64#discussion_r46779530","pull_request_url":"https://api.github.com/repos/Test-More/Test-Stream/pulls/64","_links":{"self":{"href":"https://api.github.com/repos/Test-More/Test-Stream/pulls/comments/46779530"},"html":{"href":"https://github.com/Test-More/Test-Stream/pull/64#discussion_r46779530"},"pull_request":{"href":"https://api.github.com/repos/Test-More/Test-Stream/pulls/64"}}},"pull_request":{"url":"https://api.github.com/repos/Test-More/Test-Stream/pulls/64","id":51477477,"html_url":"https://github.com/Test-More/Test-Stream/pull/64","diff_url":"https://github.com/Test-More/Test-Stream/pull/64.diff","patch_url":"https://github.com/Test-More/Test-Stream/pull/64.patch","issue_url":"https://api.github.com/repos/Test-More/Test-Stream/issues/64","number":64,"state":"open","locked":false,"title":"Move TAP logic out of events","user":{"login":"exodist","id":73914,"avatar_url":"https://avatars.githubusercontent.com/u/73914?v=3","gravatar_id":"","url":"https://api.github.com/users/exodist","html_url":"https://github.com/exodist","followers_url":"https://api.github.com/users/exodist/followers","following_url":"https://api.github.com/users/exodist/following{/other_user}","gists_url":"https://api.github.com/users/exodist/gists{/gist_id}","starred_url":"https://api.github.com/users/exodist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exodist/subscriptions","organizations_url":"https://api.github.com/users/exodist/orgs","repos_url":"https://api.github.com/users/exodist/repos","events_url":"https://api.github.com/users/exodist/events{/privacy}","received_events_url":"https://api.github.com/users/exodist/received_events","type":"User","site_admin":false},"body":"* Move TAP logic from events to TAP formatter\r\n* Port tests from events to the TAP formatter tests\r\n* Maintain backcompat\r\n* Deprecate to_tap\r\n* Allow custom event support in TAP formatter\r\n","created_at":"2015-11-22T22:50:46Z","updated_at":"2015-12-07T00:42:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9b90afb90a69bca05552197c2e61836e75767c8a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Test-More/Test-Stream/pulls/64/commits","review_comments_url":"https://api.github.com/repos/Test-More/Test-Stream/pulls/64/comments","review_comment_url":"https://api.github.com/repos/Test-More/Test-Stream/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Test-More/Test-Stream/issues/64/comments","statuses_url":"https://api.github.com/repos/Test-More/Test-Stream/statuses/e69b5d0b6844a2a64f10d91d22fc08a3a40a42ac","head":{"label":"Test-More:tap_rework","ref":"tap_rework","sha":"e69b5d0b6844a2a64f10d91d22fc08a3a40a42ac","user":{"login":"Test-More","id":6954850,"avatar_url":"https://avatars.githubusercontent.com/u/6954850?v=3","gravatar_id":"","url":"https://api.github.com/users/Test-More","html_url":"https://github.com/Test-More","followers_url":"https://api.github.com/users/Test-More/followers","following_url":"https://api.github.com/users/Test-More/following{/other_user}","gists_url":"https://api.github.com/users/Test-More/gists{/gist_id}","starred_url":"https://api.github.com/users/Test-More/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Test-More/subscriptions","organizations_url":"https://api.github.com/users/Test-More/orgs","repos_url":"https://api.github.com/users/Test-More/repos","events_url":"https://api.github.com/users/Test-More/events{/privacy}","received_events_url":"https://api.github.com/users/Test-More/received_events","type":"Organization","site_admin":false},"repo":{"id":35126579,"name":"Test-Stream","full_name":"Test-More/Test-Stream","owner":{"login":"Test-More","id":6954850,"avatar_url":"https://avatars.githubusercontent.com/u/6954850?v=3","gravatar_id":"","url":"https://api.github.com/users/Test-More","html_url":"https://github.com/Test-More","followers_url":"https://api.github.com/users/Test-More/followers","following_url":"https://api.github.com/users/Test-More/following{/other_user}","gists_url":"https://api.github.com/users/Test-More/gists{/gist_id}","starred_url":"https://api.github.com/users/Test-More/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Test-More/subscriptions","organizations_url":"https://api.github.com/users/Test-More/orgs","repos_url":"https://api.github.com/users/Test-More/repos","events_url":"https://api.github.com/users/Test-More/events{/privacy}","received_events_url":"https://api.github.com/users/Test-More/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Test-More/Test-Stream","description":"Test-Stream, a more modern testing framework","fork":false,"url":"https://api.github.com/repos/Test-More/Test-Stream","forks_url":"https://api.github.com/repos/Test-More/Test-Stream/forks","keys_url":"https://api.github.com/repos/Test-More/Test-Stream/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Test-More/Test-Stream/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Test-More/Test-Stream/teams","hooks_url":"https://api.github.com/repos/Test-More/Test-Stream/hooks","issue_events_url":"https://api.github.com/repos/Test-More/Test-Stream/issues/events{/number}","events_url":"https://api.github.com/repos/Test-More/Test-Stream/events","assignees_url":"https://api.github.com/repos/Test-More/Test-Stream/assignees{/user}","branches_url":"https://api.github.com/repos/Test-More/Test-Stream/branches{/branch}","tags_url":"https://api.github.com/repos/Test-More/Test-Stream/tags","blobs_url":"https://api.github.com/repos/Test-More/Test-Stream/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Test-More/Test-Stream/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Test-More/Test-Stream/git/refs{/sha}","trees_url":"https://api.github.com/repos/Test-More/Test-Stream/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Test-More/Test-Stream/statuses/{sha}","languages_url":"https://api.github.com/repos/Test-More/Test-Stream/languages","stargazers_url":"https://api.github.com/repos/Test-More/Test-Stream/stargazers","contributors_url":"https://api.github.com/repos/Test-More/Test-Stream/contributors","subscribers_url":"https://api.github.com/repos/Test-More/Test-Stream/subscribers","subscription_url":"https://api.github.com/repos/Test-More/Test-Stream/subscription","commits_url":"https://api.github.com/repos/Test-More/Test-Stream/commits{/sha}","git_commits_url":"https://api.github.com/repos/Test-More/Test-Stream/git/commits{/sha}","comments_url":"https://api.github.com/repos/Test-More/Test-Stream/comments{/number}","issue_comment_url":"https://api.github.com/repos/Test-More/Test-Stream/issues/comments{/number}","contents_url":"https://api.github.com/repos/Test-More/Test-Stream/contents/{+path}","compare_url":"https://api.github.com/repos/Test-More/Test-Stream/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Test-More/Test-Stream/merges","archive_url":"https://api.github.com/repos/Test-More/Test-Stream/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Test-More/Test-Stream/downloads","issues_url":"https://api.github.com/repos/Test-More/Test-Stream/issues{/number}","pulls_url":"https://api.github.com/repos/Test-More/Test-Stream/pulls{/number}","milestones_url":"https://api.github.com/repos/Test-More/Test-Stream/milestones{/number}","notifications_url":"https://api.github.com/repos/Test-More/Test-Stream/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Test-More/Test-Stream/labels{/name}","releases_url":"https://api.github.com/repos/Test-More/Test-Stream/releases{/id}","created_at":"2015-05-05T22:11:27Z","updated_at":"2015-10-31T18:46:29Z","pushed_at":"2015-12-06T17:59:31Z","git_url":"git://github.com/Test-More/Test-Stream.git","ssh_url":"git@github.com:Test-More/Test-Stream.git","clone_url":"https://github.com/Test-More/Test-Stream.git","svn_url":"https://github.com/Test-More/Test-Stream","homepage":"","size":1598,"stargazers_count":3,"watchers_count":3,"language":"Perl","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":9,"forks":6,"open_issues":9,"watchers":3,"default_branch":"master"}},"base":{"label":"Test-More:master","ref":"master","sha":"fb3712d140383299cc3b02c828ff6fddca8116c2","user":{"login":"Test-More","id":6954850,"avatar_url":"https://avatars.githubusercontent.com/u/6954850?v=3","gravatar_id":"","url":"https://api.github.com/users/Test-More","html_url":"https://github.com/Test-More","followers_url":"https://api.github.com/users/Test-More/followers","following_url":"https://api.github.com/users/Test-More/following{/other_user}","gists_url":"https://api.github.com/users/Test-More/gists{/gist_id}","starred_url":"https://api.github.com/users/Test-More/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Test-More/subscriptions","organizations_url":"https://api.github.com/users/Test-More/orgs","repos_url":"https://api.github.com/users/Test-More/repos","events_url":"https://api.github.com/users/Test-More/events{/privacy}","received_events_url":"https://api.github.com/users/Test-More/received_events","type":"Organization","site_admin":false},"repo":{"id":35126579,"name":"Test-Stream","full_name":"Test-More/Test-Stream","owner":{"login":"Test-More","id":6954850,"avatar_url":"https://avatars.githubusercontent.com/u/6954850?v=3","gravatar_id":"","url":"https://api.github.com/users/Test-More","html_url":"https://github.com/Test-More","followers_url":"https://api.github.com/users/Test-More/followers","following_url":"https://api.github.com/users/Test-More/following{/other_user}","gists_url":"https://api.github.com/users/Test-More/gists{/gist_id}","starred_url":"https://api.github.com/users/Test-More/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Test-More/subscriptions","organizations_url":"https://api.github.com/users/Test-More/orgs","repos_url":"https://api.github.com/users/Test-More/repos","events_url":"https://api.github.com/users/Test-More/events{/privacy}","received_events_url":"https://api.github.com/users/Test-More/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Test-More/Test-Stream","description":"Test-Stream, a more modern testing framework","fork":false,"url":"https://api.github.com/repos/Test-More/Test-Stream","forks_url":"https://api.github.com/repos/Test-More/Test-Stream/forks","keys_url":"https://api.github.com/repos/Test-More/Test-Stream/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Test-More/Test-Stream/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Test-More/Test-Stream/teams","hooks_url":"https://api.github.com/repos/Test-More/Test-Stream/hooks","issue_events_url":"https://api.github.com/repos/Test-More/Test-Stream/issues/events{/number}","events_url":"https://api.github.com/repos/Test-More/Test-Stream/events","assignees_url":"https://api.github.com/repos/Test-More/Test-Stream/assignees{/user}","branches_url":"https://api.github.com/repos/Test-More/Test-Stream/branches{/branch}","tags_url":"https://api.github.com/repos/Test-More/Test-Stream/tags","blobs_url":"https://api.github.com/repos/Test-More/Test-Stream/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Test-More/Test-Stream/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Test-More/Test-Stream/git/refs{/sha}","trees_url":"https://api.github.com/repos/Test-More/Test-Stream/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Test-More/Test-Stream/statuses/{sha}","languages_url":"https://api.github.com/repos/Test-More/Test-Stream/languages","stargazers_url":"https://api.github.com/repos/Test-More/Test-Stream/stargazers","contributors_url":"https://api.github.com/repos/Test-More/Test-Stream/contributors","subscribers_url":"https://api.github.com/repos/Test-More/Test-Stream/subscribers","subscription_url":"https://api.github.com/repos/Test-More/Test-Stream/subscription","commits_url":"https://api.github.com/repos/Test-More/Test-Stream/commits{/sha}","git_commits_url":"https://api.github.com/repos/Test-More/Test-Stream/git/commits{/sha}","comments_url":"https://api.github.com/repos/Test-More/Test-Stream/comments{/number}","issue_comment_url":"https://api.github.com/repos/Test-More/Test-Stream/issues/comments{/number}","contents_url":"https://api.github.com/repos/Test-More/Test-Stream/contents/{+path}","compare_url":"https://api.github.com/repos/Test-More/Test-Stream/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Test-More/Test-Stream/merges","archive_url":"https://api.github.com/repos/Test-More/Test-Stream/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Test-More/Test-Stream/downloads","issues_url":"https://api.github.com/repos/Test-More/Test-Stream/issues{/number}","pulls_url":"https://api.github.com/repos/Test-More/Test-Stream/pulls{/number}","milestones_url":"https://api.github.com/repos/Test-More/Test-Stream/milestones{/number}","notifications_url":"https://api.github.com/repos/Test-More/Test-Stream/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Test-More/Test-Stream/labels{/name}","releases_url":"https://api.github.com/repos/Test-More/Test-Stream/releases{/id}","created_at":"2015-05-05T22:11:27Z","updated_at":"2015-10-31T18:46:29Z","pushed_at":"2015-12-06T17:59:31Z","git_url":"git://github.com/Test-More/Test-Stream.git","ssh_url":"git@github.com:Test-More/Test-Stream.git","clone_url":"https://github.com/Test-More/Test-Stream.git","svn_url":"https://github.com/Test-More/Test-Stream","homepage":"","size":1598,"stargazers_count":3,"watchers_count":3,"language":"Perl","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":9,"forks":6,"open_issues":9,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Test-More/Test-Stream/pulls/64"},"html":{"href":"https://github.com/Test-More/Test-Stream/pull/64"},"issue":{"href":"https://api.github.com/repos/Test-More/Test-Stream/issues/64"},"comments":{"href":"https://api.github.com/repos/Test-More/Test-Stream/issues/64/comments"},"review_comments":{"href":"https://api.github.com/repos/Test-More/Test-Stream/pulls/64/comments"},"review_comment":{"href":"https://api.github.com/repos/Test-More/Test-Stream/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Test-More/Test-Stream/pulls/64/commits"},"statuses":{"href":"https://api.github.com/repos/Test-More/Test-Stream/statuses/e69b5d0b6844a2a64f10d91d22fc08a3a40a42ac"}}}}