Class: Discharger::SetupRunner::Commands::BrewCommand

Inherits:
BaseCommand
  • Object
show all
Defined in:
lib/discharger/setup_runner/commands/brew_command.rb

Instance Attribute Summary

Attributes inherited from BaseCommand

#app_root, #config, #logger

Instance Method Summary collapse

Methods inherited from BaseCommand

#initialize

Constructor Details

This class inherits a constructor from Discharger::SetupRunner::Commands::BaseCommand

Instance Method Details

#can_execute?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/discharger/setup_runner/commands/brew_command.rb', line 16

def can_execute?
  File.exist?("Brewfile")
end

#descriptionObject



20
21
22
# File 'lib/discharger/setup_runner/commands/brew_command.rb', line 20

def description
  "Install Homebrew dependencies"
end

#executeObject



9
10
11
12
13
14
# File 'lib/discharger/setup_runner/commands/brew_command.rb', line 9

def execute
  proceed_with "brew bundle" do
    log "Ensuring brew dependencies"
    system! "brew bundle"
  end
end