{"action":"created","comment":{"url":"https://api.github.com/repos/pinterest/elixir-thrift/pulls/comments/93822803","pull_request_review_id":14358578,"id":93822803,"diff_hunk":"@@ -65,4 +157,207 @@ defmodule Thrift.Generator.ServiceTest do\n     assert <<12, 0, 1, 11, 0, 1, 0, 0, 0, 22, rest::binary>> = serialized\n     assert <<\"That username is taken\", 0, 0>> = rest\n   end\n+\n+  thrift_test \"it should be able to execute a simple ping\", ctx do\n+    ServerSpy.set_reply(true)\n+\n+    {:ok, true} = FramedClient.ping(ctx.client)\n+\n+    assert {:ping, {}} == ServerSpy.get_args\n+  end\n+\n+  thrift_test \"it should be able to update the username\", ctx do\n+    ServerSpy.set_reply(true)\n+\n+    assert {:ok, true} = FramedClient.update_username(ctx.client, 1234, \"stinkypants\")\n+    assert {:update_username, {1234, \"stinkypants\"}} == ServerSpy.get_args\n+\n+  end\n+\n+  thrift_test \"it should be able to handle structs as function arguments\", ctx do\n+    ServerSpy.set_reply(true)\n+\n+    assert {:ok, true} = FramedClient.are_friends(ctx.client,\n+                                                  %User{id: 1, username: \"stinky\"},\n+                                                  %User{id: 28, username: \"less_stinky\"})\n+\n+    expected_args = {:are_friends, {{:User, 1, \"stinky\"}, {:User, 28, \"less_stinky\"}}}\n+    assert expected_args == ServerSpy.get_args\n+  end\n+\n+  thrift_test \"it should be able to return structs\", ctx do\n+    ServerSpy.set_reply({:User, 28392, 'stinky'})\n+\n+    {:ok, user} = FramedClient.get_by_id(ctx.client, 12345)\n+\n+    assert %User{id: 28392, username: \"stinky\"} == user","path":"test/generator/service_test.exs","position":148,"original_position":148,"commit_id":"95b4ccaedcdf213c6cea106934af9e4aed913756","original_commit_id":"95b4ccaedcdf213c6cea106934af9e4aed913756","user":{"login":"pinterest-ebert","id":24738485,"avatar_url":"https://avatars.githubusercontent.com/u/24738485?v=3","gravatar_id":"","url":"https://api.github.com/users/pinterest-ebert","html_url":"https://github.com/pinterest-ebert","followers_url":"https://api.github.com/users/pinterest-ebert/followers","following_url":"https://api.github.com/users/pinterest-ebert/following{/other_user}","gists_url":"https://api.github.com/users/pinterest-ebert/gists{/gist_id}","starred_url":"https://api.github.com/users/pinterest-ebert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pinterest-ebert/subscriptions","organizations_url":"https://api.github.com/users/pinterest-ebert/orgs","repos_url":"https://api.github.com/users/pinterest-ebert/repos","events_url":"https://api.github.com/users/pinterest-ebert/events{/privacy}","received_events_url":"https://api.github.com/users/pinterest-ebert/received_events","type":"User","site_admin":false},"body":"Large numbers should be written with underscores: 28_392","created_at":"2016-12-25T01:07:32Z","updated_at":"2016-12-25T01:07:32Z","html_url":"https://github.com/pinterest/elixir-thrift/pull/72#discussion_r93822803","pull_request_url":"https://api.github.com/repos/pinterest/elixir-thrift/pulls/72","_links":{"self":{"href":"https://api.github.com/repos/pinterest/elixir-thrift/pulls/comments/93822803"},"html":{"href":"https://github.com/pinterest/elixir-thrift/pull/72#discussion_r93822803"},"pull_request":{"href":"https://api.github.com/repos/pinterest/elixir-thrift/pulls/72"}}},"pull_request":{"url":"https://api.github.com/repos/pinterest/elixir-thrift/pulls/72","id":99009133,"html_url":"https://github.com/pinterest/elixir-thrift/pull/72","diff_url":"https://github.com/pinterest/elixir-thrift/pull/72.diff","patch_url":"https://github.com/pinterest/elixir-thrift/pull/72.patch","issue_url":"https://api.github.com/repos/pinterest/elixir-thrift/issues/72","number":72,"state":"open","locked":false,"title":"Generated Thrift client","user":{"login":"scohen","id":55809,"avatar_url":"https://avatars.githubusercontent.com/u/55809?v=3","gravatar_id":"","url":"https://api.github.com/users/scohen","html_url":"https://github.com/scohen","followers_url":"https://api.github.com/users/scohen/followers","following_url":"https://api.github.com/users/scohen/following{/other_user}","gists_url":"https://api.github.com/users/scohen/gists{/gist_id}","starred_url":"https://api.github.com/users/scohen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scohen/subscriptions","organizations_url":"https://api.github.com/users/scohen/orgs","repos_url":"https://api.github.com/users/scohen/repos","events_url":"https://api.github.com/users/scohen/events{/privacy}","received_events_url":"https://api.github.com/users/scohen/received_events","type":"User","site_admin":false},"body":"This PR is the start of an auto-generated Framed Thrift Binary Protocol\r\nclient.\r\nSome work was needed in order to make the client work. This included\r\nmodifying the existing generators to:\r\n\r\n  * Properly handle void return types\r\n  * Create exceptions using defexception rather than defstruct.\r\n\r\nI also modified the thrift test case so it was able to pass context from\r\nsetup functions. This is necessary because testing is accomplished by\r\ncreating an erlang server off of a test client and running actual thrift\r\ncalls against it. I've validated a number of different scenarios, and\r\nall appear to work","created_at":"2016-12-21T21:37:24Z","updated_at":"2016-12-25T01:07:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7397ddaaba9bc391f9b7450caf9b0e1da26e7593","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/pinterest/elixir-thrift/pulls/72/commits","review_comments_url":"https://api.github.com/repos/pinterest/elixir-thrift/pulls/72/comments","review_comment_url":"https://api.github.com/repos/pinterest/elixir-thrift/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pinterest/elixir-thrift/issues/72/comments","statuses_url":"https://api.github.com/repos/pinterest/elixir-thrift/statuses/95b4ccaedcdf213c6cea106934af9e4aed913756","head":{"label":"scohen:thrift_client","ref":"thrift_client","sha":"95b4ccaedcdf213c6cea106934af9e4aed913756","user":{"login":"scohen","id":55809,"avatar_url":"https://avatars.githubusercontent.com/u/55809?v=3","gravatar_id":"","url":"https://api.github.com/users/scohen","html_url":"https://github.com/scohen","followers_url":"https://api.github.com/users/scohen/followers","following_url":"https://api.github.com/users/scohen/following{/other_user}","gists_url":"https://api.github.com/users/scohen/gists{/gist_id}","starred_url":"https://api.github.com/users/scohen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scohen/subscriptions","organizations_url":"https://api.github.com/users/scohen/orgs","repos_url":"https://api.github.com/users/scohen/repos","events_url":"https://api.github.com/users/scohen/events{/privacy}","received_events_url":"https://api.github.com/users/scohen/received_events","type":"User","site_admin":false},"repo":{"id":49535237,"name":"elixir-thrift","full_name":"scohen/elixir-thrift","owner":{"login":"scohen","id":55809,"avatar_url":"https://avatars.githubusercontent.com/u/55809?v=3","gravatar_id":"","url":"https://api.github.com/users/scohen","html_url":"https://github.com/scohen","followers_url":"https://api.github.com/users/scohen/followers","following_url":"https://api.github.com/users/scohen/following{/other_user}","gists_url":"https://api.github.com/users/scohen/gists{/gist_id}","starred_url":"https://api.github.com/users/scohen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scohen/subscriptions","organizations_url":"https://api.github.com/users/scohen/orgs","repos_url":"https://api.github.com/users/scohen/repos","events_url":"https://api.github.com/users/scohen/events{/privacy}","received_events_url":"https://api.github.com/users/scohen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/scohen/elixir-thrift","description":"Elixir utilities for working with Thrift","fork":true,"url":"https://api.github.com/repos/scohen/elixir-thrift","forks_url":"https://api.github.com/repos/scohen/elixir-thrift/forks","keys_url":"https://api.github.com/repos/scohen/elixir-thrift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scohen/elixir-thrift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scohen/elixir-thrift/teams","hooks_url":"https://api.github.com/repos/scohen/elixir-thrift/hooks","issue_events_url":"https://api.github.com/repos/scohen/elixir-thrift/issues/events{/number}","events_url":"https://api.github.com/repos/scohen/elixir-thrift/events","assignees_url":"https://api.github.com/repos/scohen/elixir-thrift/assignees{/user}","branches_url":"https://api.github.com/repos/scohen/elixir-thrift/branches{/branch}","tags_url":"https://api.github.com/repos/scohen/elixir-thrift/tags","blobs_url":"https://api.github.com/repos/scohen/elixir-thrift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scohen/elixir-thrift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scohen/elixir-thrift/git/refs{/sha}","trees_url":"https://api.github.com/repos/scohen/elixir-thrift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scohen/elixir-thrift/statuses/{sha}","languages_url":"https://api.github.com/repos/scohen/elixir-thrift/languages","stargazers_url":"https://api.github.com/repos/scohen/elixir-thrift/stargazers","contributors_url":"https://api.github.com/repos/scohen/elixir-thrift/contributors","subscribers_url":"https://api.github.com/repos/scohen/elixir-thrift/subscribers","subscription_url":"https://api.github.com/repos/scohen/elixir-thrift/subscription","commits_url":"https://api.github.com/repos/scohen/elixir-thrift/commits{/sha}","git_commits_url":"https://api.github.com/repos/scohen/elixir-thrift/git/commits{/sha}","comments_url":"https://api.github.com/repos/scohen/elixir-thrift/comments{/number}","issue_comment_url":"https://api.github.com/repos/scohen/elixir-thrift/issues/comments{/number}","contents_url":"https://api.github.com/repos/scohen/elixir-thrift/contents/{+path}","compare_url":"https://api.github.com/repos/scohen/elixir-thrift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scohen/elixir-thrift/merges","archive_url":"https://api.github.com/repos/scohen/elixir-thrift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scohen/elixir-thrift/downloads","issues_url":"https://api.github.com/repos/scohen/elixir-thrift/issues{/number}","pulls_url":"https://api.github.com/repos/scohen/elixir-thrift/pulls{/number}","milestones_url":"https://api.github.com/repos/scohen/elixir-thrift/milestones{/number}","notifications_url":"https://api.github.com/repos/scohen/elixir-thrift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scohen/elixir-thrift/labels{/name}","releases_url":"https://api.github.com/repos/scohen/elixir-thrift/releases{/id}","deployments_url":"https://api.github.com/repos/scohen/elixir-thrift/deployments","created_at":"2016-01-12T23:17:51Z","updated_at":"2016-12-01T19:45:37Z","pushed_at":"2016-12-25T01:06:55Z","git_url":"git://github.com/scohen/elixir-thrift.git","ssh_url":"git@github.com:scohen/elixir-thrift.git","clone_url":"https://github.com/scohen/elixir-thrift.git","svn_url":"https://github.com/scohen/elixir-thrift","homepage":null,"size":322,"stargazers_count":0,"watchers_count":0,"language":"Erlang","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"pinterest:thrift_tng","ref":"thrift_tng","sha":"ce6e90efee9ca72b98a523891acfac1802c488b0","user":{"login":"pinterest","id":541152,"avatar_url":"https://avatars.githubusercontent.com/u/541152?v=3","gravatar_id":"","url":"https://api.github.com/users/pinterest","html_url":"https://github.com/pinterest","followers_url":"https://api.github.com/users/pinterest/followers","following_url":"https://api.github.com/users/pinterest/following{/other_user}","gists_url":"https://api.github.com/users/pinterest/gists{/gist_id}","starred_url":"https://api.github.com/users/pinterest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pinterest/subscriptions","organizations_url":"https://api.github.com/users/pinterest/orgs","repos_url":"https://api.github.com/users/pinterest/repos","events_url":"https://api.github.com/users/pinterest/events{/privacy}","received_events_url":"https://api.github.com/users/pinterest/received_events","type":"Organization","site_admin":false},"repo":{"id":43914111,"name":"elixir-thrift","full_name":"pinterest/elixir-thrift","owner":{"login":"pinterest","id":541152,"avatar_url":"https://avatars.githubusercontent.com/u/541152?v=3","gravatar_id":"","url":"https://api.github.com/users/pinterest","html_url":"https://github.com/pinterest","followers_url":"https://api.github.com/users/pinterest/followers","following_url":"https://api.github.com/users/pinterest/following{/other_user}","gists_url":"https://api.github.com/users/pinterest/gists{/gist_id}","starred_url":"https://api.github.com/users/pinterest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pinterest/subscriptions","organizations_url":"https://api.github.com/users/pinterest/orgs","repos_url":"https://api.github.com/users/pinterest/repos","events_url":"https://api.github.com/users/pinterest/events{/privacy}","received_events_url":"https://api.github.com/users/pinterest/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pinterest/elixir-thrift","description":"Thrift Utilities for Elixir","fork":false,"url":"https://api.github.com/repos/pinterest/elixir-thrift","forks_url":"https://api.github.com/repos/pinterest/elixir-thrift/forks","keys_url":"https://api.github.com/repos/pinterest/elixir-thrift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pinterest/elixir-thrift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pinterest/elixir-thrift/teams","hooks_url":"https://api.github.com/repos/pinterest/elixir-thrift/hooks","issue_events_url":"https://api.github.com/repos/pinterest/elixir-thrift/issues/events{/number}","events_url":"https://api.github.com/repos/pinterest/elixir-thrift/events","assignees_url":"https://api.github.com/repos/pinterest/elixir-thrift/assignees{/user}","branches_url":"https://api.github.com/repos/pinterest/elixir-thrift/branches{/branch}","tags_url":"https://api.github.com/repos/pinterest/elixir-thrift/tags","blobs_url":"https://api.github.com/repos/pinterest/elixir-thrift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pinterest/elixir-thrift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pinterest/elixir-thrift/git/refs{/sha}","trees_url":"https://api.github.com/repos/pinterest/elixir-thrift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pinterest/elixir-thrift/statuses/{sha}","languages_url":"https://api.github.com/repos/pinterest/elixir-thrift/languages","stargazers_url":"https://api.github.com/repos/pinterest/elixir-thrift/stargazers","contributors_url":"https://api.github.com/repos/pinterest/elixir-thrift/contributors","subscribers_url":"https://api.github.com/repos/pinterest/elixir-thrift/subscribers","subscription_url":"https://api.github.com/repos/pinterest/elixir-thrift/subscription","commits_url":"https://api.github.com/repos/pinterest/elixir-thrift/commits{/sha}","git_commits_url":"https://api.github.com/repos/pinterest/elixir-thrift/git/commits{/sha}","comments_url":"https://api.github.com/repos/pinterest/elixir-thrift/comments{/number}","issue_comment_url":"https://api.github.com/repos/pinterest/elixir-thrift/issues/comments{/number}","contents_url":"https://api.github.com/repos/pinterest/elixir-thrift/contents/{+path}","compare_url":"https://api.github.com/repos/pinterest/elixir-thrift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pinterest/elixir-thrift/merges","archive_url":"https://api.github.com/repos/pinterest/elixir-thrift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pinterest/elixir-thrift/downloads","issues_url":"https://api.github.com/repos/pinterest/elixir-thrift/issues{/number}","pulls_url":"https://api.github.com/repos/pinterest/elixir-thrift/pulls{/number}","milestones_url":"https://api.github.com/repos/pinterest/elixir-thrift/milestones{/number}","notifications_url":"https://api.github.com/repos/pinterest/elixir-thrift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pinterest/elixir-thrift/labels{/name}","releases_url":"https://api.github.com/repos/pinterest/elixir-thrift/releases{/id}","deployments_url":"https://api.github.com/repos/pinterest/elixir-thrift/deployments","created_at":"2015-10-08T20:17:30Z","updated_at":"2016-12-19T20:27:29Z","pushed_at":"2016-12-25T01:06:56Z","git_url":"git://github.com/pinterest/elixir-thrift.git","ssh_url":"git@github.com:pinterest/elixir-thrift.git","clone_url":"https://github.com/pinterest/elixir-thrift.git","svn_url":"https://github.com/pinterest/elixir-thrift","homepage":"https://hexdocs.pm/thrift/","size":190,"stargazers_count":36,"watchers_count":36,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":5,"forks":12,"open_issues":5,"watchers":36,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pinterest/elixir-thrift/pulls/72"},"html":{"href":"https://github.com/pinterest/elixir-thrift/pull/72"},"issue":{"href":"https://api.github.com/repos/pinterest/elixir-thrift/issues/72"},"comments":{"href":"https://api.github.com/repos/pinterest/elixir-thrift/issues/72/comments"},"review_comments":{"href":"https://api.github.com/repos/pinterest/elixir-thrift/pulls/72/comments"},"review_comment":{"href":"https://api.github.com/repos/pinterest/elixir-thrift/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pinterest/elixir-thrift/pulls/72/commits"},"statuses":{"href":"https://api.github.com/repos/pinterest/elixir-thrift/statuses/95b4ccaedcdf213c6cea106934af9e4aed913756"}}}}
{"actor":{"display_login":"pinterest-ebert"}}