Unified · Split
| @@ -17,6 +17,8 @@ module Docs · 16 unmodified lines | ||
| 17 | 17 | 'Profiler__' => 'Profiler', |
| 18 | 18 | 'Psych' => 'YAML', |
| 19 | 19 | 'Rinda' => 'DRb', |
| 20 | + 'SimpleDelegator' => 'Delegator', | |
| 21 | + 'SingleForwardable' => 'Forwardable', | |
| 20 | 22 | 'SortedSet' => 'Set', |
| 21 | 23 | 'TCPServer' => 'Socket', |
| 22 | 24 | 'TempIO' => 'Tempfile', |
| @@ -35,6 +37,9 @@ module Docs · 12 unmodified lines | ||
| 35 | 37 | 'Socket' => 'Socket' } |
| 36 | 38 | |
| 37 | 39 | def get_type |
| 40 | + return 'Language' if guide? | |
| 41 | + return $1 if name =~ /\A(Net\:\:(?:FTP|HTTP|IMAP|SMTP))/ | |
| 42 | + | |
| 38 | 43 | type = super |
| 39 | 44 | |
| 40 | 45 | REPLACE_TYPE_STARTS_WITH.each_pair do |key, value| |
| @@ -47,6 +52,32 @@ module Docs · 6 unmodified lines | ||
| 47 | 52 | |
| 48 | 53 | REPLACE_TYPE[type] || type |
| 49 | 54 | end |
| 55 | + | |
| 56 | + def additional_entries | |
| 57 | + return super unless guide? | |
| 58 | + | |
| 59 | + if slug == 'syntax/control_expressions_rdoc' || slug == 'syntax/miscellaneous_rdoc' | |
| 60 | + css('h2 > code').each_with_object([]) do |node, entries| | |
| 61 | + name = node.content.strip | |
| 62 | + entries << [name, node.parent['id'], 'Syntax'] unless entries.any? { |e| e[0] == name } | |
| 63 | + end | |
| 64 | + elsif slug == 'globals_rdoc' | |
| 65 | + css('dt').map do |node| | |
| 66 | + name = node['id'] = node.content.strip | |
| 67 | + [name, name, 'Globals'] | |
| 68 | + end | |
| 69 | + else | |
| 70 | + [] | |
| 71 | + end | |
| 72 | + end | |
| 73 | + | |
| 74 | + def include_default_entry? | |
| 75 | + guide? || super | |
| 76 | + end | |
| 77 | + | |
| 78 | + def guide? | |
| 79 | + slug =~ /[^\/]+_rdoc/ | |
| 80 | + end | |
| 50 | 81 | end |
| 51 | 82 | end |
| 52 | 83 | end |
| @@ -1,59 +1,56 @@ | ||
| 1 | 1 | module Docs |
| 2 | 2 | class Ruby < Rdoc |
| 3 | 3 | # Generated with: |
| 4 | − # find \ | |
| 5 | − # *.c \ | |
| 6 | − # lib \ | |
| 7 | − # ext/bigdecimal \ | |
| 8 | − # ext/date \ | |
| 9 | − # ext/digest \ | |
| 10 | − # ext/json \ | |
| 11 | − # ext/pathname \ | |
| 12 | − # ext/psych \ | |
| 13 | − # ext/readline \ | |
| 14 | − # ext/ripper \ | |
| 15 | − # ext/socket \ | |
| 16 | − # ext/stringio \ | |
| 17 | − # ext/zlib \ | |
| 18 | − # \( -name '*.c' -or -name '*.rb' \) \ | |
| 19 | − # -not -wholename '*sample/*' \ | |
| 20 | − # | xargs \ | |
| 21 | − # rdoc --format=darkfish --no-line-numbers --op=rdoc --visibility=public | |
| 4 | + # rdoc \ | |
| 5 | + # --root . \ | |
| 6 | + # --page-dir doc \ | |
| 7 | + # --encoding=UTF-8 \ | |
| 8 | + # --visibility=public \ | |
| 9 | + # --format=darkfish \ | |
| 10 | + # --no-line-numbers \ | |
| 11 | + # --op html . | |
| 22 | 12 | |
| 23 | − self.version = '2.1.3' | |
| 13 | + self.version = '2.2.0' | |
| 24 | 14 | self.dir = '/Users/Thibaut/DevDocs/Docs/RDoc/Ruby' |
| 25 | 15 | |
| 26 | 16 | html_filters.replace 'rdoc/entries', 'ruby/entries' |
| 27 | 17 | |
| 28 | 18 | options[:root_title] = 'Ruby Programming Language' |
| 19 | + options[:title] = ->(filter) { filter.slug == 'globals_rdoc' ? 'Globals' : false } | |
| 29 | 20 | |
| 30 | 21 | options[:skip] += %w( |
| 31 | − fatal.html | |
| 32 | − CompositePublisher.html | |
| 22 | + contributing_rdoc.html | |
| 23 | + contributors_rdoc.html | |
| 24 | + dtrace_probes_rdoc.html | |
| 25 | + maintainers_rdoc.html | |
| 26 | + regexp_rdoc.html | |
| 27 | + standard_library_rdoc.html | |
| 28 | + syntax_rdoc.html | |
| 33 | 29 | Data.html |
| 34 | − E2MM.html | |
| 35 | 30 | English.html |
| 36 | − GServer.html | |
| 37 | − MakeMakefile.html | |
| 38 | − ParallelEach.html | |
| 39 | − SshDirPublisher.html | |
| 40 | − SshFilePublisher.html | |
| 41 | − SshFreshDirPublisher.html | |
| 42 | − YAML/DBM.html) | |
| 31 | + Fcntl.html | |
| 32 | + Kconv.html | |
| 33 | + NKF.html | |
| 34 | + OLEProperty.html | |
| 35 | + OptParse.html | |
| 36 | + UnicodeNormalize.html) | |
| 43 | 37 | |
| 44 | − options[:skip_patterns] = [ | |
| 45 | − /\AComplex/, | |
| 38 | + options[:skip_patterns] += [ | |
| 39 | + /\Alib\//, | |
| 40 | + /\ADEBUGGER__/, | |
| 46 | 41 | /\AException2MessageMapper/, |
| 47 | 42 | /\AJSON\/Ext/, |
| 48 | 43 | /\AGem/, |
| 49 | 44 | /\AHTTP/i, |
| 50 | 45 | /\AIRB/, |
| 46 | + /\AMakeMakefile/i, | |
| 51 | 47 | /\AMiniTest/i, |
| 52 | − /\ANet\/(?!HTTP)/, | |
| 53 | 48 | /\ANQXML/, |
| 54 | 49 | /\AOpenSSL/, |
| 55 | 50 | /\AOptionParser\//, |
| 51 | + /\APrettyPrint/, | |
| 56 | 52 | /\APride/, |
| 53 | + /\AProfiler__/, | |
| 57 | 54 | /\APsych\//, |
| 58 | 55 | /\ARacc/, |
| 59 | 56 | /\ARake/, |
| @@ -65,6 +62,7 @@ module Docs · 5 unmodified lines | ||
| 65 | 62 | /\ASocket\//, |
| 66 | 63 | /\ATest/, |
| 67 | 64 | /\AWEBrick/, |
| 65 | + /win32/i, | |
| 68 | 66 | /\AXML/, |
| 69 | 67 | /\AXMP/] |
| 70 | 68 | |