{"action":"created","comment":{"url":"https://api.github.com/repos/stevenbarragan/tracker/pulls/comments/85849590","pull_request_review_id":6540806,"id":85849590,"diff_hunk":"@@ -0,0 +1,114 @@\n+module V1\n+  class TasksController < ApplicationController\n+    swagger_controller :tasks, 'tasks'\n+\n+    swagger_api :index do\n+      summary 'List all tasks'\n+      notes 'This lists all the active tasks'\n+      param :path, :project_id, :string, :required, 'Project Id'\n+      param :query, :page, :integer, :optional, 'page number of results, default 1'\n+      param :query, :page_size, :integer, :optional, 'number of results per page, default 25'\n+    end\n+    def index\n+      tasks, errors = ListTasks.new(index_params).call\n+\n+      if errors.any?\n+        render json: { errors: errors }, status: 400\n+      else\n+        render json: tasks\n+      end\n+    end\n+\n+    swagger_api :show do\n+      summary 'Fetch a single task'\n+      param :path, :project_id, :string, :required, 'Project Id'\n+      param :path, :id, :string, :required, 'Task Id'\n+    end\n+    def show\n+      task = project.tasks.find_by id: params[:id]","path":"app/controllers/v1/tasks_controller.rb","position":28,"original_position":28,"commit_id":"1c0342b1548170f4735e553ec553128ded0ca3c3","original_commit_id":"1c0342b1548170f4735e553ec553128ded0ca3c3","user":{"login":"alexpeachey","id":682304,"avatar_url":"https://avatars.githubusercontent.com/u/682304?v=3","gravatar_id":"","url":"https://api.github.com/users/alexpeachey","html_url":"https://github.com/alexpeachey","followers_url":"https://api.github.com/users/alexpeachey/followers","following_url":"https://api.github.com/users/alexpeachey/following{/other_user}","gists_url":"https://api.github.com/users/alexpeachey/gists{/gist_id}","starred_url":"https://api.github.com/users/alexpeachey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexpeachey/subscriptions","organizations_url":"https://api.github.com/users/alexpeachey/orgs","repos_url":"https://api.github.com/users/alexpeachey/repos","events_url":"https://api.github.com/users/alexpeachey/events{/privacy}","received_events_url":"https://api.github.com/users/alexpeachey/received_events","type":"User","site_admin":false},"body":"I like how you made `project` a memoized method.\r\nYou have this line for finding the task through the project 3 times. It might also be good to use a method as well. That being said, I can see why you may not have since you have a different `task` in the create method.","created_at":"2016-10-31T22:53:11Z","updated_at":"2016-10-31T22:53:11Z","html_url":"https://github.com/stevenbarragan/tracker/pull/1#discussion_r85849590","pull_request_url":"https://api.github.com/repos/stevenbarragan/tracker/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/stevenbarragan/tracker/pulls/comments/85849590"},"html":{"href":"https://github.com/stevenbarragan/tracker/pull/1#discussion_r85849590"},"pull_request":{"href":"https://api.github.com/repos/stevenbarragan/tracker/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/stevenbarragan/tracker/pulls/1","id":91704832,"html_url":"https://github.com/stevenbarragan/tracker/pull/1","diff_url":"https://github.com/stevenbarragan/tracker/pull/1.diff","patch_url":"https://github.com/stevenbarragan/tracker/pull/1.patch","issue_url":"https://api.github.com/repos/stevenbarragan/tracker/issues/1","number":1,"state":"open","locked":false,"title":"Feature/tasks","user":{"login":"stevenbarragan","id":850686,"avatar_url":"https://avatars.githubusercontent.com/u/850686?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenbarragan","html_url":"https://github.com/stevenbarragan","followers_url":"https://api.github.com/users/stevenbarragan/followers","following_url":"https://api.github.com/users/stevenbarragan/following{/other_user}","gists_url":"https://api.github.com/users/stevenbarragan/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenbarragan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenbarragan/subscriptions","organizations_url":"https://api.github.com/users/stevenbarragan/orgs","repos_url":"https://api.github.com/users/stevenbarragan/repos","events_url":"https://api.github.com/users/stevenbarragan/events{/privacy}","received_events_url":"https://api.github.com/users/stevenbarragan/received_events","type":"User","site_admin":false},"body":"* Task model/migration\r\n* REST api endpont for tasks\r\n* Little refactor to the ListCollection class in order to be able to pass more parameters\r\n\r\n@versus-hosting please review.\r\n\r\nP.S. I started out writing RSpec and I just notice the app it's being test mostly on cucumber. I can migrate then to cucumber if necessary.","created_at":"2016-10-31T22:44:13Z","updated_at":"2016-10-31T23:01:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c46a1a9aa75cd78533f9a9b309560e03710194fc","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/stevenbarragan/tracker/pulls/1/commits","review_comments_url":"https://api.github.com/repos/stevenbarragan/tracker/pulls/1/comments","review_comment_url":"https://api.github.com/repos/stevenbarragan/tracker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/stevenbarragan/tracker/issues/1/comments","statuses_url":"https://api.github.com/repos/stevenbarragan/tracker/statuses/1c0342b1548170f4735e553ec553128ded0ca3c3","head":{"label":"stevenbarragan:feature/tasks","ref":"feature/tasks","sha":"1c0342b1548170f4735e553ec553128ded0ca3c3","user":{"login":"stevenbarragan","id":850686,"avatar_url":"https://avatars.githubusercontent.com/u/850686?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenbarragan","html_url":"https://github.com/stevenbarragan","followers_url":"https://api.github.com/users/stevenbarragan/followers","following_url":"https://api.github.com/users/stevenbarragan/following{/other_user}","gists_url":"https://api.github.com/users/stevenbarragan/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenbarragan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenbarragan/subscriptions","organizations_url":"https://api.github.com/users/stevenbarragan/orgs","repos_url":"https://api.github.com/users/stevenbarragan/repos","events_url":"https://api.github.com/users/stevenbarragan/events{/privacy}","received_events_url":"https://api.github.com/users/stevenbarragan/received_events","type":"User","site_admin":false},"repo":{"id":72381957,"name":"tracker","full_name":"stevenbarragan/tracker","owner":{"login":"stevenbarragan","id":850686,"avatar_url":"https://avatars.githubusercontent.com/u/850686?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenbarragan","html_url":"https://github.com/stevenbarragan","followers_url":"https://api.github.com/users/stevenbarragan/followers","following_url":"https://api.github.com/users/stevenbarragan/following{/other_user}","gists_url":"https://api.github.com/users/stevenbarragan/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenbarragan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenbarragan/subscriptions","organizations_url":"https://api.github.com/users/stevenbarragan/orgs","repos_url":"https://api.github.com/users/stevenbarragan/repos","events_url":"https://api.github.com/users/stevenbarragan/events{/privacy}","received_events_url":"https://api.github.com/users/stevenbarragan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stevenbarragan/tracker","description":"Project Tracker app for use in interviews","fork":true,"url":"https://api.github.com/repos/stevenbarragan/tracker","forks_url":"https://api.github.com/repos/stevenbarragan/tracker/forks","keys_url":"https://api.github.com/repos/stevenbarragan/tracker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stevenbarragan/tracker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stevenbarragan/tracker/teams","hooks_url":"https://api.github.com/repos/stevenbarragan/tracker/hooks","issue_events_url":"https://api.github.com/repos/stevenbarragan/tracker/issues/events{/number}","events_url":"https://api.github.com/repos/stevenbarragan/tracker/events","assignees_url":"https://api.github.com/repos/stevenbarragan/tracker/assignees{/user}","branches_url":"https://api.github.com/repos/stevenbarragan/tracker/branches{/branch}","tags_url":"https://api.github.com/repos/stevenbarragan/tracker/tags","blobs_url":"https://api.github.com/repos/stevenbarragan/tracker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stevenbarragan/tracker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stevenbarragan/tracker/git/refs{/sha}","trees_url":"https://api.github.com/repos/stevenbarragan/tracker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stevenbarragan/tracker/statuses/{sha}","languages_url":"https://api.github.com/repos/stevenbarragan/tracker/languages","stargazers_url":"https://api.github.com/repos/stevenbarragan/tracker/stargazers","contributors_url":"https://api.github.com/repos/stevenbarragan/tracker/contributors","subscribers_url":"https://api.github.com/repos/stevenbarragan/tracker/subscribers","subscription_url":"https://api.github.com/repos/stevenbarragan/tracker/subscription","commits_url":"https://api.github.com/repos/stevenbarragan/tracker/commits{/sha}","git_commits_url":"https://api.github.com/repos/stevenbarragan/tracker/git/commits{/sha}","comments_url":"https://api.github.com/repos/stevenbarragan/tracker/comments{/number}","issue_comment_url":"https://api.github.com/repos/stevenbarragan/tracker/issues/comments{/number}","contents_url":"https://api.github.com/repos/stevenbarragan/tracker/contents/{+path}","compare_url":"https://api.github.com/repos/stevenbarragan/tracker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stevenbarragan/tracker/merges","archive_url":"https://api.github.com/repos/stevenbarragan/tracker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stevenbarragan/tracker/downloads","issues_url":"https://api.github.com/repos/stevenbarragan/tracker/issues{/number}","pulls_url":"https://api.github.com/repos/stevenbarragan/tracker/pulls{/number}","milestones_url":"https://api.github.com/repos/stevenbarragan/tracker/milestones{/number}","notifications_url":"https://api.github.com/repos/stevenbarragan/tracker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stevenbarragan/tracker/labels{/name}","releases_url":"https://api.github.com/repos/stevenbarragan/tracker/releases{/id}","deployments_url":"https://api.github.com/repos/stevenbarragan/tracker/deployments","created_at":"2016-10-30T23:29:09Z","updated_at":"2016-10-30T23:29:10Z","pushed_at":"2016-10-31T22:44:13Z","git_url":"git://github.com/stevenbarragan/tracker.git","ssh_url":"git@github.com:stevenbarragan/tracker.git","clone_url":"https://github.com/stevenbarragan/tracker.git","svn_url":"https://github.com/stevenbarragan/tracker","homepage":null,"size":39,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"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":"development"}},"base":{"label":"stevenbarragan:development","ref":"development","sha":"d2b6208491c7972a52af1fb4a125c7365eca6921","user":{"login":"stevenbarragan","id":850686,"avatar_url":"https://avatars.githubusercontent.com/u/850686?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenbarragan","html_url":"https://github.com/stevenbarragan","followers_url":"https://api.github.com/users/stevenbarragan/followers","following_url":"https://api.github.com/users/stevenbarragan/following{/other_user}","gists_url":"https://api.github.com/users/stevenbarragan/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenbarragan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenbarragan/subscriptions","organizations_url":"https://api.github.com/users/stevenbarragan/orgs","repos_url":"https://api.github.com/users/stevenbarragan/repos","events_url":"https://api.github.com/users/stevenbarragan/events{/privacy}","received_events_url":"https://api.github.com/users/stevenbarragan/received_events","type":"User","site_admin":false},"repo":{"id":72381957,"name":"tracker","full_name":"stevenbarragan/tracker","owner":{"login":"stevenbarragan","id":850686,"avatar_url":"https://avatars.githubusercontent.com/u/850686?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenbarragan","html_url":"https://github.com/stevenbarragan","followers_url":"https://api.github.com/users/stevenbarragan/followers","following_url":"https://api.github.com/users/stevenbarragan/following{/other_user}","gists_url":"https://api.github.com/users/stevenbarragan/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenbarragan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenbarragan/subscriptions","organizations_url":"https://api.github.com/users/stevenbarragan/orgs","repos_url":"https://api.github.com/users/stevenbarragan/repos","events_url":"https://api.github.com/users/stevenbarragan/events{/privacy}","received_events_url":"https://api.github.com/users/stevenbarragan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stevenbarragan/tracker","description":"Project Tracker app for use in interviews","fork":true,"url":"https://api.github.com/repos/stevenbarragan/tracker","forks_url":"https://api.github.com/repos/stevenbarragan/tracker/forks","keys_url":"https://api.github.com/repos/stevenbarragan/tracker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stevenbarragan/tracker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stevenbarragan/tracker/teams","hooks_url":"https://api.github.com/repos/stevenbarragan/tracker/hooks","issue_events_url":"https://api.github.com/repos/stevenbarragan/tracker/issues/events{/number}","events_url":"https://api.github.com/repos/stevenbarragan/tracker/events","assignees_url":"https://api.github.com/repos/stevenbarragan/tracker/assignees{/user}","branches_url":"https://api.github.com/repos/stevenbarragan/tracker/branches{/branch}","tags_url":"https://api.github.com/repos/stevenbarragan/tracker/tags","blobs_url":"https://api.github.com/repos/stevenbarragan/tracker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stevenbarragan/tracker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stevenbarragan/tracker/git/refs{/sha}","trees_url":"https://api.github.com/repos/stevenbarragan/tracker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stevenbarragan/tracker/statuses/{sha}","languages_url":"https://api.github.com/repos/stevenbarragan/tracker/languages","stargazers_url":"https://api.github.com/repos/stevenbarragan/tracker/stargazers","contributors_url":"https://api.github.com/repos/stevenbarragan/tracker/contributors","subscribers_url":"https://api.github.com/repos/stevenbarragan/tracker/subscribers","subscription_url":"https://api.github.com/repos/stevenbarragan/tracker/subscription","commits_url":"https://api.github.com/repos/stevenbarragan/tracker/commits{/sha}","git_commits_url":"https://api.github.com/repos/stevenbarragan/tracker/git/commits{/sha}","comments_url":"https://api.github.com/repos/stevenbarragan/tracker/comments{/number}","issue_comment_url":"https://api.github.com/repos/stevenbarragan/tracker/issues/comments{/number}","contents_url":"https://api.github.com/repos/stevenbarragan/tracker/contents/{+path}","compare_url":"https://api.github.com/repos/stevenbarragan/tracker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stevenbarragan/tracker/merges","archive_url":"https://api.github.com/repos/stevenbarragan/tracker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stevenbarragan/tracker/downloads","issues_url":"https://api.github.com/repos/stevenbarragan/tracker/issues{/number}","pulls_url":"https://api.github.com/repos/stevenbarragan/tracker/pulls{/number}","milestones_url":"https://api.github.com/repos/stevenbarragan/tracker/milestones{/number}","notifications_url":"https://api.github.com/repos/stevenbarragan/tracker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stevenbarragan/tracker/labels{/name}","releases_url":"https://api.github.com/repos/stevenbarragan/tracker/releases{/id}","deployments_url":"https://api.github.com/repos/stevenbarragan/tracker/deployments","created_at":"2016-10-30T23:29:09Z","updated_at":"2016-10-30T23:29:10Z","pushed_at":"2016-10-31T22:44:13Z","git_url":"git://github.com/stevenbarragan/tracker.git","ssh_url":"git@github.com:stevenbarragan/tracker.git","clone_url":"https://github.com/stevenbarragan/tracker.git","svn_url":"https://github.com/stevenbarragan/tracker","homepage":null,"size":39,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"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":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/stevenbarragan/tracker/pulls/1"},"html":{"href":"https://github.com/stevenbarragan/tracker/pull/1"},"issue":{"href":"https://api.github.com/repos/stevenbarragan/tracker/issues/1"},"comments":{"href":"https://api.github.com/repos/stevenbarragan/tracker/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/stevenbarragan/tracker/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/stevenbarragan/tracker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/stevenbarragan/tracker/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/stevenbarragan/tracker/statuses/1c0342b1548170f4735e553ec553128ded0ca3c3"}}}}
{"actor":{"display_login":"alexpeachey"}}