Class: ModuleSync::CLI::Base

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

Instance Method Summary collapse

Methods inherited from Thor

#_invalid_command_call, exit_on_failure?

Instance Method Details

#updateObject

Raises:

  • (Thor::Error)


136
137
138
139
140
141
142
143
144
# File 'lib/modulesync/cli.rb', line 136

def update
  config = { :command => 'update' }.merge(options)
  config = Util.symbolize_keys(config)
  raise Thor::Error, 'No value provided for required option "--message"' unless config[:noop] \
                                                                                || config[:message] \
                                                                                || config[:offline]
  config[:git_opts] = { 'amend' => config[:amend], 'force' => config[:force] }
  ModuleSync.update(config)
end