Class: Terraspace::CLI
- Inherits:
-
Command
show all
- Includes:
- Concern
- Defined in:
- lib/terraspace/cli/completer.rb,
lib/terraspace/cli.rb,
lib/terraspace/cli/up.rb,
lib/terraspace/cli/all.rb,
lib/terraspace/cli/fmt.rb,
lib/terraspace/cli/new.rb,
lib/terraspace/cli/tfc.rb,
lib/terraspace/cli/base.rb,
lib/terraspace/cli/down.rb,
lib/terraspace/cli/help.rb,
lib/terraspace/cli/info.rb,
lib/terraspace/cli/init.rb,
lib/terraspace/cli/list.rb,
lib/terraspace/cli/logs.rb,
lib/terraspace/cli/plan.rb,
lib/terraspace/cli/seed.rb,
lib/terraspace/cli/test.rb,
lib/terraspace/cli/clean.rb,
lib/terraspace/cli/setup.rb,
lib/terraspace/cli/state.rb,
lib/terraspace/cli/taint.rb,
lib/terraspace/cli/bundle.rb,
lib/terraspace/cli/import.rb,
lib/terraspace/cli/concern.rb,
lib/terraspace/cli/summary.rb,
lib/terraspace/cli/untaint.rb,
lib/terraspace/cli/commander.rb,
lib/terraspace/cli/tfc_concern.rb
Overview
Auto-completion accounts for each of these type of commands.
Defined Under Namespace
Modules: Build, Concern, Concerns, Help, TfcConcern
Classes: All, Base, Bundle, Clean, Commander, Completer, Down, Fmt, Import, Info, Init, List, Logs, New, Plan, Seed, Setup, State, Summary, Taint, Test, Tfc, Untaint, Up
Instance Method Summary
collapse
-
#build(mod = "placeholder") ⇒ Object
-
#bundle(*args) ⇒ Object
-
#check ⇒ Object
-
#check_setup ⇒ Object
-
#completion(*params) ⇒ Object
-
#completion_script ⇒ Object
-
#console(mod, *args) ⇒ Object
-
#down(mod, *args) ⇒ Object
-
#fmt(*args) ⇒ Object
-
#force_unlock(mod, lock_id) ⇒ Object
-
#import(mod, addr, id) ⇒ Object
-
#info(mod) ⇒ Object
-
#init(mod, *args) ⇒ Object
-
#list ⇒ Object
-
#logs(action = nil, stack = nil) ⇒ Object
-
#output(mod, *args) ⇒ Object
-
#plan(mod, *args) ⇒ Object
-
#providers(mod, *args) ⇒ Object
-
#refresh(mod, *args) ⇒ Object
-
#seed(mod) ⇒ Object
-
#show(mod, *args) ⇒ Object
-
#state(subcommand, mod, *rest) ⇒ Object
-
#summary ⇒ Object
-
#taint(mod, addr, *args) ⇒ Object
-
#test ⇒ Object
-
#untaint(mod, addr, *args) ⇒ Object
-
#up(mod, *args) ⇒ Object
-
#validate(mod, *args) ⇒ Object
-
#version ⇒ Object
Methods inherited from Command
alter_command_description, check_project!, check_standalone_install!, command_help, dispatch, exit_on_failure?, help_flags, initial_dispatch_command, opt?, rbenv?, reset_dispatch_command, rvm?, subcommand?, website
#logger
Instance Method Details
#build(mod = "placeholder") ⇒ Object
56
57
58
|
# File 'lib/terraspace/cli.rb', line 56
def build(mod="placeholder")
Terraspace::Builder.new(options.merge(mod: mod)).run end
|
#bundle(*args) ⇒ Object
62
63
64
|
# File 'lib/terraspace/cli.rb', line 62
def bundle(*args)
Bundle.new(options.merge(args: args)).run
end
|
#check ⇒ Object
68
69
70
|
# File 'lib/terraspace/cli.rb', line 68
def check
Check.new(options).run
end
|
#check_setup ⇒ Object
74
75
76
77
78
79
80
81
82
|
# File 'lib/terraspace/cli.rb', line 74
def check_setup
puts <<~EOL
DEPRECATED: The terraspace check_setup command is deprecated. Instead use:
terraspace check
EOL
Check.new(options).run
end
|
#completion(*params) ⇒ Object
264
265
266
|
# File 'lib/terraspace/cli.rb', line 264
def completion(*params)
Completer.new(CLI, *params).run
end
|
#completion_script ⇒ Object
#console(mod, *args) ⇒ Object
87
88
89
|
# File 'lib/terraspace/cli.rb', line 87
def console(mod, *args)
Commander.new("console", options.merge(mod: mod, args: args, shell: "system")).run
end
|
#down(mod, *args) ⇒ Object
97
98
99
|
# File 'lib/terraspace/cli.rb', line 97
def down(mod, *args)
Down.new(options.merge(mod: mod, args: args)).run
end
|
#fmt(*args) ⇒ Object
111
112
113
114
|
# File 'lib/terraspace/cli.rb', line 111
def fmt(*args)
mod = args.shift if args.first && !args.first.include?('-')
Fmt.new(options.merge(mod: mod, args: args)).run
end
|
#force_unlock(mod, lock_id) ⇒ Object
104
105
106
|
# File 'lib/terraspace/cli.rb', line 104
def force_unlock(mod, lock_id)
Commander.new("force-unlock", options.merge(mod: mod, lock_id: lock_id)).run
end
|
#import(mod, addr, id) ⇒ Object
118
119
120
|
# File 'lib/terraspace/cli.rb', line 118
def import(mod, addr, id)
Import.new(options.merge(mod: mod, addr: addr, id: id)).run
end
|
#info(mod) ⇒ Object
127
128
129
|
# File 'lib/terraspace/cli.rb', line 127
def info(mod)
Info.new(options.merge(mod: mod)).run
end
|
#init(mod, *args) ⇒ Object
134
135
136
|
# File 'lib/terraspace/cli.rb', line 134
def init(mod, *args)
Commander.new("init", options.merge(mod: mod, args: args, quiet: false)).run
end
|
#list ⇒ Object
141
142
143
|
# File 'lib/terraspace/cli.rb', line 141
def list
List.new(options).run
end
|
#logs(action = nil, stack = nil) ⇒ Object
152
153
154
|
# File 'lib/terraspace/cli.rb', line 152
def logs(action=nil, stack=nil)
Logs.new(@options.merge(action: action, stack: stack)).run
end
|
#output(mod, *args) ⇒ Object
231
232
233
|
# File 'lib/terraspace/cli.rb', line 231
def output(mod, *args)
Commander.new("output", options.merge(mod: mod, args: args)).run
end
|
#plan(mod, *args) ⇒ Object
164
165
166
|
# File 'lib/terraspace/cli.rb', line 164
def plan(mod, *args)
Plan.new(options.merge(mod: mod, args: args)).run
end
|
#providers(mod, *args) ⇒ Object
171
172
173
|
# File 'lib/terraspace/cli.rb', line 171
def providers(mod, *args)
Commander.new("providers", options.merge(mod: mod, args: args)).run
end
|
#refresh(mod, *args) ⇒ Object
178
179
180
|
# File 'lib/terraspace/cli.rb', line 178
def refresh(mod, *args)
Commander.new("refresh", options.merge(mod: mod, args: args)).run
end
|
#seed(mod) ⇒ Object
188
189
190
|
# File 'lib/terraspace/cli.rb', line 188
def seed(mod)
Seed.new(options.merge(mod: mod)).run
end
|
#show(mod, *args) ⇒ Object
205
206
207
|
# File 'lib/terraspace/cli.rb', line 205
def show(mod, *args)
Commander.new("show", options.merge(mod: mod, args: args)).run
end
|
#state(subcommand, mod, *rest) ⇒ Object
211
212
213
|
# File 'lib/terraspace/cli.rb', line 211
def state(subcommand, mod, *rest)
State.new(options.merge(subcommand: subcommand, mod: mod, rest: rest)).run
end
|
#summary ⇒ Object
197
198
199
|
# File 'lib/terraspace/cli.rb', line 197
def summary
Summary.new(options).run
end
|
#taint(mod, addr, *args) ⇒ Object
217
218
219
|
# File 'lib/terraspace/cli.rb', line 217
def taint(mod, addr, *args)
Taint.new(options.merge(mod: mod, addr: addr, args: args)).run
end
|
#test ⇒ Object
223
224
225
|
# File 'lib/terraspace/cli.rb', line 223
def test
Test.new(options).run
end
|
#untaint(mod, addr, *args) ⇒ Object
237
238
239
|
# File 'lib/terraspace/cli.rb', line 237
def untaint(mod, addr, *args)
Untaint.new(options.merge(mod: mod, addr: addr, args: args)).run
end
|
#up(mod, *args) ⇒ Object
251
252
253
|
# File 'lib/terraspace/cli.rb', line 251
def up(mod, *args)
Up.new(options.merge(mod: mod, args: args)).run
end
|
#validate(mod, *args) ⇒ Object
258
259
260
|
# File 'lib/terraspace/cli.rb', line 258
def validate(mod, *args)
Commander.new("validate", options.merge(mod: mod, args: args)).run
end
|
#version ⇒ Object
275
276
277
|
# File 'lib/terraspace/cli.rb', line 275
def version
puts VERSION
end
|