aboutsummaryrefslogtreecommitdiffstats
path: root/railties/Rakefile
diff options
context:
space:
mode:
authorYehuda Katz <wycats@gmail.com>2009-01-30 10:53:14 -0800
committerYehuda Katz <wycats@gmail.com>2009-01-30 10:53:19 -0800
commitda10673e32718d6a0619bd0f4b4d3d796db86a1a (patch)
tree7bdb7868b0be65daec06ba729f68deccfe61a8bb /railties/Rakefile
parentb8fadd708b9850a77e1f64038763fffcff502499 (diff)
parented0e5640879fd42c00fc5900e0355a0ea1dcf2ad (diff)
downloadrails-da10673e32718d6a0619bd0f4b4d3d796db86a1a.tar.gz
rails-da10673e32718d6a0619bd0f4b4d3d796db86a1a.tar.bz2
rails-da10673e32718d6a0619bd0f4b4d3d796db86a1a.zip
Sync 'rails/rails/master'
Diffstat (limited to 'railties/Rakefile')
-rw-r--r--railties/Rakefile16
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))