Sha256: 31f160a3749bf14876aacdf52ac59b45a8b09a19f80ee130eae36640acf6bb5a

Contents?: true

Size: 1.18 KB

Versions: 9

Compression:

Stored size: 1.18 KB

Contents

require "bundler/gem_tasks"
require 'rake/clean'
require 'rspec/core/rake_task'
#require 'ruby-debug'

CLEAN << "testproject"

desc "Run specs"
RSpec::Core::RakeTask.new(:spec, :focus) do |t, args|
  t.pattern = "./spec/**/*_spec.rb" # don't need this, it's default.
  if args[:focus] then
    usetags="--tag #{args[:focus]}"
  else
    usetags="--tag ~exp"
  end
  t.rspec_opts = [usetags,
                  " -fd -fd --out ./testresults/wortsammler_testresults.log -fh --out ./testresults/wortsammler_testresults.html"]
  # Put spec opts in a file named .rspec in root
end

desc "Generate code coverage"
RSpec::Core::RakeTask.new(:coverage) do |t|
  t.pattern = "./spec/**/*_spec.rb" # don't need this, it's default.
  t.rcov = true
  t.rcov_opts = ['--exclude', 'spec']
end

desc "create documentation"
task :doc do
  sh "bin/wortsammler -bi README.md"
  sh "bin/wortsammler -bi changelog.md"
  sh "yard --markup markdown doc ."
end

desc "get the default stylefiles from pandoc" 
task :getpandocstyles do
  [:latex, :docx, :html, :epub].each{|format |sh "pandoc -D #{format} > resources/pandocdefault.#{format}"}
  end

desc "run tests"
task :test  => [:clean, :spec]

task :default do
  sh "rake -T"
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
wortsammler-1.0.3 Rakefile
wortsammler-1.0.2 Rakefile
wortsammler-1.0.1 Rakefile
wortsammler-1.0.0 Rakefile
wortsammler-0.0.9 Rakefile
wortsammler-0.0.8 Rakefile
wortsammler-0.0.7 Rakefile
wortsammler-0.0.6 Rakefile
wortsammler-0.0.5 Rakefile