Sha256: 0a6040aabc84347bddb5eb9e522c4bdae8634771fa11635cf5e4222437cc0abe
Contents?: true
Size: 781 Bytes
Versions: 24
Compression:
Stored size: 781 Bytes
Contents
class Ufo::Docker class Variables @@variables_path = "#{Ufo.root}/.ufo/settings/dockerfile_variables.yml" def initialize(full_image_name, options={}) @full_image_name, @options = full_image_name, options end def update data = current_data data[Ufo.env] ||= {} data[Ufo.env]["base_image"] = @full_image_name pretty_path = @@variables_path.sub("#{Ufo.root}/", "") IO.write(@@variables_path, YAML.dump(data)) unless @options[:mute] puts "The #{pretty_path} base_image has been updated with the latest base image:".color(:green) puts " #{@full_image_name}".color(:green) end end def current_data File.exist?(@@variables_path) ? YAML.load_file(@@variables_path) : {} end end end
Version data entries
24 entries across 24 versions & 1 rubygems