Sha256: ef82b6965636b98d71254f181bd6f636dde14fc42290bc382fead7f845515917

Contents?: true

Size: 934 Bytes

Versions: 10

Compression:

Stored size: 934 Bytes

Contents

#!/usr/bin/env ruby

$:.unshift File.join(File.dirname(__FILE__),'..','lib')

require 'rubygems'
require 'brief'
require 'brief/dsl'
require 'colored'


if ARGV[0] == "console"
  require 'pry'
  $briefcase = Brief::Briefcase.new(root: Brief.pwd)
  Pry.start($briefcase)
else
  require 'commander/import'
  
  $brief_cli = true
  $terminal.wrap_at = 120

  program :name, "Brief"
  program :description, "Brief lets you treat your markdown files like active record objects"
  program :version, Brief::VERSION 
  
  # Eager load the briefcase so that the call to Brief.load_commands()
  # will pick up the briefcase app's model classes
  if ARGV.include?('--root')
    index = ARGV.index_of('--root')

    if value = ARGV[index + 1]
      $briefcase = Brief::Briefcase.new(root: value)
    end
  elsif Pathname(Brief.pwd).join("brief.rb").exist?
    $briefcase = Brief::Briefcase.new(root: Brief.pwd)
  end

  Brief.load_commands()
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
brief-1.17.10 bin/brief
brief-1.17.9 bin/brief
brief-1.17.8 bin/brief
brief-1.17.7 bin/brief
brief-1.17.5 bin/brief
brief-1.17.4 bin/brief
brief-1.17.3 bin/brief
brief-1.17.2 bin/brief
brief-1.17.1 bin/brief
brief-1.17.0 bin/brief