Permalink
Browse files

fix doc:readmes task

Was failing with "private method `mkdir' called for File:Class" when the
doc directory didn't exist.
  • Loading branch information...
1 parent c053214 commit 66ab362b66f4fd6fbf83f5a7a7670f26d0cdc70b @gnandretta gnandretta committed Jul 2, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 Rakefile
View
@@ -10,7 +10,7 @@ namespace :doc do
next if file == 'lib/sinatra/contrib.rb'
doc = File.read(file)[/^module Sinatra\n( #[^\n]*\n)*/m].scan(/^ *#(?!#) ?(.*)\n/).join("\n")
file = "doc/#{file[4..-4].tr("/_", "-")}.rdoc"
- File.mkdir "doc" unless File.directory? "doc"
+ Dir.mkdir "doc" unless File.directory? "doc"
puts "writing #{file}"
File.open(file, "w") { |f| f << doc }
end
@@ -44,4 +44,4 @@ task 'sinatra-contrib.gemspec' do
File.open('sinatra-contrib.gemspec', 'w') { |f| f << content }
end
-task :gemspec => 'sinatra-contrib.gemspec'
+task :gemspec => 'sinatra-contrib.gemspec'

0 comments on commit 66ab362

Please sign in to comment.