Sha256: f24be78d237cf69c9375886e21164fd451cdb8aa37f9f23245cdcd0b880a8d26

Contents?: true

Size: 1.11 KB

Versions: 172

Compression:

Stored size: 1.11 KB

Contents

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

Version data entries

172 entries across 133 versions & 19 rubygems

Version Path
challah-rolls-0.1.0 vendor/bundle/gems/railties-3.2.7/guides/rails_guides.rb
challah-rolls-0.1.0 vendor/bundle/gems/challah-0.8.0.pre/vendor/bundle/gems/railties-3.2.7/guides/rails_guides.rb
challah-0.8.0.pre vendor/bundle/gems/railties-3.2.7/guides/rails_guides.rb
challah-0.7.1 vendor/bundle/gems/railties-3.2.7/guides/rails_guides.rb
challah-0.7.0 vendor/bundle/gems/railties-3.2.7/guides/rails_guides.rb
challah-0.7.0.pre2 vendor/bundle/gems/railties-3.2.7/guides/rails_guides.rb
railties-3.2.8 guides/rails_guides.rb
railties-3.1.8 guides/rails_guides.rb
railties-3.2.8.rc2 guides/rails_guides.rb
challah-0.7.0.pre vendor/bundle/gems/railties-3.2.7/guides/rails_guides.rb
railties-3.2.8.rc1 guides/rails_guides.rb
railties-3.2.7 guides/rails_guides.rb
railties-3.1.7 guides/rails_guides.rb
railties-3.2.7.rc1 guides/rails_guides.rb
challah-0.6.2 vendor/bundle/gems/railties-3.2.3/guides/rails_guides.rb
challah-0.6.2 vendor/bundle/gems/railties-3.2.6/guides/rails_guides.rb
challah-0.6.2 vendor/bundle/gems/railties-3.2.2/guides/rails_guides.rb
challah-0.6.2 vendor/bundle/gems/railties-3.2.5/guides/rails_guides.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/guides/rails_guides.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/guides/rails_guides.rb