Class: Cimas::ReleasePreflight::ShellRunner

Inherits:
Object
  • Object
show all
Defined in:
lib/cimas/release_preflight.rb

Overview

Default process boundary: real shell + filesystem credential check.

Instance Method Summary collapse

Instance Method Details

#api_key_present?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/cimas/release_preflight.rb', line 33

def api_key_present?
  ENV["RUBYGEMS_API_KEY"] && !ENV["RUBYGEMS_API_KEY"].empty?
end

#capture(cmd) ⇒ Object



25
26
27
# File 'lib/cimas/release_preflight.rb', line 25

def capture(cmd)
  `#{cmd}`
end

#credentials_present?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/cimas/release_preflight.rb', line 29

def credentials_present?
  File.exist?(File.expand_path("~/.gem/credentials"))
end

#system!(*args) ⇒ Object



21
22
23
# File 'lib/cimas/release_preflight.rb', line 21

def system!(*args)
  system(*args)
end