module Hippo
Constants
- CONFIG_PATH
The path where the user configuration file is stored
- VERSION
Public Class Methods
config()
click to toggle source
User the user configuration for Hippo
@return [Hash]
# File lib/hippo.rb, line 17 def self.config @config ||= begin if File.file?(CONFIG_PATH) YAML.load_file(CONFIG_PATH) else {} end end end
current_kubectl_context()
click to toggle source
Return the current kubectl context
@return [String]
# File lib/hippo.rb, line 30 def self.current_kubectl_context stdout, stderr, status = Open3.capture3('kubectl config current-context') unless status.success? raise Error, 'Could not determine current kubectl context' end stdout.strip end
root()
click to toggle source
Return the root to the gem
@return [String]
# File lib/hippo.rb, line 10 def self.root File.expand_path('../', __dir__) end
tmp_root()
click to toggle source
Path to store temp files
@return [String]
# File lib/hippo.rb, line 42 def self.tmp_root File.join(ENV['HOME'], '.hippo') end