Sha256: 1062daa105121bffba81c9b2a175f88dc97e3446ca0b4ffdbc01ec290c2ecb28

Contents?: true

Size: 317 Bytes

Versions: 6

Compression:

Stored size: 317 Bytes

Contents

module Kubes::Compiler::Util
  module Normalize
    def normalize_kind(path)
      extract_type(path).underscore.camelize # Deployment, Service, Ingress, ManagedCertificate, etc
    end

    def extract_type(path)
      File.basename(path).sub('.yaml','').sub('.yml','').sub('.rb','').sub(/-.*/,'')
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
kubes-0.5.1 lib/kubes/compiler/util/normalize.rb
kubes-0.5.0 lib/kubes/compiler/util/normalize.rb
kubes-0.4.7 lib/kubes/compiler/util/normalize.rb
kubes-0.4.6 lib/kubes/compiler/util/normalize.rb
kubes-0.4.5 lib/kubes/compiler/util/normalize.rb
kubes-0.4.4 lib/kubes/compiler/util/normalize.rb