Sha256: 8f016ba7540ff349ee09da0cfbe854bd6a7c75a136673edc56c31b653bb2a611

Contents?: true

Size: 998 Bytes

Versions: 3

Compression:

Stored size: 998 Bytes

Contents

# Tasks that make it easier to deal with ditz.

DOC_ROOT  = File.join(APP_ROOT, 'doc') unless defined? DOC_ROOT
ISSUE_DIR = "#{DOC_ROOT}/issues"

# 'rake issues' will just list them.
desc 'List current issues'
task :issues do
  Rake::Task['issues:list'].invoke
end

namespace :issues do
  desc 'Add an issue'
  task :add do
    sh 'ditz add'
  end

  task :list do
    # Use back-tick execution to prevent output of command being run.
    # Returns a string of the command output.
    puts `ditz todo`
  end

  # 'rake issues:report' will just generate the report.
  desc 'Generate issue report'
  task :report do
    Rake::Task['issues:report:generate'].invoke
  end

  namespace :report do
    task :generate => [ 'issues:report:clear' ] do
      header "Generating issue report in #{ISSUE_DIR}"
      sh "ditz html #{ISSUE_DIR}"
    end

    desc 'Clear the issue report'
    task :clear do
      header "Removing issue report from #{ISSUE_DIR}"
      sh "rm -rf #{ISSUE_DIR}"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
git-trip-0.0.5 tasks/ditz.rake
git-trip-0.0.3 tasks/ditz.rake
git-trip-0.0.4 tasks/ditz.rake