Sha256: a4655945bc0406edf72b3634a8560712fada782a0e5ada87acd3ec471c382e80
Contents?: true
Size: 1020 Bytes
Versions: 1
Compression:
Stored size: 1020 Bytes
Contents
require "bundler/gem_tasks" require 'rake/testtask' require 'rake/testtask' Rake::TestTask.new(:test) do |test| test.libs << 'lib' << 'test' test.pattern = 'test/**/test_*.rb' test.verbose = true end require 'rdoc/task' Rake::RDocTask.new do |rdoc| version = File.exist?('VERSION') ? File.read('VERSION') : "" rdoc.rdoc_dir = 'rdoc' rdoc.title = "tickly #{version}" rdoc.rdoc_files.include('README*') rdoc.rdoc_files.include('lib/**/*.rb') end desc "Benchmarks the parser" task :bench do require File.dirname(__FILE__) + "/lib/tickly" require 'benchmark' class Tracker3 def initialize(n); end end pe = Tickly::NodeProcessor.new pe.add_node_handler_class(Tracker3) HUGE_SCRIPT = File.open(File.dirname(__FILE__) + "/test/test-data/huge_nuke_tcl.tcl", "rb") Benchmark.bm do | runner | runner.report("Parsing a huge Nuke script:") do counter = 0 pe.parse(HUGE_SCRIPT) { counter += 1 } HUGE_SCRIPT.rewind end end end task :default => [:test, :bench]
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tickly-2.1.7 | Rakefile |