1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

Made require more sane by messing with $LOAD_PATH. Also fixed rcov in the process.

git-svn-id: svn://hamptoncatlin.com/haml/branches/1.5dev@190 7063305b-7217-0410-af8c-cdc13e5119b9
This commit is contained in:
nex3 2006-12-03 23:56:47 +00:00
parent 76c6207178
commit d10b74e7e9
15 changed files with 32 additions and 18 deletions

View file

@ -92,7 +92,7 @@ if is_task?('rcov', 'clobber_rcov')
unless not_loaded.include? 'rcov/rcovtask' unless not_loaded.include? 'rcov/rcovtask'
Rcov::RcovTask.new do |t| Rcov::RcovTask.new do |t|
t.libs << "test" t.libs << "test"
t.test_files = FileList['test/*_test.rb'] t.test_files = FileList['test/**/*_test.rb']
if ENV['NON_NATIVE'] if ENV['NON_NATIVE']
t.rcov_opts << "--no-rcovrt" t.rcov_opts << "--no-rcovrt"
end end

View file

@ -1,7 +1,9 @@
require 'haml'
require 'haml/template' require 'haml/template'
require 'sass'
require 'sass/sass_helper' require 'sass/sass_helper'
ActionView::Base.register_template_handler('haml', Haml::Template) ActionView::Base.register_template_handler('haml', Haml::Template)
ActionView::Base.class_eval do ActionView::Base.class_eval do
include Sass::SassHelper include Sass::SassHelper
end end

View file

@ -1,5 +1,6 @@
require File.dirname(__FILE__) + '/helpers' require File.dirname(__FILE__) + '/../haml'
require File.dirname(__FILE__) + '/buffer' require 'haml/helpers'
require 'haml/buffer'
module Haml module Haml
# This is the class where all the parsing and processing of the HAML # This is the class where all the parsing and processing of the HAML

View file

@ -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 module Haml
# This module contains various helpful methods to make it easier to do # This module contains various helpful methods to make it easier to do

View file

@ -1,4 +1,5 @@
require File.dirname(__FILE__) + '/engine' require File.dirname(__FILE__) + '/../haml'
require 'haml/engine'
require 'rubygems' require 'rubygems'
require 'active_support' require 'active_support'
require 'action_view' require 'action_view'

View file

@ -1,4 +1,5 @@
require File.dirname(__FILE__) + '/css/parser' require File.dirname(__FILE__) + '/../sass'
require 'sass/css/parser'
module Sass module Sass
class Engine class Engine

View file

@ -1,5 +1,5 @@
require File.dirname(__FILE__) + '/../sass'
require File.dirname(__FILE__) + "/engine" require 'sass/engine'
#Rails plugin stuff. For use with action_view #Rails plugin stuff. For use with action_view

View file

@ -1,4 +1,5 @@
require File.dirname(__FILE__) + '/../lib/haml/template' require File.dirname(__FILE__) + '/../lib/haml'
require 'haml/template'
require 'rubygems' require 'rubygems'
require 'active_support' require 'active_support'
require 'action_view' require 'action_view'

View file

@ -1,7 +1,8 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
require 'test/unit' require 'test/unit'
require File.dirname(__FILE__) + '/../../lib/haml/engine' require File.dirname(__FILE__) + '/../../lib/haml'
require 'haml/engine'
class EngineTest < Test::Unit::TestCase class EngineTest < Test::Unit::TestCase

View file

@ -1,7 +1,8 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
require 'test/unit' require 'test/unit'
require File.dirname(__FILE__) + '/../../lib/haml/template' require File.dirname(__FILE__) + '/../../lib/haml'
require 'haml/template'
class HelperTest < Test::Unit::TestCase class HelperTest < Test::Unit::TestCase
include Haml::Helpers include Haml::Helpers

View file

@ -5,7 +5,8 @@ require 'rubygems'
require 'active_support' require 'active_support'
require 'action_view' 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' require File.dirname(__FILE__) + '/mocks/article'
class TemplateTest < Test::Unit::TestCase class TemplateTest < Test::Unit::TestCase

View file

@ -1,4 +1,5 @@
require File.dirname(__FILE__) + '/../lib/haml/template' require File.dirname(__FILE__) + '/../lib/haml'
require 'haml/template'
require 'rubygems' require 'rubygems'
require 'active_support' require 'active_support'
require 'action_view' require 'action_view'

View file

@ -1,7 +1,8 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
require 'test/unit' require 'test/unit'
require File.dirname(__FILE__) + '/../../lib/sass/engine' require File.dirname(__FILE__) + '/../../lib/sass'
require 'sass/engine'
class SassEngineTest < Test::Unit::TestCase class SassEngineTest < Test::Unit::TestCase
def setup def setup

View file

@ -1,4 +1,5 @@
require File.dirname(__FILE__) + '/../../../lib/sass/sass_helper' require File.dirname(__FILE__) + '/../../../lib/sass'
require 'sass/sass_helper'
class FakeController class FakeController
include Sass::SassHelper include Sass::SassHelper

View file

@ -1,8 +1,9 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
require 'test/unit' require 'test/unit'
require File.dirname(__FILE__) + '/../../lib/sass/engine' require File.dirname(__FILE__) + '/../../lib/sass'
require File.dirname(__FILE__) + '/../../lib/sass/sass_helper' require 'sass/engine'
require 'sass/sass_helper'
require File.dirname(__FILE__) + '/mocks/fake_controller' require File.dirname(__FILE__) + '/mocks/fake_controller'
class SassPluginTest < Test::Unit::TestCase class SassPluginTest < Test::Unit::TestCase