Class: ModuleSync::CLI::Base
- Inherits:
-
Thor
- Object
- Thor
- Thor
- ModuleSync::CLI::Base
show all
- Defined in:
- lib/modulesync/cli.rb
Instance Method Summary
collapse
Methods inherited from Thor
#_invalid_command_call, exit_on_failure?, start
Instance Method Details
#clone ⇒ Object
236
237
238
|
# File 'lib/modulesync/cli.rb', line 236
def clone
ModuleSync.clone CLI.prepare_options(options)
end
|
#execute(*command_args) ⇒ Object
180
181
182
183
184
|
# File 'lib/modulesync/cli.rb', line 180
def execute(*command_args)
raise Thor::Error, 'COMMAND is a required argument' if command_args.empty?
ModuleSync.execute CLI.prepare_options(options, command_args: command_args)
end
|
#push ⇒ Object
231
232
233
|
# File 'lib/modulesync/cli.rb', line 231
def push
ModuleSync.push CLI.prepare_options(options)
end
|
#reset ⇒ Object
214
215
216
|
# File 'lib/modulesync/cli.rb', line 214
def reset
ModuleSync.reset CLI.prepare_options(options)
end
|
#update ⇒ Object
143
144
145
146
147
148
149
150
|
# File 'lib/modulesync/cli.rb', line 143
def update
config = CLI.prepare_options(options)
raise Thor::Error, 'No value provided for required option "--message"' unless config[:noop] \
|| config[:message] \
|| config[:offline]
ModuleSync.update config
end
|