{"action":"created","comment":{"url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/pulls/comments/84863641","pull_request_review_id":5613084,"id":84863641,"diff_hunk":"@@ -0,0 +1,44 @@\n+provides 'ohai_gecos'\n+\n+if ohai_gecos.nil?\n+  ohai_gecos Mash.new\n+end\n+\n+begin\n+  entries = []\n+  printers = []\n+\n+  entries = Mixlib::ShellOut.new(\"lpstat -a | awk {'print $1'}\")\n+  entries.run_command\n+\n+  if entries.exitstatus == 0\n+\n+    entries.stdout.split(/\\r?\\n/).each do |printer|\n+      lpoptions = Mixlib::ShellOut.new(\"lpoptions -p #{printer}\")\n+      lpoptions.run_command\n+      lpq = Mixlib::ShellOut.new(\"lpq -P #{printer}\")\n+      lpq.run_command\n+      lpstat = Mixlib::ShellOut.new(\"lpstat -p #{printer}\")\n+      lpstat.run_command\n+","path":"files/default/plugins/printers.rb","position":null,"original_position":23,"commit_id":"0836bccd36b9994a44ac4332d53f47d1d64600a6","original_commit_id":"0ed5fa495e80ebe389c150f0d788cac11597c7fe","user":{"login":"juanconde","id":861566,"avatar_url":"https://avatars.githubusercontent.com/u/861566?v=3","gravatar_id":"","url":"https://api.github.com/users/juanconde","html_url":"https://github.com/juanconde","followers_url":"https://api.github.com/users/juanconde/followers","following_url":"https://api.github.com/users/juanconde/following{/other_user}","gists_url":"https://api.github.com/users/juanconde/gists{/gist_id}","starred_url":"https://api.github.com/users/juanconde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juanconde/subscriptions","organizations_url":"https://api.github.com/users/juanconde/orgs","repos_url":"https://api.github.com/users/juanconde/repos","events_url":"https://api.github.com/users/juanconde/events{/privacy}","received_events_url":"https://api.github.com/users/juanconde/received_events","type":"User","site_admin":false},"body":"Even if valid printer names are enforced in line 11, exit status of lp* commands should be checked for non error exit status before writing data to the node.","created_at":"2016-10-25T09:32:55Z","updated_at":"2016-10-25T09:32:55Z","html_url":"https://github.com/gecos-team/gecos-workstation-ohai-cookbook/pull/7#discussion_r84863641","pull_request_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/pulls/comments/84863641"},"html":{"href":"https://github.com/gecos-team/gecos-workstation-ohai-cookbook/pull/7#discussion_r84863641"},"pull_request":{"href":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/pulls/7","id":90590988,"html_url":"https://github.com/gecos-team/gecos-workstation-ohai-cookbook/pull/7","diff_url":"https://github.com/gecos-team/gecos-workstation-ohai-cookbook/pull/7.diff","patch_url":"https://github.com/gecos-team/gecos-workstation-ohai-cookbook/pull/7.patch","issue_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/issues/7","number":7,"state":"open","locked":false,"title":"ohai printers plugin","user":{"login":"n1mh","id":5114046,"avatar_url":"https://avatars.githubusercontent.com/u/5114046?v=3","gravatar_id":"","url":"https://api.github.com/users/n1mh","html_url":"https://github.com/n1mh","followers_url":"https://api.github.com/users/n1mh/followers","following_url":"https://api.github.com/users/n1mh/following{/other_user}","gists_url":"https://api.github.com/users/n1mh/gists{/gist_id}","starred_url":"https://api.github.com/users/n1mh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n1mh/subscriptions","organizations_url":"https://api.github.com/users/n1mh/orgs","repos_url":"https://api.github.com/users/n1mh/repos","events_url":"https://api.github.com/users/n1mh/events{/privacy}","received_events_url":"https://api.github.com/users/n1mh/received_events","type":"User","site_admin":false},"body":"This pull request implements the ohai plugin for printers.","created_at":"2016-10-24T11:05:15Z","updated_at":"2016-10-25T09:32:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4ae2ed5839ceaee9a9b2bd1353c929890e3e89a6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/pulls/7/commits","review_comments_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/pulls/7/comments","review_comment_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/issues/7/comments","statuses_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/statuses/0836bccd36b9994a44ac4332d53f47d1d64600a6","head":{"label":"n1mh:development","ref":"development","sha":"0836bccd36b9994a44ac4332d53f47d1d64600a6","user":{"login":"n1mh","id":5114046,"avatar_url":"https://avatars.githubusercontent.com/u/5114046?v=3","gravatar_id":"","url":"https://api.github.com/users/n1mh","html_url":"https://github.com/n1mh","followers_url":"https://api.github.com/users/n1mh/followers","following_url":"https://api.github.com/users/n1mh/following{/other_user}","gists_url":"https://api.github.com/users/n1mh/gists{/gist_id}","starred_url":"https://api.github.com/users/n1mh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n1mh/subscriptions","organizations_url":"https://api.github.com/users/n1mh/orgs","repos_url":"https://api.github.com/users/n1mh/repos","events_url":"https://api.github.com/users/n1mh/events{/privacy}","received_events_url":"https://api.github.com/users/n1mh/received_events","type":"User","site_admin":false},"repo":{"id":68705969,"name":"gecos-workstation-ohai-cookbook","full_name":"n1mh/gecos-workstation-ohai-cookbook","owner":{"login":"n1mh","id":5114046,"avatar_url":"https://avatars.githubusercontent.com/u/5114046?v=3","gravatar_id":"","url":"https://api.github.com/users/n1mh","html_url":"https://github.com/n1mh","followers_url":"https://api.github.com/users/n1mh/followers","following_url":"https://api.github.com/users/n1mh/following{/other_user}","gists_url":"https://api.github.com/users/n1mh/gists{/gist_id}","starred_url":"https://api.github.com/users/n1mh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n1mh/subscriptions","organizations_url":"https://api.github.com/users/n1mh/orgs","repos_url":"https://api.github.com/users/n1mh/repos","events_url":"https://api.github.com/users/n1mh/events{/privacy}","received_events_url":"https://api.github.com/users/n1mh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/n1mh/gecos-workstation-ohai-cookbook","description":"Cookbook with plugins ohai","fork":true,"url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook","forks_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/forks","keys_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/teams","hooks_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/hooks","issue_events_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/issues/events{/number}","events_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/events","assignees_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/assignees{/user}","branches_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/branches{/branch}","tags_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/tags","blobs_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/git/refs{/sha}","trees_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/statuses/{sha}","languages_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/languages","stargazers_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/stargazers","contributors_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/contributors","subscribers_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/subscribers","subscription_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/subscription","commits_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/commits{/sha}","git_commits_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/git/commits{/sha}","comments_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/comments{/number}","issue_comment_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/issues/comments{/number}","contents_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/contents/{+path}","compare_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/merges","archive_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/downloads","issues_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/issues{/number}","pulls_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/pulls{/number}","milestones_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/milestones{/number}","notifications_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/labels{/name}","releases_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/releases{/id}","deployments_url":"https://api.github.com/repos/n1mh/gecos-workstation-ohai-cookbook/deployments","created_at":"2016-09-20T11:39:18Z","updated_at":"2016-09-20T11:39:19Z","pushed_at":"2016-10-10T08:12:14Z","git_url":"git://github.com/n1mh/gecos-workstation-ohai-cookbook.git","ssh_url":"git@github.com:n1mh/gecos-workstation-ohai-cookbook.git","clone_url":"https://github.com/n1mh/gecos-workstation-ohai-cookbook.git","svn_url":"https://github.com/n1mh/gecos-workstation-ohai-cookbook","homepage":null,"size":20,"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":"development"}},"base":{"label":"gecos-team:development","ref":"development","sha":"465d5476b79d1be94b7b24a67c1de6a080b405d7","user":{"login":"gecos-team","id":1118706,"avatar_url":"https://avatars.githubusercontent.com/u/1118706?v=3","gravatar_id":"","url":"https://api.github.com/users/gecos-team","html_url":"https://github.com/gecos-team","followers_url":"https://api.github.com/users/gecos-team/followers","following_url":"https://api.github.com/users/gecos-team/following{/other_user}","gists_url":"https://api.github.com/users/gecos-team/gists{/gist_id}","starred_url":"https://api.github.com/users/gecos-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gecos-team/subscriptions","organizations_url":"https://api.github.com/users/gecos-team/orgs","repos_url":"https://api.github.com/users/gecos-team/repos","events_url":"https://api.github.com/users/gecos-team/events{/privacy}","received_events_url":"https://api.github.com/users/gecos-team/received_events","type":"Organization","site_admin":false},"repo":{"id":19248952,"name":"gecos-workstation-ohai-cookbook","full_name":"gecos-team/gecos-workstation-ohai-cookbook","owner":{"login":"gecos-team","id":1118706,"avatar_url":"https://avatars.githubusercontent.com/u/1118706?v=3","gravatar_id":"","url":"https://api.github.com/users/gecos-team","html_url":"https://github.com/gecos-team","followers_url":"https://api.github.com/users/gecos-team/followers","following_url":"https://api.github.com/users/gecos-team/following{/other_user}","gists_url":"https://api.github.com/users/gecos-team/gists{/gist_id}","starred_url":"https://api.github.com/users/gecos-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gecos-team/subscriptions","organizations_url":"https://api.github.com/users/gecos-team/orgs","repos_url":"https://api.github.com/users/gecos-team/repos","events_url":"https://api.github.com/users/gecos-team/events{/privacy}","received_events_url":"https://api.github.com/users/gecos-team/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gecos-team/gecos-workstation-ohai-cookbook","description":"Cookbook with plugins ohai","fork":false,"url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook","forks_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/forks","keys_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/teams","hooks_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/hooks","issue_events_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/issues/events{/number}","events_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/events","assignees_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/assignees{/user}","branches_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/branches{/branch}","tags_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/tags","blobs_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/git/refs{/sha}","trees_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/statuses/{sha}","languages_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/languages","stargazers_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/stargazers","contributors_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/contributors","subscribers_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/subscribers","subscription_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/subscription","commits_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/commits{/sha}","git_commits_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/git/commits{/sha}","comments_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/comments{/number}","issue_comment_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/issues/comments{/number}","contents_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/contents/{+path}","compare_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/merges","archive_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/downloads","issues_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/issues{/number}","pulls_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/pulls{/number}","milestones_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/milestones{/number}","notifications_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/labels{/name}","releases_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/releases{/id}","deployments_url":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/deployments","created_at":"2014-04-28T18:15:42Z","updated_at":"2016-08-02T06:51:21Z","pushed_at":"2016-10-24T11:05:15Z","git_url":"git://github.com/gecos-team/gecos-workstation-ohai-cookbook.git","ssh_url":"git@github.com:gecos-team/gecos-workstation-ohai-cookbook.git","clone_url":"https://github.com/gecos-team/gecos-workstation-ohai-cookbook.git","svn_url":"https://github.com/gecos-team/gecos-workstation-ohai-cookbook","homepage":null,"size":19,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":3,"forks":4,"open_issues":3,"watchers":0,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/pulls/7"},"html":{"href":"https://github.com/gecos-team/gecos-workstation-ohai-cookbook/pull/7"},"issue":{"href":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/issues/7"},"comments":{"href":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/gecos-team/gecos-workstation-ohai-cookbook/statuses/0836bccd36b9994a44ac4332d53f47d1d64600a6"}}}}
{"actor":{"display_login":"juanconde"}}