mirror of https://github.com/rails/rails
upgrades RedCloth dependency to ~> 4.2, adds RedCloth to the project's Rakefile, removes gem call from the guides generator (use bundle exec if needed)
This commit is contained in:
parent
37bd45f893
commit
74188cbff4
1
Gemfile
1
Gemfile
|
@ -14,6 +14,7 @@ gem "rake", ">= 0.8.7"
|
||||||
gem "mocha", ">= 0.9.8"
|
gem "mocha", ">= 0.9.8"
|
||||||
gem "rdoc", "~> 3.4"
|
gem "rdoc", "~> 3.4"
|
||||||
gem "horo", "= 1.0.3"
|
gem "horo", "= 1.0.3"
|
||||||
|
gem "RedCloth", "~> 4.2"
|
||||||
|
|
||||||
# for perf tests
|
# for perf tests
|
||||||
gem "faker"
|
gem "faker"
|
||||||
|
|
|
@ -24,14 +24,14 @@ rescue LoadError
|
||||||
end
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
gem 'RedCloth', '>= 4.1.1'
|
|
||||||
require 'redcloth'
|
require 'redcloth'
|
||||||
rescue Gem::LoadError
|
rescue Gem::LoadError
|
||||||
|
# This can happen if doc:guides is executed in an application.
|
||||||
$stderr.puts('Generating guides requires RedCloth 4.1.1+.')
|
$stderr.puts('Generating guides requires RedCloth 4.1.1+.')
|
||||||
$stderr.puts(<<ERROR) if bundler?
|
$stderr.puts(<<ERROR) if bundler?
|
||||||
Please add
|
Please add
|
||||||
|
|
||||||
gem 'RedCloth', '>= 4.1.1'
|
gem 'RedCloth', '~> 4.2'
|
||||||
|
|
||||||
to the Gemfile, run
|
to the Gemfile, run
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,8 @@ h3. How to Contribute?
|
||||||
* Assets are stored in the +railties/guides/assets+ directory.
|
* Assets are stored in the +railties/guides/assets+ directory.
|
||||||
* Sample format : "Active Record Associations":http://github.com/lifo/docrails/blob/3e56a3832415476fdd1cb963980d0ae390ac1ed3/railties/guides/source/association_basics.textile.
|
* Sample format : "Active Record Associations":http://github.com/lifo/docrails/blob/3e56a3832415476fdd1cb963980d0ae390ac1ed3/railties/guides/source/association_basics.textile.
|
||||||
* Sample output : "Active Record Associations":association_basics.html.
|
* Sample output : "Active Record Associations":association_basics.html.
|
||||||
* You can build the Guides during testing by running +rake generate_guides+ in the +railties+ directory.
|
* You can build the Guides during testing by running +bundle exec rake generate_guides+ in the +railties+ directory.
|
||||||
* You're encouraged to validate XHTML for the generated guides before commiting your changes by running +rake validate_guides+ in the +railties+ directory.
|
* You're encouraged to validate XHTML for the generated guides before commiting your changes by running +bundle exec rake validate_guides+ in the +railties+ directory.
|
||||||
* Edge guides "can be consulted online":http://edgeguides.rubyonrails.org/. That website is generated periodically from docrails.
|
* Edge guides "can be consulted online":http://edgeguides.rubyonrails.org/. That website is generated periodically from docrails.
|
||||||
|
|
||||||
h3. What to Contribute?
|
h3. What to Contribute?
|
||||||
|
|
|
@ -45,7 +45,7 @@ h3. HTML Generation
|
||||||
To generate all the guides just cd into the +railties+ directory and execute
|
To generate all the guides just cd into the +railties+ directory and execute
|
||||||
|
|
||||||
<plain>
|
<plain>
|
||||||
rake generate_guides
|
bundle exec rake generate_guides
|
||||||
</plain>
|
</plain>
|
||||||
|
|
||||||
You'll need the gems erubis, i18n, and RedCloth.
|
You'll need the gems erubis, i18n, and RedCloth.
|
||||||
|
@ -53,7 +53,7 @@ You'll need the gems erubis, i18n, and RedCloth.
|
||||||
To process +my_guide.textile+ and nothing else use the +ONLY+ environment variable:
|
To process +my_guide.textile+ and nothing else use the +ONLY+ environment variable:
|
||||||
|
|
||||||
<plain>
|
<plain>
|
||||||
rake generate_guides ONLY=my_guide
|
bundle exec rake generate_guides ONLY=my_guide
|
||||||
</plain>
|
</plain>
|
||||||
|
|
||||||
Although by default guides that have not been modified are not processed, so +ONLY+ is rarely needed in practice.
|
Although by default guides that have not been modified are not processed, so +ONLY+ is rarely needed in practice.
|
||||||
|
|
Loading…
Reference in New Issue