{"action":"created","comment":{"url":"https://api.github.com/repos/AgileVentures/shf-project/pulls/comments/140342653","pull_request_review_id":64402881,"id":140342653,"diff_hunk":"@@ -0,0 +1,17 @@\n+- provide :signoff do\n+  = render 'admin_mailer/signoff'\n+\n+\n+= t('shf_mailer.admin.new_application_received.message_text.new_app_arrived')\n+\\\n+= t('shf_mailer.admin.new_application_received.message_text.from')\n+= \"     #{@member_app.user.full_name}\"","path":"app/views/admin_mailer/member_application_received.text.haml","position":8,"original_position":8,"commit_id":"267030e425a20cffeba7b51dbd9f5c684c1ee64e","original_commit_id":"267030e425a20cffeba7b51dbd9f5c684c1ee64e","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"`= \"...\"` should be rewritten as `...`","created_at":"2017-09-21T19:52:18Z","updated_at":"2017-09-21T19:52:18Z","html_url":"https://github.com/AgileVentures/shf-project/pull/318#discussion_r140342653","pull_request_url":"https://api.github.com/repos/AgileVentures/shf-project/pulls/318","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/AgileVentures/shf-project/pulls/comments/140342653"},"html":{"href":"https://github.com/AgileVentures/shf-project/pull/318#discussion_r140342653"},"pull_request":{"href":"https://api.github.com/repos/AgileVentures/shf-project/pulls/318"}}},"pull_request":{"url":"https://api.github.com/repos/AgileVentures/shf-project/pulls/318","id":133064004,"html_url":"https://github.com/AgileVentures/shf-project/pull/318","diff_url":"https://github.com/AgileVentures/shf-project/pull/318.diff","patch_url":"https://github.com/AgileVentures/shf-project/pull/318.patch","issue_url":"https://api.github.com/repos/AgileVentures/shf-project/issues/318","number":318,"state":"open","locked":false,"title":"[WIP] emails can be sent using MailGun","user":{"login":"weedySeaDragon","id":673794,"avatar_url":"https://avatars0.githubusercontent.com/u/673794?v=4","gravatar_id":"","url":"https://api.github.com/users/weedySeaDragon","html_url":"https://github.com/weedySeaDragon","followers_url":"https://api.github.com/users/weedySeaDragon/followers","following_url":"https://api.github.com/users/weedySeaDragon/following{/other_user}","gists_url":"https://api.github.com/users/weedySeaDragon/gists{/gist_id}","starred_url":"https://api.github.com/users/weedySeaDragon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weedySeaDragon/subscriptions","organizations_url":"https://api.github.com/users/weedySeaDragon/orgs","repos_url":"https://api.github.com/users/weedySeaDragon/repos","events_url":"https://api.github.com/users/weedySeaDragon/events{/privacy}","received_events_url":"https://api.github.com/users/weedySeaDragon/received_events","type":"User","site_admin":false},"body":"**PT Story:  Email service on Production server** https://www.pivotaltracker.com/story/show/140637017\r\n\r\n(Yes, it's another _epic_ PR. )\r\n\r\n## Changes proposed in this pull request:\r\n1.  Use the official Mailgun gem `mailgun-ruby` (is current; works on staged DigitalOcean server I tested with)\r\n2.  **Created the **ShfMailer**  class as the parent class for all mailers needed.**  This class uses MailGun and has some helper methods.\r\n    - this is a subclass of `Devise::Mailer` so that all Devise-related mails will be sent correctly\r\n    - `config/initializers/devise.rb` sets `ShfMailer` as the mailer to be used for Devise-related actions\r\n\r\n2.  **Created the layouts and views for the emails** (HTML and text versions)\r\n    The HTML version needs to look like the mails that SHF sends out via MailChimp so that there is 1 consistent branding/look across all emails no matter where they originate.\r\n       - To accomplish this, I copied the HTML in sample MailChimp emails and put that into the mailer layout  (`app/views/layouts/mailer.html.haml`).  This is ugly HTML.  I also copied nearly all of the styles used in the MailChimp sample email.  That makes the stylesheet (`shf-mailer.scss`) ugly as well. \r\n\r\n    - Formatting and the content can be addressed in another PR.  I wanted to get this in as a starting point.\r\n\r\n\r\n**Help needed on the failing cucumber test**\r\n1 cucumber test is failing.  The email is generated in English (_locale = :en_)  but the test runs in Swedish (_locale = :sv_).  I don't understand why the email is being generated in English.  \r\n\r\n\r\n**_Note:_**  You can preview emails in Rails via files set up in `spec/mailers/previews`.  If you have this branch and are running Rails, go to `http://localhost:3000/rails/mailers`.  (That's how these screenshots were done.)\r\n\r\n**Suggestions for reviewing this monster:**\r\n- focus first on **ShfMailer** (`app/mailers/shf_mailer.rb` ) and its subclasses.  \r\n- look at the views for the `text` emails and understand those before looking at the `html` views. It will probably be easier that way.\r\n\r\nFeedback on _tests_ is appreciated.  I have some RSpec tests.  I _think_ those are sufficient.  (They probably over-test a wee bit.)  I have not yet written feature tests for the emails.  I figured those can come when we actually enable each feature (e.g. actually _send_ the email when a membership application state is changed, etc.)\r\n\r\n\r\n---\r\n   \r\n## Screenshots of the HTML emails\r\n\r\n#### _sent to a user:  Password has been reset_\r\n\r\n<img width=\"564\" alt=\"to-user-password-reset-html\" src=\"https://user-images.githubusercontent.com/673794/30682325-205bf030-9e5e-11e7-9da8-57904418107c.png\">\r\n\r\n---\r\n---\r\n\r\n#### _sent to a user: Your membership application has been received (acknowledgement)_\r\n\r\n<img width=\"564\" alt=\"to-user-membership-app-received-html\" src=\"https://user-images.githubusercontent.com/673794/30682357-4527300a-9e5e-11e7-8f51-9e212b1bba87.png\">\r\n\r\n---\r\n---\r\n\r\n####  _sent to a user: Your membership application has been accepted_\r\n\r\n<img width=\"567\" alt=\"to-user-membership-accepted-html\" src=\"https://user-images.githubusercontent.com/673794/30682534-d57b8480-9e5e-11e7-8afc-3579dbffd1b8.png\">\r\n\r\n\r\n---\r\n---\r\n\r\n####  _sent to the admin: A New Membership Application has arrived_\r\n\r\n<img width=\"564\" alt=\"to-admin-new-app-received-html\" src=\"https://user-images.githubusercontent.com/673794/30682555-ee14bd9a-9e5e-11e7-97a3-c014b05fa599.png\">\r\n\r\n\r\n\r\n---\r\n---\r\n\r\nReady for review:\r\n@AgileVentures/shf-project-team \r\n","created_at":"2017-07-28T22:39:16Z","updated_at":"2017-09-21T19:52:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"72730149d24e76d88f540c7538aff05d0a78e08f","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/AgileVentures/shf-project/pulls/318/commits","review_comments_url":"https://api.github.com/repos/AgileVentures/shf-project/pulls/318/comments","review_comment_url":"https://api.github.com/repos/AgileVentures/shf-project/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AgileVentures/shf-project/issues/318/comments","statuses_url":"https://api.github.com/repos/AgileVentures/shf-project/statuses/267030e425a20cffeba7b51dbd9f5c684c1ee64e","head":{"label":"weedySeaDragon:sprint20-#140637017-mailgun-email","ref":"sprint20-#140637017-mailgun-email","sha":"267030e425a20cffeba7b51dbd9f5c684c1ee64e","user":{"login":"weedySeaDragon","id":673794,"avatar_url":"https://avatars0.githubusercontent.com/u/673794?v=4","gravatar_id":"","url":"https://api.github.com/users/weedySeaDragon","html_url":"https://github.com/weedySeaDragon","followers_url":"https://api.github.com/users/weedySeaDragon/followers","following_url":"https://api.github.com/users/weedySeaDragon/following{/other_user}","gists_url":"https://api.github.com/users/weedySeaDragon/gists{/gist_id}","starred_url":"https://api.github.com/users/weedySeaDragon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weedySeaDragon/subscriptions","organizations_url":"https://api.github.com/users/weedySeaDragon/orgs","repos_url":"https://api.github.com/users/weedySeaDragon/repos","events_url":"https://api.github.com/users/weedySeaDragon/events{/privacy}","received_events_url":"https://api.github.com/users/weedySeaDragon/received_events","type":"User","site_admin":false},"repo":{"id":72142277,"name":"shf-project","full_name":"weedySeaDragon/shf-project","owner":{"login":"weedySeaDragon","id":673794,"avatar_url":"https://avatars0.githubusercontent.com/u/673794?v=4","gravatar_id":"","url":"https://api.github.com/users/weedySeaDragon","html_url":"https://github.com/weedySeaDragon","followers_url":"https://api.github.com/users/weedySeaDragon/followers","following_url":"https://api.github.com/users/weedySeaDragon/following{/other_user}","gists_url":"https://api.github.com/users/weedySeaDragon/gists{/gist_id}","starred_url":"https://api.github.com/users/weedySeaDragon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weedySeaDragon/subscriptions","organizations_url":"https://api.github.com/users/weedySeaDragon/orgs","repos_url":"https://api.github.com/users/weedySeaDragon/repos","events_url":"https://api.github.com/users/weedySeaDragon/events{/privacy}","received_events_url":"https://api.github.com/users/weedySeaDragon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/weedySeaDragon/shf-project","description":null,"fork":true,"url":"https://api.github.com/repos/weedySeaDragon/shf-project","forks_url":"https://api.github.com/repos/weedySeaDragon/shf-project/forks","keys_url":"https://api.github.com/repos/weedySeaDragon/shf-project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/weedySeaDragon/shf-project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/weedySeaDragon/shf-project/teams","hooks_url":"https://api.github.com/repos/weedySeaDragon/shf-project/hooks","issue_events_url":"https://api.github.com/repos/weedySeaDragon/shf-project/issues/events{/number}","events_url":"https://api.github.com/repos/weedySeaDragon/shf-project/events","assignees_url":"https://api.github.com/repos/weedySeaDragon/shf-project/assignees{/user}","branches_url":"https://api.github.com/repos/weedySeaDragon/shf-project/branches{/branch}","tags_url":"https://api.github.com/repos/weedySeaDragon/shf-project/tags","blobs_url":"https://api.github.com/repos/weedySeaDragon/shf-project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/weedySeaDragon/shf-project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/weedySeaDragon/shf-project/git/refs{/sha}","trees_url":"https://api.github.com/repos/weedySeaDragon/shf-project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/weedySeaDragon/shf-project/statuses/{sha}","languages_url":"https://api.github.com/repos/weedySeaDragon/shf-project/languages","stargazers_url":"https://api.github.com/repos/weedySeaDragon/shf-project/stargazers","contributors_url":"https://api.github.com/repos/weedySeaDragon/shf-project/contributors","subscribers_url":"https://api.github.com/repos/weedySeaDragon/shf-project/subscribers","subscription_url":"https://api.github.com/repos/weedySeaDragon/shf-project/subscription","commits_url":"https://api.github.com/repos/weedySeaDragon/shf-project/commits{/sha}","git_commits_url":"https://api.github.com/repos/weedySeaDragon/shf-project/git/commits{/sha}","comments_url":"https://api.github.com/repos/weedySeaDragon/shf-project/comments{/number}","issue_comment_url":"https://api.github.com/repos/weedySeaDragon/shf-project/issues/comments{/number}","contents_url":"https://api.github.com/repos/weedySeaDragon/shf-project/contents/{+path}","compare_url":"https://api.github.com/repos/weedySeaDragon/shf-project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/weedySeaDragon/shf-project/merges","archive_url":"https://api.github.com/repos/weedySeaDragon/shf-project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/weedySeaDragon/shf-project/downloads","issues_url":"https://api.github.com/repos/weedySeaDragon/shf-project/issues{/number}","pulls_url":"https://api.github.com/repos/weedySeaDragon/shf-project/pulls{/number}","milestones_url":"https://api.github.com/repos/weedySeaDragon/shf-project/milestones{/number}","notifications_url":"https://api.github.com/repos/weedySeaDragon/shf-project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/weedySeaDragon/shf-project/labels{/name}","releases_url":"https://api.github.com/repos/weedySeaDragon/shf-project/releases{/id}","deployments_url":"https://api.github.com/repos/weedySeaDragon/shf-project/deployments","created_at":"2016-10-27T19:44:01Z","updated_at":"2017-02-06T19:31:28Z","pushed_at":"2017-09-21T19:51:37Z","git_url":"git://github.com/weedySeaDragon/shf-project.git","ssh_url":"git@github.com:weedySeaDragon/shf-project.git","clone_url":"https://github.com/weedySeaDragon/shf-project.git","svn_url":"https://github.com/weedySeaDragon/shf-project","homepage":null,"size":27269,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"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":"develop"}},"base":{"label":"AgileVentures:develop","ref":"develop","sha":"662683643d61dfe779d135421bcaeda16c3c72e0","user":{"login":"AgileVentures","id":5116968,"avatar_url":"https://avatars0.githubusercontent.com/u/5116968?v=4","gravatar_id":"","url":"https://api.github.com/users/AgileVentures","html_url":"https://github.com/AgileVentures","followers_url":"https://api.github.com/users/AgileVentures/followers","following_url":"https://api.github.com/users/AgileVentures/following{/other_user}","gists_url":"https://api.github.com/users/AgileVentures/gists{/gist_id}","starred_url":"https://api.github.com/users/AgileVentures/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AgileVentures/subscriptions","organizations_url":"https://api.github.com/users/AgileVentures/orgs","repos_url":"https://api.github.com/users/AgileVentures/repos","events_url":"https://api.github.com/users/AgileVentures/events{/privacy}","received_events_url":"https://api.github.com/users/AgileVentures/received_events","type":"Organization","site_admin":false},"repo":{"id":71157737,"name":"shf-project","full_name":"AgileVentures/shf-project","owner":{"login":"AgileVentures","id":5116968,"avatar_url":"https://avatars0.githubusercontent.com/u/5116968?v=4","gravatar_id":"","url":"https://api.github.com/users/AgileVentures","html_url":"https://github.com/AgileVentures","followers_url":"https://api.github.com/users/AgileVentures/followers","following_url":"https://api.github.com/users/AgileVentures/following{/other_user}","gists_url":"https://api.github.com/users/AgileVentures/gists{/gist_id}","starred_url":"https://api.github.com/users/AgileVentures/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AgileVentures/subscriptions","organizations_url":"https://api.github.com/users/AgileVentures/orgs","repos_url":"https://api.github.com/users/AgileVentures/repos","events_url":"https://api.github.com/users/AgileVentures/events{/privacy}","received_events_url":"https://api.github.com/users/AgileVentures/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AgileVentures/shf-project","description":"Part of the website for and membership management for Sveriges Hundföretagare  (The Swedish Dog  Industry association). A project run with AgileVentures.org","fork":true,"url":"https://api.github.com/repos/AgileVentures/shf-project","forks_url":"https://api.github.com/repos/AgileVentures/shf-project/forks","keys_url":"https://api.github.com/repos/AgileVentures/shf-project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AgileVentures/shf-project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AgileVentures/shf-project/teams","hooks_url":"https://api.github.com/repos/AgileVentures/shf-project/hooks","issue_events_url":"https://api.github.com/repos/AgileVentures/shf-project/issues/events{/number}","events_url":"https://api.github.com/repos/AgileVentures/shf-project/events","assignees_url":"https://api.github.com/repos/AgileVentures/shf-project/assignees{/user}","branches_url":"https://api.github.com/repos/AgileVentures/shf-project/branches{/branch}","tags_url":"https://api.github.com/repos/AgileVentures/shf-project/tags","blobs_url":"https://api.github.com/repos/AgileVentures/shf-project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AgileVentures/shf-project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AgileVentures/shf-project/git/refs{/sha}","trees_url":"https://api.github.com/repos/AgileVentures/shf-project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AgileVentures/shf-project/statuses/{sha}","languages_url":"https://api.github.com/repos/AgileVentures/shf-project/languages","stargazers_url":"https://api.github.com/repos/AgileVentures/shf-project/stargazers","contributors_url":"https://api.github.com/repos/AgileVentures/shf-project/contributors","subscribers_url":"https://api.github.com/repos/AgileVentures/shf-project/subscribers","subscription_url":"https://api.github.com/repos/AgileVentures/shf-project/subscription","commits_url":"https://api.github.com/repos/AgileVentures/shf-project/commits{/sha}","git_commits_url":"https://api.github.com/repos/AgileVentures/shf-project/git/commits{/sha}","comments_url":"https://api.github.com/repos/AgileVentures/shf-project/comments{/number}","issue_comment_url":"https://api.github.com/repos/AgileVentures/shf-project/issues/comments{/number}","contents_url":"https://api.github.com/repos/AgileVentures/shf-project/contents/{+path}","compare_url":"https://api.github.com/repos/AgileVentures/shf-project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AgileVentures/shf-project/merges","archive_url":"https://api.github.com/repos/AgileVentures/shf-project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AgileVentures/shf-project/downloads","issues_url":"https://api.github.com/repos/AgileVentures/shf-project/issues{/number}","pulls_url":"https://api.github.com/repos/AgileVentures/shf-project/pulls{/number}","milestones_url":"https://api.github.com/repos/AgileVentures/shf-project/milestones{/number}","notifications_url":"https://api.github.com/repos/AgileVentures/shf-project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AgileVentures/shf-project/labels{/name}","releases_url":"https://api.github.com/repos/AgileVentures/shf-project/releases{/id}","deployments_url":"https://api.github.com/repos/AgileVentures/shf-project/deployments","created_at":"2016-10-17T16:18:10Z","updated_at":"2017-06-13T23:22:32Z","pushed_at":"2017-09-21T19:51:39Z","git_url":"git://github.com/AgileVentures/shf-project.git","ssh_url":"git@github.com:AgileVentures/shf-project.git","clone_url":"https://github.com/AgileVentures/shf-project.git","svn_url":"https://github.com/AgileVentures/shf-project","homepage":"","size":24741,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":8,"forks":19,"open_issues":8,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/AgileVentures/shf-project/pulls/318"},"html":{"href":"https://github.com/AgileVentures/shf-project/pull/318"},"issue":{"href":"https://api.github.com/repos/AgileVentures/shf-project/issues/318"},"comments":{"href":"https://api.github.com/repos/AgileVentures/shf-project/issues/318/comments"},"review_comments":{"href":"https://api.github.com/repos/AgileVentures/shf-project/pulls/318/comments"},"review_comment":{"href":"https://api.github.com/repos/AgileVentures/shf-project/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AgileVentures/shf-project/pulls/318/commits"},"statuses":{"href":"https://api.github.com/repos/AgileVentures/shf-project/statuses/267030e425a20cffeba7b51dbd9f5c684c1ee64e"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"houndci-bot"}}