{"action":"created","comment":{"url":"https://api.github.com/repos/ManageIQ/linux_admin/pulls/comments/42249646","id":42249646,"diff_hunk":"@@ -38,6 +38,20 @@ def update_entry(address, hostname, comment = nil)\n       end\n     end\n \n+    # Updates the IP address associated with the entry specified by the hostname\n+    # or inserts a new row in the file if there is no entry for that name\n+    #\n+    # @param hostname [String] the hostname used to find the record to update\n+    # @param ip [String] the new address to use for the record\n+    def update_ip_for_hostname(host, ip)\n+      line_num = @parsed_file.find_path(host).first\n+      if line_num.nil?","path":"lib/linux_admin/hosts.rb","position":11,"original_position":11,"commit_id":"dc1216eb3db35fb5f37bffeb109deeac240c99e1","original_commit_id":"dc1216eb3db35fb5f37bffeb109deeac240c99e1","user":{"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},"body":"Prefer the positive case `if line_num`","created_at":"2015-10-16T14:39:28Z","updated_at":"2015-10-16T14:39:28Z","html_url":"https://github.com/ManageIQ/linux_admin/pull/134#discussion_r42249646","pull_request_url":"https://api.github.com/repos/ManageIQ/linux_admin/pulls/134","_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/linux_admin/pulls/comments/42249646"},"html":{"href":"https://github.com/ManageIQ/linux_admin/pull/134#discussion_r42249646"},"pull_request":{"href":"https://api.github.com/repos/ManageIQ/linux_admin/pulls/134"}}},"pull_request":{"url":"https://api.github.com/repos/ManageIQ/linux_admin/pulls/134","id":47915351,"html_url":"https://github.com/ManageIQ/linux_admin/pull/134","diff_url":"https://github.com/ManageIQ/linux_admin/pull/134.diff","patch_url":"https://github.com/ManageIQ/linux_admin/pull/134.patch","issue_url":"https://api.github.com/repos/ManageIQ/linux_admin/issues/134","number":134,"state":"open","locked":false,"title":"Added method to update the IP address for a particular hostname","user":{"login":"carbonin","id":12697904,"avatar_url":"https://avatars.githubusercontent.com/u/12697904?v=3","gravatar_id":"","url":"https://api.github.com/users/carbonin","html_url":"https://github.com/carbonin","followers_url":"https://api.github.com/users/carbonin/followers","following_url":"https://api.github.com/users/carbonin/following{/other_user}","gists_url":"https://api.github.com/users/carbonin/gists{/gist_id}","starred_url":"https://api.github.com/users/carbonin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carbonin/subscriptions","organizations_url":"https://api.github.com/users/carbonin/orgs","repos_url":"https://api.github.com/users/carbonin/repos","events_url":"https://api.github.com/users/carbonin/events{/privacy}","received_events_url":"https://api.github.com/users/carbonin/received_events","type":"User","site_admin":false},"body":"@bdunne Please review\r\nhttps://trello.com/c/rWKh4KQs","created_at":"2015-10-16T14:12:58Z","updated_at":"2015-10-16T14:39:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9d48b7d1f00787448641e17af2ade7d0f04f4c29","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ManageIQ/linux_admin/pulls/134/commits","review_comments_url":"https://api.github.com/repos/ManageIQ/linux_admin/pulls/134/comments","review_comment_url":"https://api.github.com/repos/ManageIQ/linux_admin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ManageIQ/linux_admin/issues/134/comments","statuses_url":"https://api.github.com/repos/ManageIQ/linux_admin/statuses/dc1216eb3db35fb5f37bffeb109deeac240c99e1","head":{"label":"carbonin:add_update_ip_for_hostname_to_hosts","ref":"add_update_ip_for_hostname_to_hosts","sha":"dc1216eb3db35fb5f37bffeb109deeac240c99e1","user":{"login":"carbonin","id":12697904,"avatar_url":"https://avatars.githubusercontent.com/u/12697904?v=3","gravatar_id":"","url":"https://api.github.com/users/carbonin","html_url":"https://github.com/carbonin","followers_url":"https://api.github.com/users/carbonin/followers","following_url":"https://api.github.com/users/carbonin/following{/other_user}","gists_url":"https://api.github.com/users/carbonin/gists{/gist_id}","starred_url":"https://api.github.com/users/carbonin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carbonin/subscriptions","organizations_url":"https://api.github.com/users/carbonin/orgs","repos_url":"https://api.github.com/users/carbonin/repos","events_url":"https://api.github.com/users/carbonin/events{/privacy}","received_events_url":"https://api.github.com/users/carbonin/received_events","type":"User","site_admin":false},"repo":{"id":39075654,"name":"linux_admin","full_name":"carbonin/linux_admin","owner":{"login":"carbonin","id":12697904,"avatar_url":"https://avatars.githubusercontent.com/u/12697904?v=3","gravatar_id":"","url":"https://api.github.com/users/carbonin","html_url":"https://github.com/carbonin","followers_url":"https://api.github.com/users/carbonin/followers","following_url":"https://api.github.com/users/carbonin/following{/other_user}","gists_url":"https://api.github.com/users/carbonin/gists{/gist_id}","starred_url":"https://api.github.com/users/carbonin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carbonin/subscriptions","organizations_url":"https://api.github.com/users/carbonin/orgs","repos_url":"https://api.github.com/users/carbonin/repos","events_url":"https://api.github.com/users/carbonin/events{/privacy}","received_events_url":"https://api.github.com/users/carbonin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/carbonin/linux_admin","description":"LinuxAdmin is a module to simplify management of linux systems.","fork":true,"url":"https://api.github.com/repos/carbonin/linux_admin","forks_url":"https://api.github.com/repos/carbonin/linux_admin/forks","keys_url":"https://api.github.com/repos/carbonin/linux_admin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/carbonin/linux_admin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/carbonin/linux_admin/teams","hooks_url":"https://api.github.com/repos/carbonin/linux_admin/hooks","issue_events_url":"https://api.github.com/repos/carbonin/linux_admin/issues/events{/number}","events_url":"https://api.github.com/repos/carbonin/linux_admin/events","assignees_url":"https://api.github.com/repos/carbonin/linux_admin/assignees{/user}","branches_url":"https://api.github.com/repos/carbonin/linux_admin/branches{/branch}","tags_url":"https://api.github.com/repos/carbonin/linux_admin/tags","blobs_url":"https://api.github.com/repos/carbonin/linux_admin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/carbonin/linux_admin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/carbonin/linux_admin/git/refs{/sha}","trees_url":"https://api.github.com/repos/carbonin/linux_admin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/carbonin/linux_admin/statuses/{sha}","languages_url":"https://api.github.com/repos/carbonin/linux_admin/languages","stargazers_url":"https://api.github.com/repos/carbonin/linux_admin/stargazers","contributors_url":"https://api.github.com/repos/carbonin/linux_admin/contributors","subscribers_url":"https://api.github.com/repos/carbonin/linux_admin/subscribers","subscription_url":"https://api.github.com/repos/carbonin/linux_admin/subscription","commits_url":"https://api.github.com/repos/carbonin/linux_admin/commits{/sha}","git_commits_url":"https://api.github.com/repos/carbonin/linux_admin/git/commits{/sha}","comments_url":"https://api.github.com/repos/carbonin/linux_admin/comments{/number}","issue_comment_url":"https://api.github.com/repos/carbonin/linux_admin/issues/comments{/number}","contents_url":"https://api.github.com/repos/carbonin/linux_admin/contents/{+path}","compare_url":"https://api.github.com/repos/carbonin/linux_admin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/carbonin/linux_admin/merges","archive_url":"https://api.github.com/repos/carbonin/linux_admin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/carbonin/linux_admin/downloads","issues_url":"https://api.github.com/repos/carbonin/linux_admin/issues{/number}","pulls_url":"https://api.github.com/repos/carbonin/linux_admin/pulls{/number}","milestones_url":"https://api.github.com/repos/carbonin/linux_admin/milestones{/number}","notifications_url":"https://api.github.com/repos/carbonin/linux_admin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/carbonin/linux_admin/labels{/name}","releases_url":"https://api.github.com/repos/carbonin/linux_admin/releases{/id}","created_at":"2015-07-14T13:13:33Z","updated_at":"2015-07-14T13:13:33Z","pushed_at":"2015-10-16T14:09:08Z","git_url":"git://github.com/carbonin/linux_admin.git","ssh_url":"git@github.com:carbonin/linux_admin.git","clone_url":"https://github.com/carbonin/linux_admin.git","svn_url":"https://github.com/carbonin/linux_admin","homepage":null,"size":552,"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":"759b09ab01f0a9d63903e2cb863ec81971675ad2","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":9753961,"name":"linux_admin","full_name":"ManageIQ/linux_admin","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/linux_admin","description":"LinuxAdmin is a module to simplify management of linux systems.","fork":false,"url":"https://api.github.com/repos/ManageIQ/linux_admin","forks_url":"https://api.github.com/repos/ManageIQ/linux_admin/forks","keys_url":"https://api.github.com/repos/ManageIQ/linux_admin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ManageIQ/linux_admin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ManageIQ/linux_admin/teams","hooks_url":"https://api.github.com/repos/ManageIQ/linux_admin/hooks","issue_events_url":"https://api.github.com/repos/ManageIQ/linux_admin/issues/events{/number}","events_url":"https://api.github.com/repos/ManageIQ/linux_admin/events","assignees_url":"https://api.github.com/repos/ManageIQ/linux_admin/assignees{/user}","branches_url":"https://api.github.com/repos/ManageIQ/linux_admin/branches{/branch}","tags_url":"https://api.github.com/repos/ManageIQ/linux_admin/tags","blobs_url":"https://api.github.com/repos/ManageIQ/linux_admin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ManageIQ/linux_admin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ManageIQ/linux_admin/git/refs{/sha}","trees_url":"https://api.github.com/repos/ManageIQ/linux_admin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ManageIQ/linux_admin/statuses/{sha}","languages_url":"https://api.github.com/repos/ManageIQ/linux_admin/languages","stargazers_url":"https://api.github.com/repos/ManageIQ/linux_admin/stargazers","contributors_url":"https://api.github.com/repos/ManageIQ/linux_admin/contributors","subscribers_url":"https://api.github.com/repos/ManageIQ/linux_admin/subscribers","subscription_url":"https://api.github.com/repos/ManageIQ/linux_admin/subscription","commits_url":"https://api.github.com/repos/ManageIQ/linux_admin/commits{/sha}","git_commits_url":"https://api.github.com/repos/ManageIQ/linux_admin/git/commits{/sha}","comments_url":"https://api.github.com/repos/ManageIQ/linux_admin/comments{/number}","issue_comment_url":"https://api.github.com/repos/ManageIQ/linux_admin/issues/comments{/number}","contents_url":"https://api.github.com/repos/ManageIQ/linux_admin/contents/{+path}","compare_url":"https://api.github.com/repos/ManageIQ/linux_admin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ManageIQ/linux_admin/merges","archive_url":"https://api.github.com/repos/ManageIQ/linux_admin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ManageIQ/linux_admin/downloads","issues_url":"https://api.github.com/repos/ManageIQ/linux_admin/issues{/number}","pulls_url":"https://api.github.com/repos/ManageIQ/linux_admin/pulls{/number}","milestones_url":"https://api.github.com/repos/ManageIQ/linux_admin/milestones{/number}","notifications_url":"https://api.github.com/repos/ManageIQ/linux_admin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ManageIQ/linux_admin/labels{/name}","releases_url":"https://api.github.com/repos/ManageIQ/linux_admin/releases{/id}","created_at":"2013-04-29T17:36:58Z","updated_at":"2015-10-13T19:12:16Z","pushed_at":"2015-10-16T14:12:58Z","git_url":"git://github.com/ManageIQ/linux_admin.git","ssh_url":"git@github.com:ManageIQ/linux_admin.git","clone_url":"https://github.com/ManageIQ/linux_admin.git","svn_url":"https://github.com/ManageIQ/linux_admin","homepage":null,"size":1473,"stargazers_count":14,"watchers_count":14,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":9,"forks":11,"open_issues":9,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/linux_admin/pulls/134"},"html":{"href":"https://github.com/ManageIQ/linux_admin/pull/134"},"issue":{"href":"https://api.github.com/repos/ManageIQ/linux_admin/issues/134"},"comments":{"href":"https://api.github.com/repos/ManageIQ/linux_admin/issues/134/comments"},"review_comments":{"href":"https://api.github.com/repos/ManageIQ/linux_admin/pulls/134/comments"},"review_comment":{"href":"https://api.github.com/repos/ManageIQ/linux_admin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ManageIQ/linux_admin/pulls/134/commits"},"statuses":{"href":"https://api.github.com/repos/ManageIQ/linux_admin/statuses/dc1216eb3db35fb5f37bffeb109deeac240c99e1"}}}}