{"action":"created","comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/pulls/comments/114303965","pull_request_review_id":35757320,"id":114303965,"diff_hunk":"@@ -0,0 +1,87 @@\n+module ManageIQ::Providers\n+  module Hawkular\n+    module ServerOperations","path":"app/models/manageiq/providers/hawkular/concerns/server_operations.rb","position":5,"original_position":3,"commit_id":"991846d8f735dbe22448f695cc26234bf5adc918","original_commit_id":"f2f4fb51fb24dd6db64f1e585386d849632a21fb","user":{"login":"cfcosta","id":14752,"avatar_url":"https://avatars1.githubusercontent.com/u/14752?v=3","gravatar_id":"","url":"https://api.github.com/users/cfcosta","html_url":"https://github.com/cfcosta","followers_url":"https://api.github.com/users/cfcosta/followers","following_url":"https://api.github.com/users/cfcosta/following{/other_user}","gists_url":"https://api.github.com/users/cfcosta/gists{/gist_id}","starred_url":"https://api.github.com/users/cfcosta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfcosta/subscriptions","organizations_url":"https://api.github.com/users/cfcosta/orgs","repos_url":"https://api.github.com/users/cfcosta/repos","events_url":"https://api.github.com/users/cfcosta/events{/privacy}","received_events_url":"https://api.github.com/users/cfcosta/received_events","type":"User","site_admin":false},"body":"Actually, having concerns as a different folder, but without namespacing it is the rails default (try creating a new rails application and check the `app/models` folder.","created_at":"2017-05-02T12:13:43Z","updated_at":"2017-05-02T12:13:43Z","html_url":"https://github.com/ManageIQ/manageiq-providers-hawkular/pull/9#discussion_r114303965","pull_request_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/pulls/comments/114303965"},"html":{"href":"https://github.com/ManageIQ/manageiq-providers-hawkular/pull/9#discussion_r114303965"},"pull_request":{"href":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/pulls/9","id":115873169,"html_url":"https://github.com/ManageIQ/manageiq-providers-hawkular/pull/9","diff_url":"https://github.com/ManageIQ/manageiq-providers-hawkular/pull/9.diff","patch_url":"https://github.com/ManageIQ/manageiq-providers-hawkular/pull/9.patch","issue_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/issues/9","number":9,"state":"open","locked":false,"title":"[WIP] Extract server operations from MiddlewareManager","user":{"login":"cfcosta","id":14752,"avatar_url":"https://avatars1.githubusercontent.com/u/14752?v=3","gravatar_id":"","url":"https://api.github.com/users/cfcosta","html_url":"https://github.com/cfcosta","followers_url":"https://api.github.com/users/cfcosta/followers","following_url":"https://api.github.com/users/cfcosta/following{/other_user}","gists_url":"https://api.github.com/users/cfcosta/gists{/gist_id}","starred_url":"https://api.github.com/users/cfcosta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfcosta/subscriptions","organizations_url":"https://api.github.com/users/cfcosta/orgs","repos_url":"https://api.github.com/users/cfcosta/repos","events_url":"https://api.github.com/users/cfcosta/events{/privacy}","received_events_url":"https://api.github.com/users/cfcosta/received_events","type":"User","site_admin":false},"body":"**CURRENT STATUS**: Testing it manually to make sure it works as\r\nexpected, and waiting for feedback.\r\n\r\n## What is it?\r\n\r\nMiddlewareManager is, at the moment, not only the biggest class in the\r\nproject, but also the one with most churn[1], both of which are indicators\r\nthat the class is doing more than necessary.\r\n\r\nThis commit extract those methods to a concern, so that the interface\r\nremains the same, but it extracts the whole behaviour into a separate\r\nclass, which is then tested in isolation.\r\n\r\nThe next step on this change is to use the operation class directly and\r\nremove the facade methods, but that will require further change on both\r\nMiQ Core and MiQ-classic-ui.\r\n\r\n[1]: For this PR, we consider \"churn\" the rate at which a file changes,\r\nso more changes mean the file has more responsibilities, since objects\r\nwith loose coupling and high cohesion have less reason to change.\r\n\r\n## Other\r\n\r\n1. How to see what the churn for the files is?\r\n    Run this:\r\n\r\n        git log --all -M -C --name-only --format='format:' | sort | grep -v '^$' | uniq -c | sort -n | awk 'BEGIN {print \"count\\tfile\"} {print $1 \"\\t\" $2}' | grep hawkular | sort -nr | less ","created_at":"2017-04-14T01:55:05Z","updated_at":"2017-05-02T12:13:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"49de67853fb4c0465adc44137b117b4a8a5a1617","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/pulls/9/commits","review_comments_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/pulls/9/comments","review_comment_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/issues/9/comments","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/statuses/991846d8f735dbe22448f695cc26234bf5adc918","head":{"label":"cfcosta:extract-server-actions-from-model","ref":"extract-server-actions-from-model","sha":"991846d8f735dbe22448f695cc26234bf5adc918","user":{"login":"cfcosta","id":14752,"avatar_url":"https://avatars1.githubusercontent.com/u/14752?v=3","gravatar_id":"","url":"https://api.github.com/users/cfcosta","html_url":"https://github.com/cfcosta","followers_url":"https://api.github.com/users/cfcosta/followers","following_url":"https://api.github.com/users/cfcosta/following{/other_user}","gists_url":"https://api.github.com/users/cfcosta/gists{/gist_id}","starred_url":"https://api.github.com/users/cfcosta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfcosta/subscriptions","organizations_url":"https://api.github.com/users/cfcosta/orgs","repos_url":"https://api.github.com/users/cfcosta/repos","events_url":"https://api.github.com/users/cfcosta/events{/privacy}","received_events_url":"https://api.github.com/users/cfcosta/received_events","type":"User","site_admin":false},"repo":{"id":87871813,"name":"manageiq-providers-hawkular","full_name":"cfcosta/manageiq-providers-hawkular","owner":{"login":"cfcosta","id":14752,"avatar_url":"https://avatars1.githubusercontent.com/u/14752?v=3","gravatar_id":"","url":"https://api.github.com/users/cfcosta","html_url":"https://github.com/cfcosta","followers_url":"https://api.github.com/users/cfcosta/followers","following_url":"https://api.github.com/users/cfcosta/following{/other_user}","gists_url":"https://api.github.com/users/cfcosta/gists{/gist_id}","starred_url":"https://api.github.com/users/cfcosta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfcosta/subscriptions","organizations_url":"https://api.github.com/users/cfcosta/orgs","repos_url":"https://api.github.com/users/cfcosta/repos","events_url":"https://api.github.com/users/cfcosta/events{/privacy}","received_events_url":"https://api.github.com/users/cfcosta/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cfcosta/manageiq-providers-hawkular","description":"ManageIQ plugin for the Hawkular provider","fork":true,"url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular","forks_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/forks","keys_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/teams","hooks_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/hooks","issue_events_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/issues/events{/number}","events_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/events","assignees_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/assignees{/user}","branches_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/branches{/branch}","tags_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/tags","blobs_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/git/refs{/sha}","trees_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/statuses/{sha}","languages_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/languages","stargazers_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/stargazers","contributors_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/contributors","subscribers_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/subscribers","subscription_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/subscription","commits_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/commits{/sha}","git_commits_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/git/commits{/sha}","comments_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/comments{/number}","issue_comment_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/issues/comments{/number}","contents_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/contents/{+path}","compare_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/merges","archive_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/downloads","issues_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/issues{/number}","pulls_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/pulls{/number}","milestones_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/milestones{/number}","notifications_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/labels{/name}","releases_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/releases{/id}","deployments_url":"https://api.github.com/repos/cfcosta/manageiq-providers-hawkular/deployments","created_at":"2017-04-11T00:55:42Z","updated_at":"2017-04-11T00:55:43Z","pushed_at":"2017-04-25T18:45:41Z","git_url":"git://github.com/cfcosta/manageiq-providers-hawkular.git","ssh_url":"git@github.com:cfcosta/manageiq-providers-hawkular.git","clone_url":"https://github.com/cfcosta/manageiq-providers-hawkular.git","svn_url":"https://github.com/cfcosta/manageiq-providers-hawkular","homepage":null,"size":639,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"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":"ManageIQ:master","ref":"master","sha":"cda05ae63d5787aff28ed5fa64d549b934acaebb","user":{"login":"ManageIQ","id":1125575,"avatar_url":"https://avatars3.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":87439518,"name":"manageiq-providers-hawkular","full_name":"ManageIQ/manageiq-providers-hawkular","owner":{"login":"ManageIQ","id":1125575,"avatar_url":"https://avatars3.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-providers-hawkular","description":"ManageIQ plugin for the Hawkular provider","fork":false,"url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular","forks_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/forks","keys_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/teams","hooks_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/hooks","issue_events_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/issues/events{/number}","events_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/events","assignees_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/assignees{/user}","branches_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/branches{/branch}","tags_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/tags","blobs_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/git/refs{/sha}","trees_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/statuses/{sha}","languages_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/languages","stargazers_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/stargazers","contributors_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/contributors","subscribers_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/subscribers","subscription_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/subscription","commits_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/commits{/sha}","git_commits_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/git/commits{/sha}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/comments{/number}","issue_comment_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/issues/comments{/number}","contents_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/contents/{+path}","compare_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/merges","archive_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/downloads","issues_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/issues{/number}","pulls_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/pulls{/number}","milestones_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/milestones{/number}","notifications_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/labels{/name}","releases_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/releases{/id}","deployments_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/deployments","created_at":"2017-04-06T14:36:28Z","updated_at":"2017-04-09T10:18:11Z","pushed_at":"2017-04-28T13:31:12Z","git_url":"git://github.com/ManageIQ/manageiq-providers-hawkular.git","ssh_url":"git@github.com:ManageIQ/manageiq-providers-hawkular.git","clone_url":"https://github.com/ManageIQ/manageiq-providers-hawkular.git","svn_url":"https://github.com/ManageIQ/manageiq-providers-hawkular","homepage":null,"size":832,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":8,"forks":12,"open_issues":8,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/pulls/9"},"html":{"href":"https://github.com/ManageIQ/manageiq-providers-hawkular/pull/9"},"issue":{"href":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/issues/9"},"comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/statuses/991846d8f735dbe22448f695cc26234bf5adc918"}}}}
{"actor":{"display_login":"cfcosta"}}