{"action":"created","comment":{"url":"https://api.github.com/repos/rubygems/rubygems.org/pulls/comments/34004182","id":34004182,"diff_hunk":"@@ -0,0 +1,5 @@\n+class AddExtensionsToVersions < ActiveRecord::Migration\n+  def change\n+    add_column :versions, :extensions, :boolean","path":"db/migrate/20150618183029_add_extensions_to_versions.rb","position":3,"original_position":3,"commit_id":"12c80e43135c13e3a1d299a8e517835666b01dc9","original_commit_id":"12c80e43135c13e3a1d299a8e517835666b01dc9","user":{"login":"qrush","id":12610,"avatar_url":"https://avatars.githubusercontent.com/u/12610?v=3","gravatar_id":"","url":"https://api.github.com/users/qrush","html_url":"https://github.com/qrush","followers_url":"https://api.github.com/users/qrush/followers","following_url":"https://api.github.com/users/qrush/following{/other_user}","gists_url":"https://api.github.com/users/qrush/gists{/gist_id}","starred_url":"https://api.github.com/users/qrush/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qrush/subscriptions","organizations_url":"https://api.github.com/users/qrush/orgs","repos_url":"https://api.github.com/users/qrush/repos","events_url":"https://api.github.com/users/qrush/events{/privacy}","received_events_url":"https://api.github.com/users/qrush/received_events","type":"User","site_admin":false},"body":"Add a default state here or we'll end up with a tri-state boolean column (true, false, nil)","created_at":"2015-07-07T02:45:58Z","updated_at":"2015-07-07T02:45:58Z","html_url":"https://github.com/rubygems/rubygems.org/pull/984#discussion_r34004182","pull_request_url":"https://api.github.com/repos/rubygems/rubygems.org/pulls/984","_links":{"self":{"href":"https://api.github.com/repos/rubygems/rubygems.org/pulls/comments/34004182"},"html":{"href":"https://github.com/rubygems/rubygems.org/pull/984#discussion_r34004182"},"pull_request":{"href":"https://api.github.com/repos/rubygems/rubygems.org/pulls/984"}}},"pull_request":{"url":"https://api.github.com/repos/rubygems/rubygems.org/pulls/984","id":38254502,"html_url":"https://github.com/rubygems/rubygems.org/pull/984","diff_url":"https://github.com/rubygems/rubygems.org/pull/984.diff","patch_url":"https://github.com/rubygems/rubygems.org/pull/984.patch","issue_url":"https://api.github.com/repos/rubygems/rubygems.org/issues/984","number":984,"state":"open","locked":false,"title":"486 native extensions","user":{"login":"Gedrovits","id":2951943,"avatar_url":"https://avatars.githubusercontent.com/u/2951943?v=3","gravatar_id":"","url":"https://api.github.com/users/Gedrovits","html_url":"https://github.com/Gedrovits","followers_url":"https://api.github.com/users/Gedrovits/followers","following_url":"https://api.github.com/users/Gedrovits/following{/other_user}","gists_url":"https://api.github.com/users/Gedrovits/gists{/gist_id}","starred_url":"https://api.github.com/users/Gedrovits/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gedrovits/subscriptions","organizations_url":"https://api.github.com/users/Gedrovits/orgs","repos_url":"https://api.github.com/users/Gedrovits/repos","events_url":"https://api.github.com/users/Gedrovits/events{/privacy}","received_events_url":"https://api.github.com/users/Gedrovits/received_events","type":"User","site_admin":false},"body":"https://github.com/rubygems/rubygems.org/issues/486\r\n\r\nOK, so how about this approach.\r\nI've added the boolean field *extensions* to Version model, which is nil by default. On gem pull it checks for the spec .extensions attribute, if it's not blank, when we expect this gem have native extensions, so we set *extensions* to true, otherwise false.\r\n\r\nOn the gem show page (only on it, no index involved) we show beneath the REQUIRED RUBY VERSION: block for native extensions, with possible values: Yes, None, Unknown.\r\nMy approach is not to rebuild the existing gems, that's why I sticked with nil instead of false by default. This is because we don't know from start is there extensions for the gem, until it's pushed again.\r\n\r\n![screen shot 2015-06-22 at 20 15 30](https://cloud.githubusercontent.com/assets/2951943/8287909/784031b4-191b-11e5-8025-eb958dd90f2b.png)\r\n\r\nMaybe I've missed something to test against, if this is true, feel free to point me up on the problem place.","created_at":"2015-06-22T17:16:38Z","updated_at":"2015-07-07T02:45:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"01e18f4eba35b0667664dc44d426df6d598a60f0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rubygems/rubygems.org/pulls/984/commits","review_comments_url":"https://api.github.com/repos/rubygems/rubygems.org/pulls/984/comments","review_comment_url":"https://api.github.com/repos/rubygems/rubygems.org/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rubygems/rubygems.org/issues/984/comments","statuses_url":"https://api.github.com/repos/rubygems/rubygems.org/statuses/12c80e43135c13e3a1d299a8e517835666b01dc9","head":{"label":"Gedrovits:486-native-extensions","ref":"486-native-extensions","sha":"12c80e43135c13e3a1d299a8e517835666b01dc9","user":{"login":"Gedrovits","id":2951943,"avatar_url":"https://avatars.githubusercontent.com/u/2951943?v=3","gravatar_id":"","url":"https://api.github.com/users/Gedrovits","html_url":"https://github.com/Gedrovits","followers_url":"https://api.github.com/users/Gedrovits/followers","following_url":"https://api.github.com/users/Gedrovits/following{/other_user}","gists_url":"https://api.github.com/users/Gedrovits/gists{/gist_id}","starred_url":"https://api.github.com/users/Gedrovits/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gedrovits/subscriptions","organizations_url":"https://api.github.com/users/Gedrovits/orgs","repos_url":"https://api.github.com/users/Gedrovits/repos","events_url":"https://api.github.com/users/Gedrovits/events{/privacy}","received_events_url":"https://api.github.com/users/Gedrovits/received_events","type":"User","site_admin":false},"repo":{"id":37868800,"name":"rubygems.org","full_name":"Gedrovits/rubygems.org","owner":{"login":"Gedrovits","id":2951943,"avatar_url":"https://avatars.githubusercontent.com/u/2951943?v=3","gravatar_id":"","url":"https://api.github.com/users/Gedrovits","html_url":"https://github.com/Gedrovits","followers_url":"https://api.github.com/users/Gedrovits/followers","following_url":"https://api.github.com/users/Gedrovits/following{/other_user}","gists_url":"https://api.github.com/users/Gedrovits/gists{/gist_id}","starred_url":"https://api.github.com/users/Gedrovits/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gedrovits/subscriptions","organizations_url":"https://api.github.com/users/Gedrovits/orgs","repos_url":"https://api.github.com/users/Gedrovits/repos","events_url":"https://api.github.com/users/Gedrovits/events{/privacy}","received_events_url":"https://api.github.com/users/Gedrovits/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Gedrovits/rubygems.org","description":"The Ruby community's gem hosting service.","fork":true,"url":"https://api.github.com/repos/Gedrovits/rubygems.org","forks_url":"https://api.github.com/repos/Gedrovits/rubygems.org/forks","keys_url":"https://api.github.com/repos/Gedrovits/rubygems.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Gedrovits/rubygems.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Gedrovits/rubygems.org/teams","hooks_url":"https://api.github.com/repos/Gedrovits/rubygems.org/hooks","issue_events_url":"https://api.github.com/repos/Gedrovits/rubygems.org/issues/events{/number}","events_url":"https://api.github.com/repos/Gedrovits/rubygems.org/events","assignees_url":"https://api.github.com/repos/Gedrovits/rubygems.org/assignees{/user}","branches_url":"https://api.github.com/repos/Gedrovits/rubygems.org/branches{/branch}","tags_url":"https://api.github.com/repos/Gedrovits/rubygems.org/tags","blobs_url":"https://api.github.com/repos/Gedrovits/rubygems.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Gedrovits/rubygems.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Gedrovits/rubygems.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/Gedrovits/rubygems.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Gedrovits/rubygems.org/statuses/{sha}","languages_url":"https://api.github.com/repos/Gedrovits/rubygems.org/languages","stargazers_url":"https://api.github.com/repos/Gedrovits/rubygems.org/stargazers","contributors_url":"https://api.github.com/repos/Gedrovits/rubygems.org/contributors","subscribers_url":"https://api.github.com/repos/Gedrovits/rubygems.org/subscribers","subscription_url":"https://api.github.com/repos/Gedrovits/rubygems.org/subscription","commits_url":"https://api.github.com/repos/Gedrovits/rubygems.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/Gedrovits/rubygems.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/Gedrovits/rubygems.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/Gedrovits/rubygems.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/Gedrovits/rubygems.org/contents/{+path}","compare_url":"https://api.github.com/repos/Gedrovits/rubygems.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Gedrovits/rubygems.org/merges","archive_url":"https://api.github.com/repos/Gedrovits/rubygems.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Gedrovits/rubygems.org/downloads","issues_url":"https://api.github.com/repos/Gedrovits/rubygems.org/issues{/number}","pulls_url":"https://api.github.com/repos/Gedrovits/rubygems.org/pulls{/number}","milestones_url":"https://api.github.com/repos/Gedrovits/rubygems.org/milestones{/number}","notifications_url":"https://api.github.com/repos/Gedrovits/rubygems.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Gedrovits/rubygems.org/labels{/name}","releases_url":"https://api.github.com/repos/Gedrovits/rubygems.org/releases{/id}","created_at":"2015-06-22T17:07:28Z","updated_at":"2015-06-22T17:07:29Z","pushed_at":"2015-06-22T17:10:08Z","git_url":"git://github.com/Gedrovits/rubygems.org.git","ssh_url":"git@github.com:Gedrovits/rubygems.org.git","clone_url":"https://github.com/Gedrovits/rubygems.org.git","svn_url":"https://github.com/Gedrovits/rubygems.org","homepage":"https://rubygems.org","size":7995,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":false,"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":"rubygems:master","ref":"master","sha":"375c2843e72236459f73ced3330aca515205d281","user":{"login":"rubygems","id":208761,"avatar_url":"https://avatars.githubusercontent.com/u/208761?v=3","gravatar_id":"","url":"https://api.github.com/users/rubygems","html_url":"https://github.com/rubygems","followers_url":"https://api.github.com/users/rubygems/followers","following_url":"https://api.github.com/users/rubygems/following{/other_user}","gists_url":"https://api.github.com/users/rubygems/gists{/gist_id}","starred_url":"https://api.github.com/users/rubygems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubygems/subscriptions","organizations_url":"https://api.github.com/users/rubygems/orgs","repos_url":"https://api.github.com/users/rubygems/repos","events_url":"https://api.github.com/users/rubygems/events{/privacy}","received_events_url":"https://api.github.com/users/rubygems/received_events","type":"Organization","site_admin":false},"repo":{"id":117646,"name":"rubygems.org","full_name":"rubygems/rubygems.org","owner":{"login":"rubygems","id":208761,"avatar_url":"https://avatars.githubusercontent.com/u/208761?v=3","gravatar_id":"","url":"https://api.github.com/users/rubygems","html_url":"https://github.com/rubygems","followers_url":"https://api.github.com/users/rubygems/followers","following_url":"https://api.github.com/users/rubygems/following{/other_user}","gists_url":"https://api.github.com/users/rubygems/gists{/gist_id}","starred_url":"https://api.github.com/users/rubygems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubygems/subscriptions","organizations_url":"https://api.github.com/users/rubygems/orgs","repos_url":"https://api.github.com/users/rubygems/repos","events_url":"https://api.github.com/users/rubygems/events{/privacy}","received_events_url":"https://api.github.com/users/rubygems/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rubygems/rubygems.org","description":"The Ruby community's gem hosting service.","fork":false,"url":"https://api.github.com/repos/rubygems/rubygems.org","forks_url":"https://api.github.com/repos/rubygems/rubygems.org/forks","keys_url":"https://api.github.com/repos/rubygems/rubygems.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rubygems/rubygems.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rubygems/rubygems.org/teams","hooks_url":"https://api.github.com/repos/rubygems/rubygems.org/hooks","issue_events_url":"https://api.github.com/repos/rubygems/rubygems.org/issues/events{/number}","events_url":"https://api.github.com/repos/rubygems/rubygems.org/events","assignees_url":"https://api.github.com/repos/rubygems/rubygems.org/assignees{/user}","branches_url":"https://api.github.com/repos/rubygems/rubygems.org/branches{/branch}","tags_url":"https://api.github.com/repos/rubygems/rubygems.org/tags","blobs_url":"https://api.github.com/repos/rubygems/rubygems.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rubygems/rubygems.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rubygems/rubygems.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/rubygems/rubygems.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rubygems/rubygems.org/statuses/{sha}","languages_url":"https://api.github.com/repos/rubygems/rubygems.org/languages","stargazers_url":"https://api.github.com/repos/rubygems/rubygems.org/stargazers","contributors_url":"https://api.github.com/repos/rubygems/rubygems.org/contributors","subscribers_url":"https://api.github.com/repos/rubygems/rubygems.org/subscribers","subscription_url":"https://api.github.com/repos/rubygems/rubygems.org/subscription","commits_url":"https://api.github.com/repos/rubygems/rubygems.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/rubygems/rubygems.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/rubygems/rubygems.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/rubygems/rubygems.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/rubygems/rubygems.org/contents/{+path}","compare_url":"https://api.github.com/repos/rubygems/rubygems.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rubygems/rubygems.org/merges","archive_url":"https://api.github.com/repos/rubygems/rubygems.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rubygems/rubygems.org/downloads","issues_url":"https://api.github.com/repos/rubygems/rubygems.org/issues{/number}","pulls_url":"https://api.github.com/repos/rubygems/rubygems.org/pulls{/number}","milestones_url":"https://api.github.com/repos/rubygems/rubygems.org/milestones{/number}","notifications_url":"https://api.github.com/repos/rubygems/rubygems.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rubygems/rubygems.org/labels{/name}","releases_url":"https://api.github.com/repos/rubygems/rubygems.org/releases{/id}","created_at":"2009-01-29T22:30:46Z","updated_at":"2015-07-02T03:24:03Z","pushed_at":"2015-07-07T02:32:33Z","git_url":"git://github.com/rubygems/rubygems.org.git","ssh_url":"git@github.com:rubygems/rubygems.org.git","clone_url":"https://github.com/rubygems/rubygems.org.git","svn_url":"https://github.com/rubygems/rubygems.org","homepage":"https://rubygems.org","size":640045,"stargazers_count":1196,"watchers_count":1196,"language":"HTML","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":459,"mirror_url":null,"open_issues_count":50,"forks":459,"open_issues":50,"watchers":1196,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rubygems/rubygems.org/pulls/984"},"html":{"href":"https://github.com/rubygems/rubygems.org/pull/984"},"issue":{"href":"https://api.github.com/repos/rubygems/rubygems.org/issues/984"},"comments":{"href":"https://api.github.com/repos/rubygems/rubygems.org/issues/984/comments"},"review_comments":{"href":"https://api.github.com/repos/rubygems/rubygems.org/pulls/984/comments"},"review_comment":{"href":"https://api.github.com/repos/rubygems/rubygems.org/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rubygems/rubygems.org/pulls/984/commits"},"statuses":{"href":"https://api.github.com/repos/rubygems/rubygems.org/statuses/12c80e43135c13e3a1d299a8e517835666b01dc9"}}}}