{"action":"created","comment":{"url":"https://api.github.com/repos/projectjellyfish/api/pulls/comments/25539552","id":25539552,"diff_hunk":"@@ -0,0 +1,157 @@\n+class AwsFog\n+  def initialize(order_item_id)\n+    @order_item_id = order_item_id\n+    ENV['MOCK_MODE'] == true ? Fog.mock! : Fog.unmock!\n+  end\n+\n+  def provision","path":"app/workers/aws_fog.rb","position":7,"original_position":7,"commit_id":"e1928e2102361978de8104609875419ef0196db1","original_commit_id":"e1928e2102361978de8104609875419ef0196db1","user":{"login":"stackus","id":158579,"avatar_url":"https://avatars.githubusercontent.com/u/158579?v=3","gravatar_id":"","url":"https://api.github.com/users/stackus","html_url":"https://github.com/stackus","followers_url":"https://api.github.com/users/stackus/followers","following_url":"https://api.github.com/users/stackus/following{/other_user}","gists_url":"https://api.github.com/users/stackus/gists{/gist_id}","starred_url":"https://api.github.com/users/stackus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stackus/subscriptions","organizations_url":"https://api.github.com/users/stackus/orgs","repos_url":"https://api.github.com/users/stackus/repos","events_url":"https://api.github.com/users/stackus/events{/privacy}","received_events_url":"https://api.github.com/users/stackus/received_events","type":"User","site_admin":false},"body":"You could move the `begin...rescue...ensure...end` blocks into here and `case` on the types currently supported. Most of the method appear to setup some values and then call a `create_*` method. Some of that setup can either be done before the `case` or within the `create_*` methods. Doing this should make code climate happy.","created_at":"2015-02-27T21:15:24Z","updated_at":"2015-02-27T21:15:24Z","html_url":"https://github.com/projectjellyfish/api/pull/293#discussion_r25539552","pull_request_url":"https://api.github.com/repos/projectjellyfish/api/pulls/293","_links":{"self":{"href":"https://api.github.com/repos/projectjellyfish/api/pulls/comments/25539552"},"html":{"href":"https://github.com/projectjellyfish/api/pull/293#discussion_r25539552"},"pull_request":{"href":"https://api.github.com/repos/projectjellyfish/api/pulls/293"}}},"pull_request":{"url":"https://api.github.com/repos/projectjellyfish/api/pulls/293","id":30198140,"html_url":"https://github.com/projectjellyfish/api/pull/293","diff_url":"https://github.com/projectjellyfish/api/pull/293.diff","patch_url":"https://github.com/projectjellyfish/api/pull/293.patch","issue_url":"https://api.github.com/repos/projectjellyfish/api/issues/293","number":293,"state":"open","locked":false,"title":"Feature/jel 209 fog integration","user":{"login":"jntullo","id":2433314,"avatar_url":"https://avatars.githubusercontent.com/u/2433314?v=3","gravatar_id":"","url":"https://api.github.com/users/jntullo","html_url":"https://github.com/jntullo","followers_url":"https://api.github.com/users/jntullo/followers","following_url":"https://api.github.com/users/jntullo/following{/other_user}","gists_url":"https://api.github.com/users/jntullo/gists{/gist_id}","starred_url":"https://api.github.com/users/jntullo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jntullo/subscriptions","organizations_url":"https://api.github.com/users/jntullo/orgs","repos_url":"https://api.github.com/users/jntullo/repos","events_url":"https://api.github.com/users/jntullo/events{/privacy}","received_events_url":"https://api.github.com/users/jntullo/received_events","type":"User","site_admin":false},"body":"- AWS Fog integration\r\n- Includes mocking\r\n- Updates to sample data ","created_at":"2015-02-27T20:28:53Z","updated_at":"2015-02-27T21:15:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7e9b754d9a0aeb7d508925a12c1c6ff99fc995bd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/projectjellyfish/api/pulls/293/commits","review_comments_url":"https://api.github.com/repos/projectjellyfish/api/pulls/293/comments","review_comment_url":"https://api.github.com/repos/projectjellyfish/api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/projectjellyfish/api/issues/293/comments","statuses_url":"https://api.github.com/repos/projectjellyfish/api/statuses/e1928e2102361978de8104609875419ef0196db1","head":{"label":"projectjellyfish:feature/jel_209_fog_integration","ref":"feature/jel_209_fog_integration","sha":"e1928e2102361978de8104609875419ef0196db1","user":{"login":"projectjellyfish","id":10867673,"avatar_url":"https://avatars.githubusercontent.com/u/10867673?v=3","gravatar_id":"","url":"https://api.github.com/users/projectjellyfish","html_url":"https://github.com/projectjellyfish","followers_url":"https://api.github.com/users/projectjellyfish/followers","following_url":"https://api.github.com/users/projectjellyfish/following{/other_user}","gists_url":"https://api.github.com/users/projectjellyfish/gists{/gist_id}","starred_url":"https://api.github.com/users/projectjellyfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectjellyfish/subscriptions","organizations_url":"https://api.github.com/users/projectjellyfish/orgs","repos_url":"https://api.github.com/users/projectjellyfish/repos","events_url":"https://api.github.com/users/projectjellyfish/events{/privacy}","received_events_url":"https://api.github.com/users/projectjellyfish/received_events","type":"Organization","site_admin":false},"repo":{"id":25487089,"name":"api","full_name":"projectjellyfish/api","owner":{"login":"projectjellyfish","id":10867673,"avatar_url":"https://avatars.githubusercontent.com/u/10867673?v=3","gravatar_id":"","url":"https://api.github.com/users/projectjellyfish","html_url":"https://github.com/projectjellyfish","followers_url":"https://api.github.com/users/projectjellyfish/followers","following_url":"https://api.github.com/users/projectjellyfish/following{/other_user}","gists_url":"https://api.github.com/users/projectjellyfish/gists{/gist_id}","starred_url":"https://api.github.com/users/projectjellyfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectjellyfish/subscriptions","organizations_url":"https://api.github.com/users/projectjellyfish/orgs","repos_url":"https://api.github.com/users/projectjellyfish/repos","events_url":"https://api.github.com/users/projectjellyfish/events{/privacy}","received_events_url":"https://api.github.com/users/projectjellyfish/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projectjellyfish/api","description":"Project Jellyfish API","fork":false,"url":"https://api.github.com/repos/projectjellyfish/api","forks_url":"https://api.github.com/repos/projectjellyfish/api/forks","keys_url":"https://api.github.com/repos/projectjellyfish/api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projectjellyfish/api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projectjellyfish/api/teams","hooks_url":"https://api.github.com/repos/projectjellyfish/api/hooks","issue_events_url":"https://api.github.com/repos/projectjellyfish/api/issues/events{/number}","events_url":"https://api.github.com/repos/projectjellyfish/api/events","assignees_url":"https://api.github.com/repos/projectjellyfish/api/assignees{/user}","branches_url":"https://api.github.com/repos/projectjellyfish/api/branches{/branch}","tags_url":"https://api.github.com/repos/projectjellyfish/api/tags","blobs_url":"https://api.github.com/repos/projectjellyfish/api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projectjellyfish/api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projectjellyfish/api/git/refs{/sha}","trees_url":"https://api.github.com/repos/projectjellyfish/api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projectjellyfish/api/statuses/{sha}","languages_url":"https://api.github.com/repos/projectjellyfish/api/languages","stargazers_url":"https://api.github.com/repos/projectjellyfish/api/stargazers","contributors_url":"https://api.github.com/repos/projectjellyfish/api/contributors","subscribers_url":"https://api.github.com/repos/projectjellyfish/api/subscribers","subscription_url":"https://api.github.com/repos/projectjellyfish/api/subscription","commits_url":"https://api.github.com/repos/projectjellyfish/api/commits{/sha}","git_commits_url":"https://api.github.com/repos/projectjellyfish/api/git/commits{/sha}","comments_url":"https://api.github.com/repos/projectjellyfish/api/comments{/number}","issue_comment_url":"https://api.github.com/repos/projectjellyfish/api/issues/comments{/number}","contents_url":"https://api.github.com/repos/projectjellyfish/api/contents/{+path}","compare_url":"https://api.github.com/repos/projectjellyfish/api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projectjellyfish/api/merges","archive_url":"https://api.github.com/repos/projectjellyfish/api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projectjellyfish/api/downloads","issues_url":"https://api.github.com/repos/projectjellyfish/api/issues{/number}","pulls_url":"https://api.github.com/repos/projectjellyfish/api/pulls{/number}","milestones_url":"https://api.github.com/repos/projectjellyfish/api/milestones{/number}","notifications_url":"https://api.github.com/repos/projectjellyfish/api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projectjellyfish/api/labels{/name}","releases_url":"https://api.github.com/repos/projectjellyfish/api/releases{/id}","created_at":"2014-10-20T21:17:09Z","updated_at":"2015-02-27T20:20:51Z","pushed_at":"2015-02-27T20:45:15Z","git_url":"git://github.com/projectjellyfish/api.git","ssh_url":"git@github.com:projectjellyfish/api.git","clone_url":"https://github.com/projectjellyfish/api.git","svn_url":"https://github.com/projectjellyfish/api","homepage":"","size":5105,"stargazers_count":15,"watchers_count":15,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":67,"forks":3,"open_issues":67,"watchers":15,"default_branch":"master"}},"base":{"label":"projectjellyfish:master","ref":"master","sha":"85f8efee987d9ba594364811824f5aa0f5e339a3","user":{"login":"projectjellyfish","id":10867673,"avatar_url":"https://avatars.githubusercontent.com/u/10867673?v=3","gravatar_id":"","url":"https://api.github.com/users/projectjellyfish","html_url":"https://github.com/projectjellyfish","followers_url":"https://api.github.com/users/projectjellyfish/followers","following_url":"https://api.github.com/users/projectjellyfish/following{/other_user}","gists_url":"https://api.github.com/users/projectjellyfish/gists{/gist_id}","starred_url":"https://api.github.com/users/projectjellyfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectjellyfish/subscriptions","organizations_url":"https://api.github.com/users/projectjellyfish/orgs","repos_url":"https://api.github.com/users/projectjellyfish/repos","events_url":"https://api.github.com/users/projectjellyfish/events{/privacy}","received_events_url":"https://api.github.com/users/projectjellyfish/received_events","type":"Organization","site_admin":false},"repo":{"id":25487089,"name":"api","full_name":"projectjellyfish/api","owner":{"login":"projectjellyfish","id":10867673,"avatar_url":"https://avatars.githubusercontent.com/u/10867673?v=3","gravatar_id":"","url":"https://api.github.com/users/projectjellyfish","html_url":"https://github.com/projectjellyfish","followers_url":"https://api.github.com/users/projectjellyfish/followers","following_url":"https://api.github.com/users/projectjellyfish/following{/other_user}","gists_url":"https://api.github.com/users/projectjellyfish/gists{/gist_id}","starred_url":"https://api.github.com/users/projectjellyfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectjellyfish/subscriptions","organizations_url":"https://api.github.com/users/projectjellyfish/orgs","repos_url":"https://api.github.com/users/projectjellyfish/repos","events_url":"https://api.github.com/users/projectjellyfish/events{/privacy}","received_events_url":"https://api.github.com/users/projectjellyfish/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projectjellyfish/api","description":"Project Jellyfish API","fork":false,"url":"https://api.github.com/repos/projectjellyfish/api","forks_url":"https://api.github.com/repos/projectjellyfish/api/forks","keys_url":"https://api.github.com/repos/projectjellyfish/api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projectjellyfish/api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projectjellyfish/api/teams","hooks_url":"https://api.github.com/repos/projectjellyfish/api/hooks","issue_events_url":"https://api.github.com/repos/projectjellyfish/api/issues/events{/number}","events_url":"https://api.github.com/repos/projectjellyfish/api/events","assignees_url":"https://api.github.com/repos/projectjellyfish/api/assignees{/user}","branches_url":"https://api.github.com/repos/projectjellyfish/api/branches{/branch}","tags_url":"https://api.github.com/repos/projectjellyfish/api/tags","blobs_url":"https://api.github.com/repos/projectjellyfish/api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projectjellyfish/api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projectjellyfish/api/git/refs{/sha}","trees_url":"https://api.github.com/repos/projectjellyfish/api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projectjellyfish/api/statuses/{sha}","languages_url":"https://api.github.com/repos/projectjellyfish/api/languages","stargazers_url":"https://api.github.com/repos/projectjellyfish/api/stargazers","contributors_url":"https://api.github.com/repos/projectjellyfish/api/contributors","subscribers_url":"https://api.github.com/repos/projectjellyfish/api/subscribers","subscription_url":"https://api.github.com/repos/projectjellyfish/api/subscription","commits_url":"https://api.github.com/repos/projectjellyfish/api/commits{/sha}","git_commits_url":"https://api.github.com/repos/projectjellyfish/api/git/commits{/sha}","comments_url":"https://api.github.com/repos/projectjellyfish/api/comments{/number}","issue_comment_url":"https://api.github.com/repos/projectjellyfish/api/issues/comments{/number}","contents_url":"https://api.github.com/repos/projectjellyfish/api/contents/{+path}","compare_url":"https://api.github.com/repos/projectjellyfish/api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projectjellyfish/api/merges","archive_url":"https://api.github.com/repos/projectjellyfish/api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projectjellyfish/api/downloads","issues_url":"https://api.github.com/repos/projectjellyfish/api/issues{/number}","pulls_url":"https://api.github.com/repos/projectjellyfish/api/pulls{/number}","milestones_url":"https://api.github.com/repos/projectjellyfish/api/milestones{/number}","notifications_url":"https://api.github.com/repos/projectjellyfish/api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projectjellyfish/api/labels{/name}","releases_url":"https://api.github.com/repos/projectjellyfish/api/releases{/id}","created_at":"2014-10-20T21:17:09Z","updated_at":"2015-02-27T20:20:51Z","pushed_at":"2015-02-27T20:45:15Z","git_url":"git://github.com/projectjellyfish/api.git","ssh_url":"git@github.com:projectjellyfish/api.git","clone_url":"https://github.com/projectjellyfish/api.git","svn_url":"https://github.com/projectjellyfish/api","homepage":"","size":5105,"stargazers_count":15,"watchers_count":15,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":67,"forks":3,"open_issues":67,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/projectjellyfish/api/pulls/293"},"html":{"href":"https://github.com/projectjellyfish/api/pull/293"},"issue":{"href":"https://api.github.com/repos/projectjellyfish/api/issues/293"},"comments":{"href":"https://api.github.com/repos/projectjellyfish/api/issues/293/comments"},"review_comments":{"href":"https://api.github.com/repos/projectjellyfish/api/pulls/293/comments"},"review_comment":{"href":"https://api.github.com/repos/projectjellyfish/api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/projectjellyfish/api/pulls/293/commits"},"statuses":{"href":"https://api.github.com/repos/projectjellyfish/api/statuses/e1928e2102361978de8104609875419ef0196db1"}}}}