{"action":"created","comment":{"url":"https://api.github.com/repos/google/protobuf/pulls/comments/22562017","id":22562017,"diff_hunk":"@@ -0,0 +1,116 @@\n+package com.google.protobuf.jruby;\n+\n+import org.jruby.*;\n+import org.jruby.anno.JRubyClass;\n+import org.jruby.anno.JRubyMethod;\n+import org.jruby.runtime.*;\n+import org.jruby.runtime.builtin.IRubyObject;\n+\n+/**\n+ * Created by isaiah on 12/12/14.\n+ */\n+@JRubyClass(name = \"Builder\")\n+public class RubyBuilder  extends RubyObject {\n+    public static void createRubyBuilder(Ruby runtime) {\n+        RubyModule protobuf = runtime.getClassFromPath(\"Google::Protobuf\");\n+        RubyClass cBuilder = protobuf.defineClassUnder(\"Builder\", runtime.getObject(), new ObjectAllocator() {\n+            @Override\n+            public IRubyObject allocate(Ruby runtime, RubyClass klazz) {\n+                return new RubyBuilder(runtime, klazz);\n+            }\n+        });\n+        cBuilder.defineAnnotatedMethods(RubyBuilder.class);\n+    }\n+\n+    public RubyBuilder(Ruby runtime, RubyClass metaClass) {\n+        super(runtime, metaClass);\n+        this.cDescriptor = (RubyClass) runtime.getClassFromPath(\"Google::Protobuf::Descriptor\");\n+        this.cEnumDescriptor = (RubyClass) runtime.getClassFromPath(\"Google::Protobuf::EnumDescriptor\");\n+        this.cMessageBuilderContext = (RubyClass) runtime.getClassFromPath(\"Google::Protobuf::MessageBuilderContext\");","path":"ruby/src/main/java/com/google/protobuf/jruby/RubyBuilder.java","position":29,"original_position":29,"commit_id":"d6536453140af8d7a4b95aa5948946bee14aae01","original_commit_id":"d6536453140af8d7a4b95aa5948946bee14aae01","user":{"login":"cfallin","id":216148,"avatar_url":"https://avatars.githubusercontent.com/u/216148?v=3","gravatar_id":"","url":"https://api.github.com/users/cfallin","html_url":"https://github.com/cfallin","followers_url":"https://api.github.com/users/cfallin/followers","following_url":"https://api.github.com/users/cfallin/following{/other_user}","gists_url":"https://api.github.com/users/cfallin/gists{/gist_id}","starred_url":"https://api.github.com/users/cfallin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfallin/subscriptions","organizations_url":"https://api.github.com/users/cfallin/orgs","repos_url":"https://api.github.com/users/cfallin/repos","events_url":"https://api.github.com/users/cfallin/events{/privacy}","received_events_url":"https://api.github.com/users/cfallin/received_events","type":"User","site_admin":false},"body":"Avoid long lines (wrap at 80 columns if possible)?","created_at":"2015-01-06T23:54:06Z","updated_at":"2015-01-06T23:54:06Z","html_url":"https://github.com/google/protobuf/pull/146#discussion_r22562017","pull_request_url":"https://api.github.com/repos/google/protobuf/pulls/146","_links":{"self":{"href":"https://api.github.com/repos/google/protobuf/pulls/comments/22562017"},"html":{"href":"https://github.com/google/protobuf/pull/146#discussion_r22562017"},"pull_request":{"href":"https://api.github.com/repos/google/protobuf/pulls/146"}}},"pull_request":{"url":"https://api.github.com/repos/google/protobuf/pulls/146","id":26560991,"html_url":"https://github.com/google/protobuf/pull/146","diff_url":"https://github.com/google/protobuf/pull/146.diff","patch_url":"https://github.com/google/protobuf/pull/146.patch","issue_url":"https://api.github.com/repos/google/protobuf/issues/146","number":146,"state":"open","locked":false,"title":"protobuf support for jruby","user":{"login":"isaiah","id":18042,"avatar_url":"https://avatars.githubusercontent.com/u/18042?v=3","gravatar_id":"","url":"https://api.github.com/users/isaiah","html_url":"https://github.com/isaiah","followers_url":"https://api.github.com/users/isaiah/followers","following_url":"https://api.github.com/users/isaiah/following{/other_user}","gists_url":"https://api.github.com/users/isaiah/gists{/gist_id}","starred_url":"https://api.github.com/users/isaiah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isaiah/subscriptions","organizations_url":"https://api.github.com/users/isaiah/orgs","repos_url":"https://api.github.com/users/isaiah/repos","events_url":"https://api.github.com/users/isaiah/events{/privacy}","received_events_url":"https://api.github.com/users/isaiah/received_events","type":"User","site_admin":false},"body":"JRuby support via native extension.\r\n\r\nIt's basically a wrapper around ```DynamicMessage```\r\n\r\nThe tests are changed to use minitest instead of test/unit.\r\n\r\nThere are a few differences/bugs than the c implementation:\r\n\r\n* Enum value cannot take arbitary integer\r\n* Non-repeated fields are copied, and cannot be modified, this goes directly into `DynamicMessage.Builder`\r\n* Serialize circle is allowed\r\n* Corecursive messages cannot be inspected or compared, seems ```DynamicMessage``` cannot tell the difference between an empty message and the default instance.\r\n","created_at":"2014-12-24T14:47:05Z","updated_at":"2015-01-06T23:54:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4a9fbc25c4ac5cccbee4659967ece4d3866f25f3","assignee":{"login":"cfallin","id":216148,"avatar_url":"https://avatars.githubusercontent.com/u/216148?v=3","gravatar_id":"","url":"https://api.github.com/users/cfallin","html_url":"https://github.com/cfallin","followers_url":"https://api.github.com/users/cfallin/followers","following_url":"https://api.github.com/users/cfallin/following{/other_user}","gists_url":"https://api.github.com/users/cfallin/gists{/gist_id}","starred_url":"https://api.github.com/users/cfallin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfallin/subscriptions","organizations_url":"https://api.github.com/users/cfallin/orgs","repos_url":"https://api.github.com/users/cfallin/repos","events_url":"https://api.github.com/users/cfallin/events{/privacy}","received_events_url":"https://api.github.com/users/cfallin/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/google/protobuf/pulls/146/commits","review_comments_url":"https://api.github.com/repos/google/protobuf/pulls/146/comments","review_comment_url":"https://api.github.com/repos/google/protobuf/pulls/comments/{number}","comments_url":"https://api.github.com/repos/google/protobuf/issues/146/comments","statuses_url":"https://api.github.com/repos/google/protobuf/statuses/d6536453140af8d7a4b95aa5948946bee14aae01","head":{"label":"isaiah:jruby","ref":"jruby","sha":"d6536453140af8d7a4b95aa5948946bee14aae01","user":{"login":"isaiah","id":18042,"avatar_url":"https://avatars.githubusercontent.com/u/18042?v=3","gravatar_id":"","url":"https://api.github.com/users/isaiah","html_url":"https://github.com/isaiah","followers_url":"https://api.github.com/users/isaiah/followers","following_url":"https://api.github.com/users/isaiah/following{/other_user}","gists_url":"https://api.github.com/users/isaiah/gists{/gist_id}","starred_url":"https://api.github.com/users/isaiah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isaiah/subscriptions","organizations_url":"https://api.github.com/users/isaiah/orgs","repos_url":"https://api.github.com/users/isaiah/repos","events_url":"https://api.github.com/users/isaiah/events{/privacy}","received_events_url":"https://api.github.com/users/isaiah/received_events","type":"User","site_admin":false},"repo":{"id":28451416,"name":"protobuf","full_name":"isaiah/protobuf","owner":{"login":"isaiah","id":18042,"avatar_url":"https://avatars.githubusercontent.com/u/18042?v=3","gravatar_id":"","url":"https://api.github.com/users/isaiah","html_url":"https://github.com/isaiah","followers_url":"https://api.github.com/users/isaiah/followers","following_url":"https://api.github.com/users/isaiah/following{/other_user}","gists_url":"https://api.github.com/users/isaiah/gists{/gist_id}","starred_url":"https://api.github.com/users/isaiah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isaiah/subscriptions","organizations_url":"https://api.github.com/users/isaiah/orgs","repos_url":"https://api.github.com/users/isaiah/repos","events_url":"https://api.github.com/users/isaiah/events{/privacy}","received_events_url":"https://api.github.com/users/isaiah/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/isaiah/protobuf","description":"Protocol Buffers - Google's data interchange format","fork":true,"url":"https://api.github.com/repos/isaiah/protobuf","forks_url":"https://api.github.com/repos/isaiah/protobuf/forks","keys_url":"https://api.github.com/repos/isaiah/protobuf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/isaiah/protobuf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/isaiah/protobuf/teams","hooks_url":"https://api.github.com/repos/isaiah/protobuf/hooks","issue_events_url":"https://api.github.com/repos/isaiah/protobuf/issues/events{/number}","events_url":"https://api.github.com/repos/isaiah/protobuf/events","assignees_url":"https://api.github.com/repos/isaiah/protobuf/assignees{/user}","branches_url":"https://api.github.com/repos/isaiah/protobuf/branches{/branch}","tags_url":"https://api.github.com/repos/isaiah/protobuf/tags","blobs_url":"https://api.github.com/repos/isaiah/protobuf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/isaiah/protobuf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/isaiah/protobuf/git/refs{/sha}","trees_url":"https://api.github.com/repos/isaiah/protobuf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/isaiah/protobuf/statuses/{sha}","languages_url":"https://api.github.com/repos/isaiah/protobuf/languages","stargazers_url":"https://api.github.com/repos/isaiah/protobuf/stargazers","contributors_url":"https://api.github.com/repos/isaiah/protobuf/contributors","subscribers_url":"https://api.github.com/repos/isaiah/protobuf/subscribers","subscription_url":"https://api.github.com/repos/isaiah/protobuf/subscription","commits_url":"https://api.github.com/repos/isaiah/protobuf/commits{/sha}","git_commits_url":"https://api.github.com/repos/isaiah/protobuf/git/commits{/sha}","comments_url":"https://api.github.com/repos/isaiah/protobuf/comments{/number}","issue_comment_url":"https://api.github.com/repos/isaiah/protobuf/issues/comments/{number}","contents_url":"https://api.github.com/repos/isaiah/protobuf/contents/{+path}","compare_url":"https://api.github.com/repos/isaiah/protobuf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/isaiah/protobuf/merges","archive_url":"https://api.github.com/repos/isaiah/protobuf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/isaiah/protobuf/downloads","issues_url":"https://api.github.com/repos/isaiah/protobuf/issues{/number}","pulls_url":"https://api.github.com/repos/isaiah/protobuf/pulls{/number}","milestones_url":"https://api.github.com/repos/isaiah/protobuf/milestones{/number}","notifications_url":"https://api.github.com/repos/isaiah/protobuf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/isaiah/protobuf/labels{/name}","releases_url":"https://api.github.com/repos/isaiah/protobuf/releases{/id}","created_at":"2014-12-24T14:34:02Z","updated_at":"2014-12-24T14:34:05Z","pushed_at":"2015-01-04T18:28:52Z","git_url":"git://github.com/isaiah/protobuf.git","ssh_url":"git@github.com:isaiah/protobuf.git","clone_url":"https://github.com/isaiah/protobuf.git","svn_url":"https://github.com/isaiah/protobuf","homepage":"https://developers.google.com/protocol-buffers/","size":6519,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"google:master","ref":"master","sha":"644a6a1da71385e9d7a7a26b3476c93fdd71788c","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":23357588,"name":"protobuf","full_name":"google/protobuf","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/protobuf","description":"Protocol Buffers - Google's data interchange format","fork":false,"url":"https://api.github.com/repos/google/protobuf","forks_url":"https://api.github.com/repos/google/protobuf/forks","keys_url":"https://api.github.com/repos/google/protobuf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/protobuf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/protobuf/teams","hooks_url":"https://api.github.com/repos/google/protobuf/hooks","issue_events_url":"https://api.github.com/repos/google/protobuf/issues/events{/number}","events_url":"https://api.github.com/repos/google/protobuf/events","assignees_url":"https://api.github.com/repos/google/protobuf/assignees{/user}","branches_url":"https://api.github.com/repos/google/protobuf/branches{/branch}","tags_url":"https://api.github.com/repos/google/protobuf/tags","blobs_url":"https://api.github.com/repos/google/protobuf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/protobuf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/protobuf/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/protobuf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/protobuf/statuses/{sha}","languages_url":"https://api.github.com/repos/google/protobuf/languages","stargazers_url":"https://api.github.com/repos/google/protobuf/stargazers","contributors_url":"https://api.github.com/repos/google/protobuf/contributors","subscribers_url":"https://api.github.com/repos/google/protobuf/subscribers","subscription_url":"https://api.github.com/repos/google/protobuf/subscription","commits_url":"https://api.github.com/repos/google/protobuf/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/protobuf/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/protobuf/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/protobuf/issues/comments/{number}","contents_url":"https://api.github.com/repos/google/protobuf/contents/{+path}","compare_url":"https://api.github.com/repos/google/protobuf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/protobuf/merges","archive_url":"https://api.github.com/repos/google/protobuf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/protobuf/downloads","issues_url":"https://api.github.com/repos/google/protobuf/issues{/number}","pulls_url":"https://api.github.com/repos/google/protobuf/pulls{/number}","milestones_url":"https://api.github.com/repos/google/protobuf/milestones{/number}","notifications_url":"https://api.github.com/repos/google/protobuf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/protobuf/labels{/name}","releases_url":"https://api.github.com/repos/google/protobuf/releases{/id}","created_at":"2014-08-26T15:52:15Z","updated_at":"2015-01-06T17:55:48Z","pushed_at":"2015-01-06T01:59:15Z","git_url":"git://github.com/google/protobuf.git","ssh_url":"git@github.com:google/protobuf.git","clone_url":"https://github.com/google/protobuf.git","svn_url":"https://github.com/google/protobuf","homepage":"https://developers.google.com/protocol-buffers/","size":14624,"stargazers_count":1375,"watchers_count":1375,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":314,"mirror_url":null,"open_issues_count":42,"forks":314,"open_issues":42,"watchers":1375,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/protobuf/pulls/146"},"html":{"href":"https://github.com/google/protobuf/pull/146"},"issue":{"href":"https://api.github.com/repos/google/protobuf/issues/146"},"comments":{"href":"https://api.github.com/repos/google/protobuf/issues/146/comments"},"review_comments":{"href":"https://api.github.com/repos/google/protobuf/pulls/146/comments"},"review_comment":{"href":"https://api.github.com/repos/google/protobuf/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/google/protobuf/pulls/146/commits"},"statuses":{"href":"https://api.github.com/repos/google/protobuf/statuses/d6536453140af8d7a4b95aa5948946bee14aae01"}}}}