{"action":"closed","number":471,"pull_request":{"url":"https://api.github.com/repos/mizzy/specinfra/pulls/471","id":43483354,"html_url":"https://github.com/mizzy/specinfra/pull/471","diff_url":"https://github.com/mizzy/specinfra/pull/471.diff","patch_url":"https://github.com/mizzy/specinfra/pull/471.patch","issue_url":"https://api.github.com/repos/mizzy/specinfra/issues/471","number":471,"state":"closed","locked":false,"title":"Don't try to use the -C switch for ps in OS X","user":{"login":"RoboticCheese","id":956619,"avatar_url":"https://avatars.githubusercontent.com/u/956619?v=3","gravatar_id":"","url":"https://api.github.com/users/RoboticCheese","html_url":"https://github.com/RoboticCheese","followers_url":"https://api.github.com/users/RoboticCheese/followers","following_url":"https://api.github.com/users/RoboticCheese/following{/other_user}","gists_url":"https://api.github.com/users/RoboticCheese/gists{/gist_id}","starred_url":"https://api.github.com/users/RoboticCheese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RoboticCheese/subscriptions","organizations_url":"https://api.github.com/users/RoboticCheese/orgs","repos_url":"https://api.github.com/users/RoboticCheese/repos","events_url":"https://api.github.com/users/RoboticCheese/events{/privacy}","received_events_url":"https://api.github.com/users/RoboticCheese/received_events","type":"User","site_admin":false},"body":"The -C switch in the BSD-flavored version of `ps` in OS X doesn't do\r\nwhat it does in Linux:\r\n\r\n```\r\n-C      Change the way the CPU percentage is calculated by using a\r\n        ``raw'' CPU calculation that ignores ``resident'' time (this normally\r\n        has no effect).\r\n```\r\n\r\n```\r\n$ ps -C Google\\ Chrome -o pid= | head -1\r\nps: illegal argument: Google Chrome\r\n```\r\n\r\nThis causes tests for `process('AppName')` resources to fail. This workaround\r\ndoes get ugly, but yields the expected output:\r\n\r\n```\r\n$ ps -A -c -o command | grep Google\\ Chrome\r\nGoogle Chrome\r\nGoogle Chrome Helper\r\nGoogle Chrome Helper\r\n```\r\n\r\n```\r\n$ ps -A -c -o pid=,command | grep -E -m 1 ^\\ *[0-9]+\\ +Google\\ Chrome$\r\n99159 Google Chrome\r\n```\r\n\r\n```\r\n$ ps -A -c -o pid=,command | grep -E -m 1 ^\\ *[0-9]+\\ +Google\\ Chrome$ | \\\r\n    awk '{print $1}'\r\n99159\r\n```","created_at":"2015-08-27T06:27:29Z","updated_at":"2015-08-27T12:33:53Z","closed_at":"2015-08-27T12:33:53Z","merged_at":"2015-08-27T12:33:53Z","merge_commit_sha":"9a351d16ad774cb53f37cfc1bfe7d3e682a3f43f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mizzy/specinfra/pulls/471/commits","review_comments_url":"https://api.github.com/repos/mizzy/specinfra/pulls/471/comments","review_comment_url":"https://api.github.com/repos/mizzy/specinfra/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mizzy/specinfra/issues/471/comments","statuses_url":"https://api.github.com/repos/mizzy/specinfra/statuses/a2609f21671033bb675469d861094721b6ac3a31","head":{"label":"RoboticCheese:jdh-osx-ps-cmd","ref":"jdh-osx-ps-cmd","sha":"a2609f21671033bb675469d861094721b6ac3a31","user":{"login":"RoboticCheese","id":956619,"avatar_url":"https://avatars.githubusercontent.com/u/956619?v=3","gravatar_id":"","url":"https://api.github.com/users/RoboticCheese","html_url":"https://github.com/RoboticCheese","followers_url":"https://api.github.com/users/RoboticCheese/followers","following_url":"https://api.github.com/users/RoboticCheese/following{/other_user}","gists_url":"https://api.github.com/users/RoboticCheese/gists{/gist_id}","starred_url":"https://api.github.com/users/RoboticCheese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RoboticCheese/subscriptions","organizations_url":"https://api.github.com/users/RoboticCheese/orgs","repos_url":"https://api.github.com/users/RoboticCheese/repos","events_url":"https://api.github.com/users/RoboticCheese/events{/privacy}","received_events_url":"https://api.github.com/users/RoboticCheese/received_events","type":"User","site_admin":false},"repo":{"id":34887307,"name":"specinfra","full_name":"RoboticCheese/specinfra","owner":{"login":"RoboticCheese","id":956619,"avatar_url":"https://avatars.githubusercontent.com/u/956619?v=3","gravatar_id":"","url":"https://api.github.com/users/RoboticCheese","html_url":"https://github.com/RoboticCheese","followers_url":"https://api.github.com/users/RoboticCheese/followers","following_url":"https://api.github.com/users/RoboticCheese/following{/other_user}","gists_url":"https://api.github.com/users/RoboticCheese/gists{/gist_id}","starred_url":"https://api.github.com/users/RoboticCheese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RoboticCheese/subscriptions","organizations_url":"https://api.github.com/users/RoboticCheese/orgs","repos_url":"https://api.github.com/users/RoboticCheese/repos","events_url":"https://api.github.com/users/RoboticCheese/events{/privacy}","received_events_url":"https://api.github.com/users/RoboticCheese/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/RoboticCheese/specinfra","description":"Command Execution Framework for serverspec, itamae and so on","fork":true,"url":"https://api.github.com/repos/RoboticCheese/specinfra","forks_url":"https://api.github.com/repos/RoboticCheese/specinfra/forks","keys_url":"https://api.github.com/repos/RoboticCheese/specinfra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RoboticCheese/specinfra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RoboticCheese/specinfra/teams","hooks_url":"https://api.github.com/repos/RoboticCheese/specinfra/hooks","issue_events_url":"https://api.github.com/repos/RoboticCheese/specinfra/issues/events{/number}","events_url":"https://api.github.com/repos/RoboticCheese/specinfra/events","assignees_url":"https://api.github.com/repos/RoboticCheese/specinfra/assignees{/user}","branches_url":"https://api.github.com/repos/RoboticCheese/specinfra/branches{/branch}","tags_url":"https://api.github.com/repos/RoboticCheese/specinfra/tags","blobs_url":"https://api.github.com/repos/RoboticCheese/specinfra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RoboticCheese/specinfra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RoboticCheese/specinfra/git/refs{/sha}","trees_url":"https://api.github.com/repos/RoboticCheese/specinfra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RoboticCheese/specinfra/statuses/{sha}","languages_url":"https://api.github.com/repos/RoboticCheese/specinfra/languages","stargazers_url":"https://api.github.com/repos/RoboticCheese/specinfra/stargazers","contributors_url":"https://api.github.com/repos/RoboticCheese/specinfra/contributors","subscribers_url":"https://api.github.com/repos/RoboticCheese/specinfra/subscribers","subscription_url":"https://api.github.com/repos/RoboticCheese/specinfra/subscription","commits_url":"https://api.github.com/repos/RoboticCheese/specinfra/commits{/sha}","git_commits_url":"https://api.github.com/repos/RoboticCheese/specinfra/git/commits{/sha}","comments_url":"https://api.github.com/repos/RoboticCheese/specinfra/comments{/number}","issue_comment_url":"https://api.github.com/repos/RoboticCheese/specinfra/issues/comments{/number}","contents_url":"https://api.github.com/repos/RoboticCheese/specinfra/contents/{+path}","compare_url":"https://api.github.com/repos/RoboticCheese/specinfra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RoboticCheese/specinfra/merges","archive_url":"https://api.github.com/repos/RoboticCheese/specinfra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RoboticCheese/specinfra/downloads","issues_url":"https://api.github.com/repos/RoboticCheese/specinfra/issues{/number}","pulls_url":"https://api.github.com/repos/RoboticCheese/specinfra/pulls{/number}","milestones_url":"https://api.github.com/repos/RoboticCheese/specinfra/milestones{/number}","notifications_url":"https://api.github.com/repos/RoboticCheese/specinfra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RoboticCheese/specinfra/labels{/name}","releases_url":"https://api.github.com/repos/RoboticCheese/specinfra/releases{/id}","created_at":"2015-05-01T02:54:48Z","updated_at":"2015-05-01T02:54:49Z","pushed_at":"2015-08-27T06:34:49Z","git_url":"git://github.com/RoboticCheese/specinfra.git","ssh_url":"git@github.com:RoboticCheese/specinfra.git","clone_url":"https://github.com/RoboticCheese/specinfra.git","svn_url":"https://github.com/RoboticCheese/specinfra","homepage":"http://serverspec.org/","size":1269,"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":"mizzy:master","ref":"master","sha":"5cae245bcf0aa28412fa0c733bce2875336fb431","user":{"login":"mizzy","id":3620,"avatar_url":"https://avatars.githubusercontent.com/u/3620?v=3","gravatar_id":"","url":"https://api.github.com/users/mizzy","html_url":"https://github.com/mizzy","followers_url":"https://api.github.com/users/mizzy/followers","following_url":"https://api.github.com/users/mizzy/following{/other_user}","gists_url":"https://api.github.com/users/mizzy/gists{/gist_id}","starred_url":"https://api.github.com/users/mizzy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mizzy/subscriptions","organizations_url":"https://api.github.com/users/mizzy/orgs","repos_url":"https://api.github.com/users/mizzy/repos","events_url":"https://api.github.com/users/mizzy/events{/privacy}","received_events_url":"https://api.github.com/users/mizzy/received_events","type":"User","site_admin":false},"repo":{"id":14747279,"name":"specinfra","full_name":"mizzy/specinfra","owner":{"login":"mizzy","id":3620,"avatar_url":"https://avatars.githubusercontent.com/u/3620?v=3","gravatar_id":"","url":"https://api.github.com/users/mizzy","html_url":"https://github.com/mizzy","followers_url":"https://api.github.com/users/mizzy/followers","following_url":"https://api.github.com/users/mizzy/following{/other_user}","gists_url":"https://api.github.com/users/mizzy/gists{/gist_id}","starred_url":"https://api.github.com/users/mizzy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mizzy/subscriptions","organizations_url":"https://api.github.com/users/mizzy/orgs","repos_url":"https://api.github.com/users/mizzy/repos","events_url":"https://api.github.com/users/mizzy/events{/privacy}","received_events_url":"https://api.github.com/users/mizzy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mizzy/specinfra","description":"Command Execution Framework for serverspec, itamae and so on","fork":false,"url":"https://api.github.com/repos/mizzy/specinfra","forks_url":"https://api.github.com/repos/mizzy/specinfra/forks","keys_url":"https://api.github.com/repos/mizzy/specinfra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mizzy/specinfra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mizzy/specinfra/teams","hooks_url":"https://api.github.com/repos/mizzy/specinfra/hooks","issue_events_url":"https://api.github.com/repos/mizzy/specinfra/issues/events{/number}","events_url":"https://api.github.com/repos/mizzy/specinfra/events","assignees_url":"https://api.github.com/repos/mizzy/specinfra/assignees{/user}","branches_url":"https://api.github.com/repos/mizzy/specinfra/branches{/branch}","tags_url":"https://api.github.com/repos/mizzy/specinfra/tags","blobs_url":"https://api.github.com/repos/mizzy/specinfra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mizzy/specinfra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mizzy/specinfra/git/refs{/sha}","trees_url":"https://api.github.com/repos/mizzy/specinfra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mizzy/specinfra/statuses/{sha}","languages_url":"https://api.github.com/repos/mizzy/specinfra/languages","stargazers_url":"https://api.github.com/repos/mizzy/specinfra/stargazers","contributors_url":"https://api.github.com/repos/mizzy/specinfra/contributors","subscribers_url":"https://api.github.com/repos/mizzy/specinfra/subscribers","subscription_url":"https://api.github.com/repos/mizzy/specinfra/subscription","commits_url":"https://api.github.com/repos/mizzy/specinfra/commits{/sha}","git_commits_url":"https://api.github.com/repos/mizzy/specinfra/git/commits{/sha}","comments_url":"https://api.github.com/repos/mizzy/specinfra/comments{/number}","issue_comment_url":"https://api.github.com/repos/mizzy/specinfra/issues/comments{/number}","contents_url":"https://api.github.com/repos/mizzy/specinfra/contents/{+path}","compare_url":"https://api.github.com/repos/mizzy/specinfra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mizzy/specinfra/merges","archive_url":"https://api.github.com/repos/mizzy/specinfra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mizzy/specinfra/downloads","issues_url":"https://api.github.com/repos/mizzy/specinfra/issues{/number}","pulls_url":"https://api.github.com/repos/mizzy/specinfra/pulls{/number}","milestones_url":"https://api.github.com/repos/mizzy/specinfra/milestones{/number}","notifications_url":"https://api.github.com/repos/mizzy/specinfra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mizzy/specinfra/labels{/name}","releases_url":"https://api.github.com/repos/mizzy/specinfra/releases{/id}","created_at":"2013-11-27T13:08:43Z","updated_at":"2015-08-19T18:27:55Z","pushed_at":"2015-08-27T12:33:53Z","git_url":"git://github.com/mizzy/specinfra.git","ssh_url":"git@github.com:mizzy/specinfra.git","clone_url":"https://github.com/mizzy/specinfra.git","svn_url":"https://github.com/mizzy/specinfra","homepage":"http://serverspec.org/","size":5035,"stargazers_count":162,"watchers_count":162,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":204,"mirror_url":null,"open_issues_count":2,"forks":204,"open_issues":2,"watchers":162,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mizzy/specinfra/pulls/471"},"html":{"href":"https://github.com/mizzy/specinfra/pull/471"},"issue":{"href":"https://api.github.com/repos/mizzy/specinfra/issues/471"},"comments":{"href":"https://api.github.com/repos/mizzy/specinfra/issues/471/comments"},"review_comments":{"href":"https://api.github.com/repos/mizzy/specinfra/pulls/471/comments"},"review_comment":{"href":"https://api.github.com/repos/mizzy/specinfra/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mizzy/specinfra/pulls/471/commits"},"statuses":{"href":"https://api.github.com/repos/mizzy/specinfra/statuses/a2609f21671033bb675469d861094721b6ac3a31"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"mizzy","id":3620,"avatar_url":"https://avatars.githubusercontent.com/u/3620?v=3","gravatar_id":"","url":"https://api.github.com/users/mizzy","html_url":"https://github.com/mizzy","followers_url":"https://api.github.com/users/mizzy/followers","following_url":"https://api.github.com/users/mizzy/following{/other_user}","gists_url":"https://api.github.com/users/mizzy/gists{/gist_id}","starred_url":"https://api.github.com/users/mizzy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mizzy/subscriptions","organizations_url":"https://api.github.com/users/mizzy/orgs","repos_url":"https://api.github.com/users/mizzy/repos","events_url":"https://api.github.com/users/mizzy/events{/privacy}","received_events_url":"https://api.github.com/users/mizzy/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":1,"additions":15,"deletions":0,"changed_files":3}}