Sha256: 45f9af03dcc8a0d27a697f0a6cddb9092b03debc7bd62dcdfac69446d8efd214

Contents?: true

Size: 901 Bytes

Versions: 9

Compression:

Stored size: 901 Bytes

Contents

require "bundler/gem_tasks"
require 'rake/testtask'
require 'fileutils'

include FileUtils

task :default => [:test]

Rake::TestTask.new do |t|
  t.test_files = FileList['test/**/test*.rb']
  t.verbose = true
end

namespace :doc do

  desc "Make epub documentation."
  task :epub do
    dst_dir = "tmp/doc"
    FileList['doc/**/*.md'].each do |src|
      dst = dst_dir + src.gsub(/^doc/, "").gsub(/md$/, "epub")
      mkdir_p File.dirname(dst), verbose: false
      cmd = "pandoc -f markdown -t epub3 #{src} -o #{dst}"
      puts `#{cmd}`
    end
  end

=begin FIXME:It does not work on my mac.
  desc "Make pdf documentation."
  task :pdf do
    dst_dir = "tmp/doc"
    FileList['doc/**/*.md'].each do |src|
      dst = dst_dir + src.gsub(/^doc/, "").gsub(/md$/, "pdf")
      mkdir_p File.dirname(dst), verbose: false
      cmd = "pandoc #{src} -o #{dst}"
      puts `#{cmd}`
    end
  end
=end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ladder_drive-0.6.8 Rakefile
ladder_drive-0.6.7 Rakefile
ladder_drive-0.6.6 Rakefile
ladder_drive-0.6.5 Rakefile
ladder_drive-0.6.4 Rakefile
ladder_drive-0.6.3 Rakefile
ladder_drive-0.6.2 Rakefile
ladder_drive-0.6.1 Rakefile
ladder_drive-0.6.0 Rakefile