{"action":"created","issue":{"url":"https://api.github.com/repos/wit-ai/wit-ruby/issues/14","repository_url":"https://api.github.com/repos/wit-ai/wit-ruby","labels_url":"https://api.github.com/repos/wit-ai/wit-ruby/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/wit-ai/wit-ruby/issues/14/comments","events_url":"https://api.github.com/repos/wit-ai/wit-ruby/issues/14/events","html_url":"https://github.com/wit-ai/wit-ruby/pull/14","id":168779886,"number":14,"title":"Idiomatic Ruby Cleanups","user":{"login":"bklang","id":167131,"avatar_url":"https://avatars.githubusercontent.com/u/167131?v=3","gravatar_id":"","url":"https://api.github.com/users/bklang","html_url":"https://github.com/bklang","followers_url":"https://api.github.com/users/bklang/followers","following_url":"https://api.github.com/users/bklang/following{/other_user}","gists_url":"https://api.github.com/users/bklang/gists{/gist_id}","starred_url":"https://api.github.com/users/bklang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bklang/subscriptions","organizations_url":"https://api.github.com/users/bklang/orgs","repos_url":"https://api.github.com/users/bklang/repos","events_url":"https://api.github.com/users/bklang/events{/privacy}","received_events_url":"https://api.github.com/users/bklang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-08-02T01:32:43Z","updated_at":"2016-08-12T16:20:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/wit-ai/wit-ruby/pulls/14","html_url":"https://github.com/wit-ai/wit-ruby/pull/14","diff_url":"https://github.com/wit-ai/wit-ruby/pull/14.diff","patch_url":"https://github.com/wit-ai/wit-ruby/pull/14.patch"},"body":"This PR cleans up several things in the library to make it integrate better with existing apps:\r\n\r\n- Renamed WitException to Wit::Error\r\n- Changed Wit::Error to [inherit from StandardError instead of Exception](http://stackoverflow.com/questions/10048173/why-is-it-bad-style-to-rescue-exception-e-in-ruby#10048406)\r\n- Moved constants inside Wit namespace\r\n- Moved `#req` and `#validate_actions` to private methods within Wit namespace\r\n\r\nBecause of the exception name change, a major version bump will be required to follow SemVer.\r\n\r\nI made `#req` and `#validate_actions` private because I don't think they are intentionally part of the public API. I can change this if I inferred incorrectly."},"comment":{"url":"https://api.github.com/repos/wit-ai/wit-ruby/issues/comments/239491392","html_url":"https://github.com/wit-ai/wit-ruby/pull/14#issuecomment-239491392","issue_url":"https://api.github.com/repos/wit-ai/wit-ruby/issues/14","id":239491392,"user":{"login":"bklang","id":167131,"avatar_url":"https://avatars.githubusercontent.com/u/167131?v=3","gravatar_id":"","url":"https://api.github.com/users/bklang","html_url":"https://github.com/bklang","followers_url":"https://api.github.com/users/bklang/followers","following_url":"https://api.github.com/users/bklang/following{/other_user}","gists_url":"https://api.github.com/users/bklang/gists{/gist_id}","starred_url":"https://api.github.com/users/bklang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bklang/subscriptions","organizations_url":"https://api.github.com/users/bklang/orgs","repos_url":"https://api.github.com/users/bklang/repos","events_url":"https://api.github.com/users/bklang/events{/privacy}","received_events_url":"https://api.github.com/users/bklang/received_events","type":"User","site_admin":false},"created_at":"2016-08-12T16:20:05Z","updated_at":"2016-08-12T16:20:05Z","body":"@patapizza Thanks for the feedback.\r\n\r\n* I don't understand the argument for constants coming from the environment. They'll be set just fine whether they are defined as global constants or namespaced within the class. What a library should not do is define global constants (unless they are intended to be shared, but even then it's debatable)\r\n* I will update `#req` to remove `logger` and `access_token`\r\n* I will also make `throw_if_action_missing` and `throw_must_have_actions` private"}}
{"actor":{"display_login":"bklang"}}