{"action":"opened","number":260,"pull_request":{"url":"https://api.github.com/repos/seattlerb/ruby_parser/pulls/260","id":169509992,"html_url":"https://github.com/seattlerb/ruby_parser/pull/260","diff_url":"https://github.com/seattlerb/ruby_parser/pull/260.diff","patch_url":"https://github.com/seattlerb/ruby_parser/pull/260.patch","issue_url":"https://api.github.com/repos/seattlerb/ruby_parser/issues/260","number":260,"state":"open","locked":false,"title":"Set up legacy gem for 1.8/1.9 only","user":{"login":"presidentbeef","id":75613,"avatar_url":"https://avatars0.githubusercontent.com/u/75613?v=4","gravatar_id":"","url":"https://api.github.com/users/presidentbeef","html_url":"https://github.com/presidentbeef","followers_url":"https://api.github.com/users/presidentbeef/followers","following_url":"https://api.github.com/users/presidentbeef/following{/other_user}","gists_url":"https://api.github.com/users/presidentbeef/gists{/gist_id}","starred_url":"https://api.github.com/users/presidentbeef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/presidentbeef/subscriptions","organizations_url":"https://api.github.com/users/presidentbeef/orgs","repos_url":"https://api.github.com/users/presidentbeef/repos","events_url":"https://api.github.com/users/presidentbeef/events{/privacy}","received_events_url":"https://api.github.com/users/presidentbeef/received_events","type":"User","site_admin":false},"body":"Here is a cut at a legacy gem.\r\n\r\nI moved the relevant files to `lib/ruby_parser/legacy` (looks better and avoids `require` conflicts) and namespaced most things. `RubyParserStuff` is renamed `LegacyRubyParserStuff`.\r\n\r\nThis should work with the regular ruby_parser gem or by itself.\r\n\r\nTested with the https://github.com/zenspider/ruby_parser/tree/drop_legacy branch:\r\n```\r\nirb\r\n2.5.0 :001 > require 'ruby_parser'\r\n => true\r\n2.5.0 :002 > RubyParser::VERSIONS\r\n => [RubyParser::V25, RubyParser::V24, RubyParser::V23, RubyParser::V22, RubyParser::V21, RubyParser::V20]\r\n2.5.0 :003 > require 'ruby_parser/legacy'\r\n => true\r\n2.5.0 :004 > RubyParser::VERSIONS\r\n => [RubyParser::V25, RubyParser::V24, RubyParser::V23, RubyParser::V22, RubyParser::V21, RubyParser::V20, RubyParser::V19, RubyParser::V18]\r\n```\r\n\r\nTests pass.\r\n\r\nIf there is drift in the main `RubyParser` class, it could cause problems when the two gems are used together, since the legacy one avoids overwriting it.\r\n\r\nOtherwise I think it's fairly clean.","created_at":"2018-02-15T23:03:10Z","updated_at":"2018-02-15T23:03:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/seattlerb/ruby_parser/pulls/260/commits","review_comments_url":"https://api.github.com/repos/seattlerb/ruby_parser/pulls/260/comments","review_comment_url":"https://api.github.com/repos/seattlerb/ruby_parser/pulls/comments{/number}","comments_url":"https://api.github.com/repos/seattlerb/ruby_parser/issues/260/comments","statuses_url":"https://api.github.com/repos/seattlerb/ruby_parser/statuses/9743694d498a1e2b285fecf71fb646a33d9d27a9","head":{"label":"presidentbeef:only_1.8_1.9","ref":"only_1.8_1.9","sha":"9743694d498a1e2b285fecf71fb646a33d9d27a9","user":{"login":"presidentbeef","id":75613,"avatar_url":"https://avatars0.githubusercontent.com/u/75613?v=4","gravatar_id":"","url":"https://api.github.com/users/presidentbeef","html_url":"https://github.com/presidentbeef","followers_url":"https://api.github.com/users/presidentbeef/followers","following_url":"https://api.github.com/users/presidentbeef/following{/other_user}","gists_url":"https://api.github.com/users/presidentbeef/gists{/gist_id}","starred_url":"https://api.github.com/users/presidentbeef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/presidentbeef/subscriptions","organizations_url":"https://api.github.com/users/presidentbeef/orgs","repos_url":"https://api.github.com/users/presidentbeef/repos","events_url":"https://api.github.com/users/presidentbeef/events{/privacy}","received_events_url":"https://api.github.com/users/presidentbeef/received_events","type":"User","site_admin":false},"repo":{"id":2351916,"name":"ruby_parser","full_name":"presidentbeef/ruby_parser","owner":{"login":"presidentbeef","id":75613,"avatar_url":"https://avatars0.githubusercontent.com/u/75613?v=4","gravatar_id":"","url":"https://api.github.com/users/presidentbeef","html_url":"https://github.com/presidentbeef","followers_url":"https://api.github.com/users/presidentbeef/followers","following_url":"https://api.github.com/users/presidentbeef/following{/other_user}","gists_url":"https://api.github.com/users/presidentbeef/gists{/gist_id}","starred_url":"https://api.github.com/users/presidentbeef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/presidentbeef/subscriptions","organizations_url":"https://api.github.com/users/presidentbeef/orgs","repos_url":"https://api.github.com/users/presidentbeef/repos","events_url":"https://api.github.com/users/presidentbeef/events{/privacy}","received_events_url":"https://api.github.com/users/presidentbeef/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/presidentbeef/ruby_parser","description":null,"fork":true,"url":"https://api.github.com/repos/presidentbeef/ruby_parser","forks_url":"https://api.github.com/repos/presidentbeef/ruby_parser/forks","keys_url":"https://api.github.com/repos/presidentbeef/ruby_parser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/presidentbeef/ruby_parser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/presidentbeef/ruby_parser/teams","hooks_url":"https://api.github.com/repos/presidentbeef/ruby_parser/hooks","issue_events_url":"https://api.github.com/repos/presidentbeef/ruby_parser/issues/events{/number}","events_url":"https://api.github.com/repos/presidentbeef/ruby_parser/events","assignees_url":"https://api.github.com/repos/presidentbeef/ruby_parser/assignees{/user}","branches_url":"https://api.github.com/repos/presidentbeef/ruby_parser/branches{/branch}","tags_url":"https://api.github.com/repos/presidentbeef/ruby_parser/tags","blobs_url":"https://api.github.com/repos/presidentbeef/ruby_parser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/presidentbeef/ruby_parser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/presidentbeef/ruby_parser/git/refs{/sha}","trees_url":"https://api.github.com/repos/presidentbeef/ruby_parser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/presidentbeef/ruby_parser/statuses/{sha}","languages_url":"https://api.github.com/repos/presidentbeef/ruby_parser/languages","stargazers_url":"https://api.github.com/repos/presidentbeef/ruby_parser/stargazers","contributors_url":"https://api.github.com/repos/presidentbeef/ruby_parser/contributors","subscribers_url":"https://api.github.com/repos/presidentbeef/ruby_parser/subscribers","subscription_url":"https://api.github.com/repos/presidentbeef/ruby_parser/subscription","commits_url":"https://api.github.com/repos/presidentbeef/ruby_parser/commits{/sha}","git_commits_url":"https://api.github.com/repos/presidentbeef/ruby_parser/git/commits{/sha}","comments_url":"https://api.github.com/repos/presidentbeef/ruby_parser/comments{/number}","issue_comment_url":"https://api.github.com/repos/presidentbeef/ruby_parser/issues/comments{/number}","contents_url":"https://api.github.com/repos/presidentbeef/ruby_parser/contents/{+path}","compare_url":"https://api.github.com/repos/presidentbeef/ruby_parser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/presidentbeef/ruby_parser/merges","archive_url":"https://api.github.com/repos/presidentbeef/ruby_parser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/presidentbeef/ruby_parser/downloads","issues_url":"https://api.github.com/repos/presidentbeef/ruby_parser/issues{/number}","pulls_url":"https://api.github.com/repos/presidentbeef/ruby_parser/pulls{/number}","milestones_url":"https://api.github.com/repos/presidentbeef/ruby_parser/milestones{/number}","notifications_url":"https://api.github.com/repos/presidentbeef/ruby_parser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/presidentbeef/ruby_parser/labels{/name}","releases_url":"https://api.github.com/repos/presidentbeef/ruby_parser/releases{/id}","deployments_url":"https://api.github.com/repos/presidentbeef/ruby_parser/deployments","created_at":"2011-09-08T22:14:45Z","updated_at":"2015-07-27T03:41:12Z","pushed_at":"2018-02-15T22:52:50Z","git_url":"git://github.com/presidentbeef/ruby_parser.git","ssh_url":"git@github.com:presidentbeef/ruby_parser.git","clone_url":"https://github.com/presidentbeef/ruby_parser.git","svn_url":"https://github.com/presidentbeef/ruby_parser","homepage":null,"size":1991,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"seattlerb:master","ref":"master","sha":"588c7650ce4e111800c1d4c9f3b86f3bc11ebb67","user":{"login":"seattlerb","id":55277,"avatar_url":"https://avatars0.githubusercontent.com/u/55277?v=4","gravatar_id":"","url":"https://api.github.com/users/seattlerb","html_url":"https://github.com/seattlerb","followers_url":"https://api.github.com/users/seattlerb/followers","following_url":"https://api.github.com/users/seattlerb/following{/other_user}","gists_url":"https://api.github.com/users/seattlerb/gists{/gist_id}","starred_url":"https://api.github.com/users/seattlerb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seattlerb/subscriptions","organizations_url":"https://api.github.com/users/seattlerb/orgs","repos_url":"https://api.github.com/users/seattlerb/repos","events_url":"https://api.github.com/users/seattlerb/events{/privacy}","received_events_url":"https://api.github.com/users/seattlerb/received_events","type":"Organization","site_admin":false},"repo":{"id":131523,"name":"ruby_parser","full_name":"seattlerb/ruby_parser","owner":{"login":"seattlerb","id":55277,"avatar_url":"https://avatars0.githubusercontent.com/u/55277?v=4","gravatar_id":"","url":"https://api.github.com/users/seattlerb","html_url":"https://github.com/seattlerb","followers_url":"https://api.github.com/users/seattlerb/followers","following_url":"https://api.github.com/users/seattlerb/following{/other_user}","gists_url":"https://api.github.com/users/seattlerb/gists{/gist_id}","starred_url":"https://api.github.com/users/seattlerb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seattlerb/subscriptions","organizations_url":"https://api.github.com/users/seattlerb/orgs","repos_url":"https://api.github.com/users/seattlerb/repos","events_url":"https://api.github.com/users/seattlerb/events{/privacy}","received_events_url":"https://api.github.com/users/seattlerb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/seattlerb/ruby_parser","description":null,"fork":false,"url":"https://api.github.com/repos/seattlerb/ruby_parser","forks_url":"https://api.github.com/repos/seattlerb/ruby_parser/forks","keys_url":"https://api.github.com/repos/seattlerb/ruby_parser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/seattlerb/ruby_parser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/seattlerb/ruby_parser/teams","hooks_url":"https://api.github.com/repos/seattlerb/ruby_parser/hooks","issue_events_url":"https://api.github.com/repos/seattlerb/ruby_parser/issues/events{/number}","events_url":"https://api.github.com/repos/seattlerb/ruby_parser/events","assignees_url":"https://api.github.com/repos/seattlerb/ruby_parser/assignees{/user}","branches_url":"https://api.github.com/repos/seattlerb/ruby_parser/branches{/branch}","tags_url":"https://api.github.com/repos/seattlerb/ruby_parser/tags","blobs_url":"https://api.github.com/repos/seattlerb/ruby_parser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/seattlerb/ruby_parser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/seattlerb/ruby_parser/git/refs{/sha}","trees_url":"https://api.github.com/repos/seattlerb/ruby_parser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/seattlerb/ruby_parser/statuses/{sha}","languages_url":"https://api.github.com/repos/seattlerb/ruby_parser/languages","stargazers_url":"https://api.github.com/repos/seattlerb/ruby_parser/stargazers","contributors_url":"https://api.github.com/repos/seattlerb/ruby_parser/contributors","subscribers_url":"https://api.github.com/repos/seattlerb/ruby_parser/subscribers","subscription_url":"https://api.github.com/repos/seattlerb/ruby_parser/subscription","commits_url":"https://api.github.com/repos/seattlerb/ruby_parser/commits{/sha}","git_commits_url":"https://api.github.com/repos/seattlerb/ruby_parser/git/commits{/sha}","comments_url":"https://api.github.com/repos/seattlerb/ruby_parser/comments{/number}","issue_comment_url":"https://api.github.com/repos/seattlerb/ruby_parser/issues/comments{/number}","contents_url":"https://api.github.com/repos/seattlerb/ruby_parser/contents/{+path}","compare_url":"https://api.github.com/repos/seattlerb/ruby_parser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/seattlerb/ruby_parser/merges","archive_url":"https://api.github.com/repos/seattlerb/ruby_parser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/seattlerb/ruby_parser/downloads","issues_url":"https://api.github.com/repos/seattlerb/ruby_parser/issues{/number}","pulls_url":"https://api.github.com/repos/seattlerb/ruby_parser/pulls{/number}","milestones_url":"https://api.github.com/repos/seattlerb/ruby_parser/milestones{/number}","notifications_url":"https://api.github.com/repos/seattlerb/ruby_parser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/seattlerb/ruby_parser/labels{/name}","releases_url":"https://api.github.com/repos/seattlerb/ruby_parser/releases{/id}","deployments_url":"https://api.github.com/repos/seattlerb/ruby_parser/deployments","created_at":"2009-02-18T07:43:03Z","updated_at":"2018-02-15T08:28:13Z","pushed_at":"2018-02-14T21:03:58Z","git_url":"git://github.com/seattlerb/ruby_parser.git","ssh_url":"git@github.com:seattlerb/ruby_parser.git","clone_url":"https://github.com/seattlerb/ruby_parser.git","svn_url":"https://github.com/seattlerb/ruby_parser","homepage":null,"size":1969,"stargazers_count":350,"watchers_count":350,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":93,"mirror_url":null,"archived":false,"open_issues_count":32,"license":null,"forks":93,"open_issues":32,"watchers":350,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/seattlerb/ruby_parser/pulls/260"},"html":{"href":"https://github.com/seattlerb/ruby_parser/pull/260"},"issue":{"href":"https://api.github.com/repos/seattlerb/ruby_parser/issues/260"},"comments":{"href":"https://api.github.com/repos/seattlerb/ruby_parser/issues/260/comments"},"review_comments":{"href":"https://api.github.com/repos/seattlerb/ruby_parser/pulls/260/comments"},"review_comment":{"href":"https://api.github.com/repos/seattlerb/ruby_parser/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/seattlerb/ruby_parser/pulls/260/commits"},"statuses":{"href":"https://api.github.com/repos/seattlerb/ruby_parser/statuses/9743694d498a1e2b285fecf71fb646a33d9d27a9"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":67054,"deletions":4923,"changed_files":23}}
{"actor":{"display_login":"presidentbeef"}}