# File lib/bones/plugins/rdoc.rb, line 46 46: def define_tasks 47: config = ::Bones.config 48: 49: namespace :doc do 50: desc 'Generate RDoc documentation' 51: Rake::RDocTask.new do |rd| 52: rdoc = config.rdoc 53: rd.main = rdoc.main 54: rd.rdoc_dir = rdoc.dir 55: 56: incl = Regexp.new(rdoc.include.join('|')) 57: excl = Regexp.new(rdoc.exclude.join('|')) 58: files = config.gem.files.find_all do |fn| 59: case fn 60: when excl; false 61: when incl; true 62: else false end 63: end 64: rd.rdoc_files.push(*files) 65: 66: title = "#{config.name}-#{config.version} Documentation" 67: 68: rd.options << "-t #{title}" 69: rd.options.concat(rdoc.opts) 70: end 71: 72: desc 'Generate ri locally for testing' 73: task :ri => :clobber_ri do 74: sh "#{RDOC} --ri -o ri ." 75: end 76: 77: task :clobber_ri do 78: rm_r 'ri' rescue nil 79: end 80: end # namespace :doc 81: 82: unless have? :yard 83: desc 'Alias to doc:rdoc' 84: task :doc => 'doc:rdoc' 85: end 86: 87: desc 'Remove all build products' 88: task :clobber => %(doc:clobber_rdoc doc:clobber_ri) 89: 90: remove_desc_for_task %(doc:clobber_rdoc) 91: end
# File lib/bones/plugins/rdoc.rb, line 8 8: def initialize_rdoc 9: ::Bones.config { 10: desc 'Configuration settings for rdoc and ri' 11: rdoc { 12: 13: opts [], :desc => 'Array of rdoc options to use when generating documentation.' 14: 15: include %(^lib/ ^bin/ ^ext/ \.txt$ \.rdoc$), :desc => An array of patterns that will be used to find the files for which documentation should be generated. This is an array of strings that will be converted in regular expressions. 16: 17: exclude %(extconf\.rb$), :desc => An array of patterns that will be used to exclude files from rdoc processing. This is an array of strings that will be converted in regular expressions. 18: 19: main nil, :desc => The main rdoc file for the project. This defaults to the project's README file. 20: 21: dir 'doc', :desc => 'Output directory for generated documentation.' 22: } 23: } 24: 25: have?(:rdoc) { true } 26: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.