Class: Artifactory::GemImport::Cli

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/artifactory/gem_import/cli.rb', line 8

def self.exit_on_failure?
  true
end

Instance Method Details

#deleteObject



39
40
41
42
# File 'lib/artifactory/gem_import/cli.rb', line 39

def delete
  say GemImport.delete! repo: target_repo,
                        only: options[:only]
end

#importObject



24
25
26
27
28
29
# File 'lib/artifactory/gem_import/cli.rb', line 24

def import
  say GemImport.import! source_repo: source_repo,
                        target_repo: target_repo,
                        only: options[:only],
                        force: options[:force]
end

#show_missingObject



54
55
56
57
58
59
60
61
62
# File 'lib/artifactory/gem_import/cli.rb', line 54

def show_missing
  gems = GemImport.show_missing source_repo: source_repo,
                                target_repo: target_repo,
                                only: options[:only]

  gems.each { |gem| say gem }

  say gems.count
end

#versionObject



75
76
77
# File 'lib/artifactory/gem_import/cli.rb', line 75

def version
  say Artifactory::GemImport::VERSION
end