Update and improve Rails documentation (4.2.1)

pull/185/head
Thibaut 10 years ago
parent 756252c7ad
commit 4da29f8158

@ -302,7 +302,7 @@ credits = [
'https://www.ruby-lang.org/en/about/license.txt'
], [
'Ruby on Rails',
'2004-2014 David Heinemeier Hansson<br>Rails, Ruby on Rails, and the Rails logo are trademarks of David Heinemeier Hansson.',
'2004-2015 David Heinemeier Hansson<br>Rails, Ruby on Rails, and the Rails logo are trademarks of David Heinemeier Hansson.',
'MIT',
'https://raw.github.com/rails/rails/master/activerecord/MIT-LICENSE'
], [

@ -25,6 +25,8 @@ module Docs
at_css('> .description p') || css('.documentation-section').any? { |node| node.content.present? }
end
IGNORE_METHODS = %w(version gem_version)
def additional_entries
return [] if root_page?
require 'cgi'
@ -36,7 +38,7 @@ module Docs
name.gsub! '-', '%'
name = CGI.unescape(name)
unless name.start_with? '_'
unless name.start_with?('_') || IGNORE_METHODS.include?(name)
name.prepend self.name + (node['id'] =~ /\A\w+-c-/ ? '::' : '#')
entries << [name, node['id']] unless entries.any? { |entry| entry[0] == name }
end

@ -1,27 +1,13 @@
module Docs
class Rails < Rdoc
# Generated with:
# find \
# actionmailer \
# actionpack \
# actionview \
# activemodel \
# activejob \
# activerecord \
# activesupport \
# railties \
# -name '*.rb' \
# -not -name 'version.rb' \
# -not -wholename '*generators/*' \
# -not -wholename '*test/*' \
# -not -wholename '*examples/*' \
# | xargs \
# rdoc --format=darkfish --no-line-numbers --op=rdoc --visibility=public
self.name = 'Ruby on Rails'
self.slug = 'rails'
self.version = '4.2.0'
self.version = '4.2.1'
self.dir = '/Users/Thibaut/DevDocs/Docs/RDoc/Rails'
self.links = {
home: 'http://rubyonrails.org/',
code: 'https://github.com/rails/rails'
}
html_filters.replace 'rdoc/entries', 'rails/entries'
@ -66,10 +52,13 @@ module Docs
/\AActionView\/Resolver/,
/\AActiveSupport\/Multibyte\/Unicode\//,
/\AActiveSupport\/XML/i,
/\ASourceAnnotationExtractor/]
/\ASourceAnnotationExtractor/,
/\AI18n\/Railtie/,
/\ARails\/AppBuilder/,
/\ARails\/PluginBuilder/]
options[:attribution] = <<-HTML
&copy; 2004&ndash;2014 David Heinemeier Hansson<br>
&copy; 2004&ndash;2015 David Heinemeier Hansson<br>
Licensed under the MIT License.
HTML
end

Loading…
Cancel
Save