Sha256: 4a3dd02e199180e07601801654441b1188378978e57f77c89276cfe5dedceae4
Contents?: true
Size: 722 Bytes
Versions: 58
Compression:
Stored size: 722 Bytes
Contents
module Kubes::Compiler::Dsl::Core module Files def files(*list) dir = current_dir list.each do |file| path = "#{dir}/#{file}" load_data_from_file(path) end end def load_data_from_file(path) parser = Kubes::Compiler::Dsl::Core::Parser.new(path) items = parser.parse items.transform_values! { |v| base64(v) } if secret_class? data(items) end def secret_class? self.class == Kubes::Compiler::Dsl::Syntax::Secret end def current_dir resources_line = caller.find { |l| l.include?('.kubes/resources') } path = resources_line.split(':').first File.dirname(path) # IE: /full/path/.kubes/resources end end end
Version data entries
58 entries across 58 versions & 1 rubygems