{"action":"created","issue":{"url":"https://api.github.com/repos/bundler/bundler/issues/4063","labels_url":"https://api.github.com/repos/bundler/bundler/issues/4063/labels{/name}","comments_url":"https://api.github.com/repos/bundler/bundler/issues/4063/comments","events_url":"https://api.github.com/repos/bundler/bundler/issues/4063/events","html_url":"https://github.com/bundler/bundler/pull/4063","id":111963084,"number":4063,"title":"Extracting a new \"GemInstaller\" from installer.rb","user":{"login":"A5308Y","id":226510,"avatar_url":"https://avatars.githubusercontent.com/u/226510?v=3","gravatar_id":"","url":"https://api.github.com/users/A5308Y","html_url":"https://github.com/A5308Y","followers_url":"https://api.github.com/users/A5308Y/followers","following_url":"https://api.github.com/users/A5308Y/following{/other_user}","gists_url":"https://api.github.com/users/A5308Y/gists{/gist_id}","starred_url":"https://api.github.com/users/A5308Y/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/A5308Y/subscriptions","organizations_url":"https://api.github.com/users/A5308Y/orgs","repos_url":"https://api.github.com/users/A5308Y/repos","events_url":"https://api.github.com/users/A5308Y/events{/privacy}","received_events_url":"https://api.github.com/users/A5308Y/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-10-17T13:24:16Z","updated_at":"2015-10-27T08:37:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bundler/bundler/pulls/4063","html_url":"https://github.com/bundler/bundler/pull/4063","diff_url":"https://github.com/bundler/bundler/pull/4063.diff","patch_url":"https://github.com/bundler/bundler/pull/4063.patch"},"body":"My goal was to reveal the main part of install_gem_from_spec. From my\r\nperspective the main part is:\r\n1. Install\r\n2. Generate stubs\r\n3. Print message to the user\r\n(4. handle exceptions)\r\n\r\nWhile working on it I found that Bundler::Installer's run method and\r\ninstance variables weren't used when installing gems with\r\ninstall_gem_from_spec. The installer was (and still is) only used to\r\ngenerate executable stubs.\r\nSo I inserted the new GemInstaller in ParallelInstaller; passing the\r\ninstantiated Bundler::Installer to the GemInstaller only to generate\r\nthe executable stubs.\r\n\r\nBased on this I would continue by extracting two BinstubGenerator\r\nclasses and removing GemInstaller's dependency on Bundler::Installer,\r\npossibly allowing for a more concise way to generate binstubs in other\r\nparts of bundler.\r\n\r\nI was a bit intimidated by the amount of installers and weary to add\r\nanother one to this contested namespace. So I checked in with\r\n@indirect who approved of the general direction of the refactoring and\r\nsuggested to rename the old GemInstaller to RubyGemsGemInstaller."},"comment":{"url":"https://api.github.com/repos/bundler/bundler/issues/comments/151414362","html_url":"https://github.com/bundler/bundler/pull/4063#issuecomment-151414362","issue_url":"https://api.github.com/repos/bundler/bundler/issues/4063","id":151414362,"user":{"login":"A5308Y","id":226510,"avatar_url":"https://avatars.githubusercontent.com/u/226510?v=3","gravatar_id":"","url":"https://api.github.com/users/A5308Y","html_url":"https://github.com/A5308Y","followers_url":"https://api.github.com/users/A5308Y/followers","following_url":"https://api.github.com/users/A5308Y/following{/other_user}","gists_url":"https://api.github.com/users/A5308Y/gists{/gist_id}","starred_url":"https://api.github.com/users/A5308Y/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/A5308Y/subscriptions","organizations_url":"https://api.github.com/users/A5308Y/orgs","repos_url":"https://api.github.com/users/A5308Y/repos","events_url":"https://api.github.com/users/A5308Y/events{/privacy}","received_events_url":"https://api.github.com/users/A5308Y/received_events","type":"User","site_admin":false},"created_at":"2015-10-27T08:37:37Z","updated_at":"2015-10-27T08:37:37Z","body":"Sorry for the delay. I had a bike accident and hurt my dominant hand. I didn't even look at github-things for quite a while now. It's a lot better now. I still have to type carefully though. I see what I can do today in the (European) evening.\r\n\r\nRegarding the failure:\r\nRubocop says not to rescue Exception but StandardError. Exception was rescued before. So I guess my change only allowed to see it. \r\nWould rescuing StandardError a functionality change in bundler? Would that be covered by the specs?"}}