{"action":"created","issue":{"url":"https://api.github.com/repos/librariesio/semantic_range/issues/62","repository_url":"https://api.github.com/repos/librariesio/semantic_range","labels_url":"https://api.github.com/repos/librariesio/semantic_range/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/librariesio/semantic_range/issues/62/comments","events_url":"https://api.github.com/repos/librariesio/semantic_range/issues/62/events","html_url":"https://github.com/librariesio/semantic_range/pull/62","id":218694368,"number":62,"title":"Add support for range and comparators comparison","user":{"login":"rtfpessoa","id":902384,"avatar_url":"https://avatars3.githubusercontent.com/u/902384?v=3","gravatar_id":"","url":"https://api.github.com/users/rtfpessoa","html_url":"https://github.com/rtfpessoa","followers_url":"https://api.github.com/users/rtfpessoa/followers","following_url":"https://api.github.com/users/rtfpessoa/following{/other_user}","gists_url":"https://api.github.com/users/rtfpessoa/gists{/gist_id}","starred_url":"https://api.github.com/users/rtfpessoa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtfpessoa/subscriptions","organizations_url":"https://api.github.com/users/rtfpessoa/orgs","repos_url":"https://api.github.com/users/rtfpessoa/repos","events_url":"https://api.github.com/users/rtfpessoa/events{/privacy}","received_events_url":"https://api.github.com/users/rtfpessoa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-04-01T13:00:24Z","updated_at":"2017-04-03T18:10:07Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/librariesio/semantic_range/pulls/62","html_url":"https://github.com/librariesio/semantic_range/pull/62","diff_url":"https://github.com/librariesio/semantic_range/pull/62.diff","patch_url":"https://github.com/librariesio/semantic_range/pull/62.patch"},"body":"* Check if two ranges intersect\r\n* Check if one comparator satisfies a range\r\n* Check if two comparators intersect\r\n\r\nFixes #61\r\n\r\nNotes:\r\nI had to change the `Comparator` initializer since it was not working as I expected.\r\nFor some reason, in:\r\n```ruby\r\nif comp.is_a?(Comparator)\r\n  return comp if comp.loose == loose\r\n  @comp = comp.value\r\nend\r\n```\r\n\r\nThe `return comp if comp.loose == loose` was not returning a working Comparator object. Since I am not experienced with ruby I still do not know the internals of the initializer. Maybe you can help me understand this.\r\n\r\nStill, my change makes this class use the same logic that exists in `Range` and `Version` by replacing the if with `comp = comp.value if comp.is_a?(Comparator)`. Although it works now I am aware it seems redundant. If you have any insights please let me know."},"comment":{"url":"https://api.github.com/repos/librariesio/semantic_range/issues/comments/291225754","html_url":"https://github.com/librariesio/semantic_range/pull/62#issuecomment-291225754","issue_url":"https://api.github.com/repos/librariesio/semantic_range/issues/62","id":291225754,"user":{"login":"rtfpessoa","id":902384,"avatar_url":"https://avatars3.githubusercontent.com/u/902384?v=3","gravatar_id":"","url":"https://api.github.com/users/rtfpessoa","html_url":"https://github.com/rtfpessoa","followers_url":"https://api.github.com/users/rtfpessoa/followers","following_url":"https://api.github.com/users/rtfpessoa/following{/other_user}","gists_url":"https://api.github.com/users/rtfpessoa/gists{/gist_id}","starred_url":"https://api.github.com/users/rtfpessoa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtfpessoa/subscriptions","organizations_url":"https://api.github.com/users/rtfpessoa/orgs","repos_url":"https://api.github.com/users/rtfpessoa/repos","events_url":"https://api.github.com/users/rtfpessoa/events{/privacy}","received_events_url":"https://api.github.com/users/rtfpessoa/received_events","type":"User","site_admin":false},"created_at":"2017-04-03T18:10:07Z","updated_at":"2017-04-03T18:10:07Z","body":"I made all the changes here too, except for the if checking the types. Do you also want those? If yes what would be the exception to throw?"}}
{"actor":{"display_login":"rtfpessoa"}}