lib/jsus.rb in jsus-0.3.4 vs lib/jsus.rb in jsus-0.3.5
- old
+ new
@@ -4,13 +4,13 @@
require 'json'
require 'active_support/ordered_hash'
require 'active_support/core_ext/module/delegation'
require 'rgl/adjacency'
require 'rgl/topsort'
+require 'extensions/rgl'
require 'fileutils'
-require 'pathname'
#
# Jsus -- your better javascript packager.
#
module Jsus
@@ -20,11 +20,12 @@
autoload :Container, 'jsus/container'
autoload :Packager, 'jsus/packager'
autoload :Pool, 'jsus/pool'
autoload :Util, 'jsus/util'
autoload :Middleware, 'jsus/middleware'
- autoload :Compressor, 'jsus/compressor'
+ autoload :CLI, 'jsus/cli'
+ autoload :Compiler, 'jsus/compiler'
# In verbose mode jsus shows a lot of warnings like missing dependencies.
# Default: false
#
# @return [Boolean] jsus verbosity mode
@@ -69,11 +70,11 @@
# Jsus logger used for all the output. By default uses Logger::ERROR level
# severity and screen as output device.
#
# @return [Jsus::Util::Logger]
def self.logger
- Thread.current[:jsus_logger] ||= Jsus::Util::Logger.new(STDOUT).tap do |logger|
+ @@logger ||= Jsus::Util::Logger.new($stdout).tap do |logger|
logger.level = Logger::ERROR
logger.formatter = lambda {|severity, time, progname, msg|
"[#{time.strftime("%Y-%m-%d %H:%M:%S")}] [JSUS:#{severity}] #{msg}\n"
}
end
@@ -84,8 +85,8 @@
# @param value Logger responding to #info, #warn, #debug, #error, #fatal,
# and #buffer
# @note In case you use non-jsus logger, you might want to extend it with
# Jsus::Util::Logger::Buffering module.
def self.logger=(value)
- Thread.current[:jsus_logger] = value
+ @@logger = value
end # self.logger=
end