2009-02-04 01:44:58 +00:00
|
|
|
pwd = File.dirname(__FILE__)
|
2009-10-10 20:59:13 +00:00
|
|
|
$:.unshift pwd
|
|
|
|
|
2009-03-17 12:26:34 +00:00
|
|
|
begin
|
2010-03-15 21:06:27 +00:00
|
|
|
# Guides generation in the Rails repo.
|
2012-03-17 15:32:49 +00:00
|
|
|
as_lib = File.join(pwd, "../activesupport/lib")
|
|
|
|
ap_lib = File.join(pwd, "../actionpack/lib")
|
2009-03-17 12:26:34 +00:00
|
|
|
|
2010-03-15 21:06:27 +00:00
|
|
|
$:.unshift as_lib if File.directory?(as_lib)
|
|
|
|
$:.unshift ap_lib if File.directory?(ap_lib)
|
2009-03-17 12:26:34 +00:00
|
|
|
rescue LoadError
|
2010-03-15 21:06:27 +00:00
|
|
|
# Guides generation from gems.
|
2016-08-06 17:21:59 +00:00
|
|
|
gem "actionpack", ">= 3.0"
|
2009-03-17 12:26:34 +00:00
|
|
|
end
|
2009-02-04 01:44:58 +00:00
|
|
|
|
2010-03-15 21:06:27 +00:00
|
|
|
require "rails_guides/generator"
|
|
|
|
RailsGuides::Generator.new.generate
|