{"action":"created","comment":{"url":"https://api.github.com/repos/chef/omnibus-chef/pulls/comments/23946297","id":23946297,"diff_hunk":"@@ -12,10 +12,15 @@ module Gem\n   ##\n   # Override user_dir to live inside of ~/.chefdk\n \n-  def self.user_dir\n-    parts = [Gem.user_home, '.chefdk', 'gem', ruby_engine]\n-    parts << RbConfig::CONFIG['ruby_version'] unless RbConfig::CONFIG['ruby_version'].empty?\n-    File.join parts\n+  class << self\n+    alias :_chefdk_original_user_dir :user_dir","path":"files/rubygems-customization/default/operating_system.rb","position":9,"original_position":9,"commit_id":"ba89fea5929c2a87c7619013be2716c89f897e20","original_commit_id":"ba89fea5929c2a87c7619013be2716c89f897e20","user":{"login":"danielsdeleo","id":37162,"avatar_url":"https://avatars.githubusercontent.com/u/37162?v=3","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":"Do we need the `alias` or can we just remove the method?","created_at":"2015-02-02T18:36:41Z","updated_at":"2015-02-02T18:36:41Z","html_url":"https://github.com/chef/omnibus-chef/pull/337#discussion_r23946297","pull_request_url":"https://api.github.com/repos/chef/omnibus-chef/pulls/337","_links":{"self":{"href":"https://api.github.com/repos/chef/omnibus-chef/pulls/comments/23946297"},"html":{"href":"https://github.com/chef/omnibus-chef/pull/337#discussion_r23946297"},"pull_request":{"href":"https://api.github.com/repos/chef/omnibus-chef/pulls/337"}}},"pull_request":{"url":"https://api.github.com/repos/chef/omnibus-chef/pulls/337","id":28483451,"html_url":"https://github.com/chef/omnibus-chef/pull/337","diff_url":"https://github.com/chef/omnibus-chef/pull/337.diff","patch_url":"https://github.com/chef/omnibus-chef/pull/337.patch","issue_url":"https://api.github.com/repos/chef/omnibus-chef/issues/337","number":337,"state":"open","locked":false,"title":"Fix user_dir warning","user":{"login":"docwhat","id":40799,"avatar_url":"https://avatars.githubusercontent.com/u/40799?v=3","gravatar_id":"","url":"https://api.github.com/users/docwhat","html_url":"https://github.com/docwhat","followers_url":"https://api.github.com/users/docwhat/followers","following_url":"https://api.github.com/users/docwhat/following{/other_user}","gists_url":"https://api.github.com/users/docwhat/gists{/gist_id}","starred_url":"https://api.github.com/users/docwhat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docwhat/subscriptions","organizations_url":"https://api.github.com/users/docwhat/orgs","repos_url":"https://api.github.com/users/docwhat/repos","events_url":"https://api.github.com/users/docwhat/events{/privacy}","received_events_url":"https://api.github.com/users/docwhat/received_events","type":"User","site_admin":false},"body":"When running commands with `ruby -w` you get a warning about\n`user_dir` being redifined:\n\n```\n$ ruby -w -e 'puts \"hi\"'\n/opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/defaults/operating_system.rb:15: warning: method redefined; discarding old user_dir\n/opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/defaults.rb:75: warning: previous definition of user_dir was here\nhi\n```\n\nThis fixes the problem by using `alias` and `remove_method`.","created_at":"2015-02-02T16:53:41Z","updated_at":"2015-02-02T18:36:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ddabf10fcc51f28bffd6b70e50d79ae355524613","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/chef/omnibus-chef/pulls/337/commits","review_comments_url":"https://api.github.com/repos/chef/omnibus-chef/pulls/337/comments","review_comment_url":"https://api.github.com/repos/chef/omnibus-chef/pulls/comments/{number}","comments_url":"https://api.github.com/repos/chef/omnibus-chef/issues/337/comments","statuses_url":"https://api.github.com/repos/chef/omnibus-chef/statuses/ba89fea5929c2a87c7619013be2716c89f897e20","head":{"label":"docwhat:user_dir-warning","ref":"user_dir-warning","sha":"ba89fea5929c2a87c7619013be2716c89f897e20","user":{"login":"docwhat","id":40799,"avatar_url":"https://avatars.githubusercontent.com/u/40799?v=3","gravatar_id":"","url":"https://api.github.com/users/docwhat","html_url":"https://github.com/docwhat","followers_url":"https://api.github.com/users/docwhat/followers","following_url":"https://api.github.com/users/docwhat/following{/other_user}","gists_url":"https://api.github.com/users/docwhat/gists{/gist_id}","starred_url":"https://api.github.com/users/docwhat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docwhat/subscriptions","organizations_url":"https://api.github.com/users/docwhat/orgs","repos_url":"https://api.github.com/users/docwhat/repos","events_url":"https://api.github.com/users/docwhat/events{/privacy}","received_events_url":"https://api.github.com/users/docwhat/received_events","type":"User","site_admin":false},"repo":{"id":30196991,"name":"omnibus-chef","full_name":"docwhat/omnibus-chef","owner":{"login":"docwhat","id":40799,"avatar_url":"https://avatars.githubusercontent.com/u/40799?v=3","gravatar_id":"","url":"https://api.github.com/users/docwhat","html_url":"https://github.com/docwhat","followers_url":"https://api.github.com/users/docwhat/followers","following_url":"https://api.github.com/users/docwhat/following{/other_user}","gists_url":"https://api.github.com/users/docwhat/gists{/gist_id}","starred_url":"https://api.github.com/users/docwhat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docwhat/subscriptions","organizations_url":"https://api.github.com/users/docwhat/orgs","repos_url":"https://api.github.com/users/docwhat/repos","events_url":"https://api.github.com/users/docwhat/events{/privacy}","received_events_url":"https://api.github.com/users/docwhat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/docwhat/omnibus-chef","description":"Omnibus packaging for Chef","fork":true,"url":"https://api.github.com/repos/docwhat/omnibus-chef","forks_url":"https://api.github.com/repos/docwhat/omnibus-chef/forks","keys_url":"https://api.github.com/repos/docwhat/omnibus-chef/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docwhat/omnibus-chef/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docwhat/omnibus-chef/teams","hooks_url":"https://api.github.com/repos/docwhat/omnibus-chef/hooks","issue_events_url":"https://api.github.com/repos/docwhat/omnibus-chef/issues/events{/number}","events_url":"https://api.github.com/repos/docwhat/omnibus-chef/events","assignees_url":"https://api.github.com/repos/docwhat/omnibus-chef/assignees{/user}","branches_url":"https://api.github.com/repos/docwhat/omnibus-chef/branches{/branch}","tags_url":"https://api.github.com/repos/docwhat/omnibus-chef/tags","blobs_url":"https://api.github.com/repos/docwhat/omnibus-chef/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docwhat/omnibus-chef/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docwhat/omnibus-chef/git/refs{/sha}","trees_url":"https://api.github.com/repos/docwhat/omnibus-chef/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docwhat/omnibus-chef/statuses/{sha}","languages_url":"https://api.github.com/repos/docwhat/omnibus-chef/languages","stargazers_url":"https://api.github.com/repos/docwhat/omnibus-chef/stargazers","contributors_url":"https://api.github.com/repos/docwhat/omnibus-chef/contributors","subscribers_url":"https://api.github.com/repos/docwhat/omnibus-chef/subscribers","subscription_url":"https://api.github.com/repos/docwhat/omnibus-chef/subscription","commits_url":"https://api.github.com/repos/docwhat/omnibus-chef/commits{/sha}","git_commits_url":"https://api.github.com/repos/docwhat/omnibus-chef/git/commits{/sha}","comments_url":"https://api.github.com/repos/docwhat/omnibus-chef/comments{/number}","issue_comment_url":"https://api.github.com/repos/docwhat/omnibus-chef/issues/comments/{number}","contents_url":"https://api.github.com/repos/docwhat/omnibus-chef/contents/{+path}","compare_url":"https://api.github.com/repos/docwhat/omnibus-chef/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docwhat/omnibus-chef/merges","archive_url":"https://api.github.com/repos/docwhat/omnibus-chef/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docwhat/omnibus-chef/downloads","issues_url":"https://api.github.com/repos/docwhat/omnibus-chef/issues{/number}","pulls_url":"https://api.github.com/repos/docwhat/omnibus-chef/pulls{/number}","milestones_url":"https://api.github.com/repos/docwhat/omnibus-chef/milestones{/number}","notifications_url":"https://api.github.com/repos/docwhat/omnibus-chef/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docwhat/omnibus-chef/labels{/name}","releases_url":"https://api.github.com/repos/docwhat/omnibus-chef/releases{/id}","created_at":"2015-02-02T16:47:06Z","updated_at":"2015-02-02T16:47:06Z","pushed_at":"2015-02-02T16:56:18Z","git_url":"git://github.com/docwhat/omnibus-chef.git","ssh_url":"git@github.com:docwhat/omnibus-chef.git","clone_url":"https://github.com/docwhat/omnibus-chef.git","svn_url":"https://github.com/docwhat/omnibus-chef","homepage":"","size":7619,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"chef:master","ref":"master","sha":"b57c0bae15036a6286b2ab241b47821e73d0cce9","user":{"login":"chef","id":29740,"avatar_url":"https://avatars.githubusercontent.com/u/29740?v=3","gravatar_id":"","url":"https://api.github.com/users/chef","html_url":"https://github.com/chef","followers_url":"https://api.github.com/users/chef/followers","following_url":"https://api.github.com/users/chef/following{/other_user}","gists_url":"https://api.github.com/users/chef/gists{/gist_id}","starred_url":"https://api.github.com/users/chef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chef/subscriptions","organizations_url":"https://api.github.com/users/chef/orgs","repos_url":"https://api.github.com/users/chef/repos","events_url":"https://api.github.com/users/chef/events{/privacy}","received_events_url":"https://api.github.com/users/chef/received_events","type":"Organization","site_admin":false},"repo":{"id":4056288,"name":"omnibus-chef","full_name":"chef/omnibus-chef","owner":{"login":"chef","id":29740,"avatar_url":"https://avatars.githubusercontent.com/u/29740?v=3","gravatar_id":"","url":"https://api.github.com/users/chef","html_url":"https://github.com/chef","followers_url":"https://api.github.com/users/chef/followers","following_url":"https://api.github.com/users/chef/following{/other_user}","gists_url":"https://api.github.com/users/chef/gists{/gist_id}","starred_url":"https://api.github.com/users/chef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chef/subscriptions","organizations_url":"https://api.github.com/users/chef/orgs","repos_url":"https://api.github.com/users/chef/repos","events_url":"https://api.github.com/users/chef/events{/privacy}","received_events_url":"https://api.github.com/users/chef/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/chef/omnibus-chef","description":"Omnibus packaging for Chef","fork":false,"url":"https://api.github.com/repos/chef/omnibus-chef","forks_url":"https://api.github.com/repos/chef/omnibus-chef/forks","keys_url":"https://api.github.com/repos/chef/omnibus-chef/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chef/omnibus-chef/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chef/omnibus-chef/teams","hooks_url":"https://api.github.com/repos/chef/omnibus-chef/hooks","issue_events_url":"https://api.github.com/repos/chef/omnibus-chef/issues/events{/number}","events_url":"https://api.github.com/repos/chef/omnibus-chef/events","assignees_url":"https://api.github.com/repos/chef/omnibus-chef/assignees{/user}","branches_url":"https://api.github.com/repos/chef/omnibus-chef/branches{/branch}","tags_url":"https://api.github.com/repos/chef/omnibus-chef/tags","blobs_url":"https://api.github.com/repos/chef/omnibus-chef/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chef/omnibus-chef/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chef/omnibus-chef/git/refs{/sha}","trees_url":"https://api.github.com/repos/chef/omnibus-chef/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chef/omnibus-chef/statuses/{sha}","languages_url":"https://api.github.com/repos/chef/omnibus-chef/languages","stargazers_url":"https://api.github.com/repos/chef/omnibus-chef/stargazers","contributors_url":"https://api.github.com/repos/chef/omnibus-chef/contributors","subscribers_url":"https://api.github.com/repos/chef/omnibus-chef/subscribers","subscription_url":"https://api.github.com/repos/chef/omnibus-chef/subscription","commits_url":"https://api.github.com/repos/chef/omnibus-chef/commits{/sha}","git_commits_url":"https://api.github.com/repos/chef/omnibus-chef/git/commits{/sha}","comments_url":"https://api.github.com/repos/chef/omnibus-chef/comments{/number}","issue_comment_url":"https://api.github.com/repos/chef/omnibus-chef/issues/comments/{number}","contents_url":"https://api.github.com/repos/chef/omnibus-chef/contents/{+path}","compare_url":"https://api.github.com/repos/chef/omnibus-chef/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chef/omnibus-chef/merges","archive_url":"https://api.github.com/repos/chef/omnibus-chef/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chef/omnibus-chef/downloads","issues_url":"https://api.github.com/repos/chef/omnibus-chef/issues{/number}","pulls_url":"https://api.github.com/repos/chef/omnibus-chef/pulls{/number}","milestones_url":"https://api.github.com/repos/chef/omnibus-chef/milestones{/number}","notifications_url":"https://api.github.com/repos/chef/omnibus-chef/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chef/omnibus-chef/labels{/name}","releases_url":"https://api.github.com/repos/chef/omnibus-chef/releases{/id}","created_at":"2012-04-17T19:22:38Z","updated_at":"2015-02-02T14:59:13Z","pushed_at":"2015-02-02T15:01:08Z","git_url":"git://github.com/chef/omnibus-chef.git","ssh_url":"git@github.com:chef/omnibus-chef.git","clone_url":"https://github.com/chef/omnibus-chef.git","svn_url":"https://github.com/chef/omnibus-chef","homepage":"","size":7619,"stargazers_count":67,"watchers_count":67,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":61,"mirror_url":null,"open_issues_count":17,"forks":61,"open_issues":17,"watchers":67,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chef/omnibus-chef/pulls/337"},"html":{"href":"https://github.com/chef/omnibus-chef/pull/337"},"issue":{"href":"https://api.github.com/repos/chef/omnibus-chef/issues/337"},"comments":{"href":"https://api.github.com/repos/chef/omnibus-chef/issues/337/comments"},"review_comments":{"href":"https://api.github.com/repos/chef/omnibus-chef/pulls/337/comments"},"review_comment":{"href":"https://api.github.com/repos/chef/omnibus-chef/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/chef/omnibus-chef/pulls/337/commits"},"statuses":{"href":"https://api.github.com/repos/chef/omnibus-chef/statuses/ba89fea5929c2a87c7619013be2716c89f897e20"}}}}