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

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

Instance Method Summary collapse

Instance Method Details

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



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

def call(source_path: nil, **options)
  validate_options!(options)
  output_path = resolve_output_path(options)
  resolved = resolve_source_path(source_path)
  not_a_lockfile!(resolved) unless lockfile?(resolved)

  setup_from_lockfile(resolved, output_path, options)
rescue UnresolvableGemError, ManifestConflictError => error
  warn "Error: #{error.message}"
  exit 1
end