Sha256: a842540b4e9c688ae4a13b6c3de6ae9167d70a05a0f467b7a0d55eb147caceb4

Contents?: true

Size: 856 Bytes

Versions: 10

Compression:

Stored size: 856 Bytes

Contents

require 'bundler/gem_tasks'

task :default => [:compile, :spec]

require 'rake/extensiontask'
Rake::ExtensionTask.new('attribute_builder') do |ext|
  ext.lib_dir = 'lib/fast_haml'
end

require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)

namespace :benchmark do
  task :rendering => ['benchmark:rendering:haml', 'benchmark:rendering:attributes']
  namespace :rendering do
    desc "Run benchmark with Haml's standard template"
    task :haml do
      haml_gem = Gem::Specification.find_by_name('haml')
      standard_haml_path = File.join(haml_gem.gem_dir, 'test', 'templates', 'standard.haml')
      sh 'ruby', 'benchmark/rendering.rb', standard_haml_path
    end

    desc "Run benchmark for attribute builder"
    task :attributes do
      sh 'ruby', 'benchmark/rendering.rb', File.join('benchmark/attribute_builder.haml')
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
fast_haml-0.1.10 Rakefile
fast_haml-0.1.9 Rakefile
fast_haml-0.1.8 Rakefile
fast_haml-0.1.7 Rakefile
fast_haml-0.1.6 Rakefile
fast_haml-0.1.5 Rakefile
fast_haml-0.1.4 Rakefile
fast_haml-0.1.3 Rakefile
fast_haml-0.1.2 Rakefile
fast_haml-0.1.1 Rakefile