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

19 lines
590 B
Ruby
Raw Normal View History

begin
require File.join(File.dirname(__FILE__), 'lib', 'haml') # From here
rescue LoadError
begin
require 'haml' # From gem
rescue LoadError => e
# gems:install may be run to install Haml with the skeleton plugin
# but not the gem itself installed.
# Don't die if this is the case.
raise e unless defined?(Rake) &&
(Rake.application.top_level_tasks.include?('gems') ||
Rake.application.top_level_tasks.include?('gems:install'))
end
end
2010-08-22 19:04:02 -04:00
# Load Haml.
# Haml may be undefined if we're running gems:install.
Haml.init_rails(binding) if defined?(Haml)