aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2012-05-29 14:09:08 -0700
committerXavier Noria <fxn@hashref.com>2012-05-29 14:09:08 -0700
commit669694fe888053ccc86e9a9d1d19adb8dba5fafb (patch)
tree03aaa88fb1c6ac80eb7235f46fe32a6a6e3afc9d /guides/source
parent70ad12a72fe3151fd548e9a37a84b54060fcdbba (diff)
parenteb362e59c0587cc907a3826561718d389a189065 (diff)
downloadrails-669694fe888053ccc86e9a9d1d19adb8dba5fafb.tar.gz
rails-669694fe888053ccc86e9a9d1d19adb8dba5fafb.tar.bz2
rails-669694fe888053ccc86e9a9d1d19adb8dba5fafb.zip
Merge pull request #6502 from rafmagana/guides_refactor_rakefile
[Guides] refactor rakefile to have a :guides namespace and a task that shows help
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/ruby_on_rails_guides_guidelines.textile24
1 files changed, 18 insertions, 6 deletions
diff --git a/guides/source/ruby_on_rails_guides_guidelines.textile b/guides/source/ruby_on_rails_guides_guidelines.textile
index f3e934d38c..dd209b61d6 100644
--- a/guides/source/ruby_on_rails_guides_guidelines.textile
+++ b/guides/source/ruby_on_rails_guides_guidelines.textile
@@ -47,7 +47,13 @@ h4. Generation
To generate all the guides, just +cd+ into the *+guides+* directory and execute:
<plain>
-bundle exec rake generate_guides
+bundle exec rake guides:generate
+</plain>
+
+or
+
+<plain>
+bundle exec rake guides:generate:html
</plain>
(You may need to run +bundle install+ first to install the required gems.)
@@ -56,7 +62,7 @@ To process +my_guide.textile+ and nothing else use the +ONLY+ environment variab
<plain>
touch my_guide.textile
-bundle exec rake generate_guides ONLY=my_guide
+bundle exec rake guides:generate ONLY=my_guide
</plain>
By default, guides that have not been modified are not processed, so +ONLY+ is rarely needed in practice.
@@ -68,7 +74,13 @@ It is also recommended that you work with +WARNINGS=1+. This detects duplicate I
If you want to generate guides in a language other than English, you can keep them in a separate directory under +source+ (eg. <tt>source/es</tt>) and use the +GUIDES_LANGUAGE+ environment variable:
<plain>
-bundle exec rake generate_guides GUIDES_LANGUAGE=es
+bundle exec rake guides:generate GUIDES_LANGUAGE=es
+</plain>
+
+If you want to see all the environment variables you can use to configure the generation script just run:
+
+<plain>
+rake
</plain>
h4. Validation
@@ -76,7 +88,7 @@ h4. Validation
Please validate the generated HTML with:
<plain>
-bundle exec rake validate_guides
+bundle exec rake guides:validate
</plain>
Particularly, titles get an ID generated from their content and this often leads to duplicates. Please set +WARNINGS=1+ when generating guides to detect them. The warning messages suggest a solution.
@@ -85,8 +97,8 @@ h3. Kindle Guides
h4(#generation-kindle). Generation
-To generate guides for the Kindle, you need to provide +KINDLE=1+ as an environment variable:
+To generate guides for the Kindle, use the following rake task:
<plain>
-KINDLE=1 bundle exec rake generate_guides
+bundle exec rake guides:generate:kindle
</plain>