diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-01-18 18:10:58 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-01-18 18:10:58 +0000 |
commit | 39e1ac658efc80e4c54abef4f1c7679e4b3dc2ac (patch) | |
tree | 78cc8f3aaecf75ea1fde4229170027e840eb9cd3 /railties/Rakefile | |
parent | 085991891e610ed0ab616ce434eabf42a9437039 (diff) | |
download | rails-39e1ac658efc80e4c54abef4f1c7679e4b3dc2ac.tar.gz rails-39e1ac658efc80e4c54abef4f1c7679e4b3dc2ac.tar.bz2 rails-39e1ac658efc80e4c54abef4f1c7679e4b3dc2ac.zip |
Merge docrails
Diffstat (limited to 'railties/Rakefile')
-rw-r--r-- | railties/Rakefile | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/railties/Rakefile b/railties/Rakefile index 692c96ddbb..be0f449efc 100644 --- a/railties/Rakefile +++ b/railties/Rakefile @@ -272,7 +272,7 @@ Rake::RDocTask.new { |rdoc| rdoc.rdoc_files.include('lib/commands/**/*.rb') } -desc "Generate guides for the framework" +desc "Generate guides for the framework. Use ONLY='migrations i18n.txt' option to build just specific ones." task :guides do require 'mizuho/generator' @@ -289,8 +289,18 @@ task :guides do indexless = ['index.txt', 'authors.txt'] - # Traverse all entries in doc/guides/source/ - Dir.entries(source).each do |entry| + # Traverse all entries in doc/guides/source/ or only those specified in ONLY env variable + entries = Dir.entries(source) + if ENV['ONLY'] + only = ENV['ONLY'].split(' ') + unless only.empty? + entries = entries.select do |e| + only.include?(e) || only.include?(e.sub(/\.txt$/, '')) + end + end + end + + entries.each do |entry| next if ignore.include?(entry) if File.directory?(File.join(source, entry)) |