Class: Rubysmith::Extensions::Bundler

Inherits:
Object
  • Object
show all
Defined in:
lib/rubysmith/extensions/bundler.rb

Overview

Ensures gem dependencies are installed.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(configuration, client: ::Bundler::CLI) ⇒ Bundler

Returns a new instance of Bundler.



17
18
19
20
# File 'lib/rubysmith/extensions/bundler.rb', line 17

def initialize configuration, client: ::Bundler::CLI
  @configuration = configuration
  @client = client
end

Class Method Details

.callObject



15
# File 'lib/rubysmith/extensions/bundler.rb', line 15

def self.call(...) = new(...).call

Instance Method Details

#callObject



22
23
24
25
26
27
28
29
# File 'lib/rubysmith/extensions/bundler.rb', line 22

def call
  configuration.project_root.change_dir do
    client.start %w[install --quiet]
    STDOUT.squelch { client.start %w[lock --add-platform x86_64-linux --update] }
  end

  configuration
end