Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Clean up project.

  • Loading branch information...
commit 343b315151b1286f90cfe16de68198b1c2a5ce3c 1 parent 8630001
Bernard Lambeau authored
1  Gemfile
@@ -11,7 +11,6 @@ end
11 11 group :profiling do
12 12 gem "ruby-prof", "~> 0.11.2"
13 13 gem "mustache", "~> 0.99.4"
14   - #gem "viiite", :git => "git://github.com/blambeau/viiite.git"
15 14 end
16 15
17 16 group :development do
10 benchmarks/erb.rb
... ... @@ -1,10 +0,0 @@
1   -require File.expand_path('../viiite_helper', __FILE__)
2   -
3   -Viiite.bench do |b|
4   - b.variation_point :ruby, Viiite.which_ruby
5   -
6   - b.report(:erb){
7   - tpl = template("table.erb")
8   - ERB.new(tpl.read).result(binding)
9   - }
10   -end
10 benchmarks/mustache.rb
... ... @@ -1,10 +0,0 @@
1   -require File.expand_path('../viiite_helper', __FILE__)
2   -
3   -Viiite.bench do |b|
4   - b.variation_point :ruby, Viiite.which_ruby
5   -
6   - b.report(:mutache){
7   - tpl = template("table.mustache")
8   - Mustache.render(tpl.read, scope)
9   - }
10   -end
8 benchmarks/templates/table.erb
... ... @@ -1,8 +0,0 @@
1   -<table>
2   - <% people.each do |p| %>
3   - <tr>
4   - <td><%= p.name %></td>
5   - <td><%= p.score %></td>
6   - </tr>
7   - <% end %>
8   -</table>
8 benchmarks/templates/table.mustache
... ... @@ -1,8 +0,0 @@
1   -<table>
2   - {{#people}}
3   - <tr>
4   - <td>{{name}}</td>
5   - <td>{{score}}</td>
6   - </tr>
7   - {{/people}}
8   -</table>
8 benchmarks/templates/table.wlang2
... ... @@ -1,8 +0,0 @@
1   -<table>
2   - *{people}{
3   - <tr>
4   - <td>${name}</td>
5   - <td>${score}</td>
6   - </tr>
7   - }
8   -</table>
30 benchmarks/viiite_helper.rb
... ... @@ -1,30 +0,0 @@
1   -$:.unshift File.expand_path('../../lib', __FILE__)
2   -require 'rubygems' if RUBY_VERSION <= "1.9"
3   -require 'bundler/setup'
4   -require 'wlang/mustang'
5   -require 'wlang/html'
6   -require 'erb'
7   -require 'mustache'
8   -require 'viiite'
9   -require 'epath'
10   -
11   -People = Struct.new(:name, :score)
12   -
13   -module Helpers
14   -
15   - def people
16   - @people ||= (1..25000).map{|i|
17   - People.new("People#{i}", rand)
18   - }
19   - end
20   -
21   - def scope
22   - {:people => people}
23   - end
24   -
25   - def template(name)
26   - Path.dir/:templates/name
27   - end
28   -
29   -end
30   -include Helpers
10 benchmarks/wlang2.rb
... ... @@ -1,10 +0,0 @@
1   -require File.expand_path('../viiite_helper', __FILE__)
2   -
3   -Viiite.bench do |b|
4   - b.variation_point :ruby, Viiite.which_ruby
5   -
6   - b.report(:wlang2){
7   - tpl = template("table.wlang2")
8   - WLang::Html.render(tpl, scope)
9   - }
10   -end
10 profiling/compiling.rb
... ... @@ -1,10 +0,0 @@
1   -require File.expand_path('../../benchmarks/viiite_helper', __FILE__)
2   -require 'ruby-prof'
3   -
4   -RubyProf.start
5   -
6   -WLang::Html.compile template("table.wlang2")
7   -
8   -result = RubyProf.stop
9   -printer = RubyProf::FlatPrinter.new(result)
10   -printer.print(STDOUT)
12 profiling/instantiating.rb
... ... @@ -1,12 +0,0 @@
1   -require File.expand_path('../../benchmarks/viiite_helper', __FILE__)
2   -require 'ruby-prof'
3   -
4   -tpl = WLang::Html.compile template("table.wlang2")
5   -
6   -RubyProf.start
7   -
8   -tpl.call(scope)
9   -
10   -result = RubyProf.stop
11   -printer = RubyProf::FlatPrinter.new(result)
12   -printer.print(STDOUT)
26 wlang.noespec
@@ -31,17 +31,15 @@ variables:
31 31 - http://blambeau.github.com/wlang
32 32 - http://revision-zero.org/wlang
33 33 dependencies:
34   - - {name: citrus, version: "~> 2.4.1", groups: [runtime]}
35   - - {name: temple, version: "~> 0.4.0", groups: [runtime]}
36   - - {name: backports, version: "~> 2.6.1", groups: [runtime]}
37   - - {name: quickl, version: "~> 0.4.3", groups: [runtime]}
38   - - {name: awesome_print, version: "~> 1.0.2", groups: [runtime]}
39   - - {name: ruby-prof, version: "~> 0.11.2", groups: [profiling]}
40   - - {name: mustache, version: "~> 0.99.4", groups: [profiling]}
41   - - {name: tilt, version: "~> 1.3", groups: [development]}
42   - - {name: rake, version: "~> 0.9.2", groups: [development]}
43   - - {name: bundler, version: "~> 1.0", groups: [development]}
44   - - {name: rspec, version: "~> 2.10.0", groups: [development]}
45   - - {name: epath, version: "~> 0.1.0", groups: [development]}
46   - - {name: yard, version: "~> 0.8.1", groups: [development]}
47   - - {name: bluecloth, version: "~> 2.2.0", groups: [development]}
  34 + - {name: citrus, version: "~> 2.4.1", groups: [runtime]}
  35 + - {name: temple, version: "~> 0.4.0", groups: [runtime]}
  36 + - {name: backports, version: "~> 2.6.1", groups: [runtime]}
  37 + - {name: quickl, version: "~> 0.4.3", groups: [runtime]}
  38 + - {name: awesome_print, version: "~> 1.0.2", groups: [runtime]}
  39 + - {name: tilt, version: "~> 1.3", groups: [development]}
  40 + - {name: rake, version: "~> 0.9.2", groups: [development]}
  41 + - {name: bundler, version: "~> 1.0", groups: [development]}
  42 + - {name: rspec, version: "~> 2.10.0", groups: [development]}
  43 + - {name: epath, version: "~> 0.1.0", groups: [development]}
  44 + - {name: yard, version: "~> 0.8.1", groups: [development]}
  45 + - {name: bluecloth, version: "~> 2.2.0", groups: [development]}

0 comments on commit 343b315

Please sign in to comment.
Something went wrong with that request. Please try again.