Sha256: dfd1bc7430a350bcce5ec95bbbbb6f555c11a3f3e778d2abd9414da81475a5fa

Contents?: true

Size: 713 Bytes

Versions: 4

Compression:

Stored size: 713 Bytes

Contents

class Lbrt::CLI::Space < Thor
  include Lbrt::Utils::CLIHelper

  class_option :target
  class_option :'export-concurrency', :type => :numeric, :default => 32

  desc 'peco', 'Show space by peco'
  def peco
    client(Lbrt::Space).peco
  end

  desc 'apply FILE', 'Apply spaces'
  option :'dry-run', :type => :boolean, :default => false
  def apply(file)
    updated = client(Lbrt::Space).apply(file)

    unless updated
      Lbrt::Logger.instance.info('No change'.intense_blue)
    end
  end

  desc 'export [FILE]', 'Export spaces'
  def export(file = nil)
    dsl = client(Lbrt::Space).export

    if file.nil? or file == '-'
      puts dsl
    else
      open(file, 'wb') {|f| f.puts dsl }
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
lbrt-0.1.6 lib/lbrt/cli/space.rb
lbrt-0.1.5 lib/lbrt/cli/space.rb
lbrt-0.1.4 lib/lbrt/cli/space.rb
lbrt-0.1.3 lib/lbrt/cli/space.rb