Skip to content

Commit 6e70fdd

Browse files
committed
Change directory tests in switch_theme task to use FileTest.directory? instead of Dir.exists? for ruby 1.8.7 compatibility.
1 parent f3f08f9 commit 6e70fdd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Rakefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ task :switch_theme, :theme do |t, args|
66
theme_path = File.join(File.dirname(__FILE__), "_includes", "themes", args.theme)
77
layouts_path = File.join(File.dirname(__FILE__), "_layouts")
88

9-
abort("rake aborted: './_includes/themes/#{args.theme}' directory not found.") unless Dir.exists?(theme_path)
10-
abort("rake aborted: './_layouts' directory not found.") unless Dir.exists?(layouts_path)
9+
abort("rake aborted: './_includes/themes/#{args.theme}' directory not found.") unless FileTest.directory?(theme_path)
10+
abort("rake aborted: './_layouts' directory not found.") unless FileTest.directory?(layouts_path)
1111

1212
Dir.glob("#{theme_path}/*") do |filename|
1313
puts "Generating '#{args.theme}' layout: #{File.basename(filename)}"

0 commit comments

Comments
 (0)