diff options
author | Jaime Iniesta <jaimeiniesta@gmail.com> | 2012-08-24 11:52:04 +0200 |
---|---|---|
committer | Jaime Iniesta <jaimeiniesta@gmail.com> | 2012-08-24 11:52:04 +0200 |
commit | 1b709f620762e993ea599c82e4a9c712afc16632 (patch) | |
tree | 44996104b34f87503a5633ea0d871bf356a408a1 | |
parent | fdeaea6b45e644aa6438c75f2f9723a4794e9223 (diff) | |
download | rails-1b709f620762e993ea599c82e4a9c712afc16632.tar.gz rails-1b709f620762e993ea599c82e4a9c712afc16632.tar.bz2 rails-1b709f620762e993ea599c82e4a9c712afc16632.zip |
Fix rake guides:validate
This rake task was looking for the output folder in the wrong place.
-rw-r--r-- | guides/w3c_validator.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/guides/w3c_validator.rb b/guides/w3c_validator.rb index 5e340499c4..8be14fe1f5 100644 --- a/guides/w3c_validator.rb +++ b/guides/w3c_validator.rb @@ -5,9 +5,9 @@ # Guides are taken from the output directory, from where all .html files are # submitted to the validator. # -# This script is prepared to be launched from the railties directory as a rake task: +# This script is prepared to be launched from the guides directory as a rake task: # -# rake validate_guides +# rake guides:validate # # If nothing is specified, all files will be validated, but you can check just # some of them using this environment variable: @@ -17,12 +17,12 @@ # enough: # # # validates only association_basics.html -# ONLY=assoc rake validate_guides +# rake guides:validate ONLY=assoc # # Separate many using commas: # # # validates only association_basics.html and migrations.html -# ONLY=assoc,migrations rake validate_guides +# rake guides:validate ONLY=assoc,migrations # # --------------------------------------------------------------------------- @@ -53,15 +53,15 @@ module RailsGuides private def guides_to_validate - guides = Dir["./guides/output/*.html"] - guides.delete("./guides/output/layout.html") + guides = Dir["./output/*.html"] + guides.delete("./output/layout.html") ENV.key?('ONLY') ? select_only(guides) : guides end def select_only(guides) prefixes = ENV['ONLY'].split(",").map(&:strip) guides.select do |guide| - prefixes.any? {|p| guide.start_with?("./guides/output/#{p}")} + prefixes.any? {|p| guide.start_with?("./output/#{p}")} end end |