Skip to content

Commit e26b5f7

Browse files
committed
Merge pull request #12 from jcn/patch-1
Change directory tests in switch_theme task for ruby 1.8.7 compatibility
2 parents f3f08f9 + 6e70fdd commit e26b5f7

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)