Don't load Haml in the Rakefile unless it's necessary.

This commit is contained in:
Nathan Weizenbaum 2008-05-15 17:48:02 -07:00
parent b9d4015743
commit 6fc675ef4e
1 changed files with 2 additions and 1 deletions

View File

@ -29,7 +29,6 @@ END
# ----- Packaging -----
require 'rake/gempackagetask'
require 'lib/haml'
load 'haml.gemspec'
Rake::GemPackageTask.new(HAML_GEMSPEC) do |pkg|
@ -41,6 +40,8 @@ Rake::GemPackageTask.new(HAML_GEMSPEC) do |pkg|
end
task :revision_file do
require 'lib/haml'
if Haml.version[:rev] && !Rake.application.top_level_tasks.include?('release')
File.open('REVISION', 'w') { |f| f.puts Haml.version[:rev] }
elsif Rake.application.top_level_tasks.include?('release')