class Linecook::CLI

Public Instance Methods

bake() click to toggle source

method_option :package, type: :boolean, default: false, desc: 'Package the resulting image. Implies –upload and –snapshot', aliases: '-p'

# File lib/linecook-gem/cli.rb, line 91
def bake
  opts = options.symbolize_keys
  image = Linecook::Image.new(opts[:name], opts[:group], opts[:tag])
  baker = Linecook::Baker::Baker.new(image, directory: opts[:directory])
  baker.bake(snapshot: opts[:snapshot], upload: opts[:upload], keep: opts[:keep])
end
clean() click to toggle source
# File lib/linecook-gem/cli.rb, line 100
def clean
  opts = options.symbolize_keys
  image = Linecook::Image.new(nil, nil, nil)
  baker = Linecook::Baker::Baker.new(image, directory: opts[:directory])
  baker.clean_kitchen
end
man() click to toggle source
# File lib/linecook-gem/cli.rb, line 108
def man
  path = File.join(Gem::Specification.find_by_name('linecook-gem').gem_dir, 'man', 'LINECOOK.1' )
  system("man #{path}")
end
version() click to toggle source
# File lib/linecook-gem/cli.rb, line 114
def version
  puts Linecook::VERSION
end