-
Notifications
You must be signed in to change notification settings - Fork 0
/
rakefile.rb
41 lines (33 loc) · 912 Bytes
/
rakefile.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# coding: utf-8
require 'rake/testtask'
require "bundler/gem_tasks"
Rake::TestTask.new(:test) do |t|
t.libs << "test"
t.libs << "lib"
t.test_files = FileList["test/**/*_test.rb"]
end
task :default => :test
desc "Run a scan for smelly code!"
task :reek do |t|
`reek --no-color lib > reek.txt`
end
desc "Fire up an IRB session with mini_term preloaded."
task :console do
system "ruby irbt.rb local"
end
desc "What version of mini_term is this?"
task :vers do |t|
puts
puts "mini_term version = #{MiniTerm::VERSION}"
end
desc "Alternative test procedure"
task :alt_test, :target do |t, args|
args.with_defaults(:target => 'test')
here = File.dirname(__FILE__)
target = "#{here}/#{args[:target]}/*.rb"
puts "Target files = #{target}"
puts
block = "{|file| require file if File.basename(file) =~ /test/}"
code = "Dir['#{target}'].each #{block}"
system "ruby -e\"#{code}\""
end