Sha256: 2d2fdf9e3fc9dec9e53842828faa91b9ece6f1c63a670d68fffbbbc602d9befc

Contents?: true

Size: 1.41 KB

Versions: 1

Compression:

Stored size: 1.41 KB

Contents

require 'date'
require 'rake/clean'
require 'rake/extensiontask'
require 'digest/md5'

task :default => [:test, :spec]
task :spec => [:compile]

# Gem Spec
gem_spec = Gem::Specification.load('greenmat.gemspec')

# Ruby Extension
Rake::ExtensionTask.new('greenmat', gem_spec)

# Packaging
require 'bundler/gem_tasks'

# Testing
require 'rake/testtask'

Rake::TestTask.new('test:unit') do |t|
  t.libs << 'lib'
  t.libs << 'test'
  t.pattern = 'test/*_test.rb'
  t.verbose = true
  t.warning = false
end

task 'test:unit' => :compile

desc 'Run conformance tests (MARKDOWN_TEST_VER=1.0.3)'
task 'test:conformance' => :compile do |t|
  script  = "#{pwd}/bin/greenmat"
  version = ENV['MARKDOWN_TEST_VER'] || '1.0.3'
  lib_dir = "#{pwd}/lib"

  chdir("test/MarkdownTest_#{version}") do
    sh "RUBYLIB=#{lib_dir} ./MarkdownTest.pl --script='#{script}' --tidy"
  end
end

desc 'Run version 1.0 conformance suite'
task 'test:conformance:1.0' => :compile do |t|
  ENV['MARKDOWN_TEST_VER'] = '1.0'
  Rake::Task['test:conformance'].invoke
end

desc 'Run 1.0.3 conformance suite'
task 'test:conformance:1.0.3' => :compile do |t|
  ENV['MARKDOWN_TEST_VER'] = '1.0.3'
  Rake::Task['test:conformance'].invoke
end

desc 'Run unit and conformance tests'
task :test => %w[test:unit test:conformance]

desc 'Run benchmarks'
task :benchmark => :compile do |t|
  $:.unshift 'lib'
  load 'test/benchmark.rb'
end

Dir['tasks/*.rake'].each { |file| load file }

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
greenmat-3.5.1.2 Rakefile