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



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

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

#execute(ssh_host) ⇒ Object



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

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

#hostname(ssh_host) ⇒ Object



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

def hostname(ssh_host)
  track_time do
    @ssh_host = ssh_host
    setup_config options
    exec_hostname
  end
end

#ruby(ssh_host) ⇒ Object



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

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

#solo(ssh_host) ⇒ Object



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

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



63
64
65
66
67
68
69
# File 'lib/capstrap/cli.rb', line 63

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