class Guard::Fig::FigProxy

Attributes

command[R]

Public Class Methods

new(options) click to toggle source
# File lib/guard/fig/fig_proxy.rb, line 8
def initialize(options)
  @command = options.fetch(:command, 'fig')
end

Public Instance Methods

build(service = nil) click to toggle source
# File lib/guard/fig/fig_proxy.rb, line 12
def build(service = nil)
  system "#{command} build #{service}"
end
remove(service) click to toggle source
# File lib/guard/fig/fig_proxy.rb, line 28
def remove(service)
  system "#{command} rm --force #{service}"
end
stop(service = nil) click to toggle source
# File lib/guard/fig/fig_proxy.rb, line 24
def stop(service = nil)
  system "#{command} stop #{service}"
end
up(recreate: true) click to toggle source
# File lib/guard/fig/fig_proxy.rb, line 16
def up recreate: true
  cmd = "#{command} up -d"
  unless recreate
    cmd << " --no-recreate"
  end
  system cmd
end