From b6d94a5d0df411408ac760a1d9291d3ad9c455ee Mon Sep 17 00:00:00 2001 From: John Bintz Date: Thu, 1 Dec 2011 10:26:23 -0500 Subject: [PATCH] make sure a parent module is defined first --- lib/jasmine/headless.rb | 44 +++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/lib/jasmine/headless.rb b/lib/jasmine/headless.rb index ff6e652..9af2e94 100644 --- a/lib/jasmine/headless.rb +++ b/lib/jasmine/headless.rb @@ -1,32 +1,34 @@ require 'pathname' -module Jasmine::Headless - autoload :CommandLine, 'jasmine/headless/command_line' +module Jasmine + module Headless + autoload :CommandLine, 'jasmine/headless/command_line' - 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' + 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' - autoload :FilesList, 'jasmine/headless/files_list' - autoload :UniqueAssetList, 'jasmine/headless/unique_asset_list' + autoload :FilesList, 'jasmine/headless/files_list' + autoload :UniqueAssetList, 'jasmine/headless/unique_asset_list' - autoload :TemplateWriter, 'jasmine/headless/template_writer' + autoload :TemplateWriter, 'jasmine/headless/template_writer' - autoload :CoffeeTemplate, 'jasmine/headless/coffee_template' - autoload :JSTemplate, 'jasmine/headless/js_template' - autoload :JSTTemplate, 'jasmine/headless/jst_template' - autoload :CSSTemplate, 'jasmine/headless/css_template' + autoload :CoffeeTemplate, 'jasmine/headless/coffee_template' + autoload :JSTemplate, 'jasmine/headless/js_template' + autoload :JSTTemplate, 'jasmine/headless/jst_template' + autoload :CSSTemplate, 'jasmine/headless/css_template' - autoload :Report, 'jasmine/headless/report' - autoload :ReportMessage, 'jasmine/headless/report_message' + autoload :Report, 'jasmine/headless/report' + autoload :ReportMessage, 'jasmine/headless/report_message' - class << self - def root - @root ||= Pathname(File.expand_path('../../..', __FILE__)) + class << self + def root + @root ||= Pathname(File.expand_path('../../..', __FILE__)) + end end end end