{"action":"created","comment":{"url":"https://api.github.com/repos/rapid7/nexpose-client/pulls/comments/59313310","id":59313310,"diff_hunk":"@@ -50,7 +50,7 @@ module HostOrIP\n     # @return [IPRange|HostName] Valid class, if it can be converted.\n     #\n     def convert(asset)\n-      ips = asset.split(' - ')\n+      ips = asset.split('-').map(&:strip)","path":"lib/nexpose/util.rb","position":5,"original_position":5,"commit_id":"87d005589a7cd7944862ee7fc02f2d1140f64666","original_commit_id":"87d005589a7cd7944862ee7fc02f2d1140f64666","user":{"login":"gschneider-r7","id":4418817,"avatar_url":"https://avatars.githubusercontent.com/u/4418817?v=3","gravatar_id":"","url":"https://api.github.com/users/gschneider-r7","html_url":"https://github.com/gschneider-r7","followers_url":"https://api.github.com/users/gschneider-r7/followers","following_url":"https://api.github.com/users/gschneider-r7/following{/other_user}","gists_url":"https://api.github.com/users/gschneider-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/gschneider-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gschneider-r7/subscriptions","organizations_url":"https://api.github.com/users/gschneider-r7/orgs","repos_url":"https://api.github.com/users/gschneider-r7/repos","events_url":"https://api.github.com/users/gschneider-r7/events{/privacy}","received_events_url":"https://api.github.com/users/gschneider-r7/received_events","type":"User","site_admin":false},"body":"I guess we could just to throw a different error. I think this can only fail if the `asset` input is nil, which is true today anyway.","created_at":"2016-04-12T02:28:35Z","updated_at":"2016-04-12T02:28:35Z","html_url":"https://github.com/rapid7/nexpose-client/pull/214#discussion_r59313310","pull_request_url":"https://api.github.com/repos/rapid7/nexpose-client/pulls/214","_links":{"self":{"href":"https://api.github.com/repos/rapid7/nexpose-client/pulls/comments/59313310"},"html":{"href":"https://github.com/rapid7/nexpose-client/pull/214#discussion_r59313310"},"pull_request":{"href":"https://api.github.com/repos/rapid7/nexpose-client/pulls/214"}}},"pull_request":{"url":"https://api.github.com/repos/rapid7/nexpose-client/pulls/214","id":65723921,"html_url":"https://github.com/rapid7/nexpose-client/pull/214","diff_url":"https://github.com/rapid7/nexpose-client/pull/214.diff","patch_url":"https://github.com/rapid7/nexpose-client/pull/214.patch","issue_url":"https://api.github.com/repos/rapid7/nexpose-client/issues/214","number":214,"state":"open","locked":false,"title":"Make HostOrIP#convert more flexible on IP address range input","user":{"login":"gschneider-r7","id":4418817,"avatar_url":"https://avatars.githubusercontent.com/u/4418817?v=3","gravatar_id":"","url":"https://api.github.com/users/gschneider-r7","html_url":"https://github.com/gschneider-r7","followers_url":"https://api.github.com/users/gschneider-r7/followers","following_url":"https://api.github.com/users/gschneider-r7/following{/other_user}","gists_url":"https://api.github.com/users/gschneider-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/gschneider-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gschneider-r7/subscriptions","organizations_url":"https://api.github.com/users/gschneider-r7/orgs","repos_url":"https://api.github.com/users/gschneider-r7/repos","events_url":"https://api.github.com/users/gschneider-r7/events{/privacy}","received_events_url":"https://api.github.com/users/gschneider-r7/received_events","type":"User","site_admin":false},"body":"Had discussions with 2 different people today where this change would be very useful to them, so figured I'd throw it in here so they don't have to do it in their own scripts.\r\n\r\nAs you can see in the new tests, IP ranges are now converted with or without whitespace. As long as there is a hyphen (`-`) it should correctly make a range regardless of whitespace.","created_at":"2016-04-08T01:09:55Z","updated_at":"2016-04-12T02:28:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"effceccb200b5a33106f4187d63f32236e13b880","assignee":{"login":"sgreen-r7","id":10285110,"avatar_url":"https://avatars.githubusercontent.com/u/10285110?v=3","gravatar_id":"","url":"https://api.github.com/users/sgreen-r7","html_url":"https://github.com/sgreen-r7","followers_url":"https://api.github.com/users/sgreen-r7/followers","following_url":"https://api.github.com/users/sgreen-r7/following{/other_user}","gists_url":"https://api.github.com/users/sgreen-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/sgreen-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgreen-r7/subscriptions","organizations_url":"https://api.github.com/users/sgreen-r7/orgs","repos_url":"https://api.github.com/users/sgreen-r7/repos","events_url":"https://api.github.com/users/sgreen-r7/events{/privacy}","received_events_url":"https://api.github.com/users/sgreen-r7/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/rapid7/nexpose-client/pulls/214/commits","review_comments_url":"https://api.github.com/repos/rapid7/nexpose-client/pulls/214/comments","review_comment_url":"https://api.github.com/repos/rapid7/nexpose-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rapid7/nexpose-client/issues/214/comments","statuses_url":"https://api.github.com/repos/rapid7/nexpose-client/statuses/87d005589a7cd7944862ee7fc02f2d1140f64666","head":{"label":"rapid7:enhance_host_or_ip","ref":"enhance_host_or_ip","sha":"87d005589a7cd7944862ee7fc02f2d1140f64666","user":{"login":"rapid7","id":1013671,"avatar_url":"https://avatars.githubusercontent.com/u/1013671?v=3","gravatar_id":"","url":"https://api.github.com/users/rapid7","html_url":"https://github.com/rapid7","followers_url":"https://api.github.com/users/rapid7/followers","following_url":"https://api.github.com/users/rapid7/following{/other_user}","gists_url":"https://api.github.com/users/rapid7/gists{/gist_id}","starred_url":"https://api.github.com/users/rapid7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rapid7/subscriptions","organizations_url":"https://api.github.com/users/rapid7/orgs","repos_url":"https://api.github.com/users/rapid7/repos","events_url":"https://api.github.com/users/rapid7/events{/privacy}","received_events_url":"https://api.github.com/users/rapid7/received_events","type":"Organization","site_admin":false},"repo":{"id":2622467,"name":"nexpose-client","full_name":"rapid7/nexpose-client","owner":{"login":"rapid7","id":1013671,"avatar_url":"https://avatars.githubusercontent.com/u/1013671?v=3","gravatar_id":"","url":"https://api.github.com/users/rapid7","html_url":"https://github.com/rapid7","followers_url":"https://api.github.com/users/rapid7/followers","following_url":"https://api.github.com/users/rapid7/following{/other_user}","gists_url":"https://api.github.com/users/rapid7/gists{/gist_id}","starred_url":"https://api.github.com/users/rapid7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rapid7/subscriptions","organizations_url":"https://api.github.com/users/rapid7/orgs","repos_url":"https://api.github.com/users/rapid7/repos","events_url":"https://api.github.com/users/rapid7/events{/privacy}","received_events_url":"https://api.github.com/users/rapid7/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rapid7/nexpose-client","description":"Rapid7 Nexpose API client library written in Ruby","fork":false,"url":"https://api.github.com/repos/rapid7/nexpose-client","forks_url":"https://api.github.com/repos/rapid7/nexpose-client/forks","keys_url":"https://api.github.com/repos/rapid7/nexpose-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rapid7/nexpose-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rapid7/nexpose-client/teams","hooks_url":"https://api.github.com/repos/rapid7/nexpose-client/hooks","issue_events_url":"https://api.github.com/repos/rapid7/nexpose-client/issues/events{/number}","events_url":"https://api.github.com/repos/rapid7/nexpose-client/events","assignees_url":"https://api.github.com/repos/rapid7/nexpose-client/assignees{/user}","branches_url":"https://api.github.com/repos/rapid7/nexpose-client/branches{/branch}","tags_url":"https://api.github.com/repos/rapid7/nexpose-client/tags","blobs_url":"https://api.github.com/repos/rapid7/nexpose-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rapid7/nexpose-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rapid7/nexpose-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/rapid7/nexpose-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rapid7/nexpose-client/statuses/{sha}","languages_url":"https://api.github.com/repos/rapid7/nexpose-client/languages","stargazers_url":"https://api.github.com/repos/rapid7/nexpose-client/stargazers","contributors_url":"https://api.github.com/repos/rapid7/nexpose-client/contributors","subscribers_url":"https://api.github.com/repos/rapid7/nexpose-client/subscribers","subscription_url":"https://api.github.com/repos/rapid7/nexpose-client/subscription","commits_url":"https://api.github.com/repos/rapid7/nexpose-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/rapid7/nexpose-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/rapid7/nexpose-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/rapid7/nexpose-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/rapid7/nexpose-client/contents/{+path}","compare_url":"https://api.github.com/repos/rapid7/nexpose-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rapid7/nexpose-client/merges","archive_url":"https://api.github.com/repos/rapid7/nexpose-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rapid7/nexpose-client/downloads","issues_url":"https://api.github.com/repos/rapid7/nexpose-client/issues{/number}","pulls_url":"https://api.github.com/repos/rapid7/nexpose-client/pulls{/number}","milestones_url":"https://api.github.com/repos/rapid7/nexpose-client/milestones{/number}","notifications_url":"https://api.github.com/repos/rapid7/nexpose-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rapid7/nexpose-client/labels{/name}","releases_url":"https://api.github.com/repos/rapid7/nexpose-client/releases{/id}","deployments_url":"https://api.github.com/repos/rapid7/nexpose-client/deployments","created_at":"2011-10-21T19:04:49Z","updated_at":"2016-04-02T22:32:54Z","pushed_at":"2016-04-08T03:47:07Z","git_url":"git://github.com/rapid7/nexpose-client.git","ssh_url":"git@github.com:rapid7/nexpose-client.git","clone_url":"https://github.com/rapid7/nexpose-client.git","svn_url":"https://github.com/rapid7/nexpose-client","homepage":"http://www.rapid7.com/","size":1584,"stargazers_count":96,"watchers_count":96,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":68,"mirror_url":null,"open_issues_count":8,"forks":68,"open_issues":8,"watchers":96,"default_branch":"master"}},"base":{"label":"rapid7:master","ref":"master","sha":"9308ca17f10375df8c1f81d57c08f63bf1961e39","user":{"login":"rapid7","id":1013671,"avatar_url":"https://avatars.githubusercontent.com/u/1013671?v=3","gravatar_id":"","url":"https://api.github.com/users/rapid7","html_url":"https://github.com/rapid7","followers_url":"https://api.github.com/users/rapid7/followers","following_url":"https://api.github.com/users/rapid7/following{/other_user}","gists_url":"https://api.github.com/users/rapid7/gists{/gist_id}","starred_url":"https://api.github.com/users/rapid7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rapid7/subscriptions","organizations_url":"https://api.github.com/users/rapid7/orgs","repos_url":"https://api.github.com/users/rapid7/repos","events_url":"https://api.github.com/users/rapid7/events{/privacy}","received_events_url":"https://api.github.com/users/rapid7/received_events","type":"Organization","site_admin":false},"repo":{"id":2622467,"name":"nexpose-client","full_name":"rapid7/nexpose-client","owner":{"login":"rapid7","id":1013671,"avatar_url":"https://avatars.githubusercontent.com/u/1013671?v=3","gravatar_id":"","url":"https://api.github.com/users/rapid7","html_url":"https://github.com/rapid7","followers_url":"https://api.github.com/users/rapid7/followers","following_url":"https://api.github.com/users/rapid7/following{/other_user}","gists_url":"https://api.github.com/users/rapid7/gists{/gist_id}","starred_url":"https://api.github.com/users/rapid7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rapid7/subscriptions","organizations_url":"https://api.github.com/users/rapid7/orgs","repos_url":"https://api.github.com/users/rapid7/repos","events_url":"https://api.github.com/users/rapid7/events{/privacy}","received_events_url":"https://api.github.com/users/rapid7/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rapid7/nexpose-client","description":"Rapid7 Nexpose API client library written in Ruby","fork":false,"url":"https://api.github.com/repos/rapid7/nexpose-client","forks_url":"https://api.github.com/repos/rapid7/nexpose-client/forks","keys_url":"https://api.github.com/repos/rapid7/nexpose-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rapid7/nexpose-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rapid7/nexpose-client/teams","hooks_url":"https://api.github.com/repos/rapid7/nexpose-client/hooks","issue_events_url":"https://api.github.com/repos/rapid7/nexpose-client/issues/events{/number}","events_url":"https://api.github.com/repos/rapid7/nexpose-client/events","assignees_url":"https://api.github.com/repos/rapid7/nexpose-client/assignees{/user}","branches_url":"https://api.github.com/repos/rapid7/nexpose-client/branches{/branch}","tags_url":"https://api.github.com/repos/rapid7/nexpose-client/tags","blobs_url":"https://api.github.com/repos/rapid7/nexpose-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rapid7/nexpose-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rapid7/nexpose-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/rapid7/nexpose-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rapid7/nexpose-client/statuses/{sha}","languages_url":"https://api.github.com/repos/rapid7/nexpose-client/languages","stargazers_url":"https://api.github.com/repos/rapid7/nexpose-client/stargazers","contributors_url":"https://api.github.com/repos/rapid7/nexpose-client/contributors","subscribers_url":"https://api.github.com/repos/rapid7/nexpose-client/subscribers","subscription_url":"https://api.github.com/repos/rapid7/nexpose-client/subscription","commits_url":"https://api.github.com/repos/rapid7/nexpose-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/rapid7/nexpose-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/rapid7/nexpose-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/rapid7/nexpose-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/rapid7/nexpose-client/contents/{+path}","compare_url":"https://api.github.com/repos/rapid7/nexpose-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rapid7/nexpose-client/merges","archive_url":"https://api.github.com/repos/rapid7/nexpose-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rapid7/nexpose-client/downloads","issues_url":"https://api.github.com/repos/rapid7/nexpose-client/issues{/number}","pulls_url":"https://api.github.com/repos/rapid7/nexpose-client/pulls{/number}","milestones_url":"https://api.github.com/repos/rapid7/nexpose-client/milestones{/number}","notifications_url":"https://api.github.com/repos/rapid7/nexpose-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rapid7/nexpose-client/labels{/name}","releases_url":"https://api.github.com/repos/rapid7/nexpose-client/releases{/id}","deployments_url":"https://api.github.com/repos/rapid7/nexpose-client/deployments","created_at":"2011-10-21T19:04:49Z","updated_at":"2016-04-02T22:32:54Z","pushed_at":"2016-04-08T03:47:07Z","git_url":"git://github.com/rapid7/nexpose-client.git","ssh_url":"git@github.com:rapid7/nexpose-client.git","clone_url":"https://github.com/rapid7/nexpose-client.git","svn_url":"https://github.com/rapid7/nexpose-client","homepage":"http://www.rapid7.com/","size":1584,"stargazers_count":96,"watchers_count":96,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":68,"mirror_url":null,"open_issues_count":8,"forks":68,"open_issues":8,"watchers":96,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rapid7/nexpose-client/pulls/214"},"html":{"href":"https://github.com/rapid7/nexpose-client/pull/214"},"issue":{"href":"https://api.github.com/repos/rapid7/nexpose-client/issues/214"},"comments":{"href":"https://api.github.com/repos/rapid7/nexpose-client/issues/214/comments"},"review_comments":{"href":"https://api.github.com/repos/rapid7/nexpose-client/pulls/214/comments"},"review_comment":{"href":"https://api.github.com/repos/rapid7/nexpose-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rapid7/nexpose-client/pulls/214/commits"},"statuses":{"href":"https://api.github.com/repos/rapid7/nexpose-client/statuses/87d005589a7cd7944862ee7fc02f2d1140f64666"}}}}