diff options
author | Mark Thomson <nzl216@gmail.com> | 2012-03-17 22:29:46 -0500 |
---|---|---|
committer | Mark Thomson <nzl216@gmail.com> | 2012-03-17 22:29:46 -0500 |
commit | f2bc404ba82431d32a35b4de15cb21f179bc24c7 (patch) | |
tree | ca58ce1118eeda244ced0ef0a1d94ed7ca38e5e0 /railties/guides/rails_guides.rb | |
parent | 98b4ef730696062b624c508d22ca76d9caa018cc (diff) | |
parent | 6ce54d4ba8c220a84e55e7dd798d364c3f48d9f7 (diff) | |
download | rails-f2bc404ba82431d32a35b4de15cb21f179bc24c7.tar.gz rails-f2bc404ba82431d32a35b4de15cb21f179bc24c7.tar.bz2 rails-f2bc404ba82431d32a35b4de15cb21f179bc24c7.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'railties/guides/rails_guides.rb')
-rw-r--r-- | railties/guides/rails_guides.rb | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/railties/guides/rails_guides.rb b/railties/guides/rails_guides.rb deleted file mode 100644 index feb5fe3937..0000000000 --- a/railties/guides/rails_guides.rb +++ /dev/null @@ -1,50 +0,0 @@ -pwd = File.dirname(__FILE__) -$:.unshift pwd - -# This is a predicate useful for the doc:guides task of applications. -def bundler? - # Note that rake sets the cwd to the one that contains the Rakefile - # being executed. - File.exists?('Gemfile') -end - -# Loading Action Pack requires rack and erubis. -require 'rubygems' - -begin - # Guides generation in the Rails repo. - as_lib = File.join(pwd, "../../activesupport/lib") - ap_lib = File.join(pwd, "../../actionpack/lib") - - $:.unshift as_lib if File.directory?(as_lib) - $:.unshift ap_lib if File.directory?(ap_lib) -rescue LoadError - # Guides generation from gems. - gem "actionpack", '>= 3.0' -end - -begin - require 'redcloth' -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(<<ERROR) if bundler? -Please add - - gem 'RedCloth', '~> 4.2' - -to the Gemfile, run - - bundle install - -and try again. -ERROR - - exit 1 -end - -require "rails_guides/textile_extensions" -RedCloth.send(:include, RailsGuides::TextileExtensions) - -require "rails_guides/generator" -RailsGuides::Generator.new.generate |