Class: Consist::CLI

Inherits:
Thor
  • Object
show all
Extended by:
ThorExt::Start
Defined in:
lib/consist/cli.rb

Instance Method Summary collapse

Methods included from ThorExt::Start

extended, start

Instance Method Details

#lightup(user, server) ⇒ Object



28
29
30
31
32
33
34
35
# File 'lib/consist/cli.rb', line 28

def lightup(user, server)
  puts "---> Attempting to connect to #{server} as #{user}"
  on("#{user}@#{server}") do
    as user do
      execute "true"
    end
  end
end

#scaffold(_recipe, server_ip) ⇒ Object



38
39
40
# File 'lib/consist/cli.rb', line 38

def scaffold(_recipe, server_ip)
  Consist::Recipes.new(server_ip)
end

#up(server_ip) ⇒ Object



45
46
47
48
49
# File 'lib/consist/cli.rb', line 45

def up(server_ip)
  specified_step = options[:step]
  consistfile = options[:consistfile]
  Consist::Consistfile.new(server_ip, consistfile:, specified_step:)
end

#versionObject



23
24
25
# File 'lib/consist/cli.rb', line 23

def version
  say "consist/#{VERSION} #{RUBY_DESCRIPTION}"
end