class Gemsmith::Tools::Installer
Installs a locally built gem.
Constants
- STEPS
-
Order matters.
Attributes
Public Class Methods
Source
# File lib/gemsmith/tools/installer.rb, line 15 def initialize(steps: STEPS, **) super(**) @steps = steps end
Calls superclass method
Public Instance Methods
Source
# File lib/gemsmith/tools/installer.rb, line 20 def call specification steps.each { |step| yield step.call(specification) } run specification end
Private Instance Methods
Source
# File lib/gemsmith/tools/installer.rb, line 29 def run specification path = specification.package_path executor.capture3("gem", "install", path.to_s).then do |_stdout, _stderr, status| status.success? ? Success(specification) : Failure("Unable to install: #{path}.") end end