class Image

Public Instance Methods

clean() click to toggle source
# File lib/linecook-gem/cli.rb, line 25
def clean
  opts = options.symbolize_keys
  image = Linecook::Image.new(opts[:name], opts[:group], nil)
  puts "Cleaned up #{image.clean(opts[:retention]).length} images"
end
fetch() click to toggle source
# File lib/linecook-gem/cli.rb, line 35
def fetch
  opts = options.symbolize_keys
  image = Linecook::Image.new(opts[:name], opts[:group], opts[:tag] )
  image.fetch
end
keygen() click to toggle source
# File lib/linecook-gem/cli.rb, line 7
def keygen
  puts Linecook::Crypto.keygen
end
list() click to toggle source
# File lib/linecook-gem/cli.rb, line 15
def list
  opts = options.symbolize_keys
  image = Linecook::Image.new(opts[:name], opts[:group], nil)
  puts image.list
end
package() click to toggle source
# File lib/linecook-gem/cli.rb, line 57
def package
  opts = options.symbolize_keys
  image = Linecook::Image.new(opts[:name], opts[:group], opts[:tag])
  Linecook::Packager.package(image, name: opts[:strategy], directory: opts[:directory])
end
save() click to toggle source
# File lib/linecook-gem/cli.rb, line 68
def save
  opts = options.symbolize_keys
  image = Linecook::Image.new(opts[:name], opts[:group], opts[:tag])
  baker = Linecook::Baker::Baker.new(image, directory: opts[:directory])
  baker.save
end
upload() click to toggle source
# File lib/linecook-gem/cli.rb, line 45
def upload
  opts = options.symbolize_keys
  image = Linecook::Image.new(opts[:name], opts[:group], opts[:tag] )
  image.upload
end