aboutsummaryrefslogtreecommitdiffstats
path: root/railties/Rakefile
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-01-22 15:13:47 -0600
committerJoshua Peek <josh@joshpeek.com>2009-01-22 15:13:47 -0600
commitcc0b5fa9930dcc60914e21b518b3c54109243cfa (patch)
tree3b5c65d8d0329388730542093314028630b0945a /railties/Rakefile
parente57cb2629ac4971a5dcb1cf8bb2f6d0509317928 (diff)
parentccda96093a3bf3fb360f7c6d61bbbf341b2ae034 (diff)
downloadrails-cc0b5fa9930dcc60914e21b518b3c54109243cfa.tar.gz
rails-cc0b5fa9930dcc60914e21b518b3c54109243cfa.tar.bz2
rails-cc0b5fa9930dcc60914e21b518b3c54109243cfa.zip
Merge branch 'master' into 3-0-unstable
Conflicts: ci/cruise_config.rb
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))