lib/brief.rb in brief-0.0.5 vs lib/brief.rb in brief-1.0.0
- old
+ new
@@ -1,56 +1,51 @@
-lib = File.dirname(__FILE__)
-$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
+require "pathname"
+require "set"
+require "hashie"
+require "virtus"
+require "inflecto"
+require "active_support"
+require "active_support/core_ext"
+require "redcarpet"
+require "nokogiri"
+require "yaml"
module Brief
- # Haven't decided if the brief config system should support different profiles or not
- def self.profile
- configuration
+ def self.case= value
+ @briefcase = value
end
- def self.config
- configuration
+ def self.case
+ @briefcase
end
def self.configuration
- @configuration ||= Brief::Configuration.instance
+ Brief::Configuration.instance
end
- def self.root
- Pathname(Dir.pwd())
- end
-
def self.gem_root
Pathname(File.dirname(__FILE__))
end
- def self.define publisher_name, &config
- Brief::Publisher.define(publisher_name, &config)
+ def self.load_commands
+ Dir[gem_root.join("brief","cli","**/*.rb")].each {|f| require(f) }
end
+
+ def self.load_models(from_folder=nil)
+ Brief::Model.load_all(from_folder: from_folder)
+ end
end
-require 'pathname'
-require 'hashie'
-require 'digest'
-require 'yaml'
-
-require 'active_support'
-require 'active_support/core_ext'
-
-require 'brief/line'
-require 'brief/parser'
-require 'brief/document'
-require 'brief/tree'
-require 'brief/version'
-require 'brief/configuration'
-
-require 'brief/publisher'
-require 'brief/publisher/handler_manager'
-# These should be able to be loaded separately
-# some other way, but to help develoment..
-require 'brief/handlers/base'
-require 'brief/formatters/base'
-
-# these may be optional one day
-require 'brief/github'
-require 'brief/git'
-require 'brief/github/wiki'
+require "brief/core_ext"
+require "brief/version"
+require "brief/configuration"
+require "brief/document/rendering"
+require "brief/document/front_matter"
+require "brief/document/content_extractor"
+require "brief/document"
+require "brief/document_mapper"
+require "brief/repository"
+require "brief/model"
+require "brief/model/definition"
+require "brief/model/persistence"
+require "brief/dsl"
+require "brief/briefcase"