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