Class: Discharger::SetupRunner::Commands::BundlerCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Discharger::SetupRunner::Commands::BundlerCommand
show all
- Defined in:
- lib/discharger/setup_runner/commands/bundler_command.rb
Instance Attribute Summary
Attributes inherited from BaseCommand
#app_root, #config, #logger
Instance Method Summary
collapse
Methods inherited from BaseCommand
#initialize
Instance Method Details
#can_execute? ⇒ Boolean
15
16
17
|
# File 'lib/discharger/setup_runner/commands/bundler_command.rb', line 15
def can_execute?
File.exist?("Gemfile")
end
|
#description ⇒ Object
19
20
21
|
# File 'lib/discharger/setup_runner/commands/bundler_command.rb', line 19
def description
"Install Ruby dependencies"
end
|
#execute ⇒ Object
9
10
11
12
13
|
# File 'lib/discharger/setup_runner/commands/bundler_command.rb', line 9
def execute
log "Installing dependencies"
system! "gem install bundler --conservative"
system_quiet("bundle check") || system!("bundle install")
end
|