GitHub PullRequestReviewCommentEvent at 2014-10-28 18:24:25
Repository: rightscale_tag
Actor: douglaswth
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/pulls/comments/19492429","id":19492429,"diff_hunk":"@@ -453,6 +453,34 @@ def group_servers_by_application_name(servers)\n       Rightscale::RightscaleTag.group_servers_by_application_name(servers)\n     end\n \n+    # Determines if an IP address is a public IPv4 address based on RFC 1918.\n+    #\n+    # @param ipaddress [String] the IPv4 address to check\n+    #\n+    # @return [Boolean] whether the IP is a public IPv4 address or not\n+    #\n+    def self.is_public_ip?(ipaddress)\n+      require 'ipaddr'\n+\n+      ['10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16'].each do |private_block|\n+        IPAddr.new(private_block)\n+        return false if IPAddr.new(private_block).include?(ipaddress)\n+      end\n+      true","path":"libraries/rightscale_tag_helper.rb","position":17,"original_position":17,"commit_id":"6d669aa216ae2bfb98b099266f10f53321d0c35d","original_commit_id":"6d669aa216ae2bfb98b099266f10f53321d0c35d","user":{"login":"douglaswth","id":77890,"avatar_url":"https://avatars.githubusercontent.com/u/77890?v=2","gravatar_id":"","url":"https://api.github.com/users/douglaswth","html_url":"https://github.com/douglaswth","followers_url":"https://api.github.com/users/douglaswth/followers","following_url":"https://api.github.com/users/douglaswth/following{/other_user}","gists_url":"https://api.github.com/users/douglaswth/gists{/gist_id}","starred_url":"https://api.github.com/users/douglaswth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/douglaswth/subscriptions","organizations_url":"https://api.github.com/users/douglaswth/orgs","repos_url":"https://api.github.com/users/douglaswth/repos","events_url":"https://api.github.com/users/douglaswth/events{/privacy}","received_events_url":"https://api.github.com/users/douglaswth/received_events","type":"User","site_admin":false},"body":"Also, the [ipaddress](https://rubygems.org/gems/ipaddress) gem, which is already required by Ohai has a [`private?` method](https://github.com/bluemonk/ipaddress/blob/master/lib/ipaddress/ipv4.rb#L556-L570) which does the same thing.","created_at":"2014-10-28T18:24:25Z","updated_at":"2014-10-28T18:24:25Z","html_url":"https://github.com/rightscale-cookbooks/rightscale_tag/pull/15#discussion_r19492429","pull_request_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/pulls/comments/19492429"},"html":{"href":"https://github.com/rightscale-cookbooks/rightscale_tag/pull/15#discussion_r19492429"},"pull_request":{"href":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/pulls/15","id":23432756,"html_url":"https://github.com/rightscale-cookbooks/rightscale_tag/pull/15","diff_url":"https://github.com/rightscale-cookbooks/rightscale_tag/pull/15.diff","patch_url":"https://github.com/rightscale-cookbooks/rightscale_tag/pull/15.patch","issue_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/issues/15","number":15,"state":"open","locked":false,"title":"St 14 15 acu182511 validate ip before setting tag","user":{"login":"lopaka","id":820060,"avatar_url":"https://avatars.githubusercontent.com/u/820060?v=2","gravatar_id":"","url":"https://api.github.com/users/lopaka","html_url":"https://github.com/lopaka","followers_url":"https://api.github.com/users/lopaka/followers","following_url":"https://api.github.com/users/lopaka/following{/other_user}","gists_url":"https://api.github.com/users/lopaka/gists{/gist_id}","starred_url":"https://api.github.com/users/lopaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lopaka/subscriptions","organizations_url":"https://api.github.com/users/lopaka/orgs","repos_url":"https://api.github.com/users/lopaka/repos","events_url":"https://api.github.com/users/lopaka/events{/privacy}","received_events_url":"https://api.github.com/users/lopaka/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-10-28T03:40:39Z","updated_at":"2014-10-28T18:24:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b46040374a202f5de0b2441ca1ac754f09b54f8a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/pulls/15/commits","review_comments_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/pulls/15/comments","review_comment_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/pulls/comments/{number}","comments_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/issues/15/comments","statuses_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/statuses/6d669aa216ae2bfb98b099266f10f53321d0c35d","head":{"label":"rightscale-cookbooks:st_14_15_acu182511_validate_ip_before_setting_tag","ref":"st_14_15_acu182511_validate_ip_before_setting_tag","sha":"6d669aa216ae2bfb98b099266f10f53321d0c35d","user":{"login":"rightscale-cookbooks","id":4042499,"avatar_url":"https://avatars.githubusercontent.com/u/4042499?v=2","gravatar_id":"","url":"https://api.github.com/users/rightscale-cookbooks","html_url":"https://github.com/rightscale-cookbooks","followers_url":"https://api.github.com/users/rightscale-cookbooks/followers","following_url":"https://api.github.com/users/rightscale-cookbooks/following{/other_user}","gists_url":"https://api.github.com/users/rightscale-cookbooks/gists{/gist_id}","starred_url":"https://api.github.com/users/rightscale-cookbooks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rightscale-cookbooks/subscriptions","organizations_url":"https://api.github.com/users/rightscale-cookbooks/orgs","repos_url":"https://api.github.com/users/rightscale-cookbooks/repos","events_url":"https://api.github.com/users/rightscale-cookbooks/events{/privacy}","received_events_url":"https://api.github.com/users/rightscale-cookbooks/received_events","type":"Organization","site_admin":false},"repo":{"id":13395608,"name":"rightscale_tag","full_name":"rightscale-cookbooks/rightscale_tag","owner":{"login":"rightscale-cookbooks","id":4042499,"avatar_url":"https://avatars.githubusercontent.com/u/4042499?v=2","gravatar_id":"","url":"https://api.github.com/users/rightscale-cookbooks","html_url":"https://github.com/rightscale-cookbooks","followers_url":"https://api.github.com/users/rightscale-cookbooks/followers","following_url":"https://api.github.com/users/rightscale-cookbooks/following{/other_user}","gists_url":"https://api.github.com/users/rightscale-cookbooks/gists{/gist_id}","starred_url":"https://api.github.com/users/rightscale-cookbooks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rightscale-cookbooks/subscriptions","organizations_url":"https://api.github.com/users/rightscale-cookbooks/orgs","repos_url":"https://api.github.com/users/rightscale-cookbooks/repos","events_url":"https://api.github.com/users/rightscale-cookbooks/events{/privacy}","received_events_url":"https://api.github.com/users/rightscale-cookbooks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rightscale-cookbooks/rightscale_tag","description":"LWRPs and helper methods for building 3-tier applications using machine tags in RightScale","fork":false,"url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag","forks_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/forks","keys_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/teams","hooks_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/hooks","issue_events_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/issues/events{/number}","events_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/events","assignees_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/assignees{/user}","branches_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/branches{/branch}","tags_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/tags","blobs_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/git/refs{/sha}","trees_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/statuses/{sha}","languages_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/languages","stargazers_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/stargazers","contributors_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/contributors","subscribers_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/subscribers","subscription_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/subscription","commits_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/commits{/sha}","git_commits_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/git/commits{/sha}","comments_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/comments{/number}","issue_comment_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/issues/comments/{number}","contents_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/contents/{+path}","compare_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/merges","archive_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/downloads","issues_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/issues{/number}","pulls_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/pulls{/number}","milestones_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/milestones{/number}","notifications_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/labels{/name}","releases_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/releases{/id}","created_at":"2013-10-07T20:56:43Z","updated_at":"2014-10-09T18:28:32Z","pushed_at":"2014-10-28T03:39:57Z","git_url":"git://github.com/rightscale-cookbooks/rightscale_tag.git","ssh_url":"git@github.com:rightscale-cookbooks/rightscale_tag.git","clone_url":"https://github.com/rightscale-cookbooks/rightscale_tag.git","svn_url":"https://github.com/rightscale-cookbooks/rightscale_tag","homepage":"http://community.opscode.com/cookbooks/rightscale_tag","size":1115,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"rightscale-cookbooks:master","ref":"master","sha":"af0fa6f3cafd553f1d157c8624d3d0e652d5c8d1","user":{"login":"rightscale-cookbooks","id":4042499,"avatar_url":"https://avatars.githubusercontent.com/u/4042499?v=2","gravatar_id":"","url":"https://api.github.com/users/rightscale-cookbooks","html_url":"https://github.com/rightscale-cookbooks","followers_url":"https://api.github.com/users/rightscale-cookbooks/followers","following_url":"https://api.github.com/users/rightscale-cookbooks/following{/other_user}","gists_url":"https://api.github.com/users/rightscale-cookbooks/gists{/gist_id}","starred_url":"https://api.github.com/users/rightscale-cookbooks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rightscale-cookbooks/subscriptions","organizations_url":"https://api.github.com/users/rightscale-cookbooks/orgs","repos_url":"https://api.github.com/users/rightscale-cookbooks/repos","events_url":"https://api.github.com/users/rightscale-cookbooks/events{/privacy}","received_events_url":"https://api.github.com/users/rightscale-cookbooks/received_events","type":"Organization","site_admin":false},"repo":{"id":13395608,"name":"rightscale_tag","full_name":"rightscale-cookbooks/rightscale_tag","owner":{"login":"rightscale-cookbooks","id":4042499,"avatar_url":"https://avatars.githubusercontent.com/u/4042499?v=2","gravatar_id":"","url":"https://api.github.com/users/rightscale-cookbooks","html_url":"https://github.com/rightscale-cookbooks","followers_url":"https://api.github.com/users/rightscale-cookbooks/followers","following_url":"https://api.github.com/users/rightscale-cookbooks/following{/other_user}","gists_url":"https://api.github.com/users/rightscale-cookbooks/gists{/gist_id}","starred_url":"https://api.github.com/users/rightscale-cookbooks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rightscale-cookbooks/subscriptions","organizations_url":"https://api.github.com/users/rightscale-cookbooks/orgs","repos_url":"https://api.github.com/users/rightscale-cookbooks/repos","events_url":"https://api.github.com/users/rightscale-cookbooks/events{/privacy}","received_events_url":"https://api.github.com/users/rightscale-cookbooks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rightscale-cookbooks/rightscale_tag","description":"LWRPs and helper methods for building 3-tier applications using machine tags in RightScale","fork":false,"url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag","forks_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/forks","keys_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/teams","hooks_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/hooks","issue_events_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/issues/events{/number}","events_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/events","assignees_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/assignees{/user}","branches_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/branches{/branch}","tags_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/tags","blobs_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/git/refs{/sha}","trees_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/statuses/{sha}","languages_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/languages","stargazers_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/stargazers","contributors_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/contributors","subscribers_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/subscribers","subscription_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/subscription","commits_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/commits{/sha}","git_commits_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/git/commits{/sha}","comments_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/comments{/number}","issue_comment_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/issues/comments/{number}","contents_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/contents/{+path}","compare_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/merges","archive_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/downloads","issues_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/issues{/number}","pulls_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/pulls{/number}","milestones_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/milestones{/number}","notifications_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/labels{/name}","releases_url":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/releases{/id}","created_at":"2013-10-07T20:56:43Z","updated_at":"2014-10-09T18:28:32Z","pushed_at":"2014-10-28T03:39:57Z","git_url":"git://github.com/rightscale-cookbooks/rightscale_tag.git","ssh_url":"git@github.com:rightscale-cookbooks/rightscale_tag.git","clone_url":"https://github.com/rightscale-cookbooks/rightscale_tag.git","svn_url":"https://github.com/rightscale-cookbooks/rightscale_tag","homepage":"http://community.opscode.com/cookbooks/rightscale_tag","size":1115,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/pulls/15"},"html":{"href":"https://github.com/rightscale-cookbooks/rightscale_tag/pull/15"},"issue":{"href":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/issues/15"},"comments":{"href":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/rightscale-cookbooks/rightscale_tag/statuses/6d669aa216ae2bfb98b099266f10f53321d0c35d"}}}}