Sha256: 1073b609397ca2ccb567d6de204716eb00a6813343e2b4fd1f4ee484df84749b

Contents?: true

Size: 286 Bytes

Versions: 17

Compression:

Stored size: 286 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('.rb','').sub(/-.*/,'')
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
kubes-0.4.3 lib/kubes/compiler/util/normalize.rb
kubes-0.4.2 lib/kubes/compiler/util/normalize.rb
kubes-0.4.1 lib/kubes/compiler/util/normalize.rb
kubes-0.4.0 lib/kubes/compiler/util/normalize.rb
kubes-0.3.5 lib/kubes/compiler/util/normalize.rb
kubes-0.3.4 lib/kubes/compiler/util/normalize.rb
kubes-0.3.3 lib/kubes/compiler/util/normalize.rb
kubes-0.3.2 lib/kubes/compiler/util/normalize.rb
kubes-0.3.1 lib/kubes/compiler/util/normalize.rb
kubes-0.3.0 lib/kubes/compiler/util/normalize.rb
kubes-0.2.6 lib/kubes/compiler/util/normalize.rb
kubes-0.2.5 lib/kubes/compiler/util/normalize.rb
kubes-0.2.4 lib/kubes/compiler/util/normalize.rb
kubes-0.2.3 lib/kubes/compiler/util/normalize.rb
kubes-0.2.2 lib/kubes/compiler/util/normalize.rb
kubes-0.2.1 lib/kubes/compiler/util/normalize.rb
kubes-0.2.0 lib/kubes/compiler/util/normalize.rb