Class: Linecook::CLI
- Inherits:
-
Thor
- Object
- Thor
- Linecook::CLI
- Defined in:
- lib/linecook-gem/cli.rb
Instance Method Summary collapse
-
#bake ⇒ Object
method_option :package, type: :boolean, default: false, desc: ‘Package the resulting image.
- #clean ⇒ Object
- #man ⇒ Object
- #version ⇒ Object
Instance Method Details
#bake ⇒ Object
method_option :package, type: :boolean, default: false, desc: ‘Package the resulting image. Implies –upload and –snapshot’, aliases: ‘-p’
91 92 93 94 95 96 |
# File 'lib/linecook-gem/cli.rb', line 91 def bake opts = .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 ⇒ Object
100 101 102 103 104 105 |
# File 'lib/linecook-gem/cli.rb', line 100 def clean opts = .symbolize_keys image = Linecook::Image.new(nil, nil, nil) baker = Linecook::Baker::Baker.new(image, directory: opts[:directory]) baker.clean_kitchen end |
#man ⇒ Object
108 109 110 111 |
# 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 |