{"action":"created","comment":{"url":"https://api.github.com/repos/dLobatog/foreman/pulls/comments/46339537","id":46339537,"diff_hunk":"@@ -19,6 +19,7 @@\n     :operatingsystem_families => Operatingsystem.families.join(\", \"),\n     :providers => ComputeResource.providers.join(', '),\n     :default_nic_type => InterfaceTypeMapper::DEFAULT_TYPE.humanized_name.downcase,\n+    :template_kinds => -> { TemplateKind.scoped.map(&:name).join(\", \") },","path":"config/initializers/apipie.rb","position":4,"original_position":4,"commit_id":"6a04335e122606903426d168ef6f83949625a0a1","original_commit_id":"6a04335e122606903426d168ef6f83949625a0a1","user":{"login":"komidore64","id":1020555,"avatar_url":"https://avatars.githubusercontent.com/u/1020555?v=3","gravatar_id":"","url":"https://api.github.com/users/komidore64","html_url":"https://github.com/komidore64","followers_url":"https://api.github.com/users/komidore64/followers","following_url":"https://api.github.com/users/komidore64/following{/other_user}","gists_url":"https://api.github.com/users/komidore64/gists{/gist_id}","starred_url":"https://api.github.com/users/komidore64/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/komidore64/subscriptions","organizations_url":"https://api.github.com/users/komidore64/orgs","repos_url":"https://api.github.com/users/komidore64/repos","events_url":"https://api.github.com/users/komidore64/events{/privacy}","received_events_url":"https://api.github.com/users/komidore64/received_events","type":"User","site_admin":false},"body":"dlobatog/foreman#20","created_at":"2015-12-01T21:12:19Z","updated_at":"2015-12-01T21:12:19Z","html_url":"https://github.com/dLobatog/foreman/pull/18#discussion_r46339537","pull_request_url":"https://api.github.com/repos/dLobatog/foreman/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/dLobatog/foreman/pulls/comments/46339537"},"html":{"href":"https://github.com/dLobatog/foreman/pull/18#discussion_r46339537"},"pull_request":{"href":"https://api.github.com/repos/dLobatog/foreman/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/dLobatog/foreman/pulls/18","id":49664160,"html_url":"https://github.com/dLobatog/foreman/pull/18","diff_url":"https://github.com/dLobatog/foreman/pull/18.diff","patch_url":"https://github.com/dLobatog/foreman/pull/18.patch","issue_url":"https://api.github.com/repos/dLobatog/foreman/issues/18","number":18,"state":"open","locked":false,"title":"Fixes #7230, #12021 - Upgrade to Rails 4.1.5","user":{"login":"dLobatog","id":598891,"avatar_url":"https://avatars.githubusercontent.com/u/598891?v=3","gravatar_id":"","url":"https://api.github.com/users/dLobatog","html_url":"https://github.com/dLobatog","followers_url":"https://api.github.com/users/dLobatog/followers","following_url":"https://api.github.com/users/dLobatog/following{/other_user}","gists_url":"https://api.github.com/users/dLobatog/gists{/gist_id}","starred_url":"https://api.github.com/users/dLobatog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dLobatog/subscriptions","organizations_url":"https://api.github.com/users/dLobatog/orgs","repos_url":"https://api.github.com/users/dLobatog/repos","events_url":"https://api.github.com/users/dLobatog/events{/privacy}","received_events_url":"https://api.github.com/users/dLobatog/received_events","type":"User","site_admin":false},"body":"This commits upgrades Rails to Rails 4.1.5. See a description of the\r\nchanges included here, and go to the pull request in GitHub to see more\r\ndetailed explanations:\r\n\r\n* Update gems to a Rails 4 compatible version, including dependencies\r\n* Fix counter cache columns\r\n* Remove conditions, order, limit from has_many relations\r\n* Remove test runner\r\n    On minitest 5, the runner API was deprecated, so our custom test\r\n    runner is no longer working.\r\n\r\n* Remove useless add_index on lookup_values match\r\n    An index is added previously on lookup_values :priority, and on Rails 4\r\n    rename_column changes 'priority' to 'match' already changes the name of\r\n    the index.\r\n\r\n* Alias assert_include to assert_includes.\r\n* Expire topbar cache\r\n* Subclass ApplicationMailer in test to avoid 'missing template' error\r\n* Fixes #12021 - Use .to_param to find parent object in LookupKeys controller\r\n    On Rails 4, .find will not default to .friendly.find so find_hostgroup,\r\n    find_environment and find_host will fail for non numeric IDs. However, we can\r\n    use from_param to find these objects. This is something we can do both on\r\n    Rails 3 and Rails 4, whereas using .friendly isn't an option until friendly_id\r\n     5.0, which depends on Rails 4.\r\n\r\n* Use explicit friendly ID search.\r\n* find_common finder uses from_param -> friendly -> find\r\n    The finder needed to be refactored because with the new Friendly ID we\r\n    have to use .friendly explicitely. It currently follows the strategy of\r\n    searching like this:\r\n      - from_param -> .friendly -> regular find\r\n\r\n* Remove RecordNotFound errors from parameterizable in rails 4\r\n* Protect attributes using attr_accessible and protected_attributes\r\n* url_for doesn't append port when protocol is specified\r\n    Some of our tests are checking if port 80 or 443 is included in the URL\r\n    generated by lib/foreman/renderer.rb. However url_for has changed in\r\n    Rails 4 and now it does not append the port even if explicitly added.\r\n\r\n    If the protocol is specified, as it is in this case, then the url\r\n    generated will just have the protocol (http or https) but not the port\r\n    (80 or 443)\r\n\r\n* Validate object instead of _id column in join tables\r\n    On Rails 4 such validations will fail when we try to create objects\r\n    without explicitely assigning the id.\r\n    Puppetclass.new(:config_group => config_group) would fail even for a\r\n    valid config group, :config_group_id => config_group.id should be used\r\n    instead.\r\n\r\n    To avoid that, we validate the object, not the ID column\r\n\r\n* Rails 4 non backwards compatible syntax changes\r\n    Changes that have to deal with how some of the internal Rails objects\r\n    need a new syntax, like generating routes, exceptions, form builders.\r\n    None of these are Rails 3 compatible.\r\n\r\n* Fixes #12199 - rails 4 migration errors\r\n    There are actually two parts to the issue of not being able to migrate\r\n    with this branch. The first is\r\n    https://gist.github.com/eLobato/0f5db50b5c93cc6c277c and can be\r\n    temporarily fixed with rails/sass-rails#136 (comment) I am not sure of a\r\n    long term fix for that atm.\r\n\r\n    Once that is patched, this error\r\n    https://gist.github.com/johnpmitsch/96e5ba3629890931193a happens on a\r\n    migration. This will fix that error by changing the Migrator class\r\n    initializer arguments which have changed from rails 3 to rails 4\r\n\r\n* Refactor fact value test to not modify user_roles directly\r\n* Return external usergroupsas an array\r\n* Use eager_load to preload associations to be used in where","created_at":"2015-11-04T09:17:48Z","updated_at":"2015-12-01T21:12:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dLobatog/foreman/pulls/18/commits","review_comments_url":"https://api.github.com/repos/dLobatog/foreman/pulls/18/comments","review_comment_url":"https://api.github.com/repos/dLobatog/foreman/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dLobatog/foreman/issues/18/comments","statuses_url":"https://api.github.com/repos/dLobatog/foreman/statuses/6a04335e122606903426d168ef6f83949625a0a1","head":{"label":"dLobatog:rails4","ref":"rails4","sha":"6a04335e122606903426d168ef6f83949625a0a1","user":{"login":"dLobatog","id":598891,"avatar_url":"https://avatars.githubusercontent.com/u/598891?v=3","gravatar_id":"","url":"https://api.github.com/users/dLobatog","html_url":"https://github.com/dLobatog","followers_url":"https://api.github.com/users/dLobatog/followers","following_url":"https://api.github.com/users/dLobatog/following{/other_user}","gists_url":"https://api.github.com/users/dLobatog/gists{/gist_id}","starred_url":"https://api.github.com/users/dLobatog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dLobatog/subscriptions","organizations_url":"https://api.github.com/users/dLobatog/orgs","repos_url":"https://api.github.com/users/dLobatog/repos","events_url":"https://api.github.com/users/dLobatog/events{/privacy}","received_events_url":"https://api.github.com/users/dLobatog/received_events","type":"User","site_admin":false},"repo":{"id":5842097,"name":"foreman","full_name":"dLobatog/foreman","owner":{"login":"dLobatog","id":598891,"avatar_url":"https://avatars.githubusercontent.com/u/598891?v=3","gravatar_id":"","url":"https://api.github.com/users/dLobatog","html_url":"https://github.com/dLobatog","followers_url":"https://api.github.com/users/dLobatog/followers","following_url":"https://api.github.com/users/dLobatog/following{/other_user}","gists_url":"https://api.github.com/users/dLobatog/gists{/gist_id}","starred_url":"https://api.github.com/users/dLobatog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dLobatog/subscriptions","organizations_url":"https://api.github.com/users/dLobatog/orgs","repos_url":"https://api.github.com/users/dLobatog/repos","events_url":"https://api.github.com/users/dLobatog/events{/privacy}","received_events_url":"https://api.github.com/users/dLobatog/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dLobatog/foreman","description":"an application that automates the lifecycle of servers ","fork":true,"url":"https://api.github.com/repos/dLobatog/foreman","forks_url":"https://api.github.com/repos/dLobatog/foreman/forks","keys_url":"https://api.github.com/repos/dLobatog/foreman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dLobatog/foreman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dLobatog/foreman/teams","hooks_url":"https://api.github.com/repos/dLobatog/foreman/hooks","issue_events_url":"https://api.github.com/repos/dLobatog/foreman/issues/events{/number}","events_url":"https://api.github.com/repos/dLobatog/foreman/events","assignees_url":"https://api.github.com/repos/dLobatog/foreman/assignees{/user}","branches_url":"https://api.github.com/repos/dLobatog/foreman/branches{/branch}","tags_url":"https://api.github.com/repos/dLobatog/foreman/tags","blobs_url":"https://api.github.com/repos/dLobatog/foreman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dLobatog/foreman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dLobatog/foreman/git/refs{/sha}","trees_url":"https://api.github.com/repos/dLobatog/foreman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dLobatog/foreman/statuses/{sha}","languages_url":"https://api.github.com/repos/dLobatog/foreman/languages","stargazers_url":"https://api.github.com/repos/dLobatog/foreman/stargazers","contributors_url":"https://api.github.com/repos/dLobatog/foreman/contributors","subscribers_url":"https://api.github.com/repos/dLobatog/foreman/subscribers","subscription_url":"https://api.github.com/repos/dLobatog/foreman/subscription","commits_url":"https://api.github.com/repos/dLobatog/foreman/commits{/sha}","git_commits_url":"https://api.github.com/repos/dLobatog/foreman/git/commits{/sha}","comments_url":"https://api.github.com/repos/dLobatog/foreman/comments{/number}","issue_comment_url":"https://api.github.com/repos/dLobatog/foreman/issues/comments{/number}","contents_url":"https://api.github.com/repos/dLobatog/foreman/contents/{+path}","compare_url":"https://api.github.com/repos/dLobatog/foreman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dLobatog/foreman/merges","archive_url":"https://api.github.com/repos/dLobatog/foreman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dLobatog/foreman/downloads","issues_url":"https://api.github.com/repos/dLobatog/foreman/issues{/number}","pulls_url":"https://api.github.com/repos/dLobatog/foreman/pulls{/number}","milestones_url":"https://api.github.com/repos/dLobatog/foreman/milestones{/number}","notifications_url":"https://api.github.com/repos/dLobatog/foreman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dLobatog/foreman/labels{/name}","releases_url":"https://api.github.com/repos/dLobatog/foreman/releases{/id}","created_at":"2012-09-17T14:23:49Z","updated_at":"2015-05-06T16:17:15Z","pushed_at":"2015-12-01T21:11:07Z","git_url":"git://github.com/dLobatog/foreman.git","ssh_url":"git@github.com:dLobatog/foreman.git","clone_url":"https://github.com/dLobatog/foreman.git","svn_url":"https://github.com/dLobatog/foreman","homepage":"http://theforeman.org","size":33087,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":1,"default_branch":"develop"}},"base":{"label":"dLobatog:rails4_from_scratch","ref":"rails4_from_scratch","sha":"041148d8cd9323a4f2bf762fe01bf419bbb0f212","user":{"login":"dLobatog","id":598891,"avatar_url":"https://avatars.githubusercontent.com/u/598891?v=3","gravatar_id":"","url":"https://api.github.com/users/dLobatog","html_url":"https://github.com/dLobatog","followers_url":"https://api.github.com/users/dLobatog/followers","following_url":"https://api.github.com/users/dLobatog/following{/other_user}","gists_url":"https://api.github.com/users/dLobatog/gists{/gist_id}","starred_url":"https://api.github.com/users/dLobatog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dLobatog/subscriptions","organizations_url":"https://api.github.com/users/dLobatog/orgs","repos_url":"https://api.github.com/users/dLobatog/repos","events_url":"https://api.github.com/users/dLobatog/events{/privacy}","received_events_url":"https://api.github.com/users/dLobatog/received_events","type":"User","site_admin":false},"repo":{"id":5842097,"name":"foreman","full_name":"dLobatog/foreman","owner":{"login":"dLobatog","id":598891,"avatar_url":"https://avatars.githubusercontent.com/u/598891?v=3","gravatar_id":"","url":"https://api.github.com/users/dLobatog","html_url":"https://github.com/dLobatog","followers_url":"https://api.github.com/users/dLobatog/followers","following_url":"https://api.github.com/users/dLobatog/following{/other_user}","gists_url":"https://api.github.com/users/dLobatog/gists{/gist_id}","starred_url":"https://api.github.com/users/dLobatog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dLobatog/subscriptions","organizations_url":"https://api.github.com/users/dLobatog/orgs","repos_url":"https://api.github.com/users/dLobatog/repos","events_url":"https://api.github.com/users/dLobatog/events{/privacy}","received_events_url":"https://api.github.com/users/dLobatog/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dLobatog/foreman","description":"an application that automates the lifecycle of servers ","fork":true,"url":"https://api.github.com/repos/dLobatog/foreman","forks_url":"https://api.github.com/repos/dLobatog/foreman/forks","keys_url":"https://api.github.com/repos/dLobatog/foreman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dLobatog/foreman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dLobatog/foreman/teams","hooks_url":"https://api.github.com/repos/dLobatog/foreman/hooks","issue_events_url":"https://api.github.com/repos/dLobatog/foreman/issues/events{/number}","events_url":"https://api.github.com/repos/dLobatog/foreman/events","assignees_url":"https://api.github.com/repos/dLobatog/foreman/assignees{/user}","branches_url":"https://api.github.com/repos/dLobatog/foreman/branches{/branch}","tags_url":"https://api.github.com/repos/dLobatog/foreman/tags","blobs_url":"https://api.github.com/repos/dLobatog/foreman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dLobatog/foreman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dLobatog/foreman/git/refs{/sha}","trees_url":"https://api.github.com/repos/dLobatog/foreman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dLobatog/foreman/statuses/{sha}","languages_url":"https://api.github.com/repos/dLobatog/foreman/languages","stargazers_url":"https://api.github.com/repos/dLobatog/foreman/stargazers","contributors_url":"https://api.github.com/repos/dLobatog/foreman/contributors","subscribers_url":"https://api.github.com/repos/dLobatog/foreman/subscribers","subscription_url":"https://api.github.com/repos/dLobatog/foreman/subscription","commits_url":"https://api.github.com/repos/dLobatog/foreman/commits{/sha}","git_commits_url":"https://api.github.com/repos/dLobatog/foreman/git/commits{/sha}","comments_url":"https://api.github.com/repos/dLobatog/foreman/comments{/number}","issue_comment_url":"https://api.github.com/repos/dLobatog/foreman/issues/comments{/number}","contents_url":"https://api.github.com/repos/dLobatog/foreman/contents/{+path}","compare_url":"https://api.github.com/repos/dLobatog/foreman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dLobatog/foreman/merges","archive_url":"https://api.github.com/repos/dLobatog/foreman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dLobatog/foreman/downloads","issues_url":"https://api.github.com/repos/dLobatog/foreman/issues{/number}","pulls_url":"https://api.github.com/repos/dLobatog/foreman/pulls{/number}","milestones_url":"https://api.github.com/repos/dLobatog/foreman/milestones{/number}","notifications_url":"https://api.github.com/repos/dLobatog/foreman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dLobatog/foreman/labels{/name}","releases_url":"https://api.github.com/repos/dLobatog/foreman/releases{/id}","created_at":"2012-09-17T14:23:49Z","updated_at":"2015-05-06T16:17:15Z","pushed_at":"2015-12-01T21:11:07Z","git_url":"git://github.com/dLobatog/foreman.git","ssh_url":"git@github.com:dLobatog/foreman.git","clone_url":"https://github.com/dLobatog/foreman.git","svn_url":"https://github.com/dLobatog/foreman","homepage":"http://theforeman.org","size":33087,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/dLobatog/foreman/pulls/18"},"html":{"href":"https://github.com/dLobatog/foreman/pull/18"},"issue":{"href":"https://api.github.com/repos/dLobatog/foreman/issues/18"},"comments":{"href":"https://api.github.com/repos/dLobatog/foreman/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/dLobatog/foreman/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/dLobatog/foreman/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dLobatog/foreman/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/dLobatog/foreman/statuses/6a04335e122606903426d168ef6f83949625a0a1"}}}}