Sha256: 12594e1e236d4d07330c41f04326e7d221c2cd5811dba07bd861679adc2d4ab4

Contents?: true

Size: 792 Bytes

Versions: 4

Compression:

Stored size: 792 Bytes

Contents

#!/usr/bin/env ruby
#
lib = File.join(File.dirname(__FILE__), '../lib')
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)

begin
  require "rubygems"
  require 'colored'
  require "commander/import"
  require "pry"
  require "brief"
end

program :name, 'Brief'
program :version, Brief::Version
program :description, 'Brief CLI'

command :inspect do |c|
  c.syntax = 'brief inspect file [options]'
  c.description = 'Debug the parsing of a brief'

  c.action do |args, options|
    path = Pathname(args.first)
    path = path.relative? ? Brief.root.join(path) : path
    doc  = Brief::Document.new(path)
    
    doc.elements do |el|
      puts el.inspect
    end
  end
end

Pathname(lib).join("brief","cli","commands").children.each do |f|
  require(File.expand_path(f)) if f.file?
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
brief-0.0.5 bin/brief
brief-0.0.4 bin/brief
brief-0.0.3 bin/brief
brief-0.0.2 bin/brief