GitHub PullRequestReviewCommentEvent at 2014-09-24 22:39:53
Repository: chef-dk
Actor: adamedx
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/opscode/chef-dk/pulls/comments/18005347","id":18005347,"diff_hunk":"@@ -0,0 +1,70 @@\n+#\n+# Copyright:: Copyright (c) 2014 Chef Software Inc.\n+# License:: Apache License, Version 2.0\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use this file except in compliance with the License.\n+# You may obtain a copy of the License at\n+#\n+#     http://www.apache.org/licenses/LICENSE-2.0\n+#\n+# Unless required by applicable law or agreed to in writing, software\n+# distributed under the License is distributed on an \"AS IS\" BASIS,\n+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+# See the License for the specific language governing permissions and\n+# limitations under the License.\n+#\n+\n+require 'chef-dk/policyfile/reports/table_printer'\n+\n+module ChefDK\n+  module Policyfile\n+    module Reports\n+\n+      class Install\n+\n+        attr_reader :ui\n+        attr_reader :policyfile_compiler\n+\n+        def initialize(ui: ui, policyfile_compiler: nil)\n+          @ui = ui\n+          @policyfile_compiler = policyfile_compiler\n+\n+          @fixed_version_install_table = nil\n+          @install_table = nil\n+        end\n+\n+        def installing_fixed_version_cookbook(cookbook_spec)\n+          verb = cookbook_spec.installed? ? \"Using     \" : \"Installing\"\n+          fixed_version_install_table.print_row(verb, cookbook_spec.name, cookbook_spec.version_constraint.to_s, \"from #{cookbook_spec.source_type}\")\n+        end\n+\n+        def installing_cookbook(cookbook_spec)\n+          verb = cookbook_spec.installed? ? \"Using     \" : \"Installing\"\n+          install_table.print_row(verb, cookbook_spec.name, cookbook_spec.version_constraint.version)\n+        end\n+\n+        private\n+\n+        def fixed_version_install_table\n+          @fixed_version_install_table ||= TablePrinter.new(ui) do |t|","path":"lib/chef-dk/policyfile/reports/install.rb","position":50,"original_position":50,"commit_id":"012953400f5f22e55a28f65ee13374bd9fcaa96e","original_commit_id":"012953400f5f22e55a28f65ee13374bd9fcaa96e","user":{"login":"adamedx","id":2422125,"avatar_url":"https://avatars.githubusercontent.com/u/2422125?v=2","gravatar_id":"","url":"https://api.github.com/users/adamedx","html_url":"https://github.com/adamedx","followers_url":"https://api.github.com/users/adamedx/followers","following_url":"https://api.github.com/users/adamedx/following{/other_user}","gists_url":"https://api.github.com/users/adamedx/gists{/gist_id}","starred_url":"https://api.github.com/users/adamedx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamedx/subscriptions","organizations_url":"https://api.github.com/users/adamedx/orgs","repos_url":"https://api.github.com/users/adamedx/repos","events_url":"https://api.github.com/users/adamedx/events{/privacy}","received_events_url":"https://api.github.com/users/adamedx/received_events","type":"User","site_admin":false},"body":"ah, nice. Hadn't really seen that use before, makes sense.","created_at":"2014-09-24T22:39:53Z","updated_at":"2014-09-24T22:39:53Z","html_url":"https://github.com/opscode/chef-dk/pull/167#discussion_r18005347","pull_request_url":"https://api.github.com/repos/opscode/chef-dk/pulls/167","_links":{"self":{"href":"https://api.github.com/repos/opscode/chef-dk/pulls/comments/18005347"},"html":{"href":"https://github.com/opscode/chef-dk/pull/167#discussion_r18005347"},"pull_request":{"href":"https://api.github.com/repos/opscode/chef-dk/pulls/167"}}},"pull_request":{"url":"https://api.github.com/repos/opscode/chef-dk/pulls/167","id":21744546,"html_url":"https://github.com/opscode/chef-dk/pull/167","diff_url":"https://github.com/opscode/chef-dk/pull/167.diff","patch_url":"https://github.com/opscode/chef-dk/pull/167.patch","issue_url":"https://api.github.com/repos/opscode/chef-dk/issues/167","number":167,"state":"open","locked":false,"title":"Extract Table Printing Logic","user":{"login":"danielsdeleo","id":37162,"avatar_url":"https://avatars.githubusercontent.com/u/37162?v=2","gravatar_id":"","url":"https://api.github.com/users/danielsdeleo","html_url":"https://github.com/danielsdeleo","followers_url":"https://api.github.com/users/danielsdeleo/followers","following_url":"https://api.github.com/users/danielsdeleo/following{/other_user}","gists_url":"https://api.github.com/users/danielsdeleo/gists{/gist_id}","starred_url":"https://api.github.com/users/danielsdeleo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielsdeleo/subscriptions","organizations_url":"https://api.github.com/users/danielsdeleo/orgs","repos_url":"https://api.github.com/users/danielsdeleo/repos","events_url":"https://api.github.com/users/danielsdeleo/events{/privacy}","received_events_url":"https://api.github.com/users/danielsdeleo/received_events","type":"User","site_admin":false},"body":"Moves repeated table print logic into a class. Also moves the report classes for policyfile install and upload to their own part of the file hierarchy (and namespace), and adds tests for them.\r\n\r\n/cc @opscode/client-engineers ","created_at":"2014-09-24T21:01:56Z","updated_at":"2014-09-24T22:39:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"39d5652068ec8dd7d515106d5b82770da3b2910e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/opscode/chef-dk/pulls/167/commits","review_comments_url":"https://api.github.com/repos/opscode/chef-dk/pulls/167/comments","review_comment_url":"https://api.github.com/repos/opscode/chef-dk/pulls/comments/{number}","comments_url":"https://api.github.com/repos/opscode/chef-dk/issues/167/comments","statuses_url":"https://api.github.com/repos/opscode/chef-dk/statuses/012953400f5f22e55a28f65ee13374bd9fcaa96e","head":{"label":"opscode:dry-table-print","ref":"dry-table-print","sha":"012953400f5f22e55a28f65ee13374bd9fcaa96e","user":{"login":"opscode","id":29740,"avatar_url":"https://avatars.githubusercontent.com/u/29740?v=2","gravatar_id":"","url":"https://api.github.com/users/opscode","html_url":"https://github.com/opscode","followers_url":"https://api.github.com/users/opscode/followers","following_url":"https://api.github.com/users/opscode/following{/other_user}","gists_url":"https://api.github.com/users/opscode/gists{/gist_id}","starred_url":"https://api.github.com/users/opscode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opscode/subscriptions","organizations_url":"https://api.github.com/users/opscode/orgs","repos_url":"https://api.github.com/users/opscode/repos","events_url":"https://api.github.com/users/opscode/events{/privacy}","received_events_url":"https://api.github.com/users/opscode/received_events","type":"Organization","site_admin":false},"repo":{"id":17303641,"name":"chef-dk","full_name":"opscode/chef-dk","owner":{"login":"opscode","id":29740,"avatar_url":"https://avatars.githubusercontent.com/u/29740?v=2","gravatar_id":"","url":"https://api.github.com/users/opscode","html_url":"https://github.com/opscode","followers_url":"https://api.github.com/users/opscode/followers","following_url":"https://api.github.com/users/opscode/following{/other_user}","gists_url":"https://api.github.com/users/opscode/gists{/gist_id}","starred_url":"https://api.github.com/users/opscode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opscode/subscriptions","organizations_url":"https://api.github.com/users/opscode/orgs","repos_url":"https://api.github.com/users/opscode/repos","events_url":"https://api.github.com/users/opscode/events{/privacy}","received_events_url":"https://api.github.com/users/opscode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opscode/chef-dk","description":"A streamlined development and deployment workflow for Chef platform.","fork":false,"url":"https://api.github.com/repos/opscode/chef-dk","forks_url":"https://api.github.com/repos/opscode/chef-dk/forks","keys_url":"https://api.github.com/repos/opscode/chef-dk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opscode/chef-dk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opscode/chef-dk/teams","hooks_url":"https://api.github.com/repos/opscode/chef-dk/hooks","issue_events_url":"https://api.github.com/repos/opscode/chef-dk/issues/events{/number}","events_url":"https://api.github.com/repos/opscode/chef-dk/events","assignees_url":"https://api.github.com/repos/opscode/chef-dk/assignees{/user}","branches_url":"https://api.github.com/repos/opscode/chef-dk/branches{/branch}","tags_url":"https://api.github.com/repos/opscode/chef-dk/tags","blobs_url":"https://api.github.com/repos/opscode/chef-dk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opscode/chef-dk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opscode/chef-dk/git/refs{/sha}","trees_url":"https://api.github.com/repos/opscode/chef-dk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opscode/chef-dk/statuses/{sha}","languages_url":"https://api.github.com/repos/opscode/chef-dk/languages","stargazers_url":"https://api.github.com/repos/opscode/chef-dk/stargazers","contributors_url":"https://api.github.com/repos/opscode/chef-dk/contributors","subscribers_url":"https://api.github.com/repos/opscode/chef-dk/subscribers","subscription_url":"https://api.github.com/repos/opscode/chef-dk/subscription","commits_url":"https://api.github.com/repos/opscode/chef-dk/commits{/sha}","git_commits_url":"https://api.github.com/repos/opscode/chef-dk/git/commits{/sha}","comments_url":"https://api.github.com/repos/opscode/chef-dk/comments{/number}","issue_comment_url":"https://api.github.com/repos/opscode/chef-dk/issues/comments/{number}","contents_url":"https://api.github.com/repos/opscode/chef-dk/contents/{+path}","compare_url":"https://api.github.com/repos/opscode/chef-dk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opscode/chef-dk/merges","archive_url":"https://api.github.com/repos/opscode/chef-dk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opscode/chef-dk/downloads","issues_url":"https://api.github.com/repos/opscode/chef-dk/issues{/number}","pulls_url":"https://api.github.com/repos/opscode/chef-dk/pulls{/number}","milestones_url":"https://api.github.com/repos/opscode/chef-dk/milestones{/number}","notifications_url":"https://api.github.com/repos/opscode/chef-dk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opscode/chef-dk/labels{/name}","releases_url":"https://api.github.com/repos/opscode/chef-dk/releases{/id}","created_at":"2014-02-28T23:59:39Z","updated_at":"2014-09-23T09:32:47Z","pushed_at":"2014-09-24T20:55:30Z","git_url":"git://github.com/opscode/chef-dk.git","ssh_url":"git@github.com:opscode/chef-dk.git","clone_url":"https://github.com/opscode/chef-dk.git","svn_url":"https://github.com/opscode/chef-dk","homepage":null,"size":4118,"stargazers_count":119,"watchers_count":119,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":34,"forks":30,"open_issues":34,"watchers":119,"default_branch":"master"}},"base":{"label":"opscode:master","ref":"master","sha":"997cf3178182de3b9671372197fe78ddb0a5ceba","user":{"login":"opscode","id":29740,"avatar_url":"https://avatars.githubusercontent.com/u/29740?v=2","gravatar_id":"","url":"https://api.github.com/users/opscode","html_url":"https://github.com/opscode","followers_url":"https://api.github.com/users/opscode/followers","following_url":"https://api.github.com/users/opscode/following{/other_user}","gists_url":"https://api.github.com/users/opscode/gists{/gist_id}","starred_url":"https://api.github.com/users/opscode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opscode/subscriptions","organizations_url":"https://api.github.com/users/opscode/orgs","repos_url":"https://api.github.com/users/opscode/repos","events_url":"https://api.github.com/users/opscode/events{/privacy}","received_events_url":"https://api.github.com/users/opscode/received_events","type":"Organization","site_admin":false},"repo":{"id":17303641,"name":"chef-dk","full_name":"opscode/chef-dk","owner":{"login":"opscode","id":29740,"avatar_url":"https://avatars.githubusercontent.com/u/29740?v=2","gravatar_id":"","url":"https://api.github.com/users/opscode","html_url":"https://github.com/opscode","followers_url":"https://api.github.com/users/opscode/followers","following_url":"https://api.github.com/users/opscode/following{/other_user}","gists_url":"https://api.github.com/users/opscode/gists{/gist_id}","starred_url":"https://api.github.com/users/opscode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opscode/subscriptions","organizations_url":"https://api.github.com/users/opscode/orgs","repos_url":"https://api.github.com/users/opscode/repos","events_url":"https://api.github.com/users/opscode/events{/privacy}","received_events_url":"https://api.github.com/users/opscode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opscode/chef-dk","description":"A streamlined development and deployment workflow for Chef platform.","fork":false,"url":"https://api.github.com/repos/opscode/chef-dk","forks_url":"https://api.github.com/repos/opscode/chef-dk/forks","keys_url":"https://api.github.com/repos/opscode/chef-dk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opscode/chef-dk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opscode/chef-dk/teams","hooks_url":"https://api.github.com/repos/opscode/chef-dk/hooks","issue_events_url":"https://api.github.com/repos/opscode/chef-dk/issues/events{/number}","events_url":"https://api.github.com/repos/opscode/chef-dk/events","assignees_url":"https://api.github.com/repos/opscode/chef-dk/assignees{/user}","branches_url":"https://api.github.com/repos/opscode/chef-dk/branches{/branch}","tags_url":"https://api.github.com/repos/opscode/chef-dk/tags","blobs_url":"https://api.github.com/repos/opscode/chef-dk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opscode/chef-dk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opscode/chef-dk/git/refs{/sha}","trees_url":"https://api.github.com/repos/opscode/chef-dk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opscode/chef-dk/statuses/{sha}","languages_url":"https://api.github.com/repos/opscode/chef-dk/languages","stargazers_url":"https://api.github.com/repos/opscode/chef-dk/stargazers","contributors_url":"https://api.github.com/repos/opscode/chef-dk/contributors","subscribers_url":"https://api.github.com/repos/opscode/chef-dk/subscribers","subscription_url":"https://api.github.com/repos/opscode/chef-dk/subscription","commits_url":"https://api.github.com/repos/opscode/chef-dk/commits{/sha}","git_commits_url":"https://api.github.com/repos/opscode/chef-dk/git/commits{/sha}","comments_url":"https://api.github.com/repos/opscode/chef-dk/comments{/number}","issue_comment_url":"https://api.github.com/repos/opscode/chef-dk/issues/comments/{number}","contents_url":"https://api.github.com/repos/opscode/chef-dk/contents/{+path}","compare_url":"https://api.github.com/repos/opscode/chef-dk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opscode/chef-dk/merges","archive_url":"https://api.github.com/repos/opscode/chef-dk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opscode/chef-dk/downloads","issues_url":"https://api.github.com/repos/opscode/chef-dk/issues{/number}","pulls_url":"https://api.github.com/repos/opscode/chef-dk/pulls{/number}","milestones_url":"https://api.github.com/repos/opscode/chef-dk/milestones{/number}","notifications_url":"https://api.github.com/repos/opscode/chef-dk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opscode/chef-dk/labels{/name}","releases_url":"https://api.github.com/repos/opscode/chef-dk/releases{/id}","created_at":"2014-02-28T23:59:39Z","updated_at":"2014-09-23T09:32:47Z","pushed_at":"2014-09-24T20:55:30Z","git_url":"git://github.com/opscode/chef-dk.git","ssh_url":"git@github.com:opscode/chef-dk.git","clone_url":"https://github.com/opscode/chef-dk.git","svn_url":"https://github.com/opscode/chef-dk","homepage":null,"size":4118,"stargazers_count":119,"watchers_count":119,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":34,"forks":30,"open_issues":34,"watchers":119,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opscode/chef-dk/pulls/167"},"html":{"href":"https://github.com/opscode/chef-dk/pull/167"},"issue":{"href":"https://api.github.com/repos/opscode/chef-dk/issues/167"},"comments":{"href":"https://api.github.com/repos/opscode/chef-dk/issues/167/comments"},"review_comments":{"href":"https://api.github.com/repos/opscode/chef-dk/pulls/167/comments"},"review_comment":{"href":"https://api.github.com/repos/opscode/chef-dk/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/opscode/chef-dk/pulls/167/commits"},"statuses":{"href":"https://api.github.com/repos/opscode/chef-dk/statuses/012953400f5f22e55a28f65ee13374bd9fcaa96e"}}}}