{"action":"created","comment":{"url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/pulls/comments/23853903","id":23853903,"diff_hunk":"@@ -0,0 +1,41 @@\n+class BaseController < ApplicationController\n+  before_filter :authenticate_user_from_token!\n+  before_filter :authenticate_user!\n+\n+  # rescue_from Exception do |exception|\n+  #   render_error\n+  # end\n+\n+  def render_success\n+    render json: { success: true }, status: 200\n+  end\n+\n+  def render_invalid\n+    render json: { success: false }, status: 401\n+  end\n+\n+  def render_error\n+    render json: {\n+      success: false, message: 'An error ocurred, sorry :('\n+    }, status: 500\n+  end\n+\n+  def render_known_errors(errors)\n+    render json: { errors: errors }, status: 422\n+  end\n+\n+  def render_unauthenticated\n+    render json: {\n+      success: false, message: 'User unauthenticated'","path":"app/controllers/api/v1/base_controller.rb","position":29,"original_position":29,"commit_id":"9c7dacd7604befa7132f39f8f84dbab6aa45c7aa","original_commit_id":"9c7dacd7604befa7132f39f8f84dbab6aa45c7aa","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","created_at":"2015-01-30T16:43:07Z","updated_at":"2015-01-30T16:43:07Z","html_url":"https://github.com/wewillrich/amo-sou-balada-api/pull/9#discussion_r23853903","pull_request_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/pulls/comments/23853903"},"html":{"href":"https://github.com/wewillrich/amo-sou-balada-api/pull/9#discussion_r23853903"},"pull_request":{"href":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/pulls/9","id":28363861,"html_url":"https://github.com/wewillrich/amo-sou-balada-api/pull/9","diff_url":"https://github.com/wewillrich/amo-sou-balada-api/pull/9.diff","patch_url":"https://github.com/wewillrich/amo-sou-balada-api/pull/9.patch","issue_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/issues/9","number":9,"state":"open","locked":false,"title":"Configure to be an API","user":{"login":"vgsantoniazzi","id":1229625,"avatar_url":"https://avatars.githubusercontent.com/u/1229625?v=3","gravatar_id":"","url":"https://api.github.com/users/vgsantoniazzi","html_url":"https://github.com/vgsantoniazzi","followers_url":"https://api.github.com/users/vgsantoniazzi/followers","following_url":"https://api.github.com/users/vgsantoniazzi/following{/other_user}","gists_url":"https://api.github.com/users/vgsantoniazzi/gists{/gist_id}","starred_url":"https://api.github.com/users/vgsantoniazzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vgsantoniazzi/subscriptions","organizations_url":"https://api.github.com/users/vgsantoniazzi/orgs","repos_url":"https://api.github.com/users/vgsantoniazzi/repos","events_url":"https://api.github.com/users/vgsantoniazzi/events{/privacy}","received_events_url":"https://api.github.com/users/vgsantoniazzi/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-01-30T14:17:42Z","updated_at":"2015-01-30T16:43:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2f7b686c87bdb57cf290b0e911982d4a8efd40a7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/pulls/9/commits","review_comments_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/pulls/9/comments","review_comment_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/pulls/comments/{number}","comments_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/issues/9/comments","statuses_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/statuses/9c7dacd7604befa7132f39f8f84dbab6aa45c7aa","head":{"label":"wewillrich:devise","ref":"devise","sha":"9c7dacd7604befa7132f39f8f84dbab6aa45c7aa","user":{"login":"wewillrich","id":10708145,"avatar_url":"https://avatars.githubusercontent.com/u/10708145?v=3","gravatar_id":"","url":"https://api.github.com/users/wewillrich","html_url":"https://github.com/wewillrich","followers_url":"https://api.github.com/users/wewillrich/followers","following_url":"https://api.github.com/users/wewillrich/following{/other_user}","gists_url":"https://api.github.com/users/wewillrich/gists{/gist_id}","starred_url":"https://api.github.com/users/wewillrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wewillrich/subscriptions","organizations_url":"https://api.github.com/users/wewillrich/orgs","repos_url":"https://api.github.com/users/wewillrich/repos","events_url":"https://api.github.com/users/wewillrich/events{/privacy}","received_events_url":"https://api.github.com/users/wewillrich/received_events","type":"Organization","site_admin":false},"repo":{"id":29859938,"name":"amo-sou-balada-api","full_name":"wewillrich/amo-sou-balada-api","owner":{"login":"wewillrich","id":10708145,"avatar_url":"https://avatars.githubusercontent.com/u/10708145?v=3","gravatar_id":"","url":"https://api.github.com/users/wewillrich","html_url":"https://github.com/wewillrich","followers_url":"https://api.github.com/users/wewillrich/followers","following_url":"https://api.github.com/users/wewillrich/following{/other_user}","gists_url":"https://api.github.com/users/wewillrich/gists{/gist_id}","starred_url":"https://api.github.com/users/wewillrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wewillrich/subscriptions","organizations_url":"https://api.github.com/users/wewillrich/orgs","repos_url":"https://api.github.com/users/wewillrich/repos","events_url":"https://api.github.com/users/wewillrich/events{/privacy}","received_events_url":"https://api.github.com/users/wewillrich/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wewillrich/amo-sou-balada-api","description":"Amo sou balada API written w/ Rails","fork":false,"url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api","forks_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/forks","keys_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/teams","hooks_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/hooks","issue_events_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/issues/events{/number}","events_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/events","assignees_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/assignees{/user}","branches_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/branches{/branch}","tags_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/tags","blobs_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/statuses/{sha}","languages_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/languages","stargazers_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/stargazers","contributors_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/contributors","subscribers_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/subscribers","subscription_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/subscription","commits_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/issues/comments/{number}","contents_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/contents/{+path}","compare_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/merges","archive_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/downloads","issues_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/issues{/number}","pulls_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/pulls{/number}","milestones_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/milestones{/number}","notifications_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/labels{/name}","releases_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/releases{/id}","created_at":"2015-01-26T12:24:32Z","updated_at":"2015-01-28T11:06:36Z","pushed_at":"2015-01-30T16:43:01Z","git_url":"git://github.com/wewillrich/amo-sou-balada-api.git","ssh_url":"git@github.com:wewillrich/amo-sou-balada-api.git","clone_url":"https://github.com/wewillrich/amo-sou-balada-api.git","svn_url":"https://github.com/wewillrich/amo-sou-balada-api","homepage":null,"size":0,"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":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"wewillrich:master","ref":"master","sha":"c7bf6c2c0d56ac4bb886af370a80a8aa26e8a76b","user":{"login":"wewillrich","id":10708145,"avatar_url":"https://avatars.githubusercontent.com/u/10708145?v=3","gravatar_id":"","url":"https://api.github.com/users/wewillrich","html_url":"https://github.com/wewillrich","followers_url":"https://api.github.com/users/wewillrich/followers","following_url":"https://api.github.com/users/wewillrich/following{/other_user}","gists_url":"https://api.github.com/users/wewillrich/gists{/gist_id}","starred_url":"https://api.github.com/users/wewillrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wewillrich/subscriptions","organizations_url":"https://api.github.com/users/wewillrich/orgs","repos_url":"https://api.github.com/users/wewillrich/repos","events_url":"https://api.github.com/users/wewillrich/events{/privacy}","received_events_url":"https://api.github.com/users/wewillrich/received_events","type":"Organization","site_admin":false},"repo":{"id":29859938,"name":"amo-sou-balada-api","full_name":"wewillrich/amo-sou-balada-api","owner":{"login":"wewillrich","id":10708145,"avatar_url":"https://avatars.githubusercontent.com/u/10708145?v=3","gravatar_id":"","url":"https://api.github.com/users/wewillrich","html_url":"https://github.com/wewillrich","followers_url":"https://api.github.com/users/wewillrich/followers","following_url":"https://api.github.com/users/wewillrich/following{/other_user}","gists_url":"https://api.github.com/users/wewillrich/gists{/gist_id}","starred_url":"https://api.github.com/users/wewillrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wewillrich/subscriptions","organizations_url":"https://api.github.com/users/wewillrich/orgs","repos_url":"https://api.github.com/users/wewillrich/repos","events_url":"https://api.github.com/users/wewillrich/events{/privacy}","received_events_url":"https://api.github.com/users/wewillrich/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wewillrich/amo-sou-balada-api","description":"Amo sou balada API written w/ Rails","fork":false,"url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api","forks_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/forks","keys_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/teams","hooks_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/hooks","issue_events_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/issues/events{/number}","events_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/events","assignees_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/assignees{/user}","branches_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/branches{/branch}","tags_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/tags","blobs_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/statuses/{sha}","languages_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/languages","stargazers_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/stargazers","contributors_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/contributors","subscribers_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/subscribers","subscription_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/subscription","commits_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/issues/comments/{number}","contents_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/contents/{+path}","compare_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/merges","archive_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/downloads","issues_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/issues{/number}","pulls_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/pulls{/number}","milestones_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/milestones{/number}","notifications_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/labels{/name}","releases_url":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/releases{/id}","created_at":"2015-01-26T12:24:32Z","updated_at":"2015-01-28T11:06:36Z","pushed_at":"2015-01-30T16:43:01Z","git_url":"git://github.com/wewillrich/amo-sou-balada-api.git","ssh_url":"git@github.com:wewillrich/amo-sou-balada-api.git","clone_url":"https://github.com/wewillrich/amo-sou-balada-api.git","svn_url":"https://github.com/wewillrich/amo-sou-balada-api","homepage":null,"size":0,"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":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/pulls/9"},"html":{"href":"https://github.com/wewillrich/amo-sou-balada-api/pull/9"},"issue":{"href":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/issues/9"},"comments":{"href":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/wewillrich/amo-sou-balada-api/statuses/9c7dacd7604befa7132f39f8f84dbab6aa45c7aa"}}}}