{"action":"created","comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments/55399414","id":55399414,"diff_hunk":"@@ -78,20 +78,11 @@ def create_region\n     end\n \n     def join_region\n-      require 'tempfile'\n-      temp = Tempfile.new([\"joinregion\", \".rb\"], RAILS_ROOT.join(\"tmp\").to_s)\n-      params = {nil => ['runner', temp.path]}\n-\n-      output = nil\n-\n-      begin\n-        temp.write(activation_code)\n-        temp.close\n-\n-        output = AwesomeSpawn.run('script/rails', :chdir => RAILS_ROOT, :params => params).output\n-      ensure\n-        temp.delete\n-      end\n+      output = AwesomeSpawn.run(\n+        'bin/rails runner',","path":"gems/pending/appliance_console/database_configuration.rb","position":19,"original_position":19,"commit_id":"4bde0006989161ec67bece4d21ab2f3915a4891e","original_commit_id":"4bde0006989161ec67bece4d21ab2f3915a4891e","user":{"login":"Fryguy","id":52120,"avatar_url":"https://avatars.githubusercontent.com/u/52120?v=3","gravatar_id":"","url":"https://api.github.com/users/Fryguy","html_url":"https://github.com/Fryguy","followers_url":"https://api.github.com/users/Fryguy/followers","following_url":"https://api.github.com/users/Fryguy/following{/other_user}","gists_url":"https://api.github.com/users/Fryguy/gists{/gist_id}","starred_url":"https://api.github.com/users/Fryguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fryguy/subscriptions","organizations_url":"https://api.github.com/users/Fryguy/orgs","repos_url":"https://api.github.com/users/Fryguy/repos","events_url":"https://api.github.com/users/Fryguy/events{/privacy}","received_events_url":"https://api.github.com/users/Fryguy/received_events","type":"User","site_admin":false},"body":"Yeah, I can try that.","created_at":"2016-03-08T18:02:36Z","updated_at":"2016-03-08T18:02:36Z","html_url":"https://github.com/ManageIQ/manageiq/pull/7151#discussion_r55399414","pull_request_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/7151","_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments/55399414"},"html":{"href":"https://github.com/ManageIQ/manageiq/pull/7151#discussion_r55399414"},"pull_request":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/7151"}}},"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/7151","id":62028320,"html_url":"https://github.com/ManageIQ/manageiq/pull/7151","diff_url":"https://github.com/ManageIQ/manageiq/pull/7151.diff","patch_url":"https://github.com/ManageIQ/manageiq/pull/7151.patch","issue_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/7151","number":7151,"state":"open","locked":false,"title":"Remove MiqDbConfig in favor of Rails config.","user":{"login":"Fryguy","id":52120,"avatar_url":"https://avatars.githubusercontent.com/u/52120?v=3","gravatar_id":"","url":"https://api.github.com/users/Fryguy","html_url":"https://github.com/Fryguy","followers_url":"https://api.github.com/users/Fryguy/followers","following_url":"https://api.github.com/users/Fryguy/following{/other_user}","gists_url":"https://api.github.com/users/Fryguy/gists{/gist_id}","starred_url":"https://api.github.com/users/Fryguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fryguy/subscriptions","organizations_url":"https://api.github.com/users/Fryguy/orgs","repos_url":"https://api.github.com/users/Fryguy/repos","events_url":"https://api.github.com/users/Fryguy/events{/privacy}","received_events_url":"https://api.github.com/users/Fryguy/received_events","type":"User","site_admin":false},"body":"- The UI was the only location using MiqDbConfig.get_db_types, and only\r\n  to determine the display name for the diagnostics screen, so it moved\r\n  there.\r\n- DatabaseBackup.backup_supported? was the only location using the\r\n  `:name` property of MiqDbConfig (e.g. \"internal\", \"external_evm\").\r\n  However, the code just cares that it's PostgreSQL, so instead we\r\n  can just use the `\"adapter\"` property of the database configuration,\r\n  and can remove the `:name` property.\r\n- The ApplianceConsole was the only location using MiqDbConfig#save, but\r\n  it was really only being used for joining the region, so joining a\r\n  region was moved there as a separate script to be run through Rails\r\n  runner.\r\n- All of the other callers to MiqDbConfig called\r\n  `MiqDbConfig.current.options`, which is the same as calling\r\n  `Rails.configuration.database_configuration[Rails.env]` with the only\r\n  difference being the former has Symbol keys and the latter has String\r\n  keys.\r\n\r\n---\r\n\r\nThe reason I did this is because the MiqDbConfig spec is the only thing left that is failing on my configuration_revamp branch.  I found myself doing all this refactoring and moving on the branch to make it work, so I am pulling it out separately.\r\n\r\n@jrafanie Here's for you leg :moneybag: :poultry_leg:\r\n@kbrock :wink: ","created_at":"2016-03-08T05:58:28Z","updated_at":"2016-03-08T18:02:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"401836a74a76bde30a782238dff06bf56a8f2172","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/7151/commits","review_comments_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/7151/comments","review_comment_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/7151/comments","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq/statuses/4bde0006989161ec67bece4d21ab2f3915a4891e","head":{"label":"Fryguy:remove_miq_db_config","ref":"remove_miq_db_config","sha":"4bde0006989161ec67bece4d21ab2f3915a4891e","user":{"login":"Fryguy","id":52120,"avatar_url":"https://avatars.githubusercontent.com/u/52120?v=3","gravatar_id":"","url":"https://api.github.com/users/Fryguy","html_url":"https://github.com/Fryguy","followers_url":"https://api.github.com/users/Fryguy/followers","following_url":"https://api.github.com/users/Fryguy/following{/other_user}","gists_url":"https://api.github.com/users/Fryguy/gists{/gist_id}","starred_url":"https://api.github.com/users/Fryguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fryguy/subscriptions","organizations_url":"https://api.github.com/users/Fryguy/orgs","repos_url":"https://api.github.com/users/Fryguy/repos","events_url":"https://api.github.com/users/Fryguy/events{/privacy}","received_events_url":"https://api.github.com/users/Fryguy/received_events","type":"User","site_admin":false},"repo":{"id":20789885,"name":"manageiq","full_name":"Fryguy/manageiq","owner":{"login":"Fryguy","id":52120,"avatar_url":"https://avatars.githubusercontent.com/u/52120?v=3","gravatar_id":"","url":"https://api.github.com/users/Fryguy","html_url":"https://github.com/Fryguy","followers_url":"https://api.github.com/users/Fryguy/followers","following_url":"https://api.github.com/users/Fryguy/following{/other_user}","gists_url":"https://api.github.com/users/Fryguy/gists{/gist_id}","starred_url":"https://api.github.com/users/Fryguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fryguy/subscriptions","organizations_url":"https://api.github.com/users/Fryguy/orgs","repos_url":"https://api.github.com/users/Fryguy/repos","events_url":"https://api.github.com/users/Fryguy/events{/privacy}","received_events_url":"https://api.github.com/users/Fryguy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Fryguy/manageiq","description":"ManageIQ Cloud Management Platform","fork":true,"url":"https://api.github.com/repos/Fryguy/manageiq","forks_url":"https://api.github.com/repos/Fryguy/manageiq/forks","keys_url":"https://api.github.com/repos/Fryguy/manageiq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Fryguy/manageiq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Fryguy/manageiq/teams","hooks_url":"https://api.github.com/repos/Fryguy/manageiq/hooks","issue_events_url":"https://api.github.com/repos/Fryguy/manageiq/issues/events{/number}","events_url":"https://api.github.com/repos/Fryguy/manageiq/events","assignees_url":"https://api.github.com/repos/Fryguy/manageiq/assignees{/user}","branches_url":"https://api.github.com/repos/Fryguy/manageiq/branches{/branch}","tags_url":"https://api.github.com/repos/Fryguy/manageiq/tags","blobs_url":"https://api.github.com/repos/Fryguy/manageiq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Fryguy/manageiq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Fryguy/manageiq/git/refs{/sha}","trees_url":"https://api.github.com/repos/Fryguy/manageiq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Fryguy/manageiq/statuses/{sha}","languages_url":"https://api.github.com/repos/Fryguy/manageiq/languages","stargazers_url":"https://api.github.com/repos/Fryguy/manageiq/stargazers","contributors_url":"https://api.github.com/repos/Fryguy/manageiq/contributors","subscribers_url":"https://api.github.com/repos/Fryguy/manageiq/subscribers","subscription_url":"https://api.github.com/repos/Fryguy/manageiq/subscription","commits_url":"https://api.github.com/repos/Fryguy/manageiq/commits{/sha}","git_commits_url":"https://api.github.com/repos/Fryguy/manageiq/git/commits{/sha}","comments_url":"https://api.github.com/repos/Fryguy/manageiq/comments{/number}","issue_comment_url":"https://api.github.com/repos/Fryguy/manageiq/issues/comments{/number}","contents_url":"https://api.github.com/repos/Fryguy/manageiq/contents/{+path}","compare_url":"https://api.github.com/repos/Fryguy/manageiq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Fryguy/manageiq/merges","archive_url":"https://api.github.com/repos/Fryguy/manageiq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Fryguy/manageiq/downloads","issues_url":"https://api.github.com/repos/Fryguy/manageiq/issues{/number}","pulls_url":"https://api.github.com/repos/Fryguy/manageiq/pulls{/number}","milestones_url":"https://api.github.com/repos/Fryguy/manageiq/milestones{/number}","notifications_url":"https://api.github.com/repos/Fryguy/manageiq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Fryguy/manageiq/labels{/name}","releases_url":"https://api.github.com/repos/Fryguy/manageiq/releases{/id}","deployments_url":"https://api.github.com/repos/Fryguy/manageiq/deployments","created_at":"2014-06-13T02:37:50Z","updated_at":"2014-07-02T02:07:48Z","pushed_at":"2016-03-08T06:16:25Z","git_url":"git://github.com/Fryguy/manageiq.git","ssh_url":"git@github.com:Fryguy/manageiq.git","clone_url":"https://github.com/Fryguy/manageiq.git","svn_url":"https://github.com/Fryguy/manageiq","homepage":null,"size":109866,"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":"ManageIQ:master","ref":"master","sha":"904caa27384f6451b3a128f6528f88d3d6269fe6","user":{"login":"ManageIQ","id":1125575,"avatar_url":"https://avatars.githubusercontent.com/u/1125575?v=3","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"repo":{"id":20789757,"name":"manageiq","full_name":"ManageIQ/manageiq","owner":{"login":"ManageIQ","id":1125575,"avatar_url":"https://avatars.githubusercontent.com/u/1125575?v=3","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ManageIQ/manageiq","description":"ManageIQ Cloud Management Platform","fork":false,"url":"https://api.github.com/repos/ManageIQ/manageiq","forks_url":"https://api.github.com/repos/ManageIQ/manageiq/forks","keys_url":"https://api.github.com/repos/ManageIQ/manageiq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ManageIQ/manageiq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ManageIQ/manageiq/teams","hooks_url":"https://api.github.com/repos/ManageIQ/manageiq/hooks","issue_events_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/events{/number}","events_url":"https://api.github.com/repos/ManageIQ/manageiq/events","assignees_url":"https://api.github.com/repos/ManageIQ/manageiq/assignees{/user}","branches_url":"https://api.github.com/repos/ManageIQ/manageiq/branches{/branch}","tags_url":"https://api.github.com/repos/ManageIQ/manageiq/tags","blobs_url":"https://api.github.com/repos/ManageIQ/manageiq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ManageIQ/manageiq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ManageIQ/manageiq/git/refs{/sha}","trees_url":"https://api.github.com/repos/ManageIQ/manageiq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq/statuses/{sha}","languages_url":"https://api.github.com/repos/ManageIQ/manageiq/languages","stargazers_url":"https://api.github.com/repos/ManageIQ/manageiq/stargazers","contributors_url":"https://api.github.com/repos/ManageIQ/manageiq/contributors","subscribers_url":"https://api.github.com/repos/ManageIQ/manageiq/subscribers","subscription_url":"https://api.github.com/repos/ManageIQ/manageiq/subscription","commits_url":"https://api.github.com/repos/ManageIQ/manageiq/commits{/sha}","git_commits_url":"https://api.github.com/repos/ManageIQ/manageiq/git/commits{/sha}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/comments{/number}","issue_comment_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/comments{/number}","contents_url":"https://api.github.com/repos/ManageIQ/manageiq/contents/{+path}","compare_url":"https://api.github.com/repos/ManageIQ/manageiq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ManageIQ/manageiq/merges","archive_url":"https://api.github.com/repos/ManageIQ/manageiq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ManageIQ/manageiq/downloads","issues_url":"https://api.github.com/repos/ManageIQ/manageiq/issues{/number}","pulls_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls{/number}","milestones_url":"https://api.github.com/repos/ManageIQ/manageiq/milestones{/number}","notifications_url":"https://api.github.com/repos/ManageIQ/manageiq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ManageIQ/manageiq/labels{/name}","releases_url":"https://api.github.com/repos/ManageIQ/manageiq/releases{/id}","deployments_url":"https://api.github.com/repos/ManageIQ/manageiq/deployments","created_at":"2014-06-13T02:31:26Z","updated_at":"2016-03-07T11:58:55Z","pushed_at":"2016-03-08T17:59:20Z","git_url":"git://github.com/ManageIQ/manageiq.git","ssh_url":"git@github.com:ManageIQ/manageiq.git","clone_url":"https://github.com/ManageIQ/manageiq.git","svn_url":"https://github.com/ManageIQ/manageiq","homepage":"manageiq.org","size":146219,"stargazers_count":227,"watchers_count":227,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":253,"mirror_url":null,"open_issues_count":599,"forks":253,"open_issues":599,"watchers":227,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/7151"},"html":{"href":"https://github.com/ManageIQ/manageiq/pull/7151"},"issue":{"href":"https://api.github.com/repos/ManageIQ/manageiq/issues/7151"},"comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq/issues/7151/comments"},"review_comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/7151/comments"},"review_comment":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/7151/commits"},"statuses":{"href":"https://api.github.com/repos/ManageIQ/manageiq/statuses/4bde0006989161ec67bece4d21ab2f3915a4891e"}}}}