Class: Dip::CLI::Infra

Inherits:
Base
  • Object
show all
Defined in:
lib/dip/cli/infra.rb

Instance Method Summary collapse

Methods inherited from Base

exit_on_failure?

Instance Method Details

#down(*compose_argv) ⇒ Object



52
53
54
55
56
57
58
59
60
# File 'lib/dip/cli/infra.rb', line 52

def down(*compose_argv)
  if options[:help]
    invoke :help, ["down"]
  else
    lookup_services(options[:name]).each do |service|
      Commands::Infra::Down.new(*compose_argv, service: service).execute
    end
  end
end

#up(*compose_argv) ⇒ Object



33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/dip/cli/infra.rb', line 33

def up(*compose_argv)
  if options[:help]
    invoke :help, ["up"]
  else
    lookup_services(options[:name]).each do |service|
      if options[:update]
        Commands::Infra::Update.new(service: service).execute
      end

      Commands::Infra::Up.new(*compose_argv, service: service).execute
    end
  end
end

#updateObject



16
17
18
19
20
21
22
23
24
# File 'lib/dip/cli/infra.rb', line 16

def update
  if options[:help]
    invoke :help, ["update"]
  else
    lookup_services(options[:name]).each do |service|
      Commands::Infra::Update.new(service: service).execute
    end
  end
end