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