Class: Gemkeeper::CLI::Commands::Setup

Inherits:
Dry::CLI::Command
  • Object
show all
Defined in:
lib/gemkeeper/cli/commands/setup.rb

Instance Method Summary collapse

Instance Method Details

#call(source_path:, **options) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/gemkeeper/cli/commands/setup.rb', line 21

def call(source_path:, **options)
  validate_options!(options)
  output_path = resolve_output_path(options)

  if lockfile?(source_path)
    setup_from_lockfile(source_path, output_path, options)
  else
    setup_from_config(source_path, output_path, options)
  end
rescue UnresolvableGemError, ManifestConflictError => error
  warn "Error: #{error.message}"
  exit 1
end