diff options
| author | Andreas Hellwig <a5308y@gmail.com> | 2015-10-27 22:01:56 +0100 |
|---|---|---|
| committer | Andreas Hellwig <a5308y@gmail.com> | 2015-10-27 22:08:21 +0100 |
| commit | f7ee5ae6e99cd5503de8916174012f98f6518862 (patch) | |
| tree | 4135917f4842e3944f0de74f50f3ee0441c33196 /lib/bundler/source/path | |
| parent | 9e6f9d88b91d9d0644ee610d7cea09aebc43751f (diff) | |
| download | bundler-f7ee5ae6e99cd5503de8916174012f98f6518862.tar.gz | |
My goal was to reveal the main part of install_gem_from_spec. From my
perspective the main part is:
1. Install
2. Generate stubs
3. Print message to the user
(4. handle exceptions)
While working on it I found that Bundler::Installer's run method and
instance variables weren't used when installing gems with
install_gem_from_spec. The installer was (and still is) only used to
generate executable stubs.
So I inserted the new GemInstaller in ParallelInstaller; passing the
instantiated Bundler::Installer to the GemInstaller only to generate
the executable stubs.
Based on this I would continue by extracting two BinstubGenerator
classes and removing GemInstaller's dependency on Bundler::Installer,
possibly allowing for a more concise way to generate binstubs in other
parts of bundler.
I was a bit intimidated by the amount of installers and weary to add
another one to this contested namespace. So I checked in with
@indirect who approved of the general direction of the refactoring and
suggested to rename the old GemInstaller to RubyGemsGemInstaller.
Diffstat (limited to 'lib/bundler/source/path')
| -rw-r--r-- | lib/bundler/source/path/installer.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/source/path/installer.rb b/lib/bundler/source/path/installer.rb index 87e9a6e9ca..74542dd913 100644 --- a/lib/bundler/source/path/installer.rb +++ b/lib/bundler/source/path/installer.rb @@ -1,7 +1,7 @@ module Bundler class Source class Path - class Installer < Bundler::GemInstaller + class Installer < Bundler::RubyGemsGemInstaller attr_reader :spec def initialize(spec, options = {}) |
