{"action":"created","comment":{"url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/pulls/comments/28657167","id":28657167,"diff_hunk":"@@ -0,0 +1,760 @@\n+/*!\n+ * jQuery Raty - A Star Rating Plugin\n+ *\n+ * The MIT License\n+ *\n+ * @author  : Washington Botelho\n+ * @doc     : http://wbotelhos.com/raty\n+ * @version : 2.7.0\n+ *\n+ */\n+\n+;\n+(function($) {\n+  'use strict';\n+\n+  var methods = {\n+    init: function(options) {\n+      return this.each(function() {\n+        this.self = $(this);\n+\n+        methods.destroy.call(this.self);\n+\n+        this.opt = $.extend(true, {}, $.fn.raty.defaults, options);\n+\n+        methods._adjustCallback.call(this);\n+        methods._adjustNumber.call(this);\n+        methods._adjustHints.call(this);\n+\n+        this.opt.score = methods._adjustedScore.call(this, this.opt.score);\n+\n+        if (this.opt.starType !== 'img') {\n+          methods._adjustStarType.call(this);\n+        }\n+\n+        methods._adjustPath.call(this);\n+        methods._createStars.call(this);\n+\n+        if (this.opt.cancel) {\n+          methods._createCancel.call(this);\n+        }\n+\n+        if (this.opt.precision) {\n+          methods._adjustPrecision.call(this);\n+        }\n+\n+        methods._createScore.call(this);\n+        methods._apply.call(this, this.opt.score);\n+        methods._setTitle.call(this, this.opt.score);\n+        methods._target.call(this, this.opt.score);\n+\n+        if (this.opt.readOnly) {\n+          methods._lock.call(this);\n+        } else {\n+          this.style.cursor = 'pointer';\n+\n+          methods._binds.call(this);\n+        }\n+      });\n+    },\n+\n+    _adjustCallback: function() {\n+      var options = ['number', 'readOnly', 'score', 'scoreName', 'target'];\n+\n+      for (var i = 0; i < options.length; i++) {\n+        if (typeof this.opt[options[i]] === 'function') {\n+          this.opt[options[i]] = this.opt[options[i]].call(this);\n+        }\n+      }\n+    },\n+\n+    _adjustedScore: function(score) {\n+      if (!score) {\n+        return score;\n+      }\n+\n+      return methods._between(score, 0, this.opt.number);\n+    },\n+\n+    _adjustHints: function() {\n+      if (!this.opt.hints) {\n+        this.opt.hints = [];\n+      }\n+\n+      if (!this.opt.halfShow && !this.opt.half) {\n+        return;\n+      }\n+\n+      var steps = this.opt.precision ? 10 : 2;\n+\n+      for (var i = 0; i < this.opt.number; i++) {\n+        var group = this.opt.hints[i];\n+\n+        if (Object.prototype.toString.call(group) !== '[object Array]') {\n+          group = [group];\n+        }\n+\n+        this.opt.hints[i] = [];\n+\n+        for (var j = 0; j < steps; j++) {\n+          var\n+            hint = group[j],\n+            last = group[group.length - 1];\n+\n+          if (last === undefined) {\n+            last = null;\n+          }\n+\n+          this.opt.hints[i][j] = hint === undefined ? last : hint;\n+        }\n+      }\n+    },\n+\n+    _adjustNumber: function() {\n+      this.opt.number = methods._between(this.opt.number, 1, this.opt.numberMax);","path":"app/assets/javascripts/jquery.raty.js","position":114,"original_position":114,"commit_id":"8c675f6a7eb7ddca6d70d4602e98296ee1ba783b","original_commit_id":"8c675f6a7eb7ddca6d70d4602e98296ee1ba783b","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":"Line is too long.","created_at":"2015-04-19T21:32:54Z","updated_at":"2015-04-19T21:32:54Z","html_url":"https://github.com/MatthewRiggott/Raving-Recipes/pull/2#discussion_r28657167","pull_request_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/pulls/comments/28657167"},"html":{"href":"https://github.com/MatthewRiggott/Raving-Recipes/pull/2#discussion_r28657167"},"pull_request":{"href":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/pulls/2","id":33626362,"html_url":"https://github.com/MatthewRiggott/Raving-Recipes/pull/2","diff_url":"https://github.com/MatthewRiggott/Raving-Recipes/pull/2.diff","patch_url":"https://github.com/MatthewRiggott/Raving-Recipes/pull/2.patch","issue_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/issues/2","number":2,"state":"open","locked":false,"title":"Add ratings","user":{"login":"MatthewRiggott","id":9540829,"avatar_url":"https://avatars.githubusercontent.com/u/9540829?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthewRiggott","html_url":"https://github.com/MatthewRiggott","followers_url":"https://api.github.com/users/MatthewRiggott/followers","following_url":"https://api.github.com/users/MatthewRiggott/following{/other_user}","gists_url":"https://api.github.com/users/MatthewRiggott/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthewRiggott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthewRiggott/subscriptions","organizations_url":"https://api.github.com/users/MatthewRiggott/orgs","repos_url":"https://api.github.com/users/MatthewRiggott/repos","events_url":"https://api.github.com/users/MatthewRiggott/events{/privacy}","received_events_url":"https://api.github.com/users/MatthewRiggott/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-19T21:32:47Z","updated_at":"2015-04-19T21:32:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ac95a6e17bc9b1cb10b9e487e30da28a01b4b970","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/pulls/2/commits","review_comments_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/pulls/2/comments","review_comment_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/issues/2/comments","statuses_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/statuses/8c675f6a7eb7ddca6d70d4602e98296ee1ba783b","head":{"label":"MatthewRiggott:add-ratings","ref":"add-ratings","sha":"8c675f6a7eb7ddca6d70d4602e98296ee1ba783b","user":{"login":"MatthewRiggott","id":9540829,"avatar_url":"https://avatars.githubusercontent.com/u/9540829?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthewRiggott","html_url":"https://github.com/MatthewRiggott","followers_url":"https://api.github.com/users/MatthewRiggott/followers","following_url":"https://api.github.com/users/MatthewRiggott/following{/other_user}","gists_url":"https://api.github.com/users/MatthewRiggott/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthewRiggott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthewRiggott/subscriptions","organizations_url":"https://api.github.com/users/MatthewRiggott/orgs","repos_url":"https://api.github.com/users/MatthewRiggott/repos","events_url":"https://api.github.com/users/MatthewRiggott/events{/privacy}","received_events_url":"https://api.github.com/users/MatthewRiggott/received_events","type":"User","site_admin":false},"repo":{"id":33462157,"name":"Raving-Recipes","full_name":"MatthewRiggott/Raving-Recipes","owner":{"login":"MatthewRiggott","id":9540829,"avatar_url":"https://avatars.githubusercontent.com/u/9540829?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthewRiggott","html_url":"https://github.com/MatthewRiggott","followers_url":"https://api.github.com/users/MatthewRiggott/followers","following_url":"https://api.github.com/users/MatthewRiggott/following{/other_user}","gists_url":"https://api.github.com/users/MatthewRiggott/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthewRiggott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthewRiggott/subscriptions","organizations_url":"https://api.github.com/users/MatthewRiggott/orgs","repos_url":"https://api.github.com/users/MatthewRiggott/repos","events_url":"https://api.github.com/users/MatthewRiggott/events{/privacy}","received_events_url":"https://api.github.com/users/MatthewRiggott/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MatthewRiggott/Raving-Recipes","description":"A website where recipes are found, liked and reviewed.","fork":false,"url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes","forks_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/forks","keys_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/teams","hooks_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/hooks","issue_events_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/issues/events{/number}","events_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/events","assignees_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/assignees{/user}","branches_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/branches{/branch}","tags_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/tags","blobs_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/git/refs{/sha}","trees_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/statuses/{sha}","languages_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/languages","stargazers_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/stargazers","contributors_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/contributors","subscribers_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/subscribers","subscription_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/subscription","commits_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/commits{/sha}","git_commits_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/git/commits{/sha}","comments_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/comments{/number}","issue_comment_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/issues/comments{/number}","contents_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/contents/{+path}","compare_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/merges","archive_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/downloads","issues_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/issues{/number}","pulls_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/pulls{/number}","milestones_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/milestones{/number}","notifications_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/labels{/name}","releases_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/releases{/id}","created_at":"2015-04-06T01:51:23Z","updated_at":"2015-04-19T02:09:11Z","pushed_at":"2015-04-19T21:32:48Z","git_url":"git://github.com/MatthewRiggott/Raving-Recipes.git","ssh_url":"git@github.com:MatthewRiggott/Raving-Recipes.git","clone_url":"https://github.com/MatthewRiggott/Raving-Recipes.git","svn_url":"https://github.com/MatthewRiggott/Raving-Recipes","homepage":null,"size":160,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"MatthewRiggott:master","ref":"master","sha":"6f939d9e6d7ec2dee92f3c1a08a3916c944b19f5","user":{"login":"MatthewRiggott","id":9540829,"avatar_url":"https://avatars.githubusercontent.com/u/9540829?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthewRiggott","html_url":"https://github.com/MatthewRiggott","followers_url":"https://api.github.com/users/MatthewRiggott/followers","following_url":"https://api.github.com/users/MatthewRiggott/following{/other_user}","gists_url":"https://api.github.com/users/MatthewRiggott/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthewRiggott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthewRiggott/subscriptions","organizations_url":"https://api.github.com/users/MatthewRiggott/orgs","repos_url":"https://api.github.com/users/MatthewRiggott/repos","events_url":"https://api.github.com/users/MatthewRiggott/events{/privacy}","received_events_url":"https://api.github.com/users/MatthewRiggott/received_events","type":"User","site_admin":false},"repo":{"id":33462157,"name":"Raving-Recipes","full_name":"MatthewRiggott/Raving-Recipes","owner":{"login":"MatthewRiggott","id":9540829,"avatar_url":"https://avatars.githubusercontent.com/u/9540829?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthewRiggott","html_url":"https://github.com/MatthewRiggott","followers_url":"https://api.github.com/users/MatthewRiggott/followers","following_url":"https://api.github.com/users/MatthewRiggott/following{/other_user}","gists_url":"https://api.github.com/users/MatthewRiggott/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthewRiggott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthewRiggott/subscriptions","organizations_url":"https://api.github.com/users/MatthewRiggott/orgs","repos_url":"https://api.github.com/users/MatthewRiggott/repos","events_url":"https://api.github.com/users/MatthewRiggott/events{/privacy}","received_events_url":"https://api.github.com/users/MatthewRiggott/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MatthewRiggott/Raving-Recipes","description":"A website where recipes are found, liked and reviewed.","fork":false,"url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes","forks_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/forks","keys_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/teams","hooks_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/hooks","issue_events_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/issues/events{/number}","events_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/events","assignees_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/assignees{/user}","branches_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/branches{/branch}","tags_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/tags","blobs_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/git/refs{/sha}","trees_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/statuses/{sha}","languages_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/languages","stargazers_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/stargazers","contributors_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/contributors","subscribers_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/subscribers","subscription_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/subscription","commits_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/commits{/sha}","git_commits_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/git/commits{/sha}","comments_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/comments{/number}","issue_comment_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/issues/comments{/number}","contents_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/contents/{+path}","compare_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/merges","archive_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/downloads","issues_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/issues{/number}","pulls_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/pulls{/number}","milestones_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/milestones{/number}","notifications_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/labels{/name}","releases_url":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/releases{/id}","created_at":"2015-04-06T01:51:23Z","updated_at":"2015-04-19T02:09:11Z","pushed_at":"2015-04-19T21:32:48Z","git_url":"git://github.com/MatthewRiggott/Raving-Recipes.git","ssh_url":"git@github.com:MatthewRiggott/Raving-Recipes.git","clone_url":"https://github.com/MatthewRiggott/Raving-Recipes.git","svn_url":"https://github.com/MatthewRiggott/Raving-Recipes","homepage":null,"size":160,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/pulls/2"},"html":{"href":"https://github.com/MatthewRiggott/Raving-Recipes/pull/2"},"issue":{"href":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/issues/2"},"comments":{"href":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/MatthewRiggott/Raving-Recipes/statuses/8c675f6a7eb7ddca6d70d4602e98296ee1ba783b"}}}}