File: notes.rake

package info (click to toggle)
ruby-ffi 1.0.11debian-5
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,488 kB
  • sloc: ansic: 6,608; ruby: 6,167; xml: 151; sh: 74; makefile: 12
file content (27 lines) | stat: -rw-r--r-- 649 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

if HAVE_BONES

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(
      PROJ, PROJ.notes.tags.join('|'), id, :tag => true)
end

namespace :notes do
  PROJ.notes.tags.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(PROJ, tag, id)
    end
  end
end

end  # if HAVE_BONES

# EOF