diff --git a/Rakefile b/Rakefile index 2b29f0c5..e84f20af 100644 --- a/Rakefile +++ b/Rakefile @@ -92,7 +92,7 @@ if is_task?('rcov', 'clobber_rcov') unless not_loaded.include? 'rcov/rcovtask' Rcov::RcovTask.new do |t| t.libs << "test" - t.test_files = FileList['test/*_test.rb'] + t.test_files = FileList['test/**/*_test.rb'] if ENV['NON_NATIVE'] t.rcov_opts << "--no-rcovrt" end diff --git a/init.rb b/init.rb index 495700c6..976664c4 100644 --- a/init.rb +++ b/init.rb @@ -1,7 +1,9 @@ +require 'haml' require 'haml/template' +require 'sass' require 'sass/sass_helper' ActionView::Base.register_template_handler('haml', Haml::Template) ActionView::Base.class_eval do include Sass::SassHelper -end \ No newline at end of file +end diff --git a/lib/haml/engine.rb b/lib/haml/engine.rb index bc90849e..094d863b 100644 --- a/lib/haml/engine.rb +++ b/lib/haml/engine.rb @@ -1,5 +1,6 @@ -require File.dirname(__FILE__) + '/helpers' -require File.dirname(__FILE__) + '/buffer' +require File.dirname(__FILE__) + '/../haml' +require 'haml/helpers' +require 'haml/buffer' module Haml # This is the class where all the parsing and processing of the HAML diff --git a/lib/haml/helpers.rb b/lib/haml/helpers.rb index df6a29dd..dd35b1e8 100644 --- a/lib/haml/helpers.rb +++ b/lib/haml/helpers.rb @@ -1,4 +1,5 @@ -require File.dirname(__FILE__) + '/helpers/action_view_mods' +require File.dirname(__FILE__) + '/../haml' +require 'haml/helpers/action_view_mods' module Haml # This module contains various helpful methods to make it easier to do diff --git a/lib/haml/template.rb b/lib/haml/template.rb index 2e280344..3f896949 100644 --- a/lib/haml/template.rb +++ b/lib/haml/template.rb @@ -1,4 +1,5 @@ -require File.dirname(__FILE__) + '/engine' +require File.dirname(__FILE__) + '/../haml' +require 'haml/engine' require 'rubygems' require 'active_support' require 'action_view' diff --git a/lib/sass/engine.rb b/lib/sass/engine.rb index c794bb2e..eac8eeba 100644 --- a/lib/sass/engine.rb +++ b/lib/sass/engine.rb @@ -1,4 +1,5 @@ -require File.dirname(__FILE__) + '/css/parser' +require File.dirname(__FILE__) + '/../sass' +require 'sass/css/parser' module Sass class Engine diff --git a/lib/sass/sass_helper.rb b/lib/sass/sass_helper.rb index eaba4b84..55223eb1 100644 --- a/lib/sass/sass_helper.rb +++ b/lib/sass/sass_helper.rb @@ -1,5 +1,5 @@ - -require File.dirname(__FILE__) + "/engine" +require File.dirname(__FILE__) + '/../sass' +require 'sass/engine' #Rails plugin stuff. For use with action_view diff --git a/test/benchmark.rb b/test/benchmark.rb index a02eac9b..a57ab601 100644 --- a/test/benchmark.rb +++ b/test/benchmark.rb @@ -1,4 +1,5 @@ -require File.dirname(__FILE__) + '/../lib/haml/template' +require File.dirname(__FILE__) + '/../lib/haml' +require 'haml/template' require 'rubygems' require 'active_support' require 'action_view' diff --git a/test/haml/engine_test.rb b/test/haml/engine_test.rb index 38d1d318..fb4cf87d 100644 --- a/test/haml/engine_test.rb +++ b/test/haml/engine_test.rb @@ -1,7 +1,8 @@ #!/usr/bin/env ruby require 'test/unit' -require File.dirname(__FILE__) + '/../../lib/haml/engine' +require File.dirname(__FILE__) + '/../../lib/haml' +require 'haml/engine' class EngineTest < Test::Unit::TestCase diff --git a/test/haml/helper_test.rb b/test/haml/helper_test.rb index 65f5462f..0892b857 100644 --- a/test/haml/helper_test.rb +++ b/test/haml/helper_test.rb @@ -1,7 +1,8 @@ #!/usr/bin/env ruby require 'test/unit' -require File.dirname(__FILE__) + '/../../lib/haml/template' +require File.dirname(__FILE__) + '/../../lib/haml' +require 'haml/template' class HelperTest < Test::Unit::TestCase include Haml::Helpers diff --git a/test/haml/template_test.rb b/test/haml/template_test.rb index 8634767e..bd3d684e 100644 --- a/test/haml/template_test.rb +++ b/test/haml/template_test.rb @@ -5,7 +5,8 @@ require 'rubygems' require 'active_support' require 'action_view' -require File.dirname(__FILE__) + '/../../lib/haml/template' +require File.dirname(__FILE__) + '/../../lib/haml' +require 'haml/template' require File.dirname(__FILE__) + '/mocks/article' class TemplateTest < Test::Unit::TestCase diff --git a/test/profile.rb b/test/profile.rb index d9e86955..50dd6363 100644 --- a/test/profile.rb +++ b/test/profile.rb @@ -1,4 +1,5 @@ -require File.dirname(__FILE__) + '/../lib/haml/template' +require File.dirname(__FILE__) + '/../lib/haml' +require 'haml/template' require 'rubygems' require 'active_support' require 'action_view' diff --git a/test/sass/engine_test.rb b/test/sass/engine_test.rb index 65a1db1e..f030b1f4 100644 --- a/test/sass/engine_test.rb +++ b/test/sass/engine_test.rb @@ -1,7 +1,8 @@ #!/usr/bin/env ruby require 'test/unit' -require File.dirname(__FILE__) + '/../../lib/sass/engine' +require File.dirname(__FILE__) + '/../../lib/sass' +require 'sass/engine' class SassEngineTest < Test::Unit::TestCase def setup diff --git a/test/sass/mocks/fake_controller.rb b/test/sass/mocks/fake_controller.rb index 22cb1c58..92af7827 100644 --- a/test/sass/mocks/fake_controller.rb +++ b/test/sass/mocks/fake_controller.rb @@ -1,4 +1,5 @@ -require File.dirname(__FILE__) + '/../../../lib/sass/sass_helper' +require File.dirname(__FILE__) + '/../../../lib/sass' +require 'sass/sass_helper' class FakeController include Sass::SassHelper diff --git a/test/sass/plugin_test.rb b/test/sass/plugin_test.rb index 05fc9b59..d03e68e7 100644 --- a/test/sass/plugin_test.rb +++ b/test/sass/plugin_test.rb @@ -1,8 +1,9 @@ #!/usr/bin/env ruby require 'test/unit' -require File.dirname(__FILE__) + '/../../lib/sass/engine' -require File.dirname(__FILE__) + '/../../lib/sass/sass_helper' +require File.dirname(__FILE__) + '/../../lib/sass' +require 'sass/engine' +require 'sass/sass_helper' require File.dirname(__FILE__) + '/mocks/fake_controller' class SassPluginTest < Test::Unit::TestCase