{"action":"created","comment":{"url":"https://api.github.com/repos/localshred/protobuf/pulls/comments/27430638","id":27430638,"diff_hunk":"@@ -17,7 +17,15 @@ def self.default\n       # #\n \n       def acceptable?(val)\n-        [true, false].include?(val)\n+        [true, false].include?(val) || (val.is_a?(String) && %w(true false).include?(val))\n+      end\n+\n+      def coerce!(val)\n+        if val.is_a?(String)","path":"lib/protobuf/field/bool_field.rb","position":9,"original_position":9,"commit_id":"4d67a8a7a62aa69839b343ffb44824e50015e53b","original_commit_id":"4d67a8a7a62aa69839b343ffb44824e50015e53b","user":{"login":"hrsht","id":1829397,"avatar_url":"https://avatars.githubusercontent.com/u/1829397?v=3","gravatar_id":"","url":"https://api.github.com/users/hrsht","html_url":"https://github.com/hrsht","followers_url":"https://api.github.com/users/hrsht/followers","following_url":"https://api.github.com/users/hrsht/following{/other_user}","gists_url":"https://api.github.com/users/hrsht/gists{/gist_id}","starred_url":"https://api.github.com/users/hrsht/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hrsht/subscriptions","organizations_url":"https://api.github.com/users/hrsht/orgs","repos_url":"https://api.github.com/users/hrsht/repos","events_url":"https://api.github.com/users/hrsht/events{/privacy}","received_events_url":"https://api.github.com/users/hrsht/received_events","type":"User","site_admin":false},"body":"Will do.","created_at":"2015-03-30T20:51:47Z","updated_at":"2015-03-30T20:51:47Z","html_url":"https://github.com/localshred/protobuf/pull/253#discussion_r27430638","pull_request_url":"https://api.github.com/repos/localshred/protobuf/pulls/253","_links":{"self":{"href":"https://api.github.com/repos/localshred/protobuf/pulls/comments/27430638"},"html":{"href":"https://github.com/localshred/protobuf/pull/253#discussion_r27430638"},"pull_request":{"href":"https://api.github.com/repos/localshred/protobuf/pulls/253"}}},"pull_request":{"url":"https://api.github.com/repos/localshred/protobuf/pulls/253","id":32263113,"html_url":"https://github.com/localshred/protobuf/pull/253","diff_url":"https://github.com/localshred/protobuf/pull/253.diff","patch_url":"https://github.com/localshred/protobuf/pull/253.patch","issue_url":"https://api.github.com/repos/localshred/protobuf/issues/253","number":253,"state":"open","locked":false,"title":"Adds support to specify integer and bool proto fields as string.","user":{"login":"hrsht","id":1829397,"avatar_url":"https://avatars.githubusercontent.com/u/1829397?v=3","gravatar_id":"","url":"https://api.github.com/users/hrsht","html_url":"https://github.com/hrsht","followers_url":"https://api.github.com/users/hrsht/followers","following_url":"https://api.github.com/users/hrsht/following{/other_user}","gists_url":"https://api.github.com/users/hrsht/gists{/gist_id}","starred_url":"https://api.github.com/users/hrsht/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hrsht/subscriptions","organizations_url":"https://api.github.com/users/hrsht/orgs","repos_url":"https://api.github.com/users/hrsht/repos","events_url":"https://api.github.com/users/hrsht/events{/privacy}","received_events_url":"https://api.github.com/users/hrsht/received_events","type":"User","site_admin":false},"body":"Also fixes the range check for integer types.\r\n\r\nr: @zachmargolis ","created_at":"2015-03-30T20:18:59Z","updated_at":"2015-03-30T20:51:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4273783f31dbfa428a4c11cb21e1fab66e5b2853","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/localshred/protobuf/pulls/253/commits","review_comments_url":"https://api.github.com/repos/localshred/protobuf/pulls/253/comments","review_comment_url":"https://api.github.com/repos/localshred/protobuf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/localshred/protobuf/issues/253/comments","statuses_url":"https://api.github.com/repos/localshred/protobuf/statuses/4d67a8a7a62aa69839b343ffb44824e50015e53b","head":{"label":"hrsht:support_string_for_integers_and_bools","ref":"support_string_for_integers_and_bools","sha":"4d67a8a7a62aa69839b343ffb44824e50015e53b","user":{"login":"hrsht","id":1829397,"avatar_url":"https://avatars.githubusercontent.com/u/1829397?v=3","gravatar_id":"","url":"https://api.github.com/users/hrsht","html_url":"https://github.com/hrsht","followers_url":"https://api.github.com/users/hrsht/followers","following_url":"https://api.github.com/users/hrsht/following{/other_user}","gists_url":"https://api.github.com/users/hrsht/gists{/gist_id}","starred_url":"https://api.github.com/users/hrsht/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hrsht/subscriptions","organizations_url":"https://api.github.com/users/hrsht/orgs","repos_url":"https://api.github.com/users/hrsht/repos","events_url":"https://api.github.com/users/hrsht/events{/privacy}","received_events_url":"https://api.github.com/users/hrsht/received_events","type":"User","site_admin":false},"repo":{"id":33144577,"name":"protobuf","full_name":"hrsht/protobuf","owner":{"login":"hrsht","id":1829397,"avatar_url":"https://avatars.githubusercontent.com/u/1829397?v=3","gravatar_id":"","url":"https://api.github.com/users/hrsht","html_url":"https://github.com/hrsht","followers_url":"https://api.github.com/users/hrsht/followers","following_url":"https://api.github.com/users/hrsht/following{/other_user}","gists_url":"https://api.github.com/users/hrsht/gists{/gist_id}","starred_url":"https://api.github.com/users/hrsht/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hrsht/subscriptions","organizations_url":"https://api.github.com/users/hrsht/orgs","repos_url":"https://api.github.com/users/hrsht/repos","events_url":"https://api.github.com/users/hrsht/events{/privacy}","received_events_url":"https://api.github.com/users/hrsht/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hrsht/protobuf","description":"Ruby implementation for Protocol Buffers","fork":true,"url":"https://api.github.com/repos/hrsht/protobuf","forks_url":"https://api.github.com/repos/hrsht/protobuf/forks","keys_url":"https://api.github.com/repos/hrsht/protobuf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hrsht/protobuf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hrsht/protobuf/teams","hooks_url":"https://api.github.com/repos/hrsht/protobuf/hooks","issue_events_url":"https://api.github.com/repos/hrsht/protobuf/issues/events{/number}","events_url":"https://api.github.com/repos/hrsht/protobuf/events","assignees_url":"https://api.github.com/repos/hrsht/protobuf/assignees{/user}","branches_url":"https://api.github.com/repos/hrsht/protobuf/branches{/branch}","tags_url":"https://api.github.com/repos/hrsht/protobuf/tags","blobs_url":"https://api.github.com/repos/hrsht/protobuf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hrsht/protobuf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hrsht/protobuf/git/refs{/sha}","trees_url":"https://api.github.com/repos/hrsht/protobuf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hrsht/protobuf/statuses/{sha}","languages_url":"https://api.github.com/repos/hrsht/protobuf/languages","stargazers_url":"https://api.github.com/repos/hrsht/protobuf/stargazers","contributors_url":"https://api.github.com/repos/hrsht/protobuf/contributors","subscribers_url":"https://api.github.com/repos/hrsht/protobuf/subscribers","subscription_url":"https://api.github.com/repos/hrsht/protobuf/subscription","commits_url":"https://api.github.com/repos/hrsht/protobuf/commits{/sha}","git_commits_url":"https://api.github.com/repos/hrsht/protobuf/git/commits{/sha}","comments_url":"https://api.github.com/repos/hrsht/protobuf/comments{/number}","issue_comment_url":"https://api.github.com/repos/hrsht/protobuf/issues/comments{/number}","contents_url":"https://api.github.com/repos/hrsht/protobuf/contents/{+path}","compare_url":"https://api.github.com/repos/hrsht/protobuf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hrsht/protobuf/merges","archive_url":"https://api.github.com/repos/hrsht/protobuf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hrsht/protobuf/downloads","issues_url":"https://api.github.com/repos/hrsht/protobuf/issues{/number}","pulls_url":"https://api.github.com/repos/hrsht/protobuf/pulls{/number}","milestones_url":"https://api.github.com/repos/hrsht/protobuf/milestones{/number}","notifications_url":"https://api.github.com/repos/hrsht/protobuf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hrsht/protobuf/labels{/name}","releases_url":"https://api.github.com/repos/hrsht/protobuf/releases{/id}","created_at":"2015-03-30T19:55:46Z","updated_at":"2015-03-30T19:55:47Z","pushed_at":"2015-03-30T20:03:27Z","git_url":"git://github.com/hrsht/protobuf.git","ssh_url":"git@github.com:hrsht/protobuf.git","clone_url":"https://github.com/hrsht/protobuf.git","svn_url":"https://github.com/hrsht/protobuf","homepage":"github.com/localshred","size":5488,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"localshred:master","ref":"master","sha":"2ea42e846a429beed8de75a8d797164bafc11de8","user":{"login":"localshred","id":47752,"avatar_url":"https://avatars.githubusercontent.com/u/47752?v=3","gravatar_id":"","url":"https://api.github.com/users/localshred","html_url":"https://github.com/localshred","followers_url":"https://api.github.com/users/localshred/followers","following_url":"https://api.github.com/users/localshred/following{/other_user}","gists_url":"https://api.github.com/users/localshred/gists{/gist_id}","starred_url":"https://api.github.com/users/localshred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/localshred/subscriptions","organizations_url":"https://api.github.com/users/localshred/orgs","repos_url":"https://api.github.com/users/localshred/repos","events_url":"https://api.github.com/users/localshred/events{/privacy}","received_events_url":"https://api.github.com/users/localshred/received_events","type":"User","site_admin":false},"repo":{"id":2724591,"name":"protobuf","full_name":"localshred/protobuf","owner":{"login":"localshred","id":47752,"avatar_url":"https://avatars.githubusercontent.com/u/47752?v=3","gravatar_id":"","url":"https://api.github.com/users/localshred","html_url":"https://github.com/localshred","followers_url":"https://api.github.com/users/localshred/followers","following_url":"https://api.github.com/users/localshred/following{/other_user}","gists_url":"https://api.github.com/users/localshred/gists{/gist_id}","starred_url":"https://api.github.com/users/localshred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/localshred/subscriptions","organizations_url":"https://api.github.com/users/localshred/orgs","repos_url":"https://api.github.com/users/localshred/repos","events_url":"https://api.github.com/users/localshred/events{/privacy}","received_events_url":"https://api.github.com/users/localshred/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/localshred/protobuf","description":"Ruby implementation for Protocol Buffers","fork":false,"url":"https://api.github.com/repos/localshred/protobuf","forks_url":"https://api.github.com/repos/localshred/protobuf/forks","keys_url":"https://api.github.com/repos/localshred/protobuf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/localshred/protobuf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/localshred/protobuf/teams","hooks_url":"https://api.github.com/repos/localshred/protobuf/hooks","issue_events_url":"https://api.github.com/repos/localshred/protobuf/issues/events{/number}","events_url":"https://api.github.com/repos/localshred/protobuf/events","assignees_url":"https://api.github.com/repos/localshred/protobuf/assignees{/user}","branches_url":"https://api.github.com/repos/localshred/protobuf/branches{/branch}","tags_url":"https://api.github.com/repos/localshred/protobuf/tags","blobs_url":"https://api.github.com/repos/localshred/protobuf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/localshred/protobuf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/localshred/protobuf/git/refs{/sha}","trees_url":"https://api.github.com/repos/localshred/protobuf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/localshred/protobuf/statuses/{sha}","languages_url":"https://api.github.com/repos/localshred/protobuf/languages","stargazers_url":"https://api.github.com/repos/localshred/protobuf/stargazers","contributors_url":"https://api.github.com/repos/localshred/protobuf/contributors","subscribers_url":"https://api.github.com/repos/localshred/protobuf/subscribers","subscription_url":"https://api.github.com/repos/localshred/protobuf/subscription","commits_url":"https://api.github.com/repos/localshred/protobuf/commits{/sha}","git_commits_url":"https://api.github.com/repos/localshred/protobuf/git/commits{/sha}","comments_url":"https://api.github.com/repos/localshred/protobuf/comments{/number}","issue_comment_url":"https://api.github.com/repos/localshred/protobuf/issues/comments{/number}","contents_url":"https://api.github.com/repos/localshred/protobuf/contents/{+path}","compare_url":"https://api.github.com/repos/localshred/protobuf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/localshred/protobuf/merges","archive_url":"https://api.github.com/repos/localshred/protobuf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/localshred/protobuf/downloads","issues_url":"https://api.github.com/repos/localshred/protobuf/issues{/number}","pulls_url":"https://api.github.com/repos/localshred/protobuf/pulls{/number}","milestones_url":"https://api.github.com/repos/localshred/protobuf/milestones{/number}","notifications_url":"https://api.github.com/repos/localshred/protobuf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/localshred/protobuf/labels{/name}","releases_url":"https://api.github.com/repos/localshred/protobuf/releases{/id}","created_at":"2011-11-07T06:52:37Z","updated_at":"2015-03-24T22:33:11Z","pushed_at":"2015-03-30T20:19:00Z","git_url":"git://github.com/localshred/protobuf.git","ssh_url":"git@github.com:localshred/protobuf.git","clone_url":"https://github.com/localshred/protobuf.git","svn_url":"https://github.com/localshred/protobuf","homepage":"github.com/localshred","size":5488,"stargazers_count":127,"watchers_count":127,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":40,"mirror_url":null,"open_issues_count":26,"forks":40,"open_issues":26,"watchers":127,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/localshred/protobuf/pulls/253"},"html":{"href":"https://github.com/localshred/protobuf/pull/253"},"issue":{"href":"https://api.github.com/repos/localshred/protobuf/issues/253"},"comments":{"href":"https://api.github.com/repos/localshred/protobuf/issues/253/comments"},"review_comments":{"href":"https://api.github.com/repos/localshred/protobuf/pulls/253/comments"},"review_comment":{"href":"https://api.github.com/repos/localshred/protobuf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/localshred/protobuf/pulls/253/commits"},"statuses":{"href":"https://api.github.com/repos/localshred/protobuf/statuses/4d67a8a7a62aa69839b343ffb44824e50015e53b"}}}}