63 lines
1.2 KiB
Ruby
63 lines
1.2 KiB
Ruby
# frozen_string_literal: true
|
|
|
|
require 'bundler/inline'
|
|
|
|
gemfile ENV.has_key?('INSTALL_GEMS') do
|
|
source 'https://rubygems.org'
|
|
gem 'benchmark-ips'
|
|
gem 'tilt'
|
|
gem 'kramdown'
|
|
gem 'rdiscount'
|
|
gem 'redcarpet'
|
|
gem 'bluecloth'
|
|
gem 'maruku'
|
|
gem 'commonmarker'
|
|
gem 'RedCloth'
|
|
gem 'creole'
|
|
gem 'rinku'
|
|
gem 'wikicloth'
|
|
gem 'asciidoctor'
|
|
end
|
|
|
|
require 'benchmark/ips'
|
|
|
|
Benchmark.ips do |x|
|
|
x.report('Kramdown:') do
|
|
Tilt::KramdownTemplate.new('markup/markdown.md').render
|
|
end
|
|
|
|
x.report('Redcarpet:') do
|
|
Tilt::RedcarpetTemplate.new('markup/markdown.md').render
|
|
end
|
|
|
|
x.report('BlueCloth:') do
|
|
Tilt::BlueClothTemplate.new('markup/markdown.md').render
|
|
end
|
|
|
|
x.report('Maruku:') do
|
|
Tilt::MarukuTemplate.new('markup/markdown.md').render
|
|
end
|
|
|
|
x.report('CommonMarker:') do
|
|
Tilt::CommonMarkerTemplate.new('markup/markdown.md').render
|
|
end
|
|
|
|
x.report('RedCloth:') do
|
|
Tilt.new('markup/textile.textile').render
|
|
end
|
|
|
|
x.report('Creole:') do
|
|
Tilt.new('markup/creole.creole').render
|
|
end
|
|
|
|
x.report('WikiText:') do
|
|
Tilt.new('markup/wikitext.mediawiki').render
|
|
end
|
|
|
|
x.report('Asciidoctor:') do
|
|
Tilt.new('markup/asciidoc.adoc').render
|
|
end
|
|
|
|
x.compare!
|
|
end
|