Sha256: b2dcead9ad87f41f49208541e8ba2a57452fc369926b484765297709c6f12408
Contents?: true
Size: 1.48 KB
Versions: 4
Compression:
Stored size: 1.48 KB
Contents
#!rake # coding: utf-8 require 'pathname' require 'English' require 'pp' # Project-specific tasks ##################################################################### ### T A S K S ##################################################################### MANUAL_PAGES = Pathname.glob( MANUALDIR + '**/*.page' ) RCOV_EXCLUDES.replace( RCOV_EXCLUDES + ',sequel_integration\.rb' ) task :local => :check_manual task :manual => :check_manual # Check the manual for laika references before committing Rake::Task[ 'checkin' ].prerequisites.unshift( 'check_manual' ) desc "Check the manual for various problems and/or inconsistencies" task :check_manual => MANUAL_PAGES do MANUAL_PAGES.each do |page| lines = page.readlines lines.each_with_index do |line, i| if line =~ /\blaika\b/i msg = [ ' ', i.zero? ? "" : lines[ i - 1 ], ' ', $PREMATCH, colorize( :bold, :yellow ) { $MATCH }, $POSTMATCH, ' ', lines[ i + 1 ] ].join abort "Page #{page} has a LAIKA reference on line #{i + 1}:\n#{msg}" end end end end namespace :spec do desc "Run specs under gdb" task :gdb do |task| require 'tempfile' cmd_parts = ['run'] cmd_parts << '-Ilib:ext' cmd_parts << '/usr/bin/spec' cmd_parts += SPEC_FILES.collect { |fn| %["#{fn}"] } cmd_parts += COMMON_SPEC_OPTS + ['-f', 's', '-c'] script = Tempfile.new( 'spec-gdbscript' ) script.puts( cmd_parts.join(' ') ) script.flush run 'gdb', '-x', script.path, RUBY end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
treequel-1.2.0 | Rakefile.local |
treequel-1.2.0pre320 | Rakefile.local |
treequel-1.1.1 | Rakefile.local |
treequel-1.1.0 | Rakefile.local |