2011-10-16 15:05:35 +00:00
|
|
|
require 'pathname'
|
2011-11-19 17:45:40 +00:00
|
|
|
require 'sprockets'
|
2011-10-16 15:05:35 +00:00
|
|
|
|
2011-10-10 18:11:13 +00:00
|
|
|
module Jasmine::Headless
|
|
|
|
autoload :CoffeeScriptCache, 'jasmine/headless/coffee_script_cache'
|
|
|
|
autoload :SpecFileAnalyzer, 'jasmine/headless/spec_file_analyzer'
|
|
|
|
autoload :CacheableAction, 'jasmine/headless/cacheable_action'
|
|
|
|
autoload :VERSION, 'jasmine/headless/version'
|
|
|
|
autoload :Runner, 'jasmine/headless/runner'
|
|
|
|
autoload :Options, 'jasmine/headless/options'
|
|
|
|
autoload :Task, 'jasmine/headless/task'
|
2011-11-16 20:28:02 +00:00
|
|
|
autoload :FilesList, 'jasmine/headless/files_list'
|
|
|
|
autoload :TestFile, 'jasmine/headless/test_file'
|
2011-10-10 18:11:13 +00:00
|
|
|
|
|
|
|
autoload :TemplateWriter, 'jasmine/headless/template_writer'
|
|
|
|
|
2011-11-19 17:45:40 +00:00
|
|
|
autoload :CoffeeTemplate, 'jasmine/headless/coffee_template'
|
|
|
|
|
2011-10-10 18:11:13 +00:00
|
|
|
autoload :Report, 'jasmine/headless/report'
|
|
|
|
autoload :ReportMessage, 'jasmine/headless/report_message'
|
|
|
|
|
|
|
|
class << self
|
|
|
|
def root
|
2011-10-25 15:25:28 +00:00
|
|
|
@root ||= Pathname(File.expand_path('../../..', __FILE__))
|
2011-10-10 18:11:13 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
require 'jasmine/headless/errors'
|
2011-11-19 17:45:40 +00:00
|
|
|
|
|
|
|
# register haml-sprockets if it's available...
|
|
|
|
%w{haml-sprockets}.each do |library|
|
|
|
|
begin
|
|
|
|
require library
|
|
|
|
rescue LoadError
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# ...and unregister ones we don't want/need
|
|
|
|
module Sprockets
|
|
|
|
%w{less sass scss erb str}.each do |extension|
|
|
|
|
@engines.delete(".#{extension}")
|
|
|
|
end
|
|
|
|
|
|
|
|
register_engine '.coffee', Jasmine::Headless::CoffeeTemplate
|
|
|
|
end
|
|
|
|
|