Sha256: 6baba9af08c43f39932b399dfc95e3fdceeda03fb906b9418d5aca030cb8e801

Contents?: true

Size: 779 Bytes

Versions: 2

Compression:

Stored size: 779 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
  option :'ignore-no-metric', :type => :boolean, :default => true
  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

2 entries across 2 versions & 1 rubygems

Version Path
lbrt-0.1.8 lib/lbrt/cli/space.rb
lbrt-0.1.7 lib/lbrt/cli/space.rb