diff options
author | Jesse Chan-Norris <jcn@pith.org> | 2012-01-16 21:20:25 -0500 |
---|---|---|
committer | Jesse Chan-Norris <jcn@pith.org> | 2012-01-16 21:20:25 -0500 |
commit | 6e70fddae61a1de1bd7fba7aa43f7c2f0f3d8af6 (patch) | |
tree | 7eb978be34b1753e7f79d9e54c967dd94d1e3b59 /Rakefile | |
parent | f3f08f9b151da2076d8318ca1fdec97530a4d9d8 (diff) |
Change directory tests in switch_theme task to use FileTest.directory? instead of Dir.exists? for ruby 1.8.7 compatibility.
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -6,8 +6,8 @@ task :switch_theme, :theme do |t, args| theme_path = File.join(File.dirname(__FILE__), "_includes", "themes", args.theme) layouts_path = File.join(File.dirname(__FILE__), "_layouts") - abort("rake aborted: './_includes/themes/#{args.theme}' directory not found.") unless Dir.exists?(theme_path) - abort("rake aborted: './_layouts' directory not found.") unless Dir.exists?(layouts_path) + abort("rake aborted: './_includes/themes/#{args.theme}' directory not found.") unless FileTest.directory?(theme_path) + abort("rake aborted: './_layouts' directory not found.") unless FileTest.directory?(layouts_path) Dir.glob("#{theme_path}/*") do |filename| puts "Generating '#{args.theme}' layout: #{File.basename(filename)}" |