From 6d87cd028b32570973450424db164e5405a0ee13 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sat, 17 Mar 2012 08:32:49 -0700 Subject: moves the guides up to the root directory --- railties/guides/rails_guides.rb | 50 ----------------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 railties/guides/rails_guides.rb (limited to 'railties/guides/rails_guides.rb') 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(< 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 -- cgit v1.2.3