{"action":"created","comment":{"url":"https://api.github.com/repos/theforeman/foreman/pulls/comments/88419077","pull_request_review_id":8991558,"id":88419077,"diff_hunk":"@@ -1,9 +1,8 @@\n class AIX < Operatingsystem\n   PXEFILES = {:kernel => \"powerpc\", :initrd => \"initrd\"}\n \n-  # Override the class representation, as this breaks many rails helpers\n-  def class\n-    Operatingsystem\n+  class << self","path":"app/models/operatingsystems/aix.rb","position":7,"original_position":7,"commit_id":"3498ca69edfdc9e2f8375ac20dbdcc14b4fab5de","original_commit_id":"3498ca69edfdc9e2f8375ac20dbdcc14b4fab5de","user":{"login":"timogoebel","id":4107560,"avatar_url":"https://avatars.githubusercontent.com/u/4107560?v=3","gravatar_id":"","url":"https://api.github.com/users/timogoebel","html_url":"https://github.com/timogoebel","followers_url":"https://api.github.com/users/timogoebel/followers","following_url":"https://api.github.com/users/timogoebel/following{/other_user}","gists_url":"https://api.github.com/users/timogoebel/gists{/gist_id}","starred_url":"https://api.github.com/users/timogoebel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timogoebel/subscriptions","organizations_url":"https://api.github.com/users/timogoebel/orgs","repos_url":"https://api.github.com/users/timogoebel/repos","events_url":"https://api.github.com/users/timogoebel/events{/privacy}","received_events_url":"https://api.github.com/users/timogoebel/received_events","type":"User","site_admin":false},"body":"You could add this to the superclass to not repeat yourself:\r\n\r\n```ruby\r\ndef self.inherited(child)\r\n  child.instance_eval do\r\n    # rubocop:disable Rails/Delegate\r\n    def model_name\r\n      superclass.model_name\r\n      end\r\n    # rubocop:enable Rails/Delegate\r\n  end\r\n  super\r\nend\r\n```","created_at":"2016-11-17T09:52:26Z","updated_at":"2016-11-17T09:52:26Z","html_url":"https://github.com/theforeman/foreman/pull/4026#discussion_r88419077","pull_request_url":"https://api.github.com/repos/theforeman/foreman/pulls/4026","_links":{"self":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/comments/88419077"},"html":{"href":"https://github.com/theforeman/foreman/pull/4026#discussion_r88419077"},"pull_request":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/4026"}}},"pull_request":{"url":"https://api.github.com/repos/theforeman/foreman/pulls/4026","id":93925550,"html_url":"https://github.com/theforeman/foreman/pull/4026","diff_url":"https://github.com/theforeman/foreman/pull/4026.diff","patch_url":"https://github.com/theforeman/foreman/pull/4026.patch","issue_url":"https://api.github.com/repos/theforeman/foreman/issues/4026","number":4026,"state":"open","locked":false,"title":"fixes #17354 - test and improve idempotency of OS fact parser","user":{"login":"domcleal","id":482089,"avatar_url":"https://avatars.githubusercontent.com/u/482089?v=3","gravatar_id":"","url":"https://api.github.com/users/domcleal","html_url":"https://github.com/domcleal","followers_url":"https://api.github.com/users/domcleal/followers","following_url":"https://api.github.com/users/domcleal/following{/other_user}","gists_url":"https://api.github.com/users/domcleal/gists{/gist_id}","starred_url":"https://api.github.com/users/domcleal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domcleal/subscriptions","organizations_url":"https://api.github.com/users/domcleal/orgs","repos_url":"https://api.github.com/users/domcleal/repos","events_url":"https://api.github.com/users/domcleal/events{/privacy}","received_events_url":"https://api.github.com/users/domcleal/received_events","type":"User","site_admin":false},"body":"Contains the commit from #4025 which fixes an issue when parsing OSes with only a major version.","created_at":"2016-11-16T09:04:17Z","updated_at":"2016-11-17T09:52:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d5dc0b06248dd82d96648fffd42807e110add555","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/theforeman/foreman/pulls/4026/commits","review_comments_url":"https://api.github.com/repos/theforeman/foreman/pulls/4026/comments","review_comment_url":"https://api.github.com/repos/theforeman/foreman/pulls/comments{/number}","comments_url":"https://api.github.com/repos/theforeman/foreman/issues/4026/comments","statuses_url":"https://api.github.com/repos/theforeman/foreman/statuses/3498ca69edfdc9e2f8375ac20dbdcc14b4fab5de","head":{"label":"domcleal:17354-os-fact-parser-idempotent","ref":"17354-os-fact-parser-idempotent","sha":"3498ca69edfdc9e2f8375ac20dbdcc14b4fab5de","user":{"login":"domcleal","id":482089,"avatar_url":"https://avatars.githubusercontent.com/u/482089?v=3","gravatar_id":"","url":"https://api.github.com/users/domcleal","html_url":"https://github.com/domcleal","followers_url":"https://api.github.com/users/domcleal/followers","following_url":"https://api.github.com/users/domcleal/following{/other_user}","gists_url":"https://api.github.com/users/domcleal/gists{/gist_id}","starred_url":"https://api.github.com/users/domcleal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domcleal/subscriptions","organizations_url":"https://api.github.com/users/domcleal/orgs","repos_url":"https://api.github.com/users/domcleal/repos","events_url":"https://api.github.com/users/domcleal/events{/privacy}","received_events_url":"https://api.github.com/users/domcleal/received_events","type":"User","site_admin":false},"repo":{"id":6577737,"name":"foreman","full_name":"domcleal/foreman","owner":{"login":"domcleal","id":482089,"avatar_url":"https://avatars.githubusercontent.com/u/482089?v=3","gravatar_id":"","url":"https://api.github.com/users/domcleal","html_url":"https://github.com/domcleal","followers_url":"https://api.github.com/users/domcleal/followers","following_url":"https://api.github.com/users/domcleal/following{/other_user}","gists_url":"https://api.github.com/users/domcleal/gists{/gist_id}","starred_url":"https://api.github.com/users/domcleal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domcleal/subscriptions","organizations_url":"https://api.github.com/users/domcleal/orgs","repos_url":"https://api.github.com/users/domcleal/repos","events_url":"https://api.github.com/users/domcleal/events{/privacy}","received_events_url":"https://api.github.com/users/domcleal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/domcleal/foreman","description":"an application that automates the lifecycle of servers ","fork":true,"url":"https://api.github.com/repos/domcleal/foreman","forks_url":"https://api.github.com/repos/domcleal/foreman/forks","keys_url":"https://api.github.com/repos/domcleal/foreman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/domcleal/foreman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/domcleal/foreman/teams","hooks_url":"https://api.github.com/repos/domcleal/foreman/hooks","issue_events_url":"https://api.github.com/repos/domcleal/foreman/issues/events{/number}","events_url":"https://api.github.com/repos/domcleal/foreman/events","assignees_url":"https://api.github.com/repos/domcleal/foreman/assignees{/user}","branches_url":"https://api.github.com/repos/domcleal/foreman/branches{/branch}","tags_url":"https://api.github.com/repos/domcleal/foreman/tags","blobs_url":"https://api.github.com/repos/domcleal/foreman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/domcleal/foreman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/domcleal/foreman/git/refs{/sha}","trees_url":"https://api.github.com/repos/domcleal/foreman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/domcleal/foreman/statuses/{sha}","languages_url":"https://api.github.com/repos/domcleal/foreman/languages","stargazers_url":"https://api.github.com/repos/domcleal/foreman/stargazers","contributors_url":"https://api.github.com/repos/domcleal/foreman/contributors","subscribers_url":"https://api.github.com/repos/domcleal/foreman/subscribers","subscription_url":"https://api.github.com/repos/domcleal/foreman/subscription","commits_url":"https://api.github.com/repos/domcleal/foreman/commits{/sha}","git_commits_url":"https://api.github.com/repos/domcleal/foreman/git/commits{/sha}","comments_url":"https://api.github.com/repos/domcleal/foreman/comments{/number}","issue_comment_url":"https://api.github.com/repos/domcleal/foreman/issues/comments{/number}","contents_url":"https://api.github.com/repos/domcleal/foreman/contents/{+path}","compare_url":"https://api.github.com/repos/domcleal/foreman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/domcleal/foreman/merges","archive_url":"https://api.github.com/repos/domcleal/foreman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/domcleal/foreman/downloads","issues_url":"https://api.github.com/repos/domcleal/foreman/issues{/number}","pulls_url":"https://api.github.com/repos/domcleal/foreman/pulls{/number}","milestones_url":"https://api.github.com/repos/domcleal/foreman/milestones{/number}","notifications_url":"https://api.github.com/repos/domcleal/foreman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/domcleal/foreman/labels{/name}","releases_url":"https://api.github.com/repos/domcleal/foreman/releases{/id}","deployments_url":"https://api.github.com/repos/domcleal/foreman/deployments","created_at":"2012-11-07T10:48:14Z","updated_at":"2016-08-25T09:42:15Z","pushed_at":"2016-11-17T09:20:21Z","git_url":"git://github.com/domcleal/foreman.git","ssh_url":"git@github.com:domcleal/foreman.git","clone_url":"https://github.com/domcleal/foreman.git","svn_url":"https://github.com/domcleal/foreman","homepage":"http://theforeman.org","size":48990,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"theforeman:develop","ref":"develop","sha":"13875289357605c80b8073c2befcf84303e3695d","user":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=3","gravatar_id":"","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"repo":{"id":258750,"name":"foreman","full_name":"theforeman/foreman","owner":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=3","gravatar_id":"","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/theforeman/foreman","description":"an application that automates the lifecycle of servers ","fork":false,"url":"https://api.github.com/repos/theforeman/foreman","forks_url":"https://api.github.com/repos/theforeman/foreman/forks","keys_url":"https://api.github.com/repos/theforeman/foreman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/theforeman/foreman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/theforeman/foreman/teams","hooks_url":"https://api.github.com/repos/theforeman/foreman/hooks","issue_events_url":"https://api.github.com/repos/theforeman/foreman/issues/events{/number}","events_url":"https://api.github.com/repos/theforeman/foreman/events","assignees_url":"https://api.github.com/repos/theforeman/foreman/assignees{/user}","branches_url":"https://api.github.com/repos/theforeman/foreman/branches{/branch}","tags_url":"https://api.github.com/repos/theforeman/foreman/tags","blobs_url":"https://api.github.com/repos/theforeman/foreman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/theforeman/foreman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/theforeman/foreman/git/refs{/sha}","trees_url":"https://api.github.com/repos/theforeman/foreman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/theforeman/foreman/statuses/{sha}","languages_url":"https://api.github.com/repos/theforeman/foreman/languages","stargazers_url":"https://api.github.com/repos/theforeman/foreman/stargazers","contributors_url":"https://api.github.com/repos/theforeman/foreman/contributors","subscribers_url":"https://api.github.com/repos/theforeman/foreman/subscribers","subscription_url":"https://api.github.com/repos/theforeman/foreman/subscription","commits_url":"https://api.github.com/repos/theforeman/foreman/commits{/sha}","git_commits_url":"https://api.github.com/repos/theforeman/foreman/git/commits{/sha}","comments_url":"https://api.github.com/repos/theforeman/foreman/comments{/number}","issue_comment_url":"https://api.github.com/repos/theforeman/foreman/issues/comments{/number}","contents_url":"https://api.github.com/repos/theforeman/foreman/contents/{+path}","compare_url":"https://api.github.com/repos/theforeman/foreman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/theforeman/foreman/merges","archive_url":"https://api.github.com/repos/theforeman/foreman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/theforeman/foreman/downloads","issues_url":"https://api.github.com/repos/theforeman/foreman/issues{/number}","pulls_url":"https://api.github.com/repos/theforeman/foreman/pulls{/number}","milestones_url":"https://api.github.com/repos/theforeman/foreman/milestones{/number}","notifications_url":"https://api.github.com/repos/theforeman/foreman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/theforeman/foreman/labels{/name}","releases_url":"https://api.github.com/repos/theforeman/foreman/releases{/id}","deployments_url":"https://api.github.com/repos/theforeman/foreman/deployments","created_at":"2009-07-23T15:07:00Z","updated_at":"2016-11-05T14:43:14Z","pushed_at":"2016-11-17T09:38:08Z","git_url":"git://github.com/theforeman/foreman.git","ssh_url":"git@github.com:theforeman/foreman.git","clone_url":"https://github.com/theforeman/foreman.git","svn_url":"https://github.com/theforeman/foreman","homepage":"http://theforeman.org","size":72969,"stargazers_count":1110,"watchers_count":1110,"language":"Ruby","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":566,"mirror_url":null,"open_issues_count":85,"forks":566,"open_issues":85,"watchers":1110,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/4026"},"html":{"href":"https://github.com/theforeman/foreman/pull/4026"},"issue":{"href":"https://api.github.com/repos/theforeman/foreman/issues/4026"},"comments":{"href":"https://api.github.com/repos/theforeman/foreman/issues/4026/comments"},"review_comments":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/4026/comments"},"review_comment":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/4026/commits"},"statuses":{"href":"https://api.github.com/repos/theforeman/foreman/statuses/3498ca69edfdc9e2f8375ac20dbdcc14b4fab5de"}}}}
{"actor":{"display_login":"timogoebel"}}