Renew CI benchmark suite
This commit is contained in:
parent
a327b100d6
commit
b3b7db59b5
|
@ -4,7 +4,3 @@
|
|||
%input{ disabled: disabled }
|
||||
- disabled = true
|
||||
%input{ disabled: disabled }
|
||||
- hash = { disabled: false }
|
||||
%input{ hash }
|
||||
- hash = { disabled: true }
|
||||
%input{ hash }
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
%div{ class: 'content active' }
|
||||
- c = %w[content active]
|
||||
%div{ class: c }
|
||||
- hash = { class: %w[content active] }
|
||||
%div{ hash }
|
||||
|
||||
.book{ class: 'content active' }
|
||||
- c = %w[content active]
|
||||
.book{ class: c }
|
||||
- hash = { class: %w[content active] }
|
||||
.book{ hash }
|
||||
.book(class='content active')
|
||||
|
||||
- klass = %w[content active]
|
||||
.book{ class: klass }
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
%a{ href: '&"\'<>' }
|
||||
- href = '&"\'<>'
|
||||
%a{ href: href }
|
||||
- hash = { href: '&"\'<>' }
|
||||
%a{ hash }
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
%div{ data: { disabled: false } }
|
||||
%div{ data: { disabled: true } }
|
||||
- hash = { data: { disabled: true } }
|
||||
%div{ hash }
|
||||
- hash = { 'user' => { id: 1234, name: 'eagletmt' }, book_id: 5432 }
|
||||
%div{ data: hash }
|
||||
Book
|
||||
- hash = { 'user' => { id: 1234, name: 'k0kubun' }, book_id: 5432 }
|
||||
%div{ data: hash } data
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
- hash = { disabled: false }
|
||||
%input{ hash }
|
||||
- hash = { disabled: true }
|
||||
%input{ hash }
|
|
@ -0,0 +1,4 @@
|
|||
- hash = { class: %w[content active] }
|
||||
.book{ hash }
|
||||
- arr = %w[foo bar]
|
||||
.book(class=arr){ hash }
|
|
@ -0,0 +1,2 @@
|
|||
- hash = { href: '&"\'<>' }
|
||||
%a{ hash }
|
|
@ -0,0 +1,2 @@
|
|||
- hash = { data: { 'user' => { id: 1234, name: 'k0kubun' }, book_id: 5432 } }
|
||||
%div{ hash } data
|
|
@ -0,0 +1,2 @@
|
|||
- hash = { id: %w[content active] }
|
||||
#book{ hash }
|
|
@ -1,11 +1,3 @@
|
|||
%div{ id: 'content active' }
|
||||
- i = %w[content active]
|
||||
%div{ id: i }
|
||||
- hash = { id: %w[content active] }
|
||||
%div{ hash }
|
||||
|
||||
#book{ id: 'content active' }
|
||||
- c = %w[content active]
|
||||
#book{ id: c }
|
||||
- hash = { id: %w[content active] }
|
||||
#book{ hash }
|
||||
- id = %w[content active]
|
||||
#book{ id: id }
|
||||
|
|
|
@ -10,10 +10,9 @@ require 'hamlit1' if File.exist?('hamlit1')
|
|||
class Bench < Thor
|
||||
desc 'bench HAML', 'Benchmark haml template'
|
||||
option :show_code, type: :boolean, aliases: ['-c']
|
||||
def bench(file)
|
||||
compile(file)
|
||||
render(file)
|
||||
code(file) if options[:show_code]
|
||||
def bench(*files)
|
||||
files.each { |file| render(file) }
|
||||
files.each { |file| code(file) if options[:show_code] }
|
||||
end
|
||||
|
||||
desc 'compile HAML', 'Benchmark compilation'
|
||||
|
|
24
wercker.yml
24
wercker.yml
|
@ -6,23 +6,23 @@ build:
|
|||
name: clone hamlit1
|
||||
code: bin/clone
|
||||
- script:
|
||||
name: attribute_builder.haml
|
||||
code: bin/bench bench -c benchmark/attribute_builder.haml
|
||||
name: "[benchmark] static attributes"
|
||||
code: bin/bench bench benchmark/boolean_attribute.haml benchmark/class_attribute.haml benchmark/id_attribute.haml benchmark/data_attribute.haml benchmark/common_attribute.haml
|
||||
- script:
|
||||
name: basic.haml
|
||||
code: bin/bench bench -c benchmark/basic.haml
|
||||
name: "[benchmark] dynamic attributes"
|
||||
code: bin/bench bench 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: old_attributes.haml
|
||||
code: bin/bench bench -c benchmark/old_attributes.haml
|
||||
name: "[benchmark] plain text"
|
||||
code: bin/bench bench benchmark/plain.haml
|
||||
- script:
|
||||
name: plain.haml
|
||||
code: bin/bench bench -c benchmark/plain.haml
|
||||
name: "[benchmark] script"
|
||||
code: bin/bench bench benchmark/script.haml
|
||||
- script:
|
||||
name: real_sample.haml
|
||||
code: bin/bench bench -c benchmark/real_sample.haml
|
||||
name: "[benchmark] attribute_builder bench by faml"
|
||||
code: bin/bench bench benchmark/etc/attribute_builder.haml
|
||||
- script:
|
||||
name: tags.haml
|
||||
code: bin/bench bench -c benchmark/tags.haml
|
||||
name: "[benchmark] basic bench by slim"
|
||||
code: bin/bench bench benchmark/etc/slim_bench.haml
|
||||
- script:
|
||||
name: minitest
|
||||
code: bundle exec rake test
|
||||
|
|
Loading…
Reference in New Issue