{"action":"created","issue":{"url":"https://api.github.com/repos/fog/fog-aws/issues/223","repository_url":"https://api.github.com/repos/fog/fog-aws","labels_url":"https://api.github.com/repos/fog/fog-aws/issues/223/labels{/name}","comments_url":"https://api.github.com/repos/fog/fog-aws/issues/223/comments","events_url":"https://api.github.com/repos/fog/fog-aws/issues/223/events","html_url":"https://github.com/fog/fog-aws/pull/223","id":131136750,"number":223,"title":"Security Group perms of FromPort 0 and ToPort -1","user":{"login":"jacobo","id":10033,"avatar_url":"https://avatars.githubusercontent.com/u/10033?v=3","gravatar_id":"","url":"https://api.github.com/users/jacobo","html_url":"https://github.com/jacobo","followers_url":"https://api.github.com/users/jacobo/followers","following_url":"https://api.github.com/users/jacobo/following{/other_user}","gists_url":"https://api.github.com/users/jacobo/gists{/gist_id}","starred_url":"https://api.github.com/users/jacobo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacobo/subscriptions","organizations_url":"https://api.github.com/users/jacobo/orgs","repos_url":"https://api.github.com/users/jacobo/repos","events_url":"https://api.github.com/users/jacobo/events{/privacy}","received_events_url":"https://api.github.com/users/jacobo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-03T20:04:06Z","updated_at":"2016-02-08T05:04:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/fog/fog-aws/pulls/223","html_url":"https://github.com/fog/fog-aws/pull/223","diff_url":"https://github.com/fog/fog-aws/pull/223.diff","patch_url":"https://github.com/fog/fog-aws/pull/223.patch"},"body":"Fix generation of the FromPort and ToPort paramters when authorizing or\r\nrevoking permissions on a security group.\r\n\r\nSince `(0..-1).min` is nil and `(0..-1).max` is also nil, just OR in\r\nthese values...\r\n\r\nError message would otherwise be:\r\n\r\nInvalid value 'Must specify both from and to ports with ICMP.' for\r\nportRange"},"comment":{"url":"https://api.github.com/repos/fog/fog-aws/issues/comments/181197579","html_url":"https://github.com/fog/fog-aws/pull/223#issuecomment-181197579","issue_url":"https://api.github.com/repos/fog/fog-aws/issues/223","id":181197579,"user":{"login":"jacobo","id":10033,"avatar_url":"https://avatars.githubusercontent.com/u/10033?v=3","gravatar_id":"","url":"https://api.github.com/users/jacobo","html_url":"https://github.com/jacobo","followers_url":"https://api.github.com/users/jacobo/followers","following_url":"https://api.github.com/users/jacobo/following{/other_user}","gists_url":"https://api.github.com/users/jacobo/gists{/gist_id}","starred_url":"https://api.github.com/users/jacobo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacobo/subscriptions","organizations_url":"https://api.github.com/users/jacobo/orgs","repos_url":"https://api.github.com/users/jacobo/repos","events_url":"https://api.github.com/users/jacobo/events{/privacy}","received_events_url":"https://api.github.com/users/jacobo/received_events","type":"User","site_admin":false},"created_at":"2016-02-08T05:04:06Z","updated_at":"2016-02-08T05:04:06Z","body":"because `(0..0).max == 0`  and `(0..-1).max == nil` ... really just workaround the shortcoming of ruby ranges...\r\n\r\nan alternative might be something like `(0..-1).to_s.split(\"..\").map(&:to_i)`\r\n\r\nIf we could go back in time and just accept 2 arguments instead of a range it would probably be cleaner..\r\n\r\nOr maybe we need a new object `PortRange`... \r\n`class PortRange; def initialize(min,max)` ...\r\n\r\n"}}