{"action":"created","comment":{"url":"https://api.github.com/repos/atom/apm/pulls/comments/48066856","id":48066856,"diff_hunk":"@@ -0,0 +1,83 @@\n+_ = require 'underscore-plus'\n+path = require 'path'\n+CSON = require 'season'\n+yargs = require 'yargs'\n+\n+config = require './apm'\n+Command = require './command'\n+List = require './list'\n+\n+module.exports =\n+class Disable extends Command\n+  @commandNames: ['disable']\n+\n+  parseOptions: (argv) ->\n+    options = yargs(argv).wrap(100)\n+    options.usage \"\"\"\n+\n+      Usage: apm disable [<package_name>]...\n+\n+      Disables the named package(s).\n+    \"\"\"\n+    options.alias('h', 'help').describe('help', 'Print this usage message')\n+\n+  getInstalledPackages: (callback) ->\n+    options =\n+      argv:\n+        theme: false\n+        bare: true\n+\n+    lister = new List()\n+    lister.listBundledPackages options, (error, core_packages) ->\n+      lister.listDevPackages options, (error, dev_packages) ->\n+        lister.listUserPackages options, (error, user_packages) ->\n+          callback(null, core_packages.concat(dev_packages, user_packages))\n+\n+  run: (options) ->\n+    {callback} = options\n+    options = @parseOptions(options.commandArgs)\n+\n+    packageNames = @packageNamesFromArgv(options.argv)\n+\n+    configFilePath = CSON.resolve(path.join(config.getAtomDirectory(), 'config'))\n+    unless configFilePath\n+      callback(\"Could not find config.cson. Run Atom first?\")","path":"src/disable.coffee","position":44,"original_position":44,"commit_id":"2e3d11fcc1360bc943cced8571b9a50c0cfac957","original_commit_id":"2e3d11fcc1360bc943cced8571b9a50c0cfac957","user":{"login":"mnquintana","id":823545,"avatar_url":"https://avatars.githubusercontent.com/u/823545?v=3","gravatar_id":"","url":"https://api.github.com/users/mnquintana","html_url":"https://github.com/mnquintana","followers_url":"https://api.github.com/users/mnquintana/followers","following_url":"https://api.github.com/users/mnquintana/following{/other_user}","gists_url":"https://api.github.com/users/mnquintana/gists{/gist_id}","starred_url":"https://api.github.com/users/mnquintana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnquintana/subscriptions","organizations_url":"https://api.github.com/users/mnquintana/orgs","repos_url":"https://api.github.com/users/mnquintana/repos","events_url":"https://api.github.com/users/mnquintana/events{/privacy}","received_events_url":"https://api.github.com/users/mnquintana/received_events","type":"User","site_admin":false},"body":"Just kidding, there totally is one already :+1: ","created_at":"2015-12-18T20:32:46Z","updated_at":"2015-12-18T20:32:46Z","html_url":"https://github.com/atom/apm/pull/400#discussion_r48066856","pull_request_url":"https://api.github.com/repos/atom/apm/pulls/400","_links":{"self":{"href":"https://api.github.com/repos/atom/apm/pulls/comments/48066856"},"html":{"href":"https://github.com/atom/apm/pull/400#discussion_r48066856"},"pull_request":{"href":"https://api.github.com/repos/atom/apm/pulls/400"}}},"pull_request":{"url":"https://api.github.com/repos/atom/apm/pulls/400","id":40313875,"html_url":"https://github.com/atom/apm/pull/400","diff_url":"https://github.com/atom/apm/pull/400.diff","patch_url":"https://github.com/atom/apm/pull/400.patch","issue_url":"https://api.github.com/repos/atom/apm/issues/400","number":400,"state":"open","locked":false,"title":"Add enable and disable commands","user":{"login":"bronson","id":1776,"avatar_url":"https://avatars.githubusercontent.com/u/1776?v=3","gravatar_id":"","url":"https://api.github.com/users/bronson","html_url":"https://github.com/bronson","followers_url":"https://api.github.com/users/bronson/followers","following_url":"https://api.github.com/users/bronson/following{/other_user}","gists_url":"https://api.github.com/users/bronson/gists{/gist_id}","starred_url":"https://api.github.com/users/bronson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bronson/subscriptions","organizations_url":"https://api.github.com/users/bronson/orgs","repos_url":"https://api.github.com/users/bronson/repos","events_url":"https://api.github.com/users/bronson/events{/privacy}","received_events_url":"https://api.github.com/users/bronson/received_events","type":"User","site_admin":false},"body":"Addresses https://github.com/atom/apm/issues/358 and https://github.com/atom/atom/issues/5987.\r\n\r\nThere's some code duplication but that seems to be apm's style: commands and tests are mostly self-sufficient.  I wanted to make the new commands resemble the existing ones.","created_at":"2015-07-19T19:52:04Z","updated_at":"2015-12-18T20:32:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ae28ded2bda3e0c9165086212b856589cafad98f","assignee":{"login":"mnquintana","id":823545,"avatar_url":"https://avatars.githubusercontent.com/u/823545?v=3","gravatar_id":"","url":"https://api.github.com/users/mnquintana","html_url":"https://github.com/mnquintana","followers_url":"https://api.github.com/users/mnquintana/followers","following_url":"https://api.github.com/users/mnquintana/following{/other_user}","gists_url":"https://api.github.com/users/mnquintana/gists{/gist_id}","starred_url":"https://api.github.com/users/mnquintana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnquintana/subscriptions","organizations_url":"https://api.github.com/users/mnquintana/orgs","repos_url":"https://api.github.com/users/mnquintana/repos","events_url":"https://api.github.com/users/mnquintana/events{/privacy}","received_events_url":"https://api.github.com/users/mnquintana/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/atom/apm/pulls/400/commits","review_comments_url":"https://api.github.com/repos/atom/apm/pulls/400/comments","review_comment_url":"https://api.github.com/repos/atom/apm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/atom/apm/issues/400/comments","statuses_url":"https://api.github.com/repos/atom/apm/statuses/2e3d11fcc1360bc943cced8571b9a50c0cfac957","head":{"label":"bronson:enable-disable","ref":"enable-disable","sha":"2e3d11fcc1360bc943cced8571b9a50c0cfac957","user":{"login":"bronson","id":1776,"avatar_url":"https://avatars.githubusercontent.com/u/1776?v=3","gravatar_id":"","url":"https://api.github.com/users/bronson","html_url":"https://github.com/bronson","followers_url":"https://api.github.com/users/bronson/followers","following_url":"https://api.github.com/users/bronson/following{/other_user}","gists_url":"https://api.github.com/users/bronson/gists{/gist_id}","starred_url":"https://api.github.com/users/bronson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bronson/subscriptions","organizations_url":"https://api.github.com/users/bronson/orgs","repos_url":"https://api.github.com/users/bronson/repos","events_url":"https://api.github.com/users/bronson/events{/privacy}","received_events_url":"https://api.github.com/users/bronson/received_events","type":"User","site_admin":false},"repo":{"id":39346438,"name":"apm","full_name":"bronson/apm","owner":{"login":"bronson","id":1776,"avatar_url":"https://avatars.githubusercontent.com/u/1776?v=3","gravatar_id":"","url":"https://api.github.com/users/bronson","html_url":"https://github.com/bronson","followers_url":"https://api.github.com/users/bronson/followers","following_url":"https://api.github.com/users/bronson/following{/other_user}","gists_url":"https://api.github.com/users/bronson/gists{/gist_id}","starred_url":"https://api.github.com/users/bronson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bronson/subscriptions","organizations_url":"https://api.github.com/users/bronson/orgs","repos_url":"https://api.github.com/users/bronson/repos","events_url":"https://api.github.com/users/bronson/events{/privacy}","received_events_url":"https://api.github.com/users/bronson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bronson/apm","description":"Atom Package Manager","fork":true,"url":"https://api.github.com/repos/bronson/apm","forks_url":"https://api.github.com/repos/bronson/apm/forks","keys_url":"https://api.github.com/repos/bronson/apm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bronson/apm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bronson/apm/teams","hooks_url":"https://api.github.com/repos/bronson/apm/hooks","issue_events_url":"https://api.github.com/repos/bronson/apm/issues/events{/number}","events_url":"https://api.github.com/repos/bronson/apm/events","assignees_url":"https://api.github.com/repos/bronson/apm/assignees{/user}","branches_url":"https://api.github.com/repos/bronson/apm/branches{/branch}","tags_url":"https://api.github.com/repos/bronson/apm/tags","blobs_url":"https://api.github.com/repos/bronson/apm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bronson/apm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bronson/apm/git/refs{/sha}","trees_url":"https://api.github.com/repos/bronson/apm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bronson/apm/statuses/{sha}","languages_url":"https://api.github.com/repos/bronson/apm/languages","stargazers_url":"https://api.github.com/repos/bronson/apm/stargazers","contributors_url":"https://api.github.com/repos/bronson/apm/contributors","subscribers_url":"https://api.github.com/repos/bronson/apm/subscribers","subscription_url":"https://api.github.com/repos/bronson/apm/subscription","commits_url":"https://api.github.com/repos/bronson/apm/commits{/sha}","git_commits_url":"https://api.github.com/repos/bronson/apm/git/commits{/sha}","comments_url":"https://api.github.com/repos/bronson/apm/comments{/number}","issue_comment_url":"https://api.github.com/repos/bronson/apm/issues/comments{/number}","contents_url":"https://api.github.com/repos/bronson/apm/contents/{+path}","compare_url":"https://api.github.com/repos/bronson/apm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bronson/apm/merges","archive_url":"https://api.github.com/repos/bronson/apm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bronson/apm/downloads","issues_url":"https://api.github.com/repos/bronson/apm/issues{/number}","pulls_url":"https://api.github.com/repos/bronson/apm/pulls{/number}","milestones_url":"https://api.github.com/repos/bronson/apm/milestones{/number}","notifications_url":"https://api.github.com/repos/bronson/apm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bronson/apm/labels{/name}","releases_url":"https://api.github.com/repos/bronson/apm/releases{/id}","created_at":"2015-07-19T19:42:04Z","updated_at":"2015-07-19T19:42:04Z","pushed_at":"2015-10-22T05:42:16Z","git_url":"git://github.com/bronson/apm.git","ssh_url":"git@github.com:bronson/apm.git","clone_url":"https://github.com/bronson/apm.git","svn_url":"https://github.com/bronson/apm","homepage":"https://atom.io/packages","size":5220,"stargazers_count":0,"watchers_count":0,"language":"CoffeeScript","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":"atom:master","ref":"master","sha":"d5a7f1717aa52c58c56c90e57b588b54953365d8","user":{"login":"atom","id":1089146,"avatar_url":"https://avatars.githubusercontent.com/u/1089146?v=3","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"repo":{"id":9916379,"name":"apm","full_name":"atom/apm","owner":{"login":"atom","id":1089146,"avatar_url":"https://avatars.githubusercontent.com/u/1089146?v=3","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/atom/apm","description":"Atom Package Manager","fork":false,"url":"https://api.github.com/repos/atom/apm","forks_url":"https://api.github.com/repos/atom/apm/forks","keys_url":"https://api.github.com/repos/atom/apm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atom/apm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atom/apm/teams","hooks_url":"https://api.github.com/repos/atom/apm/hooks","issue_events_url":"https://api.github.com/repos/atom/apm/issues/events{/number}","events_url":"https://api.github.com/repos/atom/apm/events","assignees_url":"https://api.github.com/repos/atom/apm/assignees{/user}","branches_url":"https://api.github.com/repos/atom/apm/branches{/branch}","tags_url":"https://api.github.com/repos/atom/apm/tags","blobs_url":"https://api.github.com/repos/atom/apm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atom/apm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atom/apm/git/refs{/sha}","trees_url":"https://api.github.com/repos/atom/apm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atom/apm/statuses/{sha}","languages_url":"https://api.github.com/repos/atom/apm/languages","stargazers_url":"https://api.github.com/repos/atom/apm/stargazers","contributors_url":"https://api.github.com/repos/atom/apm/contributors","subscribers_url":"https://api.github.com/repos/atom/apm/subscribers","subscription_url":"https://api.github.com/repos/atom/apm/subscription","commits_url":"https://api.github.com/repos/atom/apm/commits{/sha}","git_commits_url":"https://api.github.com/repos/atom/apm/git/commits{/sha}","comments_url":"https://api.github.com/repos/atom/apm/comments{/number}","issue_comment_url":"https://api.github.com/repos/atom/apm/issues/comments{/number}","contents_url":"https://api.github.com/repos/atom/apm/contents/{+path}","compare_url":"https://api.github.com/repos/atom/apm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atom/apm/merges","archive_url":"https://api.github.com/repos/atom/apm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atom/apm/downloads","issues_url":"https://api.github.com/repos/atom/apm/issues{/number}","pulls_url":"https://api.github.com/repos/atom/apm/pulls{/number}","milestones_url":"https://api.github.com/repos/atom/apm/milestones{/number}","notifications_url":"https://api.github.com/repos/atom/apm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atom/apm/labels{/name}","releases_url":"https://api.github.com/repos/atom/apm/releases{/id}","created_at":"2013-05-07T16:27:05Z","updated_at":"2015-12-17T02:25:58Z","pushed_at":"2015-12-06T01:01:23Z","git_url":"git://github.com/atom/apm.git","ssh_url":"git@github.com:atom/apm.git","clone_url":"https://github.com/atom/apm.git","svn_url":"https://github.com/atom/apm","homepage":"https://atom.io/packages","size":5857,"stargazers_count":514,"watchers_count":514,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":128,"mirror_url":null,"open_issues_count":117,"forks":128,"open_issues":117,"watchers":514,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/atom/apm/pulls/400"},"html":{"href":"https://github.com/atom/apm/pull/400"},"issue":{"href":"https://api.github.com/repos/atom/apm/issues/400"},"comments":{"href":"https://api.github.com/repos/atom/apm/issues/400/comments"},"review_comments":{"href":"https://api.github.com/repos/atom/apm/pulls/400/comments"},"review_comment":{"href":"https://api.github.com/repos/atom/apm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/atom/apm/pulls/400/commits"},"statuses":{"href":"https://api.github.com/repos/atom/apm/statuses/2e3d11fcc1360bc943cced8571b9a50c0cfac957"}}}}