{"action":"created","comment":{"url":"https://api.github.com/repos/codeforamerica/michigan-benefits/pulls/comments/135621897","pull_request_review_id":59054270,"id":135621897,"diff_hunk":"@@ -30,22 +31,19 @@ def send_pdf\n   def fax_pdf\n     if fax_phone_number_exists?\n       Fax.send_fax(\n-        number: fax_number,\n+        number: fax_recipient_number,\n         file: complete_form_with_cover.path,\n         recipient: fax_recipient_name,\n       )\n     end\n   end\n \n-  def fax_number\n-    ENV.fetch(\"FAX_NUMBER\", \"\")\n-  end\n-\n-  def fax_recipient_name\n-    ENV.fetch(\"FAX_RECIPIENT\", \"Michigan Bridges\")\n+  def fax_recipient\n+    FaxRecipient.new(residential_address: residential_address)\n   end\n+  delegate :number, :name, to: :fax_recipient, prefix: true","path":"app/jobs/send_application_job.rb","position":29,"original_position":29,"commit_id":"e1a57ca0fcb70239b4e9ac7011c3969274a798fd","original_commit_id":"e1a57ca0fcb70239b4e9ac7011c3969274a798fd","user":{"login":"jessieay","id":601515,"avatar_url":"https://avatars0.githubusercontent.com/u/601515?v=4","gravatar_id":"","url":"https://api.github.com/users/jessieay","html_url":"https://github.com/jessieay","followers_url":"https://api.github.com/users/jessieay/followers","following_url":"https://api.github.com/users/jessieay/following{/other_user}","gists_url":"https://api.github.com/users/jessieay/gists{/gist_id}","starred_url":"https://api.github.com/users/jessieay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jessieay/subscriptions","organizations_url":"https://api.github.com/users/jessieay/orgs","repos_url":"https://api.github.com/users/jessieay/repos","events_url":"https://api.github.com/users/jessieay/events{/privacy}","received_events_url":"https://api.github.com/users/jessieay/received_events","type":"User","site_admin":false},"body":"this is not highly important to me, but I generally prefer explicit methods rather than `delegate` because when looking for the logic behind something I usually search for the method name, eg `def fax_recipient_number` and if it is defined with`delegate` I will not find it. ","created_at":"2017-08-28T20:13:43Z","updated_at":"2017-08-28T20:34:36Z","html_url":"https://github.com/codeforamerica/michigan-benefits/pull/145#discussion_r135621897","pull_request_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/pulls/145","_links":{"self":{"href":"https://api.github.com/repos/codeforamerica/michigan-benefits/pulls/comments/135621897"},"html":{"href":"https://github.com/codeforamerica/michigan-benefits/pull/145#discussion_r135621897"},"pull_request":{"href":"https://api.github.com/repos/codeforamerica/michigan-benefits/pulls/145"}}},"pull_request":{"url":"https://api.github.com/repos/codeforamerica/michigan-benefits/pulls/145","id":138003300,"html_url":"https://github.com/codeforamerica/michigan-benefits/pull/145","diff_url":"https://github.com/codeforamerica/michigan-benefits/pull/145.diff","patch_url":"https://github.com/codeforamerica/michigan-benefits/pull/145.patch","issue_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/issues/145","number":145,"state":"open","locked":false,"title":"Fax particular offices based upon which zip code the applicant resides in","user":{"login":"zspencer","id":50284,"avatar_url":"https://avatars1.githubusercontent.com/u/50284?v=4","gravatar_id":"","url":"https://api.github.com/users/zspencer","html_url":"https://github.com/zspencer","followers_url":"https://api.github.com/users/zspencer/followers","following_url":"https://api.github.com/users/zspencer/following{/other_user}","gists_url":"https://api.github.com/users/zspencer/gists{/gist_id}","starred_url":"https://api.github.com/users/zspencer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zspencer/subscriptions","organizations_url":"https://api.github.com/users/zspencer/orgs","repos_url":"https://api.github.com/users/zspencer/repos","events_url":"https://api.github.com/users/zspencer/events{/privacy}","received_events_url":"https://api.github.com/users/zspencer/received_events","type":"User","site_admin":false},"body":"This will resolve https://trello.com/c/fDsq8kig/154-when-a-client-submits-an-application-it-goes-to-the-correct-mdhhs-office-based-on-their-zip-code\r\n\r\nChanges\r\n=======\r\n- [x] Remove the FAX_NUMBER environment variable\r\n- [x] ~~~Maybe? Remove the FAX_RECIPIENT environment variable?~~~\r\n- [ ] Write a feature spec that demonstrates differentiating fax recipient based upon zip code\r\n- [x] Write unit-level permutation specs that:\r\n   - [x] Exercise determining the fax number based upon which zip codes an office serves and the application is from\r\n   - [x] Excercise what happens when the zip code is not found in any offices\r\n\r\nRisks\r\n=====\r\n- [ ] Did I miss zip codes for the mapping?\r\n- [ ] Do we have the appropriate fax numbers for the offices for production?\r\n- [ ] Did we set the APP_RELEASE_STAGE variable appropriately for each application in the pipeline?","created_at":"2017-08-28T18:06:04Z","updated_at":"2017-08-28T20:34:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"04b05768da68d6b049bcc63a65cef3767b9f1234","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/pulls/145/commits","review_comments_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/pulls/145/comments","review_comment_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/issues/145/comments","statuses_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/statuses/e1a57ca0fcb70239b4e9ac7011c3969274a798fd","head":{"label":"codeforamerica:map-zip-codes-to-appropriate-initial-offices","ref":"map-zip-codes-to-appropriate-initial-offices","sha":"e1a57ca0fcb70239b4e9ac7011c3969274a798fd","user":{"login":"codeforamerica","id":337792,"avatar_url":"https://avatars2.githubusercontent.com/u/337792?v=4","gravatar_id":"","url":"https://api.github.com/users/codeforamerica","html_url":"https://github.com/codeforamerica","followers_url":"https://api.github.com/users/codeforamerica/followers","following_url":"https://api.github.com/users/codeforamerica/following{/other_user}","gists_url":"https://api.github.com/users/codeforamerica/gists{/gist_id}","starred_url":"https://api.github.com/users/codeforamerica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeforamerica/subscriptions","organizations_url":"https://api.github.com/users/codeforamerica/orgs","repos_url":"https://api.github.com/users/codeforamerica/repos","events_url":"https://api.github.com/users/codeforamerica/events{/privacy}","received_events_url":"https://api.github.com/users/codeforamerica/received_events","type":"Organization","site_admin":false},"repo":{"id":83607937,"name":"michigan-benefits","full_name":"codeforamerica/michigan-benefits","owner":{"login":"codeforamerica","id":337792,"avatar_url":"https://avatars2.githubusercontent.com/u/337792?v=4","gravatar_id":"","url":"https://api.github.com/users/codeforamerica","html_url":"https://github.com/codeforamerica","followers_url":"https://api.github.com/users/codeforamerica/followers","following_url":"https://api.github.com/users/codeforamerica/following{/other_user}","gists_url":"https://api.github.com/users/codeforamerica/gists{/gist_id}","starred_url":"https://api.github.com/users/codeforamerica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeforamerica/subscriptions","organizations_url":"https://api.github.com/users/codeforamerica/orgs","repos_url":"https://api.github.com/users/codeforamerica/repos","events_url":"https://api.github.com/users/codeforamerica/events{/privacy}","received_events_url":"https://api.github.com/users/codeforamerica/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codeforamerica/michigan-benefits","description":"Digital Assister for Michigan","fork":false,"url":"https://api.github.com/repos/codeforamerica/michigan-benefits","forks_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/forks","keys_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/teams","hooks_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/hooks","issue_events_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/issues/events{/number}","events_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/events","assignees_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/assignees{/user}","branches_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/branches{/branch}","tags_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/tags","blobs_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/git/refs{/sha}","trees_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/statuses/{sha}","languages_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/languages","stargazers_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/stargazers","contributors_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/contributors","subscribers_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/subscribers","subscription_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/subscription","commits_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/commits{/sha}","git_commits_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/git/commits{/sha}","comments_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/comments{/number}","issue_comment_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/issues/comments{/number}","contents_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/contents/{+path}","compare_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/merges","archive_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/downloads","issues_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/issues{/number}","pulls_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/pulls{/number}","milestones_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/milestones{/number}","notifications_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/labels{/name}","releases_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/releases{/id}","deployments_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/deployments","created_at":"2017-03-01T22:24:46Z","updated_at":"2017-07-28T18:25:27Z","pushed_at":"2017-08-28T19:14:31Z","git_url":"git://github.com/codeforamerica/michigan-benefits.git","ssh_url":"git@github.com:codeforamerica/michigan-benefits.git","clone_url":"https://github.com/codeforamerica/michigan-benefits.git","svn_url":"https://github.com/codeforamerica/michigan-benefits","homepage":"","size":7013,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":3,"default_branch":"master"}},"base":{"label":"codeforamerica:master","ref":"master","sha":"2ce72fe565c83a2475594732b2e522a0d182ec34","user":{"login":"codeforamerica","id":337792,"avatar_url":"https://avatars2.githubusercontent.com/u/337792?v=4","gravatar_id":"","url":"https://api.github.com/users/codeforamerica","html_url":"https://github.com/codeforamerica","followers_url":"https://api.github.com/users/codeforamerica/followers","following_url":"https://api.github.com/users/codeforamerica/following{/other_user}","gists_url":"https://api.github.com/users/codeforamerica/gists{/gist_id}","starred_url":"https://api.github.com/users/codeforamerica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeforamerica/subscriptions","organizations_url":"https://api.github.com/users/codeforamerica/orgs","repos_url":"https://api.github.com/users/codeforamerica/repos","events_url":"https://api.github.com/users/codeforamerica/events{/privacy}","received_events_url":"https://api.github.com/users/codeforamerica/received_events","type":"Organization","site_admin":false},"repo":{"id":83607937,"name":"michigan-benefits","full_name":"codeforamerica/michigan-benefits","owner":{"login":"codeforamerica","id":337792,"avatar_url":"https://avatars2.githubusercontent.com/u/337792?v=4","gravatar_id":"","url":"https://api.github.com/users/codeforamerica","html_url":"https://github.com/codeforamerica","followers_url":"https://api.github.com/users/codeforamerica/followers","following_url":"https://api.github.com/users/codeforamerica/following{/other_user}","gists_url":"https://api.github.com/users/codeforamerica/gists{/gist_id}","starred_url":"https://api.github.com/users/codeforamerica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeforamerica/subscriptions","organizations_url":"https://api.github.com/users/codeforamerica/orgs","repos_url":"https://api.github.com/users/codeforamerica/repos","events_url":"https://api.github.com/users/codeforamerica/events{/privacy}","received_events_url":"https://api.github.com/users/codeforamerica/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codeforamerica/michigan-benefits","description":"Digital Assister for Michigan","fork":false,"url":"https://api.github.com/repos/codeforamerica/michigan-benefits","forks_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/forks","keys_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/teams","hooks_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/hooks","issue_events_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/issues/events{/number}","events_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/events","assignees_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/assignees{/user}","branches_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/branches{/branch}","tags_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/tags","blobs_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/git/refs{/sha}","trees_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/statuses/{sha}","languages_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/languages","stargazers_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/stargazers","contributors_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/contributors","subscribers_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/subscribers","subscription_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/subscription","commits_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/commits{/sha}","git_commits_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/git/commits{/sha}","comments_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/comments{/number}","issue_comment_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/issues/comments{/number}","contents_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/contents/{+path}","compare_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/merges","archive_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/downloads","issues_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/issues{/number}","pulls_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/pulls{/number}","milestones_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/milestones{/number}","notifications_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/labels{/name}","releases_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/releases{/id}","deployments_url":"https://api.github.com/repos/codeforamerica/michigan-benefits/deployments","created_at":"2017-03-01T22:24:46Z","updated_at":"2017-07-28T18:25:27Z","pushed_at":"2017-08-28T19:14:31Z","git_url":"git://github.com/codeforamerica/michigan-benefits.git","ssh_url":"git@github.com:codeforamerica/michigan-benefits.git","clone_url":"https://github.com/codeforamerica/michigan-benefits.git","svn_url":"https://github.com/codeforamerica/michigan-benefits","homepage":"","size":7013,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codeforamerica/michigan-benefits/pulls/145"},"html":{"href":"https://github.com/codeforamerica/michigan-benefits/pull/145"},"issue":{"href":"https://api.github.com/repos/codeforamerica/michigan-benefits/issues/145"},"comments":{"href":"https://api.github.com/repos/codeforamerica/michigan-benefits/issues/145/comments"},"review_comments":{"href":"https://api.github.com/repos/codeforamerica/michigan-benefits/pulls/145/comments"},"review_comment":{"href":"https://api.github.com/repos/codeforamerica/michigan-benefits/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codeforamerica/michigan-benefits/pulls/145/commits"},"statuses":{"href":"https://api.github.com/repos/codeforamerica/michigan-benefits/statuses/e1a57ca0fcb70239b4e9ac7011c3969274a798fd"}}}}
{"actor":{"display_login":"jessieay"}}