Module: Bones::Plugins::Notes
Constant Summary
Constants included from Helpers
Helpers::DEV_NULL, Helpers::GEM, Helpers::HAVE, Helpers::HAVE_SVN, Helpers::RCOV, Helpers::RDOC, Helpers::SUDO
Instance Method Summary collapse
Methods included from Helpers
#find_file, #have?, #paragraphs_of, #quiet, #remove_desc_for_task
Instance Method Details
#define_tasks ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/bones/plugins/notes.rb', line 31 def define_tasks config = ::Bones.config desc "Enumerate all annotations" task :notes do |t| id = if t.application.top_level_tasks.length > 1 t.application.top_level_tasks.slice!(1..-1).join(' ') end Bones::AnnotationExtractor.enumerate( config, config.notes..join('|'), id, :tag => true) end namespace :notes do config.notes..each do |tag| desc "Enumerate all #{tag} annotations" task tag.downcase.to_sym do |t| id = if t.application.top_level_tasks.length > 1 t.application.top_level_tasks.slice!(1..-1).join(' ') end Bones::AnnotationExtractor.enumerate(config, tag, id) end end end end |
#initialize_notes ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/bones/plugins/notes.rb', line 6 def initialize_notes ::Bones.config { desc 'Configuration for extracting annotations from project files.' notes { exclude [], :desc => " A list of regular expression patterns that will be used to exclude\n certain files from the annotation search. Each pattern is given as a\n string, and they are all combined using the regular expression or\n \"|\" operator.\n __\n\n extensions %w[.txt .rb .erb .rdoc .md] << '', :desc => <<-__\n Only files with these extensions will be searched for annotations.\n __\n\n tags %w[FIXME OPTIMIZE TODO], :desc => <<-__\n The list of annotation tags that will be extracted from the files\n being searched.\n __\n }\n }\n\n have?(:notes) { true }\nend\n" |