Sha256: f61ea9da526670111a264bd3ca9dcefe95f94887e39ad9d787cb54aea058c13c
Contents?: true
Size: 1.54 KB
Versions: 1
Compression:
Stored size: 1.54 KB
Contents
require 'date' require 'rake/clean' require 'rake/extensiontask' require 'digest/md5' task :default => [:test] # Gem Spec gem_spec = Gem::Specification.load('commonmarker.gemspec') # Ruby Extension Rake::ExtensionTask.new('commonmarker', gem_spec) do |ext| ext.lib_dir = File.join('lib', 'commonmarker') end Rake::Task['clean'].enhance do ext_dir = File.join(File.dirname(__FILE__), 'ext', 'commonmarker', 'cmark') Dir.chdir(ext_dir) do `make clean` end end # 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 unit and conformance tests' task :test => %w(test:unit) desc 'Run benchmarks' task :benchmark do |t| if ENV['FETCH_PROGIT'] `rm -rf test/progit` `git clone https://github.com/progit/progit.git test/progit` langs = %w(ar az be ca cs de en eo es es-ni fa fi fr hi hu id it ja ko mk nl no-nb pl pt-br ro ru sr th tr uk vi zh zh-tw) langs.each do |lang| `cat test/progit/#{lang}/*/*.markdown >> test/benchinput.md` end end $:.unshift 'lib' load 'test/benchmark.rb' end desc 'Update tests from git repository' task :generate_test do sh 'python3 ext/commonmarker/cmark/test/spec_tests.py --no-normalize --spec ext/commonmarker/cmark/test/spec.txt --dump-tests > test/spec_tests.json' end desc 'Match style of cmark' task :astyle do sh "astyle --style=linux -t -p ext/commonmarker/commonmarker.{c,h}" end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
commonmarker-0.1.3 | Rakefile |