Sha256: 257cacb9cd7ac7de1f60fa7b8f8778c5aa6a78c081ef84edef62789b3f17ee4a
Contents?: true
Size: 415 Bytes
Versions: 9
Compression:
Stored size: 415 Bytes
Contents
module Kubes::Compiler::Util module Normalize def normalize_kind(path) info = path.sub(%r{.*/.kubes/resources/}, '') extract_type(info).underscore.camelize # Deployment, Service, Ingress, ManagedCertificate, etc end # info: web/service.yaml def extract_type(info) _, kind = info.split('/') kind.sub('.yaml','').sub('.yml','').sub('.rb','').sub(/-.*/,'') end end end
Version data entries
9 entries across 9 versions & 1 rubygems