-
Notifications
You must be signed in to change notification settings - Fork 0
/
rakefile.rb
39 lines (31 loc) · 869 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
#!/usr/bin/env rake
# coding: utf-8
require 'rake/testtask'
require "bundler/gem_tasks"
#Run the mini_readline unit test suite.
Rake::TestTask.new do |t|
#List out all the test files.
t.test_files = FileList['tests/**/*.rb']
t.verbose = false
end
desc "Fire up an IRB session with the local mini_readline."
task :console do
system "ruby irbt.rb local"
end
desc "Run a scan for smelly code!"
task :reek do |t|
`reek --no-color lib > reek.txt`
end
desc "What version of mine_readline is this?"
task :vers do |t|
puts
puts "mini_readline version = #{MiniReadline::VERSION}"
end
desc "Alternative test procedure."
task :alt_test do |t, args|
here = File.dirname(__FILE__)
target = "#{here}/tests/*.rb"
block = "{|file| require file if File.basename(file) =~ /test/}"
code = "Dir['#{target}'].each #{block}"
system "ruby -e\"#{code}\""
end