Class: Shippy::Cli::Main

Inherits:
Base
  • Object
show all
Defined in:
lib/shippy/cli/main.rb

Instance Method Summary collapse

Methods inherited from Base

exit_on_failure?, #initialize

Constructor Details

This class inherits a constructor from Shippy::Cli::Base

Instance Method Details

#deployObject



22
23
24
25
26
27
28
# File 'lib/shippy/cli/main.rb', line 22

def deploy
  print_runtime do
    Dir.glob("*", base: "apps").each do |name|
      Shippy::Cli::App.send :dispatch, :deploy, [name], {}, {}
    end
  end
end

#initObject



5
6
7
# File 'lib/shippy/cli/main.rb', line 5

def init
  Shippy::Cli::Init.new.invoke_all
end

#refreshObject



40
41
42
43
44
45
46
47
48
# File 'lib/shippy/cli/main.rb', line 40

def refresh
  print_runtime do
    Dir.glob("*", base: "apps").each do |name|
      Shippy::Cli::App.send :dispatch, :refresh, [name], {}, {}
      Shippy::Cli::App.send :dispatch, :start, [name], {}, {}
      Shippy::Cli::App.send :dispatch, :status, [name], {}, {}
    end
  end
end

#setupObject



15
16
17
18
19
# File 'lib/shippy/cli/main.rb', line 15

def setup
  invoke "shippy:cli:server:bootstrap"
  invoke "shippy:cli:server:setup"
  deploy
end

#stopObject



31
32
33
34
35
36
37
# File 'lib/shippy/cli/main.rb', line 31

def stop
  print_runtime do
    Dir.glob("*", base: "apps").each do |name|
      Shippy::Cli::App.send :dispatch, :stop, [name], {}, {}
    end
  end
end

#versionObject



10
11
12
# File 'lib/shippy/cli/main.rb', line 10

def version
  puts Shippy::VERSION
end