{"action":"created","comment":{"url":"https://api.github.com/repos/groundctrl/proclaimer/pulls/comments/41170503","id":41170503,"diff_hunk":"@@ -0,0 +1,29 @@\n+module Spree\n+  Shipment.class_eval do\n+    after_create :notify_shipment_pending\n+    state_machine.after_transition to: :ready, do: :notify_shipment_ready\n+    state_machine.after_transition to: :canceled, do: :notify_shipment_canceled\n+\n+    private\n+\n+    def method_missing(method_name, *args, &block)","path":"app/models/spree/shipment_decorator.rb","position":9,"original_position":9,"commit_id":"bfd6a597632d8561cf418080a39124b7efed407b","original_commit_id":"bfd6a597632d8561cf418080a39124b7efed407b","user":{"login":"sikachu","id":4912,"avatar_url":"https://avatars.githubusercontent.com/u/4912?v=3","gravatar_id":"","url":"https://api.github.com/users/sikachu","html_url":"https://github.com/sikachu","followers_url":"https://api.github.com/users/sikachu/followers","following_url":"https://api.github.com/users/sikachu/following{/other_user}","gists_url":"https://api.github.com/users/sikachu/gists{/gist_id}","starred_url":"https://api.github.com/users/sikachu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sikachu/subscriptions","organizations_url":"https://api.github.com/users/sikachu/orgs","repos_url":"https://api.github.com/users/sikachu/repos","events_url":"https://api.github.com/users/sikachu/events{/privacy}","received_events_url":"https://api.github.com/users/sikachu/received_events","type":"User","site_admin":false},"body":"I feel like if you create each methods separately and calling `notification_event` internally it will make the code more cleaner and it will save you a line of code. ;)","created_at":"2015-10-05T17:15:50Z","updated_at":"2015-10-05T17:15:50Z","html_url":"https://github.com/groundctrl/proclaimer/pull/15#discussion_r41170503","pull_request_url":"https://api.github.com/repos/groundctrl/proclaimer/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/groundctrl/proclaimer/pulls/comments/41170503"},"html":{"href":"https://github.com/groundctrl/proclaimer/pull/15#discussion_r41170503"},"pull_request":{"href":"https://api.github.com/repos/groundctrl/proclaimer/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/groundctrl/proclaimer/pulls/15","id":46695781,"html_url":"https://github.com/groundctrl/proclaimer/pull/15","diff_url":"https://github.com/groundctrl/proclaimer/pull/15.diff","patch_url":"https://github.com/groundctrl/proclaimer/pull/15.patch","issue_url":"https://api.github.com/repos/groundctrl/proclaimer/issues/15","number":15,"state":"open","locked":false,"title":"Add shipment event notification.","user":{"login":"vinniefranco","id":328428,"avatar_url":"https://avatars.githubusercontent.com/u/328428?v=3","gravatar_id":"","url":"https://api.github.com/users/vinniefranco","html_url":"https://github.com/vinniefranco","followers_url":"https://api.github.com/users/vinniefranco/followers","following_url":"https://api.github.com/users/vinniefranco/following{/other_user}","gists_url":"https://api.github.com/users/vinniefranco/gists{/gist_id}","starred_url":"https://api.github.com/users/vinniefranco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinniefranco/subscriptions","organizations_url":"https://api.github.com/users/vinniefranco/orgs","repos_url":"https://api.github.com/users/vinniefranco/repos","events_url":"https://api.github.com/users/vinniefranco/events{/privacy}","received_events_url":"https://api.github.com/users/vinniefranco/received_events","type":"User","site_admin":false},"body":"### What's new?\r\n* Renamed `app/models/spree/refund_decorator_spec.rb → app/models/spree/refund_decorator.rb`\r\n* Add event notification hooked for shipment: pending|ready|canceled","created_at":"2015-10-03T00:44:01Z","updated_at":"2015-10-05T17:15:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"85bb5edd61657c0cbbcf3e937e765c596aadf46d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/groundctrl/proclaimer/pulls/15/commits","review_comments_url":"https://api.github.com/repos/groundctrl/proclaimer/pulls/15/comments","review_comment_url":"https://api.github.com/repos/groundctrl/proclaimer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/groundctrl/proclaimer/issues/15/comments","statuses_url":"https://api.github.com/repos/groundctrl/proclaimer/statuses/bfd6a597632d8561cf418080a39124b7efed407b","head":{"label":"groundctrl:feature/shipment-notification","ref":"feature/shipment-notification","sha":"bfd6a597632d8561cf418080a39124b7efed407b","user":{"login":"groundctrl","id":656899,"avatar_url":"https://avatars.githubusercontent.com/u/656899?v=3","gravatar_id":"","url":"https://api.github.com/users/groundctrl","html_url":"https://github.com/groundctrl","followers_url":"https://api.github.com/users/groundctrl/followers","following_url":"https://api.github.com/users/groundctrl/following{/other_user}","gists_url":"https://api.github.com/users/groundctrl/gists{/gist_id}","starred_url":"https://api.github.com/users/groundctrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/groundctrl/subscriptions","organizations_url":"https://api.github.com/users/groundctrl/orgs","repos_url":"https://api.github.com/users/groundctrl/repos","events_url":"https://api.github.com/users/groundctrl/events{/privacy}","received_events_url":"https://api.github.com/users/groundctrl/received_events","type":"Organization","site_admin":false},"repo":{"id":40140711,"name":"proclaimer","full_name":"groundctrl/proclaimer","owner":{"login":"groundctrl","id":656899,"avatar_url":"https://avatars.githubusercontent.com/u/656899?v=3","gravatar_id":"","url":"https://api.github.com/users/groundctrl","html_url":"https://github.com/groundctrl","followers_url":"https://api.github.com/users/groundctrl/followers","following_url":"https://api.github.com/users/groundctrl/following{/other_user}","gists_url":"https://api.github.com/users/groundctrl/gists{/gist_id}","starred_url":"https://api.github.com/users/groundctrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/groundctrl/subscriptions","organizations_url":"https://api.github.com/users/groundctrl/orgs","repos_url":"https://api.github.com/users/groundctrl/repos","events_url":"https://api.github.com/users/groundctrl/events{/privacy}","received_events_url":"https://api.github.com/users/groundctrl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/groundctrl/proclaimer","description":"An easy, and extensible transactional event notification add on for Spree","fork":false,"url":"https://api.github.com/repos/groundctrl/proclaimer","forks_url":"https://api.github.com/repos/groundctrl/proclaimer/forks","keys_url":"https://api.github.com/repos/groundctrl/proclaimer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/groundctrl/proclaimer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/groundctrl/proclaimer/teams","hooks_url":"https://api.github.com/repos/groundctrl/proclaimer/hooks","issue_events_url":"https://api.github.com/repos/groundctrl/proclaimer/issues/events{/number}","events_url":"https://api.github.com/repos/groundctrl/proclaimer/events","assignees_url":"https://api.github.com/repos/groundctrl/proclaimer/assignees{/user}","branches_url":"https://api.github.com/repos/groundctrl/proclaimer/branches{/branch}","tags_url":"https://api.github.com/repos/groundctrl/proclaimer/tags","blobs_url":"https://api.github.com/repos/groundctrl/proclaimer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/groundctrl/proclaimer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/groundctrl/proclaimer/git/refs{/sha}","trees_url":"https://api.github.com/repos/groundctrl/proclaimer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/groundctrl/proclaimer/statuses/{sha}","languages_url":"https://api.github.com/repos/groundctrl/proclaimer/languages","stargazers_url":"https://api.github.com/repos/groundctrl/proclaimer/stargazers","contributors_url":"https://api.github.com/repos/groundctrl/proclaimer/contributors","subscribers_url":"https://api.github.com/repos/groundctrl/proclaimer/subscribers","subscription_url":"https://api.github.com/repos/groundctrl/proclaimer/subscription","commits_url":"https://api.github.com/repos/groundctrl/proclaimer/commits{/sha}","git_commits_url":"https://api.github.com/repos/groundctrl/proclaimer/git/commits{/sha}","comments_url":"https://api.github.com/repos/groundctrl/proclaimer/comments{/number}","issue_comment_url":"https://api.github.com/repos/groundctrl/proclaimer/issues/comments{/number}","contents_url":"https://api.github.com/repos/groundctrl/proclaimer/contents/{+path}","compare_url":"https://api.github.com/repos/groundctrl/proclaimer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/groundctrl/proclaimer/merges","archive_url":"https://api.github.com/repos/groundctrl/proclaimer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/groundctrl/proclaimer/downloads","issues_url":"https://api.github.com/repos/groundctrl/proclaimer/issues{/number}","pulls_url":"https://api.github.com/repos/groundctrl/proclaimer/pulls{/number}","milestones_url":"https://api.github.com/repos/groundctrl/proclaimer/milestones{/number}","notifications_url":"https://api.github.com/repos/groundctrl/proclaimer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/groundctrl/proclaimer/labels{/name}","releases_url":"https://api.github.com/repos/groundctrl/proclaimer/releases{/id}","created_at":"2015-08-03T18:17:55Z","updated_at":"2015-08-05T20:02:53Z","pushed_at":"2015-10-05T17:09:48Z","git_url":"git://github.com/groundctrl/proclaimer.git","ssh_url":"git@github.com:groundctrl/proclaimer.git","clone_url":"https://github.com/groundctrl/proclaimer.git","svn_url":"https://github.com/groundctrl/proclaimer","homepage":null,"size":201,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":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":"master"}},"base":{"label":"groundctrl:master","ref":"master","sha":"3c3c5727c4bf89baa6c34d4f0d90675025049225","user":{"login":"groundctrl","id":656899,"avatar_url":"https://avatars.githubusercontent.com/u/656899?v=3","gravatar_id":"","url":"https://api.github.com/users/groundctrl","html_url":"https://github.com/groundctrl","followers_url":"https://api.github.com/users/groundctrl/followers","following_url":"https://api.github.com/users/groundctrl/following{/other_user}","gists_url":"https://api.github.com/users/groundctrl/gists{/gist_id}","starred_url":"https://api.github.com/users/groundctrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/groundctrl/subscriptions","organizations_url":"https://api.github.com/users/groundctrl/orgs","repos_url":"https://api.github.com/users/groundctrl/repos","events_url":"https://api.github.com/users/groundctrl/events{/privacy}","received_events_url":"https://api.github.com/users/groundctrl/received_events","type":"Organization","site_admin":false},"repo":{"id":40140711,"name":"proclaimer","full_name":"groundctrl/proclaimer","owner":{"login":"groundctrl","id":656899,"avatar_url":"https://avatars.githubusercontent.com/u/656899?v=3","gravatar_id":"","url":"https://api.github.com/users/groundctrl","html_url":"https://github.com/groundctrl","followers_url":"https://api.github.com/users/groundctrl/followers","following_url":"https://api.github.com/users/groundctrl/following{/other_user}","gists_url":"https://api.github.com/users/groundctrl/gists{/gist_id}","starred_url":"https://api.github.com/users/groundctrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/groundctrl/subscriptions","organizations_url":"https://api.github.com/users/groundctrl/orgs","repos_url":"https://api.github.com/users/groundctrl/repos","events_url":"https://api.github.com/users/groundctrl/events{/privacy}","received_events_url":"https://api.github.com/users/groundctrl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/groundctrl/proclaimer","description":"An easy, and extensible transactional event notification add on for Spree","fork":false,"url":"https://api.github.com/repos/groundctrl/proclaimer","forks_url":"https://api.github.com/repos/groundctrl/proclaimer/forks","keys_url":"https://api.github.com/repos/groundctrl/proclaimer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/groundctrl/proclaimer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/groundctrl/proclaimer/teams","hooks_url":"https://api.github.com/repos/groundctrl/proclaimer/hooks","issue_events_url":"https://api.github.com/repos/groundctrl/proclaimer/issues/events{/number}","events_url":"https://api.github.com/repos/groundctrl/proclaimer/events","assignees_url":"https://api.github.com/repos/groundctrl/proclaimer/assignees{/user}","branches_url":"https://api.github.com/repos/groundctrl/proclaimer/branches{/branch}","tags_url":"https://api.github.com/repos/groundctrl/proclaimer/tags","blobs_url":"https://api.github.com/repos/groundctrl/proclaimer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/groundctrl/proclaimer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/groundctrl/proclaimer/git/refs{/sha}","trees_url":"https://api.github.com/repos/groundctrl/proclaimer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/groundctrl/proclaimer/statuses/{sha}","languages_url":"https://api.github.com/repos/groundctrl/proclaimer/languages","stargazers_url":"https://api.github.com/repos/groundctrl/proclaimer/stargazers","contributors_url":"https://api.github.com/repos/groundctrl/proclaimer/contributors","subscribers_url":"https://api.github.com/repos/groundctrl/proclaimer/subscribers","subscription_url":"https://api.github.com/repos/groundctrl/proclaimer/subscription","commits_url":"https://api.github.com/repos/groundctrl/proclaimer/commits{/sha}","git_commits_url":"https://api.github.com/repos/groundctrl/proclaimer/git/commits{/sha}","comments_url":"https://api.github.com/repos/groundctrl/proclaimer/comments{/number}","issue_comment_url":"https://api.github.com/repos/groundctrl/proclaimer/issues/comments{/number}","contents_url":"https://api.github.com/repos/groundctrl/proclaimer/contents/{+path}","compare_url":"https://api.github.com/repos/groundctrl/proclaimer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/groundctrl/proclaimer/merges","archive_url":"https://api.github.com/repos/groundctrl/proclaimer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/groundctrl/proclaimer/downloads","issues_url":"https://api.github.com/repos/groundctrl/proclaimer/issues{/number}","pulls_url":"https://api.github.com/repos/groundctrl/proclaimer/pulls{/number}","milestones_url":"https://api.github.com/repos/groundctrl/proclaimer/milestones{/number}","notifications_url":"https://api.github.com/repos/groundctrl/proclaimer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/groundctrl/proclaimer/labels{/name}","releases_url":"https://api.github.com/repos/groundctrl/proclaimer/releases{/id}","created_at":"2015-08-03T18:17:55Z","updated_at":"2015-08-05T20:02:53Z","pushed_at":"2015-10-05T17:09:48Z","git_url":"git://github.com/groundctrl/proclaimer.git","ssh_url":"git@github.com:groundctrl/proclaimer.git","clone_url":"https://github.com/groundctrl/proclaimer.git","svn_url":"https://github.com/groundctrl/proclaimer","homepage":null,"size":201,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":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":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/groundctrl/proclaimer/pulls/15"},"html":{"href":"https://github.com/groundctrl/proclaimer/pull/15"},"issue":{"href":"https://api.github.com/repos/groundctrl/proclaimer/issues/15"},"comments":{"href":"https://api.github.com/repos/groundctrl/proclaimer/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/groundctrl/proclaimer/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/groundctrl/proclaimer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/groundctrl/proclaimer/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/groundctrl/proclaimer/statuses/bfd6a597632d8561cf418080a39124b7efed407b"}}}}