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
active_mailer-0.0.10 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/guides/rails_guides.rb
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/railties-3.2.12/guides/rails_guides.rb
railties-3.2.14 guides/rails_guides.rb
railties-3.2.14.rc2 guides/rails_guides.rb
railties-3.2.14.rc1 guides/rails_guides.rb
swipe-rails-0.0.5 vendor/bundle/gems/railties-3.2.13/guides/rails_guides.rb
active_mailer-0.0.9 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/guides/rails_guides.rb
active_mailer-0.0.8 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/guides/rails_guides.rb
active_mailer-0.0.7 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/guides/rails_guides.rb
active_mailer-0.0.6 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/guides/rails_guides.rb
font-awesome-rails-3.1.1.2 vendor/ruby/2.0.0/gems/railties-3.2.12/guides/rails_guides.rb
font-awesome-rails-3.1.1.2 vendor/ruby/1.9.1/gems/railties-3.2.13/guides/rails_guides.rb
font-awesome-rails-3.1.1.2 vendor/ruby/1.9.1/gems/railties-3.2.12/guides/rails_guides.rb
font-awesome-rails-3.1.1.1 vendor/ruby/1.9.1/gems/railties-3.2.12/guides/rails_guides.rb
font-awesome-rails-3.1.1.1 vendor/ruby/1.9.1/gems/railties-3.2.13/guides/rails_guides.rb
font-awesome-rails-3.1.1.1 vendor/ruby/2.0.0/gems/railties-3.2.12/guides/rails_guides.rb
challah-1.0.0.beta3 vendor/bundle/gems/railties-3.2.13/guides/rails_guides.rb
fc-webicons-0.0.4 vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/guides/rails_guides.rb
challah-1.0.0.beta2 vendor/bundle/gems/railties-3.2.13/guides/rails_guides.rb
challah-1.0.0.beta vendor/bundle/gems/railties-3.2.11/guides/rails_guides.rb