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' 'https://www.ruby-lang.org/en/about/license.txt'
], [ ], [
'Ruby on Rails', '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', 'MIT',
'https://raw.github.com/rails/rails/master/activerecord/MIT-LICENSE' '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? } at_css('> .description p') || css('.documentation-section').any? { |node| node.content.present? }
end end
IGNORE_METHODS = %w(version gem_version)
def additional_entries def additional_entries
return [] if root_page? return [] if root_page?
require 'cgi' require 'cgi'
@ -36,7 +38,7 @@ module Docs
name.gsub! '-', '%' name.gsub! '-', '%'
name = CGI.unescape(name) 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-/ ? '::' : '#') name.prepend self.name + (node['id'] =~ /\A\w+-c-/ ? '::' : '#')
entries << [name, node['id']] unless entries.any? { |entry| entry[0] == name } entries << [name, node['id']] unless entries.any? { |entry| entry[0] == name }
end end

@ -1,27 +1,13 @@
module Docs module Docs
class Rails < Rdoc 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.name = 'Ruby on Rails'
self.slug = 'rails' self.slug = 'rails'
self.version = '4.2.0' self.version = '4.2.1'
self.dir = '/Users/Thibaut/DevDocs/Docs/RDoc/Rails' 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' html_filters.replace 'rdoc/entries', 'rails/entries'
@ -66,10 +52,13 @@ module Docs
/\AActionView\/Resolver/, /\AActionView\/Resolver/,
/\AActiveSupport\/Multibyte\/Unicode\//, /\AActiveSupport\/Multibyte\/Unicode\//,
/\AActiveSupport\/XML/i, /\AActiveSupport\/XML/i,
/\ASourceAnnotationExtractor/] /\ASourceAnnotationExtractor/,
/\AI18n\/Railtie/,
/\ARails\/AppBuilder/,
/\ARails\/PluginBuilder/]
options[:attribution] = <<-HTML options[:attribution] = <<-HTML
&copy; 2004&ndash;2014 David Heinemeier Hansson<br> &copy; 2004&ndash;2015 David Heinemeier Hansson<br>
Licensed under the MIT License. Licensed under the MIT License.
HTML HTML
end end

Loading…
Cancel
Save