Class: Capstrap::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/capstrap/cli.rb

Instance Method Summary collapse

Constructor Details

#initializeCLI

Returns a new instance of CLI.



4
5
6
# File 'lib/capstrap/cli.rb', line 4

def initialize(*)
  super
end

Instance Method Details

#chef(ssh_host) ⇒ Object



25
26
27
28
29
30
31
# File 'lib/capstrap/cli.rb', line 25

def chef(ssh_host)
  track_time do
    @ssh_host = ssh_host
    setup_config options
    exec_chef
  end
end

#execute(ssh_host) ⇒ Object



44
45
46
47
48
49
50
51
# File 'lib/capstrap/cli.rb', line 44

def execute(ssh_host)
  track_time do
    @ssh_host = ssh_host
    setup_config options
    assert_repos_set
    exec_execute
  end
end

#ruby(ssh_host) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/capstrap/cli.rb', line 16

def ruby(ssh_host)
  track_time do
    @ssh_host = ssh_host
    setup_config options
    exec_ruby
  end
end

#solo(ssh_host) ⇒ Object



34
35
36
37
38
39
40
41
# File 'lib/capstrap/cli.rb', line 34

def solo(ssh_host)
  track_time do
    @ssh_host = ssh_host
    setup_config options
    assert_repos_set
    exec_solo
  end
end

#update(ssh_host) ⇒ Object



54
55
56
57
58
59
60
# File 'lib/capstrap/cli.rb', line 54

def update(ssh_host)
  track_time do
    @ssh_host = ssh_host
    setup_config options
    exec_update
  end
end

#versionObject



11
12
13
# File 'lib/capstrap/cli.rb', line 11

def version
  puts "capstrap v#{Capstrap::VERSION}"
end