From 6a69515606067586bf6f20047e1d35e756ca20ac Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Mon, 23 Nov 2015 00:09:40 +0900 Subject: [PATCH] Drop -w option in bin/bench --- bin/bench | 9 ++++----- wercker.yml | 12 ++++++------ 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/bin/bench b/bin/bench index fdf1ab28..06e3b4e4 100755 --- a/bin/bench +++ b/bin/bench @@ -8,7 +8,6 @@ require 'benchmark/ips' require 'hamlit1' if File.exist?('hamlit1') class Bench < Thor - class_option :with_hamlit1, type: :boolean, aliases: ['-w'] class_option :show_template, type: :boolean, aliases: ['-t'] desc 'bench HAML', 'Benchmark haml template' @@ -28,8 +27,8 @@ class Bench < Thor Benchmark.ips do |x| x.report("haml v#{Haml::VERSION}") { Haml::Engine.new(haml, escape_html: true, escape_attrs: true, ugly: true).precompiled } x.report("faml v#{Faml::VERSION}") { Faml::Engine.new.call(haml) } - x.report("hamlit#{options[:with_hamlit1] ? '2' : ''} v#{Hamlit::VERSION}") { Hamlit::Engine.new.call(haml) } - x.report("hamlit1 v#{Hamlit1::VERSION}") { Hamlit1::Engine.new.call(haml) } if File.exist?('hamlit1') && options[:with_hamlit1] + x.report("hamlit#{File.exist?('hamlit1') ? '2' : ''} v#{Hamlit::VERSION}") { Hamlit::Engine.new.call(haml) } + x.report("hamlit1 v#{Hamlit1::VERSION}") { Hamlit1::Engine.new.call(haml) } if File.exist?('hamlit1') x.compare! end end @@ -53,8 +52,8 @@ class Bench < Thor Benchmark.ips do |x| x.report("haml v#{Haml::VERSION}") { object.haml } x.report("faml v#{Faml::VERSION}") { object.faml } - x.report("hamlit#{options[:with_hamlit1] ? '2' : ''} v#{Hamlit::VERSION}") { object.hamlit } - x.report("hamlit1 v#{Hamlit1::VERSION}") { object.hamlit1 } if File.exist?('hamlit1') && options[:with_hamlit1] + x.report("hamlit#{File.exist?('hamlit1') ? '2' : ''} v#{Hamlit::VERSION}") { object.hamlit } + x.report("hamlit1 v#{Hamlit1::VERSION}") { object.hamlit1 } if File.exist?('hamlit1') x.compare! end end diff --git a/wercker.yml b/wercker.yml index e59464f8..e058c423 100644 --- a/wercker.yml +++ b/wercker.yml @@ -14,22 +14,22 @@ build: code: bin/clone - script: name: "[benchmark] static attributes" - code: bin/bench bench -w -t benchmark/boolean_attribute.haml benchmark/class_attribute.haml benchmark/id_attribute.haml benchmark/data_attribute.haml benchmark/common_attribute.haml + code: bin/bench bench -t benchmark/boolean_attribute.haml benchmark/class_attribute.haml benchmark/id_attribute.haml benchmark/data_attribute.haml benchmark/common_attribute.haml - script: name: "[benchmark] dynamic attributes" - code: bin/bench bench -w -t benchmark/dynamic_attributes/boolean_attribute.haml benchmark/dynamic_attributes/class_attribute.haml benchmark/dynamic_attributes/id_attribute.haml benchmark/dynamic_attributes/data_attribute.haml benchmark/dynamic_attributes/common_attribute.haml + code: bin/bench bench -t benchmark/dynamic_attributes/boolean_attribute.haml benchmark/dynamic_attributes/class_attribute.haml benchmark/dynamic_attributes/id_attribute.haml benchmark/dynamic_attributes/data_attribute.haml benchmark/dynamic_attributes/common_attribute.haml - script: name: "[benchmark] plain text" - code: bin/bench bench -w -t benchmark/plain.haml + code: bin/bench bench -t benchmark/plain.haml - script: name: "[benchmark] script" - code: bin/bench bench -w -t benchmark/script.haml + code: bin/bench bench -t benchmark/script.haml - script: name: "[benchmark] attribute_builder bench by faml" - code: bin/bench bench -w -t benchmark/etc/attribute_builder.haml + code: bin/bench bench -t benchmark/etc/attribute_builder.haml - script: name: "[benchmark] slim-template/slim/benchmarks" code: bundle exec ruby benchmark/slim/run-benchmarks.rb - script: name: "[benchmark] static analyzer" - code: bin/bench bench -w -t benchmark/etc/static_analyzer.haml + code: bin/bench bench -t benchmark/etc/static_analyzer.haml