Module: Hippo
- Defined in:
- lib/hippo.rb,
lib/hippo/cli.rb,
lib/hippo/util.rb,
lib/hippo/error.rb,
lib/hippo/image.rb,
lib/hippo/stage.rb,
lib/hippo/package.rb,
lib/hippo/version.rb,
lib/hippo/manifest.rb,
lib/hippo/liquid_filters.rb,
lib/hippo/repository_tag.rb,
lib/hippo/secret_manager.rb,
lib/hippo/bootstrap_parser.rb,
lib/hippo/object_definition.rb,
lib/hippo/working_directory.rb,
lib/hippo/deployment_monitor.rb
Defined Under Namespace
Modules: LiquidFilters, Util Classes: BootstrapParser, CLI, DeploymentMonitor, Error, Image, Manifest, ObjectDefinition, Package, RepositoryTag, SecretManager, Stage, WorkingDirectory
Constant Summary collapse
- CONFIG_PATH =
The path where the user configuration file is stored
File.join(ENV['HOME'], '.hippo', 'config.yaml')
- VERSION =
'1.2.3'
Class Method Summary collapse
-
.config ⇒ Hash
User the user configuration for Hippo.
-
.current_kubectl_context ⇒ String
Return the current kubectl context.
-
.root ⇒ String
Return the root to the gem.
-
.tmp_root ⇒ String
Path to store temp files.
Class Method Details
.config ⇒ Hash
User the user configuration for Hippo
17 18 19 20 21 22 23 24 25 |
# 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 ⇒ String
Return the current kubectl context
30 31 32 33 34 35 36 37 |
# 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 ⇒ String
Return the root to the gem
10 11 12 |
# File 'lib/hippo.rb', line 10 def self.root File.('../', __dir__) end |
.tmp_root ⇒ String
Path to store temp files
42 43 44 |
# File 'lib/hippo.rb', line 42 def self.tmp_root File.join(ENV['HOME'], '.hippo') end |