GitHub PullRequestReviewCommentEvent at 2014-11-03 21:21:13
Repository: openproject
Actor: houndci
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/opf/openproject/pulls/comments/19765482","id":19765482,"diff_hunk":"@@ -66,54 +66,54 @@ def pdf(work_packages, project, query, results, options={})\n     col_width = []\n     unless query.columns.empty?\n       col_width = query.columns.collect do |c|\n-        (c.name == :subject || (c.is_a?(QueryCustomFieldColumn) && ['string', 'text'].include?(c.custom_field.field_format)))? 4.0 : 1.0\n+        (c.name == :subject || (c.is_a?(QueryCustomFieldColumn) && ['string', 'text'].include?(c.custom_field.field_format))) ? 4.0 : 1.0\n       end\n-      ratio = (table_width - col_id_width) / col_width.inject(0) {|s,w| s += w}\n-      col_width = col_width.collect {|w| w * ratio}\n+      ratio = (table_width - col_id_width) / col_width.inject(0) { |s, w| s += w }\n+      col_width = col_width.collect { |w| w * ratio }\n     end\n \n     # title\n-    pdf.SetFontStyle('B',11)\n-    pdf.RDMCell(190,10, title)\n+    pdf.SetFontStyle('B', 11)\n+    pdf.RDMCell(190, 10, title)\n     pdf.Ln\n \n     # headers\n-    pdf.SetFontStyle('B',8)\n+    pdf.SetFontStyle('B', 8)\n     pdf.SetFillColor(230, 230, 230)\n-    pdf.RDMCell(col_id_width, row_height, \"#\", 1, 0, 'L', 1)\n+    pdf.RDMCell(col_id_width, row_height, '#', 1, 0, 'L', 1)\n     query.columns.each_with_index do |column, i|\n       pdf.RDMCell(col_width[i], row_height, column.caption, 1, 0, 'L', 1)\n     end\n     pdf.Ln\n \n     # rows\n-    pdf.SetFontStyle('',8)\n+    pdf.SetFontStyle('', 8)\n     pdf.SetFillColor(255, 255, 255)\n     previous_group = false\n     work_packages.each do |work_package|\n       if query.grouped? && (group = query.group_by_column.value(work_package)) != previous_group\n-        pdf.SetFontStyle('B',9)\n+        pdf.SetFontStyle('B', 9)\n         pdf.RDMCell(277, row_height,\n-          (group.blank? ? 'None' : group.to_s) + \" (#{results.work_package_count_for(group)})\",\n-          1, 1, 'L')\n-        pdf.SetFontStyle('',8)\n+                    (group.blank? ? 'None' : group.to_s) + \" (#{results.work_package_count_for(group)})\",\n+                    1, 1, 'L')\n+        pdf.SetFontStyle('', 8)\n         previous_group = group\n       end\n \n       # fetch all the row values\n       col_values = query.columns.collect do |column|\n         s = if column.is_a?(QueryCustomFieldColumn)\n-          cv = work_package.custom_values.detect {|v| v.custom_field_id == column.custom_field.id}\n-          show_value(cv)\n-        else\n-          value = work_package.send(column.name)\n-          if value.is_a?(Date)\n-            format_date(value)\n-          elsif value.is_a?(Time)\n-            format_time(value)\n-          else\n-            value\n-          end\n+              cv = work_package.custom_values.detect { |v| v.custom_field_id == column.custom_field.id }","path":"app/models/work_package/pdf_exporter.rb","position":92,"original_position":92,"commit_id":"c81232f03a4b3bd597840ae5c080f29dccfdc72d","original_commit_id":"c81232f03a4b3bd597840ae5c080f29dccfdc72d","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=2","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. [104/99]","created_at":"2014-11-03T21:21:13Z","updated_at":"2014-11-03T21:21:13Z","html_url":"https://github.com/opf/openproject/pull/2136#discussion_r19765482","pull_request_url":"https://api.github.com/repos/opf/openproject/pulls/2136","_links":{"self":{"href":"https://api.github.com/repos/opf/openproject/pulls/comments/19765482"},"html":{"href":"https://github.com/opf/openproject/pull/2136#discussion_r19765482"},"pull_request":{"href":"https://api.github.com/repos/opf/openproject/pulls/2136"}}},"pull_request":{"url":"https://api.github.com/repos/opf/openproject/pulls/2136","id":23791934,"html_url":"https://github.com/opf/openproject/pull/2136","diff_url":"https://github.com/opf/openproject/pull/2136.diff","patch_url":"https://github.com/opf/openproject/pull/2136.patch","issue_url":"https://api.github.com/repos/opf/openproject/issues/2136","number":2136,"state":"open","locked":false,"title":"Make Ruby style consistent throughout the codebase","user":{"login":"myabc","id":755,"avatar_url":"https://avatars.githubusercontent.com/u/755?v=2","gravatar_id":"","url":"https://api.github.com/users/myabc","html_url":"https://github.com/myabc","followers_url":"https://api.github.com/users/myabc/followers","following_url":"https://api.github.com/users/myabc/following{/other_user}","gists_url":"https://api.github.com/users/myabc/gists{/gist_id}","starred_url":"https://api.github.com/users/myabc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myabc/subscriptions","organizations_url":"https://api.github.com/users/myabc/orgs","repos_url":"https://api.github.com/users/myabc/repos","events_url":"https://api.github.com/users/myabc/events{/privacy}","received_events_url":"https://api.github.com/users/myabc/received_events","type":"User","site_admin":false},"body":"Includes some small adjustments to Hound/Rubocop config.","created_at":"2014-11-03T21:18:19Z","updated_at":"2014-11-03T21:21:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"41868926328ae7b258473f920e53f6a01d4f60e5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/opf/openproject/pulls/2136/commits","review_comments_url":"https://api.github.com/repos/opf/openproject/pulls/2136/comments","review_comment_url":"https://api.github.com/repos/opf/openproject/pulls/comments/{number}","comments_url":"https://api.github.com/repos/opf/openproject/issues/2136/comments","statuses_url":"https://api.github.com/repos/opf/openproject/statuses/c81232f03a4b3bd597840ae5c080f29dccfdc72d","head":{"label":"opf:feature/consistent-ruby-style","ref":"feature/consistent-ruby-style","sha":"c81232f03a4b3bd597840ae5c080f29dccfdc72d","user":{"login":"opf","id":1756674,"avatar_url":"https://avatars.githubusercontent.com/u/1756674?v=2","gravatar_id":"","url":"https://api.github.com/users/opf","html_url":"https://github.com/opf","followers_url":"https://api.github.com/users/opf/followers","following_url":"https://api.github.com/users/opf/following{/other_user}","gists_url":"https://api.github.com/users/opf/gists{/gist_id}","starred_url":"https://api.github.com/users/opf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opf/subscriptions","organizations_url":"https://api.github.com/users/opf/orgs","repos_url":"https://api.github.com/users/opf/repos","events_url":"https://api.github.com/users/opf/events{/privacy}","received_events_url":"https://api.github.com/users/opf/received_events","type":"Organization","site_admin":false},"repo":{"id":6899875,"name":"openproject","full_name":"opf/openproject","owner":{"login":"opf","id":1756674,"avatar_url":"https://avatars.githubusercontent.com/u/1756674?v=2","gravatar_id":"","url":"https://api.github.com/users/opf","html_url":"https://github.com/opf","followers_url":"https://api.github.com/users/opf/followers","following_url":"https://api.github.com/users/opf/following{/other_user}","gists_url":"https://api.github.com/users/opf/gists{/gist_id}","starred_url":"https://api.github.com/users/opf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opf/subscriptions","organizations_url":"https://api.github.com/users/opf/orgs","repos_url":"https://api.github.com/users/opf/repos","events_url":"https://api.github.com/users/opf/events{/privacy}","received_events_url":"https://api.github.com/users/opf/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opf/openproject","description":"OpenProject is a web based project management system built on Ruby on Rails","fork":false,"url":"https://api.github.com/repos/opf/openproject","forks_url":"https://api.github.com/repos/opf/openproject/forks","keys_url":"https://api.github.com/repos/opf/openproject/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opf/openproject/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opf/openproject/teams","hooks_url":"https://api.github.com/repos/opf/openproject/hooks","issue_events_url":"https://api.github.com/repos/opf/openproject/issues/events{/number}","events_url":"https://api.github.com/repos/opf/openproject/events","assignees_url":"https://api.github.com/repos/opf/openproject/assignees{/user}","branches_url":"https://api.github.com/repos/opf/openproject/branches{/branch}","tags_url":"https://api.github.com/repos/opf/openproject/tags","blobs_url":"https://api.github.com/repos/opf/openproject/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opf/openproject/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opf/openproject/git/refs{/sha}","trees_url":"https://api.github.com/repos/opf/openproject/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opf/openproject/statuses/{sha}","languages_url":"https://api.github.com/repos/opf/openproject/languages","stargazers_url":"https://api.github.com/repos/opf/openproject/stargazers","contributors_url":"https://api.github.com/repos/opf/openproject/contributors","subscribers_url":"https://api.github.com/repos/opf/openproject/subscribers","subscription_url":"https://api.github.com/repos/opf/openproject/subscription","commits_url":"https://api.github.com/repos/opf/openproject/commits{/sha}","git_commits_url":"https://api.github.com/repos/opf/openproject/git/commits{/sha}","comments_url":"https://api.github.com/repos/opf/openproject/comments{/number}","issue_comment_url":"https://api.github.com/repos/opf/openproject/issues/comments/{number}","contents_url":"https://api.github.com/repos/opf/openproject/contents/{+path}","compare_url":"https://api.github.com/repos/opf/openproject/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opf/openproject/merges","archive_url":"https://api.github.com/repos/opf/openproject/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opf/openproject/downloads","issues_url":"https://api.github.com/repos/opf/openproject/issues{/number}","pulls_url":"https://api.github.com/repos/opf/openproject/pulls{/number}","milestones_url":"https://api.github.com/repos/opf/openproject/milestones{/number}","notifications_url":"https://api.github.com/repos/opf/openproject/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opf/openproject/labels{/name}","releases_url":"https://api.github.com/repos/opf/openproject/releases{/id}","created_at":"2012-11-28T09:59:11Z","updated_at":"2014-11-03T08:09:40Z","pushed_at":"2014-11-03T21:17:11Z","git_url":"git://github.com/opf/openproject.git","ssh_url":"git@github.com:opf/openproject.git","clone_url":"https://github.com/opf/openproject.git","svn_url":"https://github.com/opf/openproject","homepage":"https://www.openproject.org","size":182180,"stargazers_count":380,"watchers_count":380,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":192,"mirror_url":null,"open_issues_count":45,"forks":192,"open_issues":45,"watchers":380,"default_branch":"dev"}},"base":{"label":"opf:dev","ref":"dev","sha":"34c6b2ff8505a8d2a9feb0e52a64f215b1d7babc","user":{"login":"opf","id":1756674,"avatar_url":"https://avatars.githubusercontent.com/u/1756674?v=2","gravatar_id":"","url":"https://api.github.com/users/opf","html_url":"https://github.com/opf","followers_url":"https://api.github.com/users/opf/followers","following_url":"https://api.github.com/users/opf/following{/other_user}","gists_url":"https://api.github.com/users/opf/gists{/gist_id}","starred_url":"https://api.github.com/users/opf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opf/subscriptions","organizations_url":"https://api.github.com/users/opf/orgs","repos_url":"https://api.github.com/users/opf/repos","events_url":"https://api.github.com/users/opf/events{/privacy}","received_events_url":"https://api.github.com/users/opf/received_events","type":"Organization","site_admin":false},"repo":{"id":6899875,"name":"openproject","full_name":"opf/openproject","owner":{"login":"opf","id":1756674,"avatar_url":"https://avatars.githubusercontent.com/u/1756674?v=2","gravatar_id":"","url":"https://api.github.com/users/opf","html_url":"https://github.com/opf","followers_url":"https://api.github.com/users/opf/followers","following_url":"https://api.github.com/users/opf/following{/other_user}","gists_url":"https://api.github.com/users/opf/gists{/gist_id}","starred_url":"https://api.github.com/users/opf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opf/subscriptions","organizations_url":"https://api.github.com/users/opf/orgs","repos_url":"https://api.github.com/users/opf/repos","events_url":"https://api.github.com/users/opf/events{/privacy}","received_events_url":"https://api.github.com/users/opf/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opf/openproject","description":"OpenProject is a web based project management system built on Ruby on Rails","fork":false,"url":"https://api.github.com/repos/opf/openproject","forks_url":"https://api.github.com/repos/opf/openproject/forks","keys_url":"https://api.github.com/repos/opf/openproject/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opf/openproject/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opf/openproject/teams","hooks_url":"https://api.github.com/repos/opf/openproject/hooks","issue_events_url":"https://api.github.com/repos/opf/openproject/issues/events{/number}","events_url":"https://api.github.com/repos/opf/openproject/events","assignees_url":"https://api.github.com/repos/opf/openproject/assignees{/user}","branches_url":"https://api.github.com/repos/opf/openproject/branches{/branch}","tags_url":"https://api.github.com/repos/opf/openproject/tags","blobs_url":"https://api.github.com/repos/opf/openproject/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opf/openproject/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opf/openproject/git/refs{/sha}","trees_url":"https://api.github.com/repos/opf/openproject/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opf/openproject/statuses/{sha}","languages_url":"https://api.github.com/repos/opf/openproject/languages","stargazers_url":"https://api.github.com/repos/opf/openproject/stargazers","contributors_url":"https://api.github.com/repos/opf/openproject/contributors","subscribers_url":"https://api.github.com/repos/opf/openproject/subscribers","subscription_url":"https://api.github.com/repos/opf/openproject/subscription","commits_url":"https://api.github.com/repos/opf/openproject/commits{/sha}","git_commits_url":"https://api.github.com/repos/opf/openproject/git/commits{/sha}","comments_url":"https://api.github.com/repos/opf/openproject/comments{/number}","issue_comment_url":"https://api.github.com/repos/opf/openproject/issues/comments/{number}","contents_url":"https://api.github.com/repos/opf/openproject/contents/{+path}","compare_url":"https://api.github.com/repos/opf/openproject/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opf/openproject/merges","archive_url":"https://api.github.com/repos/opf/openproject/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opf/openproject/downloads","issues_url":"https://api.github.com/repos/opf/openproject/issues{/number}","pulls_url":"https://api.github.com/repos/opf/openproject/pulls{/number}","milestones_url":"https://api.github.com/repos/opf/openproject/milestones{/number}","notifications_url":"https://api.github.com/repos/opf/openproject/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opf/openproject/labels{/name}","releases_url":"https://api.github.com/repos/opf/openproject/releases{/id}","created_at":"2012-11-28T09:59:11Z","updated_at":"2014-11-03T08:09:40Z","pushed_at":"2014-11-03T21:17:11Z","git_url":"git://github.com/opf/openproject.git","ssh_url":"git@github.com:opf/openproject.git","clone_url":"https://github.com/opf/openproject.git","svn_url":"https://github.com/opf/openproject","homepage":"https://www.openproject.org","size":182180,"stargazers_count":380,"watchers_count":380,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":192,"mirror_url":null,"open_issues_count":45,"forks":192,"open_issues":45,"watchers":380,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/opf/openproject/pulls/2136"},"html":{"href":"https://github.com/opf/openproject/pull/2136"},"issue":{"href":"https://api.github.com/repos/opf/openproject/issues/2136"},"comments":{"href":"https://api.github.com/repos/opf/openproject/issues/2136/comments"},"review_comments":{"href":"https://api.github.com/repos/opf/openproject/pulls/2136/comments"},"review_comment":{"href":"https://api.github.com/repos/opf/openproject/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/opf/openproject/pulls/2136/commits"},"statuses":{"href":"https://api.github.com/repos/opf/openproject/statuses/c81232f03a4b3bd597840ae5c080f29dccfdc72d"}}}}