Rakefile in gogyou-0.2.3 vs Rakefile in gogyou-0.2.4
- old
+ new
@@ -27,10 +27,13 @@
GEMFILE = "#{GEMSTUB.name}-#{GEMSTUB.version}.gem"
GEMSPEC = "#{GEMSTUB.name}.gemspec"
GEMSTUB.files += DOC + EXT + EXTCONF + BIN + LIB + SPEC + TEST + EXAMPLE + RAKEFILE + EXTRA
GEMSTUB.files.sort!
-GEMSTUB.rdoc_options ||= %w(--charset UTF-8)
+if GEMSTUB.rdoc_options.nil? || GEMSTUB.rdoc_options.empty?
+ readme = %W(.md .markdown .rd .rdoc .txt #{""}).map { |ext| "README#{ext}" }.find { |m| DOC.find { |n| n == m } }
+ GEMSTUB.rdoc_options = %w(--charset UTF-8) + (readme ? %W(-m #{readme}) : [])
+end
GEMSTUB.extra_rdoc_files += DOC + LIB + EXT.reject { |n| n.include?("/externals/") || !%w(.h .hh .c .cc .cpp .cxx).include?(File.extname(n)) }
GEMSTUB.extra_rdoc_files.sort!
CLEAN << GEMSPEC
CLOBBER << GEMFILE