Add rubocop to our build. (#5004)

This commit is contained in:
Guo Xiang Tan
2017-07-28 10:20:09 +09:00
committed by GitHub
parent ff4e295c4f
commit 5012d46cbd
871 changed files with 5480 additions and 6056 deletions

View File

@ -4,7 +4,6 @@ require File.expand_path('../../../../config/environment', __FILE__)
# set any flags here
# MiniRacer::Platform.set_flags! :noturbo
tests = [
["tiny post", "**hello**"],
["giant post", File.read("giant_post.md")],
@ -28,7 +27,7 @@ PrettyText.v8.eval("window.commonmark = window.markdownit('commonmark')")
# exit
Benchmark.ips do |x|
[true,false].each do |sanitize|
[true, false].each do |sanitize|
tests.each do |test, text|
x.report("#{test} sanitize: #{sanitize}") do
PrettyText.markdown(text, sanitize: sanitize)
@ -36,7 +35,6 @@ Benchmark.ips do |x|
end
end
tests.each do |test, text|
x.report("markdown it no extensions commonmark #{test}") do
PrettyText.v8.eval("window.commonmark.render(#{text.inspect})")
@ -44,7 +42,6 @@ Benchmark.ips do |x|
end
end
# 27-07-2017 - Sam's NUC
#
# v8 5.7
@ -131,4 +128,3 @@ end
# 1.448k (± 6.7%) i/s - 7.239k in 5.024831s
# markdown it no extensions commonmark lots of mentions
# 1.986k (± 5.2%) i/s - 9.990k in 5.044624s