2009-05-07 00:14:31 +00:00
|
|
|
require File.join(File.dirname(__FILE__), 'compass', 'dependencies')
|
2009-01-25 19:28:11 +00:00
|
|
|
|
|
|
|
def assert_sass_version(obj)
|
|
|
|
unless obj.respond_to?(:version) && obj.version[:major] == 2 && obj.version[:minor] >= 1
|
|
|
|
raise LoadError.new("Compass requires Haml version 2.1 or greater.")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
begin
|
|
|
|
assert_sass_version(Sass)
|
|
|
|
rescue LoadError
|
|
|
|
require 'haml'
|
|
|
|
assert_sass_version(Haml)
|
|
|
|
end
|
|
|
|
|
2008-11-29 09:08:07 +00:00
|
|
|
require File.join(File.dirname(__FILE__), 'sass_extensions')
|
|
|
|
|
2008-08-23 17:00:46 +00:00
|
|
|
['core_ext', 'version'].each do |file|
|
|
|
|
require File.join(File.dirname(__FILE__), 'compass', file)
|
|
|
|
end
|
|
|
|
|
|
|
|
module Compass
|
|
|
|
extend Compass::Version
|
|
|
|
def base_directory
|
|
|
|
File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
|
|
|
end
|
2009-02-01 22:17:07 +00:00
|
|
|
def lib_directory
|
|
|
|
File.expand_path(File.join(File.dirname(__FILE__)))
|
|
|
|
end
|
|
|
|
module_function :base_directory, :lib_directory
|
2008-08-23 17:00:46 +00:00
|
|
|
end
|
|
|
|
|
2009-02-08 21:09:29 +00:00
|
|
|
require File.join(File.dirname(__FILE__), 'compass', 'configuration')
|
2008-08-23 17:00:46 +00:00
|
|
|
require File.join(File.dirname(__FILE__), 'compass', 'frameworks')
|
2009-02-08 21:09:29 +00:00
|
|
|
|
2008-08-24 19:57:49 +00:00
|
|
|
# make sure we're running inside Merb
|
|
|
|
require File.join(File.dirname(__FILE__), 'compass', 'merb') if defined?(Merb::Plugins)
|
|
|
|
|