{"action":"created","comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments/101993680","pull_request_review_id":22735497,"id":101993680,"diff_hunk":"@@ -8,6 +8,11 @@ class Plugins\n     def initialize\n       @registered_automate_domains = []\n       @vmdb_plugins = []\n+\n+      Rails.application.railties.each do |railtie|\n+        next unless railtie.class.name.start_with?(\"ManageIQ::Providers::\") || railtie.try(:vmdb_plugin?)\n+        register_vmdb_plugin(railtie)\n+      end","path":"lib/vmdb/plugins.rb","position":8,"original_position":8,"commit_id":"de3d2ed4f93ebfc5c5cbc9cfdebac44ca0fed129","original_commit_id":"de3d2ed4f93ebfc5c5cbc9cfdebac44ca0fed129","user":{"login":"durandom","id":161888,"avatar_url":"https://avatars.githubusercontent.com/u/161888?v=3","gravatar_id":"","url":"https://api.github.com/users/durandom","html_url":"https://github.com/durandom","followers_url":"https://api.github.com/users/durandom/followers","following_url":"https://api.github.com/users/durandom/following{/other_user}","gists_url":"https://api.github.com/users/durandom/gists{/gist_id}","starred_url":"https://api.github.com/users/durandom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/durandom/subscriptions","organizations_url":"https://api.github.com/users/durandom/orgs","repos_url":"https://api.github.com/users/durandom/repos","events_url":"https://api.github.com/users/durandom/events{/privacy}","received_events_url":"https://api.github.com/users/durandom/received_events","type":"User","site_admin":false},"body":"Oh, sorry, I mis-read your comment. \r\n\r\nIndeed it would add the engine root *again* to `DescendantLoader.instance.descendants_paths` [here](https://github.com/ManageIQ/manageiq/pull/13941/files#diff-2dffee21730102d591f668045fe85db7L19) - I can fix that by making it a proper method that does not allow double entries. But it makes does no real harm for now...\r\n\r\n`register_automate_domain`  only adds new `AutomateDomain` to a newly created array `@registered_automate_domains` \r\n\r\n","created_at":"2017-02-20T11:06:29Z","updated_at":"2017-02-20T11:06:29Z","html_url":"https://github.com/ManageIQ/manageiq/pull/13941#discussion_r101993680","pull_request_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/13941","_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments/101993680"},"html":{"href":"https://github.com/ManageIQ/manageiq/pull/13941#discussion_r101993680"},"pull_request":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/13941"}}},"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/13941","id":106525595,"html_url":"https://github.com/ManageIQ/manageiq/pull/13941","diff_url":"https://github.com/ManageIQ/manageiq/pull/13941.diff","patch_url":"https://github.com/ManageIQ/manageiq/pull/13941.patch","issue_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/13941","number":13941,"state":"open","locked":false,"title":"move plugin initializer code into Vmdb::Plugins","user":{"login":"durandom","id":161888,"avatar_url":"https://avatars.githubusercontent.com/u/161888?v=3","gravatar_id":"","url":"https://api.github.com/users/durandom","html_url":"https://github.com/durandom","followers_url":"https://api.github.com/users/durandom/followers","following_url":"https://api.github.com/users/durandom/following{/other_user}","gists_url":"https://api.github.com/users/durandom/gists{/gist_id}","starred_url":"https://api.github.com/users/durandom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/durandom/subscriptions","organizations_url":"https://api.github.com/users/durandom/orgs","repos_url":"https://api.github.com/users/durandom/repos","events_url":"https://api.github.com/users/durandom/events{/privacy}","received_events_url":"https://api.github.com/users/durandom/received_events","type":"User","site_admin":false},"body":"the reasoning behind this is, that in a rails console `reload!` will\r\nreset all classes and also this Vmdb::Plugins singleton\r\n\r\nMoving the code that registers all plugins to the initializer makes\r\nsure the all plugins are registered even after a reload.\r\n\r\nI think it will save future developers some frustration, when doing stuff in the console or even development mode, when more and more parts of the app rely on the arrays `@vmdb_plugins` and `@registered_automate_domains` to be filled.\r\n\r\nIts also safe to assume the singleton is accessed _after_ all rails initializers are run - if there is a way to check this, I could add it to the initializer of the singleton class.\r\n\r\n@miq-bot add_labels developer, enhacement\r\n@miq-bot assign @bdunne \r\ncc @Fryguy ","created_at":"2017-02-16T13:31:56Z","updated_at":"2017-02-20T11:06:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6235fc6a8aa9d620ca1cd067bc4ca0b43bb1947a","assignee":{"login":"bdunne","id":651659,"avatar_url":"https://avatars.githubusercontent.com/u/651659?v=3","gravatar_id":"","url":"https://api.github.com/users/bdunne","html_url":"https://github.com/bdunne","followers_url":"https://api.github.com/users/bdunne/followers","following_url":"https://api.github.com/users/bdunne/following{/other_user}","gists_url":"https://api.github.com/users/bdunne/gists{/gist_id}","starred_url":"https://api.github.com/users/bdunne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdunne/subscriptions","organizations_url":"https://api.github.com/users/bdunne/orgs","repos_url":"https://api.github.com/users/bdunne/repos","events_url":"https://api.github.com/users/bdunne/events{/privacy}","received_events_url":"https://api.github.com/users/bdunne/received_events","type":"User","site_admin":false},"assignees":[{"login":"bdunne","id":651659,"avatar_url":"https://avatars.githubusercontent.com/u/651659?v=3","gravatar_id":"","url":"https://api.github.com/users/bdunne","html_url":"https://github.com/bdunne","followers_url":"https://api.github.com/users/bdunne/followers","following_url":"https://api.github.com/users/bdunne/following{/other_user}","gists_url":"https://api.github.com/users/bdunne/gists{/gist_id}","starred_url":"https://api.github.com/users/bdunne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdunne/subscriptions","organizations_url":"https://api.github.com/users/bdunne/orgs","repos_url":"https://api.github.com/users/bdunne/repos","events_url":"https://api.github.com/users/bdunne/events{/privacy}","received_events_url":"https://api.github.com/users/bdunne/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/13941/commits","review_comments_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/13941/comments","review_comment_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/13941/comments","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq/statuses/de3d2ed4f93ebfc5c5cbc9cfdebac44ca0fed129","head":{"label":"durandom:vmdb_plugins_initialize","ref":"vmdb_plugins_initialize","sha":"de3d2ed4f93ebfc5c5cbc9cfdebac44ca0fed129","user":{"login":"durandom","id":161888,"avatar_url":"https://avatars.githubusercontent.com/u/161888?v=3","gravatar_id":"","url":"https://api.github.com/users/durandom","html_url":"https://github.com/durandom","followers_url":"https://api.github.com/users/durandom/followers","following_url":"https://api.github.com/users/durandom/following{/other_user}","gists_url":"https://api.github.com/users/durandom/gists{/gist_id}","starred_url":"https://api.github.com/users/durandom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/durandom/subscriptions","organizations_url":"https://api.github.com/users/durandom/orgs","repos_url":"https://api.github.com/users/durandom/repos","events_url":"https://api.github.com/users/durandom/events{/privacy}","received_events_url":"https://api.github.com/users/durandom/received_events","type":"User","site_admin":false},"repo":{"id":48989151,"name":"manageiq","full_name":"durandom/manageiq","owner":{"login":"durandom","id":161888,"avatar_url":"https://avatars.githubusercontent.com/u/161888?v=3","gravatar_id":"","url":"https://api.github.com/users/durandom","html_url":"https://github.com/durandom","followers_url":"https://api.github.com/users/durandom/followers","following_url":"https://api.github.com/users/durandom/following{/other_user}","gists_url":"https://api.github.com/users/durandom/gists{/gist_id}","starred_url":"https://api.github.com/users/durandom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/durandom/subscriptions","organizations_url":"https://api.github.com/users/durandom/orgs","repos_url":"https://api.github.com/users/durandom/repos","events_url":"https://api.github.com/users/durandom/events{/privacy}","received_events_url":"https://api.github.com/users/durandom/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/durandom/manageiq","description":"ManageIQ Cloud Management Platform","fork":true,"url":"https://api.github.com/repos/durandom/manageiq","forks_url":"https://api.github.com/repos/durandom/manageiq/forks","keys_url":"https://api.github.com/repos/durandom/manageiq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/durandom/manageiq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/durandom/manageiq/teams","hooks_url":"https://api.github.com/repos/durandom/manageiq/hooks","issue_events_url":"https://api.github.com/repos/durandom/manageiq/issues/events{/number}","events_url":"https://api.github.com/repos/durandom/manageiq/events","assignees_url":"https://api.github.com/repos/durandom/manageiq/assignees{/user}","branches_url":"https://api.github.com/repos/durandom/manageiq/branches{/branch}","tags_url":"https://api.github.com/repos/durandom/manageiq/tags","blobs_url":"https://api.github.com/repos/durandom/manageiq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/durandom/manageiq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/durandom/manageiq/git/refs{/sha}","trees_url":"https://api.github.com/repos/durandom/manageiq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/durandom/manageiq/statuses/{sha}","languages_url":"https://api.github.com/repos/durandom/manageiq/languages","stargazers_url":"https://api.github.com/repos/durandom/manageiq/stargazers","contributors_url":"https://api.github.com/repos/durandom/manageiq/contributors","subscribers_url":"https://api.github.com/repos/durandom/manageiq/subscribers","subscription_url":"https://api.github.com/repos/durandom/manageiq/subscription","commits_url":"https://api.github.com/repos/durandom/manageiq/commits{/sha}","git_commits_url":"https://api.github.com/repos/durandom/manageiq/git/commits{/sha}","comments_url":"https://api.github.com/repos/durandom/manageiq/comments{/number}","issue_comment_url":"https://api.github.com/repos/durandom/manageiq/issues/comments{/number}","contents_url":"https://api.github.com/repos/durandom/manageiq/contents/{+path}","compare_url":"https://api.github.com/repos/durandom/manageiq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/durandom/manageiq/merges","archive_url":"https://api.github.com/repos/durandom/manageiq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/durandom/manageiq/downloads","issues_url":"https://api.github.com/repos/durandom/manageiq/issues{/number}","pulls_url":"https://api.github.com/repos/durandom/manageiq/pulls{/number}","milestones_url":"https://api.github.com/repos/durandom/manageiq/milestones{/number}","notifications_url":"https://api.github.com/repos/durandom/manageiq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/durandom/manageiq/labels{/name}","releases_url":"https://api.github.com/repos/durandom/manageiq/releases{/id}","deployments_url":"https://api.github.com/repos/durandom/manageiq/deployments","created_at":"2016-01-04T10:05:53Z","updated_at":"2016-01-13T19:58:57Z","pushed_at":"2017-02-17T11:39:07Z","git_url":"git://github.com/durandom/manageiq.git","ssh_url":"git@github.com:durandom/manageiq.git","clone_url":"https://github.com/durandom/manageiq.git","svn_url":"https://github.com/durandom/manageiq","homepage":"manageiq.org","size":193950,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"ManageIQ:master","ref":"master","sha":"9e2b41dd6d381c458eb29907b9ed9f6af9887091","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 Open-Source 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":"2017-02-20T06:23:46Z","pushed_at":"2017-02-20T09:29:34Z","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":198100,"stargazers_count":401,"watchers_count":401,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":429,"mirror_url":null,"open_issues_count":845,"forks":429,"open_issues":845,"watchers":401,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/13941"},"html":{"href":"https://github.com/ManageIQ/manageiq/pull/13941"},"issue":{"href":"https://api.github.com/repos/ManageIQ/manageiq/issues/13941"},"comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq/issues/13941/comments"},"review_comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/13941/comments"},"review_comment":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/13941/commits"},"statuses":{"href":"https://api.github.com/repos/ManageIQ/manageiq/statuses/de3d2ed4f93ebfc5c5cbc9cfdebac44ca0fed129"}}}}
{"actor":{"display_login":"durandom"}}