diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-02-04 01:44:58 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-02-04 01:44:58 +0000 |
commit | 03bb1ebec513de779908af110c46e16b9c882673 (patch) | |
tree | 4df5643c61501de1b8e4101746e324a183042262 /railties/guides/rails_guides.rb | |
parent | e4094e23f9e3740599e9eaac527fbef86ff4b4c4 (diff) | |
download | rails-03bb1ebec513de779908af110c46e16b9c882673.tar.gz rails-03bb1ebec513de779908af110c46e16b9c882673.tar.bz2 rails-03bb1ebec513de779908af110c46e16b9c882673.zip |
Convert the guides from asciidoc to textile and integrate with the new design.
If you're a guide writer and want to generate the guides, Run :
ruby railties/guides/rails_guides.rb
And guides HTML will get generated inside railties/guides/output directory.
Diffstat (limited to 'railties/guides/rails_guides.rb')
-rw-r--r-- | railties/guides/rails_guides.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/railties/guides/rails_guides.rb b/railties/guides/rails_guides.rb new file mode 100644 index 0000000000..7617dff5a3 --- /dev/null +++ b/railties/guides/rails_guides.rb @@ -0,0 +1,30 @@ +pwd = File.dirname(__FILE__) +$: << pwd +$: << File.join(pwd, "../../activesupport/lib") +$: << File.join(pwd, "../../actionpack/lib") + +require "action_view" + +# Require rubygems after loading Action View +require 'rubygems' +begin + gem 'RedCloth', '= 4.1.1'# Need exactly 4.1.1 +rescue Gem::LoadError + $stderr.puts %(Missing the RedCloth 4.1.1 gem.\nPlease `gem install -v=4.1.1 RedCloth` to generate the guides.) + exit 1 +end + +require 'redcloth' + +module RailsGuides + autoload :Generator, "rails_guides/generator" + autoload :Indexer, "rails_guides/indexer" + autoload :Helpers, "rails_guides/helpers" + autoload :TextileExtensions, "rails_guides/textile_extensions" +end + +RedCloth.send(:include, RailsGuides::TextileExtensions) + +if $0 == __FILE__ + RailsGuides::Generator.new.generate +end |