{"action":"created","comment":{"url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/pulls/comments/71412567","id":71412567,"diff_hunk":"@@ -193,4 +193,29 @@\n       its(:body){ should == nil.to_json }\n     end\n   end\n+\n+  describe 'PATCH save_recipient' do\n+    let(:current_user){ project.user }\n+   \n+    context 'when the project does not have a recipient' do\n+      xit 'sends a create recipient request to pagarme and updates the project recipient' do\n+        bank_account  = {\n+          bank_code: '001',\n+          agencia: '0001',\n+          conta: '000001',\n+          conta_dv: '00',\n+          document_number: '111.111.111-11',\n+          legal_name: 'Juntos com você API'\n+        }\n+      \n+        #before { patch :save_recipient, id: project.id, bank_account: bank_account, locale: :pt }\n+\n+        #project.reload\n+        #expect(project.recipient).not_to be_empty ","path":"spec/controllers/projects_controller_spec.rb","position":22,"original_position":22,"commit_id":"ae082c753a306bfcfe727bb14b4c580f1eb73225","original_commit_id":"ae082c753a306bfcfe727bb14b4c580f1eb73225","user":{"login":"vitortalaia","id":5838414,"avatar_url":"https://avatars.githubusercontent.com/u/5838414?v=3","gravatar_id":"","url":"https://api.github.com/users/vitortalaia","html_url":"https://github.com/vitortalaia","followers_url":"https://api.github.com/users/vitortalaia/followers","following_url":"https://api.github.com/users/vitortalaia/following{/other_user}","gists_url":"https://api.github.com/users/vitortalaia/gists{/gist_id}","starred_url":"https://api.github.com/users/vitortalaia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitortalaia/subscriptions","organizations_url":"https://api.github.com/users/vitortalaia/orgs","repos_url":"https://api.github.com/users/vitortalaia/repos","events_url":"https://api.github.com/users/vitortalaia/events{/privacy}","received_events_url":"https://api.github.com/users/vitortalaia/received_events","type":"User","site_admin":false},"body":"Precisa desse código comentado?","created_at":"2016-07-19T20:03:02Z","updated_at":"2016-07-19T20:03:02Z","html_url":"https://github.com/juntos-com-vc/juntos.com.vc/pull/175#discussion_r71412567","pull_request_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/pulls/175","_links":{"self":{"href":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/pulls/comments/71412567"},"html":{"href":"https://github.com/juntos-com-vc/juntos.com.vc/pull/175#discussion_r71412567"},"pull_request":{"href":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/pulls/175"}}},"pull_request":{"url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/pulls/175","id":77880304,"html_url":"https://github.com/juntos-com-vc/juntos.com.vc/pull/175","diff_url":"https://github.com/juntos-com-vc/juntos.com.vc/pull/175.diff","patch_url":"https://github.com/juntos-com-vc/juntos.com.vc/pull/175.patch","issue_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/issues/175","number":175,"state":"open","locked":false,"title":"Fix/recurring","user":{"login":"andrezacm","id":1102840,"avatar_url":"https://avatars.githubusercontent.com/u/1102840?v=3","gravatar_id":"","url":"https://api.github.com/users/andrezacm","html_url":"https://github.com/andrezacm","followers_url":"https://api.github.com/users/andrezacm/followers","following_url":"https://api.github.com/users/andrezacm/following{/other_user}","gists_url":"https://api.github.com/users/andrezacm/gists{/gist_id}","starred_url":"https://api.github.com/users/andrezacm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrezacm/subscriptions","organizations_url":"https://api.github.com/users/andrezacm/orgs","repos_url":"https://api.github.com/users/andrezacm/repos","events_url":"https://api.github.com/users/andrezacm/events{/privacy}","received_events_url":"https://api.github.com/users/andrezacm/received_events","type":"User","site_admin":false},"body":"This PR aims to fix and refactor handling project recipient.\r\n\r\nContext: When a project is created in a recurring channel, it needs to have a [recipient in PagarMe](https://docs.pagar.me/api/#recebedores) in order to receive contributions. \r\n\r\n- Recipient worker was removed, creating a recipient is not a action that needs to run in background.\r\n- Bank info view was created to handle this information, it's not clear to show it together in basics form the way that it was.\r\n- save_recipient action in projects_controller was created in order to give the user a feedback about the action of create or update a recipient.\r\n- PagarmeService was split into RecipientService, CreateRemoteRecipient, UpdateRemoteRecipient, and HandleProjectRecipientService.","created_at":"2016-07-18T21:12:10Z","updated_at":"2016-07-19T20:03:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"727afdea6b98bfb6269add4438f24a5292656aeb","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/pulls/175/commits","review_comments_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/pulls/175/comments","review_comment_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/issues/175/comments","statuses_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/statuses/ae082c753a306bfcfe727bb14b4c580f1eb73225","head":{"label":"juntos-com-vc:fix/recurring","ref":"fix/recurring","sha":"ae082c753a306bfcfe727bb14b4c580f1eb73225","user":{"login":"juntos-com-vc","id":16776745,"avatar_url":"https://avatars.githubusercontent.com/u/16776745?v=3","gravatar_id":"","url":"https://api.github.com/users/juntos-com-vc","html_url":"https://github.com/juntos-com-vc","followers_url":"https://api.github.com/users/juntos-com-vc/followers","following_url":"https://api.github.com/users/juntos-com-vc/following{/other_user}","gists_url":"https://api.github.com/users/juntos-com-vc/gists{/gist_id}","starred_url":"https://api.github.com/users/juntos-com-vc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juntos-com-vc/subscriptions","organizations_url":"https://api.github.com/users/juntos-com-vc/orgs","repos_url":"https://api.github.com/users/juntos-com-vc/repos","events_url":"https://api.github.com/users/juntos-com-vc/events{/privacy}","received_events_url":"https://api.github.com/users/juntos-com-vc/received_events","type":"Organization","site_admin":false},"repo":{"id":25652386,"name":"juntos.com.vc","full_name":"juntos-com-vc/juntos.com.vc","owner":{"login":"juntos-com-vc","id":16776745,"avatar_url":"https://avatars.githubusercontent.com/u/16776745?v=3","gravatar_id":"","url":"https://api.github.com/users/juntos-com-vc","html_url":"https://github.com/juntos-com-vc","followers_url":"https://api.github.com/users/juntos-com-vc/followers","following_url":"https://api.github.com/users/juntos-com-vc/following{/other_user}","gists_url":"https://api.github.com/users/juntos-com-vc/gists{/gist_id}","starred_url":"https://api.github.com/users/juntos-com-vc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juntos-com-vc/subscriptions","organizations_url":"https://api.github.com/users/juntos-com-vc/orgs","repos_url":"https://api.github.com/users/juntos-com-vc/repos","events_url":"https://api.github.com/users/juntos-com-vc/events{/privacy}","received_events_url":"https://api.github.com/users/juntos-com-vc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/juntos-com-vc/juntos.com.vc","description":"","fork":false,"url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc","forks_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/forks","keys_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/teams","hooks_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/hooks","issue_events_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/issues/events{/number}","events_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/events","assignees_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/assignees{/user}","branches_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/branches{/branch}","tags_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/tags","blobs_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/git/refs{/sha}","trees_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/statuses/{sha}","languages_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/languages","stargazers_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/stargazers","contributors_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/contributors","subscribers_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/subscribers","subscription_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/subscription","commits_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/commits{/sha}","git_commits_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/git/commits{/sha}","comments_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/comments{/number}","issue_comment_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/issues/comments{/number}","contents_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/contents/{+path}","compare_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/merges","archive_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/downloads","issues_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/issues{/number}","pulls_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/pulls{/number}","milestones_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/milestones{/number}","notifications_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/labels{/name}","releases_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/releases{/id}","deployments_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/deployments","created_at":"2014-10-23T18:43:07Z","updated_at":"2016-06-10T21:55:40Z","pushed_at":"2016-07-19T19:46:53Z","git_url":"git://github.com/juntos-com-vc/juntos.com.vc.git","ssh_url":"git@github.com:juntos-com-vc/juntos.com.vc.git","clone_url":"https://github.com/juntos-com-vc/juntos.com.vc.git","svn_url":"https://github.com/juntos-com-vc/juntos.com.vc","homepage":null,"size":50520,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":4,"default_branch":"master"}},"base":{"label":"juntos-com-vc:master","ref":"master","sha":"9748f9479ab89699430f9e62cdaa04cfd54dd32f","user":{"login":"juntos-com-vc","id":16776745,"avatar_url":"https://avatars.githubusercontent.com/u/16776745?v=3","gravatar_id":"","url":"https://api.github.com/users/juntos-com-vc","html_url":"https://github.com/juntos-com-vc","followers_url":"https://api.github.com/users/juntos-com-vc/followers","following_url":"https://api.github.com/users/juntos-com-vc/following{/other_user}","gists_url":"https://api.github.com/users/juntos-com-vc/gists{/gist_id}","starred_url":"https://api.github.com/users/juntos-com-vc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juntos-com-vc/subscriptions","organizations_url":"https://api.github.com/users/juntos-com-vc/orgs","repos_url":"https://api.github.com/users/juntos-com-vc/repos","events_url":"https://api.github.com/users/juntos-com-vc/events{/privacy}","received_events_url":"https://api.github.com/users/juntos-com-vc/received_events","type":"Organization","site_admin":false},"repo":{"id":25652386,"name":"juntos.com.vc","full_name":"juntos-com-vc/juntos.com.vc","owner":{"login":"juntos-com-vc","id":16776745,"avatar_url":"https://avatars.githubusercontent.com/u/16776745?v=3","gravatar_id":"","url":"https://api.github.com/users/juntos-com-vc","html_url":"https://github.com/juntos-com-vc","followers_url":"https://api.github.com/users/juntos-com-vc/followers","following_url":"https://api.github.com/users/juntos-com-vc/following{/other_user}","gists_url":"https://api.github.com/users/juntos-com-vc/gists{/gist_id}","starred_url":"https://api.github.com/users/juntos-com-vc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juntos-com-vc/subscriptions","organizations_url":"https://api.github.com/users/juntos-com-vc/orgs","repos_url":"https://api.github.com/users/juntos-com-vc/repos","events_url":"https://api.github.com/users/juntos-com-vc/events{/privacy}","received_events_url":"https://api.github.com/users/juntos-com-vc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/juntos-com-vc/juntos.com.vc","description":"","fork":false,"url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc","forks_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/forks","keys_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/teams","hooks_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/hooks","issue_events_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/issues/events{/number}","events_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/events","assignees_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/assignees{/user}","branches_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/branches{/branch}","tags_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/tags","blobs_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/git/refs{/sha}","trees_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/statuses/{sha}","languages_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/languages","stargazers_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/stargazers","contributors_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/contributors","subscribers_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/subscribers","subscription_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/subscription","commits_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/commits{/sha}","git_commits_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/git/commits{/sha}","comments_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/comments{/number}","issue_comment_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/issues/comments{/number}","contents_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/contents/{+path}","compare_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/merges","archive_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/downloads","issues_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/issues{/number}","pulls_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/pulls{/number}","milestones_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/milestones{/number}","notifications_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/labels{/name}","releases_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/releases{/id}","deployments_url":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/deployments","created_at":"2014-10-23T18:43:07Z","updated_at":"2016-06-10T21:55:40Z","pushed_at":"2016-07-19T19:46:53Z","git_url":"git://github.com/juntos-com-vc/juntos.com.vc.git","ssh_url":"git@github.com:juntos-com-vc/juntos.com.vc.git","clone_url":"https://github.com/juntos-com-vc/juntos.com.vc.git","svn_url":"https://github.com/juntos-com-vc/juntos.com.vc","homepage":null,"size":50520,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/pulls/175"},"html":{"href":"https://github.com/juntos-com-vc/juntos.com.vc/pull/175"},"issue":{"href":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/issues/175"},"comments":{"href":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/issues/175/comments"},"review_comments":{"href":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/pulls/175/comments"},"review_comment":{"href":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/pulls/175/commits"},"statuses":{"href":"https://api.github.com/repos/juntos-com-vc/juntos.com.vc/statuses/ae082c753a306bfcfe727bb14b4c580f1eb73225"}}}}
{"actor":{"display_login":"vitortalaia"}}