aboutsummaryrefslogtreecommitdiffstats
path: root/guides/rails_guides.rb
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2015-03-18 12:32:10 +0100
committerYves Senn <yves.senn@gmail.com>2015-03-18 12:32:10 +0100
commit8adfba360be5e2220208506a7b8d2089bd596199 (patch)
treee301c28865d1f853cca675bc96a7c8ed90d26504 /guides/rails_guides.rb
parente121fae9662a40bbf63c204148ad2296b09fdfdc (diff)
parent2a307623a29283c794e94c71f34f111c885d30a8 (diff)
downloadrails-8adfba360be5e2220208506a7b8d2089bd596199.tar.gz
rails-8adfba360be5e2220208506a7b8d2089bd596199.tar.bz2
rails-8adfba360be5e2220208506a7b8d2089bd596199.zip
Merge pull request #19240 from yui-knk/refactor/guide_rb
Remove gem check in guides/rails_guides.rb Conflicts: guides/rails_guides.rb
Diffstat (limited to 'guides/rails_guides.rb')
-rw-r--r--guides/rails_guides.rb45
1 files changed, 0 insertions, 45 deletions
diff --git a/guides/rails_guides.rb b/guides/rails_guides.rb
index f184cff3e8..367ed0b12e 100644
--- a/guides/rails_guides.rb
+++ b/guides/rails_guides.rb
@@ -1,13 +1,6 @@
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.exist?('Gemfile')
-end
-
begin
# Guides generation in the Rails repo.
as_lib = File.join(pwd, "../activesupport/lib")
@@ -20,43 +13,5 @@ rescue LoadError
gem "actionpack", '>= 3.0'
end
-begin
- require 'redcarpet'
-rescue LoadError
- # This can happen if doc:guides is executed in an application.
- $stderr.puts('Generating guides requires Redcarpet 3.2.2+.')
- $stderr.puts(<<ERROR) if bundler?
-Please add
-
- gem 'redcarpet', '~> 3.2.2'
-
-to the Gemfile, run
-
- bundle install
-
-and try again.
-ERROR
- exit 1
-end
-
-begin
- require 'nokogiri'
-rescue LoadError
- # This can happen if doc:guides is executed in an application.
- $stderr.puts('Generating guides requires Nokogiri.')
- $stderr.puts(<<ERROR) if bundler?
-Please add
-
- gem 'nokogiri'
-
-to the Gemfile, run
-
- bundle install
-
-and try again.
-ERROR
- exit 1
-end
-
require "rails_guides/generator"
RailsGuides::Generator.new.generate