From 8b8fc32f80b94da1b02127b3a3553f88569326b9 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Fri, 2 Sep 2011 10:49:15 -0400 Subject: [PATCH] change how includes work and shuffle things around --- bin/jasmine-headless-webkit | 1 + jasmine-headless-webkit.gemspec | 4 ++-- lib/jasmine-headless-webkit.rb | 9 +++++++++ lib/jasmine-headless-webkit/version.rb | 7 ------- lib/jasmine/files_list.rb | 1 - lib/jasmine/headless/railtie.rb | 2 -- lib/jasmine/headless/runner.rb | 6 ------ lib/jasmine/headless/task.rb | 2 -- lib/jasmine/headless/version.rb | 5 +++++ 9 files changed, 17 insertions(+), 20 deletions(-) delete mode 100644 lib/jasmine-headless-webkit/version.rb create mode 100644 lib/jasmine/headless/version.rb diff --git a/bin/jasmine-headless-webkit b/bin/jasmine-headless-webkit index 8d48998..2988f6c 100755 --- a/bin/jasmine-headless-webkit +++ b/bin/jasmine-headless-webkit @@ -9,6 +9,7 @@ end $:.unshift(File.join(gem_dir, 'lib')) require 'jasmine-headless-webkit' + require 'jasmine/headless/errors' require 'jasmine/headless/runner' require 'jasmine/headless/options' diff --git a/jasmine-headless-webkit.gemspec b/jasmine-headless-webkit.gemspec index 17aeb06..834f207 100644 --- a/jasmine-headless-webkit.gemspec +++ b/jasmine-headless-webkit.gemspec @@ -1,10 +1,10 @@ # -*- encoding: utf-8 -*- $:.push File.expand_path("../lib", __FILE__) -require "jasmine-headless-webkit/version" +require "jasmine/headless/version" Gem::Specification.new do |s| s.name = "jasmine-headless-webkit" - s.version = Jasmine::Headless::Webkit::VERSION + s.version = Jasmine::Headless::VERSION s.platform = Gem::Platform::RUBY s.authors = ["John Bintz", "Sencha Inc.", "Pivotal Labs"] s.email = ["john@coswellproductions.com"] diff --git a/lib/jasmine-headless-webkit.rb b/lib/jasmine-headless-webkit.rb index 9626790..561a8a1 100644 --- a/lib/jasmine-headless-webkit.rb +++ b/lib/jasmine-headless-webkit.rb @@ -1,10 +1,19 @@ module Jasmine + autoload :FilesList, 'jasmine/files_list' + autoload :TemplateWriter, 'jasmine/template_writer' + module 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' end end +require 'jasmine/headless/errors' + require 'jasmine/headless/railtie' if defined?(Rails) && Rails::VERSION::MAJOR >= 3 diff --git a/lib/jasmine-headless-webkit/version.rb b/lib/jasmine-headless-webkit/version.rb deleted file mode 100644 index b429569..0000000 --- a/lib/jasmine-headless-webkit/version.rb +++ /dev/null @@ -1,7 +0,0 @@ -module Jasmine - module Headless - module Webkit - VERSION = "0.6.4" - end - end -end diff --git a/lib/jasmine/files_list.rb b/lib/jasmine/files_list.rb index def12b8..0201cd8 100644 --- a/lib/jasmine/files_list.rb +++ b/lib/jasmine/files_list.rb @@ -1,4 +1,3 @@ -require 'jasmine/headless/coffee_script_cache' require 'jasmine-core' require 'iconv' diff --git a/lib/jasmine/headless/railtie.rb b/lib/jasmine/headless/railtie.rb index 02441c4..5af2660 100644 --- a/lib/jasmine/headless/railtie.rb +++ b/lib/jasmine/headless/railtie.rb @@ -1,5 +1,3 @@ -require 'jasmine/headless/task' - module Jasmine module Headless class Railtie < Rails::Railtie diff --git a/lib/jasmine/headless/runner.rb b/lib/jasmine/headless/runner.rb index 672a8c6..7791103 100644 --- a/lib/jasmine/headless/runner.rb +++ b/lib/jasmine/headless/runner.rb @@ -1,14 +1,8 @@ -require 'jasmine/headless/errors' -require 'jasmine/headless/options' - require 'fileutils' require 'coffee-script' require 'rainbow' -require 'jasmine/files_list' -require 'jasmine/template_writer' - require 'yaml' module Jasmine diff --git a/lib/jasmine/headless/task.rb b/lib/jasmine/headless/task.rb index 113030e..d6456a2 100644 --- a/lib/jasmine/headless/task.rb +++ b/lib/jasmine/headless/task.rb @@ -1,5 +1,3 @@ -require 'jasmine/headless/runner' - module Digest class JasmineTest def self.file(file) diff --git a/lib/jasmine/headless/version.rb b/lib/jasmine/headless/version.rb new file mode 100644 index 0000000..8fd51dc --- /dev/null +++ b/lib/jasmine/headless/version.rb @@ -0,0 +1,5 @@ +module Jasmine + module Headless + VERSION = "0.6.4" + end +end