summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorJesse Chan-Norris <jcn@pith.org>2012-01-16 21:20:25 -0500
committerJesse Chan-Norris <jcn@pith.org>2012-01-16 21:20:25 -0500
commit6e70fddae61a1de1bd7fba7aa43f7c2f0f3d8af6 (patch)
tree7eb978be34b1753e7f79d9e54c967dd94d1e3b59 /Rakefile
parentf3f08f9b151da2076d8318ca1fdec97530a4d9d8 (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--Rakefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Rakefile b/Rakefile
index 1087d90..6f824a0 100644
--- a/Rakefile
+++ b/Rakefile
@@ -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)}"