{"action":"created","comment":{"url":"https://api.github.com/repos/stronglifters/surface/pulls/comments/69318368","id":69318368,"diff_hunk":"@@ -0,0 +1,139 @@\n+class WarmUp\n+  attr_reader :exercise, :sets, :target_weight\n+\n+  def initialize(exercise, target_weight)\n+    @sets = []\n+    @exercise = exercise\n+    @target_weight = target_weight\n+    case exercise.name\n+    when \"Deadlift\"\n+      dead_lift_warmup\n+    when \"Barbell Row\"\n+      barbell_row_warmup\n+    else\n+      default_warmup\n+    end\n+  end\n+\n+  private\n+\n+  def add_set(weight, repetitions)\n+    @sets << WarmUpSet.new(\n+      exercise: exercise,\n+      target_weight: weight,\n+      target_repetitions: repetitions,\n+    )\n+    self\n+  end\n+\n+  def dead_lift_warmup\n+    return self if target_weight < 155.0\n+    return add_set(135.0, 5) if (target_weight < 175.0)\n+    add_set(135.0, 5)\n+    return add_set(165.0, 5) if (target_weight < 200.0)\n+    return add_set(175.0, 5) if (target_weight < 220.0)\n+    return add_set(185.0, 5) if (target_weight < 225.0)\n+    add_set(185.0, 5)\n+    return add_set(205.0, 5) if (target_weight < 240.0)\n+    return add_set(215.0, 5) if (target_weight < 250.0)\n+    return add_set(225.0, 5) if (target_weight < 270.0)\n+    add_set(225.0, 5)\n+    return add_set(245.0, 5) if (target_weight < 275.0)\n+    return add_set(255.0, 5) if (target_weight < 290.0)\n+    return add_set(265.0, 5) if (target_weight < 301.0)\n+    add_set(265.0, 3)\n+    return add_set(285.0, 1) if (target_weight < 320.0)\n+    return add_set(295.0, 1) if (target_weight < 330.0)\n+    return add_set(305.0, 1) if (target_weight < 340.0)\n+    return add_set(315.0, 1) if (target_weight < 350.0)\n+    add_set(315.0, 3)\n+    return add_set(335.0, 1) if (target_weight < 360.0)\n+    return add_set(340.0, 1) if (target_weight < 370.0)\n+    return add_set(345.0, 1) if (target_weight < 380.0)\n+    return add_set(350.0, 1) if (target_weight < 390.0)\n+    return add_set(355.0, 1) if (target_weight < 395.0)\n+    return add_set(360.0, 1) if (target_weight < 400.0)\n+    add_set(365.0, 1)\n+  end\n+\n+  def barbell_row_warmup\n+    return self if target_weight < 105.0 || target_weight < 65.0\n+    return add_set(95.0, 5) if (target_weight < 145.0)\n+    return add_set(115.0, 5) if (target_weight < 160.0)\n+    return add_set(65.0, 3) if (target_weight < 105.0)\n+    return add_set(75.0, 3) if (target_weight < 125.0)\n+    return add_set(85.0, 3) if (target_weight < 135.0)\n+    return add_set(135.0, 3) if (target_weight < 185.0)\n+    add_set(135.0, 5)\n+    return add_set(165.0, 3) if (target_weight < 200.0)\n+    return add_set(175.0, 3) if (target_weight < 220.0)\n+    return add_set(185.0, 3) if (target_weight < 225.0)\n+    add_set(185.0, 5)\n+    return add_set(205.0, 2) if (target_weight < 240.0)\n+    return add_set(215.0, 2) if (target_weight < 250.0)\n+    return add_set(225.0, 2) if (target_weight < 270.0)\n+    add_set(225.0, 5)\n+    return add_set(245.0, 1) if (target_weight < 275.0)\n+    return add_set(255.0, 1) if (target_weight < 290.0)\n+    return add_set(265.0, 1) if (target_weight < 301.0)\n+    add_set(265.0, 3)\n+    return add_set(285.0, 1) if (target_weight < 320.0)\n+    return add_set(295.0, 1) if (target_weight < 330.0)\n+    return add_set(305.0, 1) if (target_weight < 340.0)\n+    return add_set(315.0, 1) if (target_weight < 350.0)\n+    add_set(315.0, 3)\n+    return add_set(330.0, 1) if (target_weight < 355.0)\n+    return add_set(340.0, 1) if (target_weight < 370.0)\n+    return add_set(345.0, 1) if (target_weight < 380.0)\n+    return add_set(350.0, 1) if (target_weight < 390.0)\n+    return add_set(355.0, 1) if (target_weight < 395.0)\n+    return add_set(360.0, 1) if (target_weight < 400.0)\n+    add_set(365.0, 1)\n+  end\n+\n+  def default_warmup\n+    return self if (target_weight < 65.0)\n+    add_set(45.0, 5)\n+    add_set(45.0, 5)\n+    return self if (target_weight < 95.0)\n+    return add_set(65.0, 3) if (target_weight < 105.0)\n+    return add_set(75.0, 3) if (target_weight < 125.0)\n+    return add_set(85.0, 3) if (target_weight < 135.0)\n+    add_set(95.0, 5)\n+    return add_set(115.0, 3) if (target_weight < 150.0)\n+    return add_set(125.0, 3) if (target_weight < 160.0)\n+    return add_set(135.0, 3) if (target_weight < 185.0)\n+    return add_set(135.0, 3) if (target_weight < 185.0)\n+    add_set(135.0, 5)\n+    return add_set(165.0, 3) if (target_weight < 200.0)\n+    return add_set(175.0, 3) if (target_weight < 220.0)\n+    return add_set(185.0, 3) if (target_weight < 225.0)\n+    add_set(185.0, target_weight < 305.0 ? 3 : 5)\n+    return add_set(205.0, 2) if (target_weight < 240.0)\n+    return add_set(215.0, 2) if (target_weight < 250.0)\n+    return add_set(225.0, 2) if (target_weight < 270.0)\n+    add_set(225.0, target_weight < 305.0 ? 2 : 3)\n+    return add_set(245.0, 1) if (target_weight < 275.0)\n+    return add_set(255.0, 1) if (target_weight < 290.0)\n+    return add_set(265.0, 1) if (target_weight < 301.0)\n+    if (target_weight < 305.0)\n+      add_set(265.0, 1)\n+    elsif (target_weight < 350.0)\n+      add_set(265.0, 2)\n+    else\n+      add_set(265.0, 3)\n+    end\n+    return add_set(285.0, 1) if (target_weight < 320.0)\n+    return add_set(295.0, 1) if (target_weight < 330.0)\n+    return add_set(305.0, 1) if (target_weight < 340.0)\n+    return add_set(315.0, 1) if (target_weight < 350.0)\n+    add_set(315.0, 2)\n+    return add_set(330.0, 1) if (target_weight < 355.0)\n+    return add_set(340.0, 1) if (target_weight < 370.0)","path":"app/models/warm_up.rb","position":132,"original_position":132,"commit_id":"4f8c1f27ddb0a8576ec1cb30df7ed77e1b91da13","original_commit_id":"4f8c1f27ddb0a8576ec1cb30df7ed77e1b91da13","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","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":"Don't use parentheses around the condition of an `if`.","created_at":"2016-07-01T15:39:57Z","updated_at":"2016-07-01T15:39:57Z","html_url":"https://github.com/stronglifters/surface/pull/45#discussion_r69318368","pull_request_url":"https://api.github.com/repos/stronglifters/surface/pulls/45","_links":{"self":{"href":"https://api.github.com/repos/stronglifters/surface/pulls/comments/69318368"},"html":{"href":"https://github.com/stronglifters/surface/pull/45#discussion_r69318368"},"pull_request":{"href":"https://api.github.com/repos/stronglifters/surface/pulls/45"}}},"pull_request":{"url":"https://api.github.com/repos/stronglifters/surface/pulls/45","id":72810005,"html_url":"https://github.com/stronglifters/surface/pull/45","diff_url":"https://github.com/stronglifters/surface/pull/45.diff","patch_url":"https://github.com/stronglifters/surface/pull/45.patch","issue_url":"https://api.github.com/repos/stronglifters/surface/issues/45","number":45,"state":"open","locked":false,"title":"Madcow - syke","user":{"login":"mokhan","id":80475,"avatar_url":"https://avatars.githubusercontent.com/u/80475?v=3","gravatar_id":"","url":"https://api.github.com/users/mokhan","html_url":"https://github.com/mokhan","followers_url":"https://api.github.com/users/mokhan/followers","following_url":"https://api.github.com/users/mokhan/following{/other_user}","gists_url":"https://api.github.com/users/mokhan/gists{/gist_id}","starred_url":"https://api.github.com/users/mokhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mokhan/subscriptions","organizations_url":"https://api.github.com/users/mokhan/orgs","repos_url":"https://api.github.com/users/mokhan/repos","events_url":"https://api.github.com/users/mokhan/events{/privacy}","received_events_url":"https://api.github.com/users/mokhan/received_events","type":"User","site_admin":false},"body":"![](http://www.musclemunch.net/wp-content/uploads/2015/01/madcows-5x5.jpg)","created_at":"2016-06-07T03:13:51Z","updated_at":"2016-07-01T15:39:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b9f44c45b355dda796e7b139ffb38da8cc939b32","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/stronglifters/surface/pulls/45/commits","review_comments_url":"https://api.github.com/repos/stronglifters/surface/pulls/45/comments","review_comment_url":"https://api.github.com/repos/stronglifters/surface/pulls/comments{/number}","comments_url":"https://api.github.com/repos/stronglifters/surface/issues/45/comments","statuses_url":"https://api.github.com/repos/stronglifters/surface/statuses/4f8c1f27ddb0a8576ec1cb30df7ed77e1b91da13","head":{"label":"mokhan:madcow","ref":"madcow","sha":"4f8c1f27ddb0a8576ec1cb30df7ed77e1b91da13","user":{"login":"mokhan","id":80475,"avatar_url":"https://avatars.githubusercontent.com/u/80475?v=3","gravatar_id":"","url":"https://api.github.com/users/mokhan","html_url":"https://github.com/mokhan","followers_url":"https://api.github.com/users/mokhan/followers","following_url":"https://api.github.com/users/mokhan/following{/other_user}","gists_url":"https://api.github.com/users/mokhan/gists{/gist_id}","starred_url":"https://api.github.com/users/mokhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mokhan/subscriptions","organizations_url":"https://api.github.com/users/mokhan/orgs","repos_url":"https://api.github.com/users/mokhan/repos","events_url":"https://api.github.com/users/mokhan/events{/privacy}","received_events_url":"https://api.github.com/users/mokhan/received_events","type":"User","site_admin":false},"repo":{"id":36050566,"name":"surface","full_name":"mokhan/surface","owner":{"login":"mokhan","id":80475,"avatar_url":"https://avatars.githubusercontent.com/u/80475?v=3","gravatar_id":"","url":"https://api.github.com/users/mokhan","html_url":"https://github.com/mokhan","followers_url":"https://api.github.com/users/mokhan/followers","following_url":"https://api.github.com/users/mokhan/following{/other_user}","gists_url":"https://api.github.com/users/mokhan/gists{/gist_id}","starred_url":"https://api.github.com/users/mokhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mokhan/subscriptions","organizations_url":"https://api.github.com/users/mokhan/orgs","repos_url":"https://api.github.com/users/mokhan/repos","events_url":"https://api.github.com/users/mokhan/events{/privacy}","received_events_url":"https://api.github.com/users/mokhan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mokhan/surface","description":"","fork":true,"url":"https://api.github.com/repos/mokhan/surface","forks_url":"https://api.github.com/repos/mokhan/surface/forks","keys_url":"https://api.github.com/repos/mokhan/surface/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mokhan/surface/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mokhan/surface/teams","hooks_url":"https://api.github.com/repos/mokhan/surface/hooks","issue_events_url":"https://api.github.com/repos/mokhan/surface/issues/events{/number}","events_url":"https://api.github.com/repos/mokhan/surface/events","assignees_url":"https://api.github.com/repos/mokhan/surface/assignees{/user}","branches_url":"https://api.github.com/repos/mokhan/surface/branches{/branch}","tags_url":"https://api.github.com/repos/mokhan/surface/tags","blobs_url":"https://api.github.com/repos/mokhan/surface/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mokhan/surface/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mokhan/surface/git/refs{/sha}","trees_url":"https://api.github.com/repos/mokhan/surface/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mokhan/surface/statuses/{sha}","languages_url":"https://api.github.com/repos/mokhan/surface/languages","stargazers_url":"https://api.github.com/repos/mokhan/surface/stargazers","contributors_url":"https://api.github.com/repos/mokhan/surface/contributors","subscribers_url":"https://api.github.com/repos/mokhan/surface/subscribers","subscription_url":"https://api.github.com/repos/mokhan/surface/subscription","commits_url":"https://api.github.com/repos/mokhan/surface/commits{/sha}","git_commits_url":"https://api.github.com/repos/mokhan/surface/git/commits{/sha}","comments_url":"https://api.github.com/repos/mokhan/surface/comments{/number}","issue_comment_url":"https://api.github.com/repos/mokhan/surface/issues/comments{/number}","contents_url":"https://api.github.com/repos/mokhan/surface/contents/{+path}","compare_url":"https://api.github.com/repos/mokhan/surface/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mokhan/surface/merges","archive_url":"https://api.github.com/repos/mokhan/surface/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mokhan/surface/downloads","issues_url":"https://api.github.com/repos/mokhan/surface/issues{/number}","pulls_url":"https://api.github.com/repos/mokhan/surface/pulls{/number}","milestones_url":"https://api.github.com/repos/mokhan/surface/milestones{/number}","notifications_url":"https://api.github.com/repos/mokhan/surface/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mokhan/surface/labels{/name}","releases_url":"https://api.github.com/repos/mokhan/surface/releases{/id}","deployments_url":"https://api.github.com/repos/mokhan/surface/deployments","created_at":"2015-05-22T03:35:52Z","updated_at":"2016-05-07T15:12:08Z","pushed_at":"2016-07-01T15:38:58Z","git_url":"git://github.com/mokhan/surface.git","ssh_url":"git@github.com:mokhan/surface.git","clone_url":"https://github.com/mokhan/surface.git","svn_url":"https://github.com/mokhan/surface","homepage":null,"size":1381,"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":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"stronglifters:master","ref":"master","sha":"fd00efe7c2d308994d6b16c0c9eafd6683f8b521","user":{"login":"stronglifters","id":12377766,"avatar_url":"https://avatars.githubusercontent.com/u/12377766?v=3","gravatar_id":"","url":"https://api.github.com/users/stronglifters","html_url":"https://github.com/stronglifters","followers_url":"https://api.github.com/users/stronglifters/followers","following_url":"https://api.github.com/users/stronglifters/following{/other_user}","gists_url":"https://api.github.com/users/stronglifters/gists{/gist_id}","starred_url":"https://api.github.com/users/stronglifters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stronglifters/subscriptions","organizations_url":"https://api.github.com/users/stronglifters/orgs","repos_url":"https://api.github.com/users/stronglifters/repos","events_url":"https://api.github.com/users/stronglifters/events{/privacy}","received_events_url":"https://api.github.com/users/stronglifters/received_events","type":"Organization","site_admin":false},"repo":{"id":35834041,"name":"surface","full_name":"stronglifters/surface","owner":{"login":"stronglifters","id":12377766,"avatar_url":"https://avatars.githubusercontent.com/u/12377766?v=3","gravatar_id":"","url":"https://api.github.com/users/stronglifters","html_url":"https://github.com/stronglifters","followers_url":"https://api.github.com/users/stronglifters/followers","following_url":"https://api.github.com/users/stronglifters/following{/other_user}","gists_url":"https://api.github.com/users/stronglifters/gists{/gist_id}","starred_url":"https://api.github.com/users/stronglifters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stronglifters/subscriptions","organizations_url":"https://api.github.com/users/stronglifters/orgs","repos_url":"https://api.github.com/users/stronglifters/repos","events_url":"https://api.github.com/users/stronglifters/events{/privacy}","received_events_url":"https://api.github.com/users/stronglifters/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/stronglifters/surface","description":"","fork":false,"url":"https://api.github.com/repos/stronglifters/surface","forks_url":"https://api.github.com/repos/stronglifters/surface/forks","keys_url":"https://api.github.com/repos/stronglifters/surface/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stronglifters/surface/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stronglifters/surface/teams","hooks_url":"https://api.github.com/repos/stronglifters/surface/hooks","issue_events_url":"https://api.github.com/repos/stronglifters/surface/issues/events{/number}","events_url":"https://api.github.com/repos/stronglifters/surface/events","assignees_url":"https://api.github.com/repos/stronglifters/surface/assignees{/user}","branches_url":"https://api.github.com/repos/stronglifters/surface/branches{/branch}","tags_url":"https://api.github.com/repos/stronglifters/surface/tags","blobs_url":"https://api.github.com/repos/stronglifters/surface/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stronglifters/surface/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stronglifters/surface/git/refs{/sha}","trees_url":"https://api.github.com/repos/stronglifters/surface/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stronglifters/surface/statuses/{sha}","languages_url":"https://api.github.com/repos/stronglifters/surface/languages","stargazers_url":"https://api.github.com/repos/stronglifters/surface/stargazers","contributors_url":"https://api.github.com/repos/stronglifters/surface/contributors","subscribers_url":"https://api.github.com/repos/stronglifters/surface/subscribers","subscription_url":"https://api.github.com/repos/stronglifters/surface/subscription","commits_url":"https://api.github.com/repos/stronglifters/surface/commits{/sha}","git_commits_url":"https://api.github.com/repos/stronglifters/surface/git/commits{/sha}","comments_url":"https://api.github.com/repos/stronglifters/surface/comments{/number}","issue_comment_url":"https://api.github.com/repos/stronglifters/surface/issues/comments{/number}","contents_url":"https://api.github.com/repos/stronglifters/surface/contents/{+path}","compare_url":"https://api.github.com/repos/stronglifters/surface/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stronglifters/surface/merges","archive_url":"https://api.github.com/repos/stronglifters/surface/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stronglifters/surface/downloads","issues_url":"https://api.github.com/repos/stronglifters/surface/issues{/number}","pulls_url":"https://api.github.com/repos/stronglifters/surface/pulls{/number}","milestones_url":"https://api.github.com/repos/stronglifters/surface/milestones{/number}","notifications_url":"https://api.github.com/repos/stronglifters/surface/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stronglifters/surface/labels{/name}","releases_url":"https://api.github.com/repos/stronglifters/surface/releases{/id}","deployments_url":"https://api.github.com/repos/stronglifters/surface/deployments","created_at":"2015-05-18T18:07:10Z","updated_at":"2016-05-15T04:36:41Z","pushed_at":"2016-07-01T15:38:58Z","git_url":"git://github.com/stronglifters/surface.git","ssh_url":"git@github.com:stronglifters/surface.git","clone_url":"https://github.com/stronglifters/surface.git","svn_url":"https://github.com/stronglifters/surface","homepage":"https://www.stronglifters.com","size":1275,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":8,"forks":2,"open_issues":8,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/stronglifters/surface/pulls/45"},"html":{"href":"https://github.com/stronglifters/surface/pull/45"},"issue":{"href":"https://api.github.com/repos/stronglifters/surface/issues/45"},"comments":{"href":"https://api.github.com/repos/stronglifters/surface/issues/45/comments"},"review_comments":{"href":"https://api.github.com/repos/stronglifters/surface/pulls/45/comments"},"review_comment":{"href":"https://api.github.com/repos/stronglifters/surface/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/stronglifters/surface/pulls/45/commits"},"statuses":{"href":"https://api.github.com/repos/stronglifters/surface/statuses/4f8c1f27ddb0a8576ec1cb30df7ed77e1b91da13"}}}}
{"actor":{"display_login":"houndci-bot"}}