2014-09-09 21:35:22 +02:00
|
|
|
#!/usr/bin/env rake
|
|
|
|
# coding: utf-8
|
|
|
|
|
|
|
|
require 'rake/testtask'
|
|
|
|
require 'rdoc/task'
|
2014-11-03 22:51:04 +01:00
|
|
|
require "bundler/gem_tasks"
|
2014-09-09 21:35:22 +02:00
|
|
|
|
2014-09-11 05:38:05 +02:00
|
|
|
#Generate internal documentation with rdoc.
|
2014-09-09 21:35:22 +02:00
|
|
|
RDoc::Task.new do |rdoc|
|
|
|
|
rdoc.rdoc_dir = "rdoc"
|
|
|
|
|
|
|
|
#List out all the files to be documented.
|
2014-11-04 21:30:25 +01:00
|
|
|
rdoc.rdoc_files.include("lib/**/*.rb", "license.txt", "README.md")
|
2014-09-09 21:35:22 +02:00
|
|
|
|
|
|
|
#Make all access levels visible.
|
|
|
|
rdoc.options << '--visibility' << 'private'
|
2014-12-01 21:46:17 +01:00
|
|
|
#rdoc.options << '--verbose'
|
|
|
|
#rdoc.options << '--coverage-report'
|
2014-09-19 19:09:33 +02:00
|
|
|
|
2014-09-20 01:10:27 +02:00
|
|
|
#Set a title.
|
|
|
|
rdoc.options << '--title' << 'fOOrth Language Internals'
|
2014-09-19 19:09:33 +02:00
|
|
|
|
2014-09-09 21:35:22 +02:00
|
|
|
end
|
|
|
|
|
2014-10-19 02:35:20 +02:00
|
|
|
#Run the fOOrth unit test suite.
|
2014-09-09 21:35:22 +02:00
|
|
|
Rake::TestTask.new do |t|
|
2016-03-30 16:41:51 +02:00
|
|
|
#List out all the unit test files.
|
2014-11-03 22:51:04 +01:00
|
|
|
t.test_files = FileList['tests/**/*.rb']
|
2014-09-09 21:35:22 +02:00
|
|
|
t.verbose = false
|
2016-03-30 16:41:51 +02:00
|
|
|
t.warning = true
|
2014-09-09 21:35:22 +02:00
|
|
|
end
|
|
|
|
|
2014-10-19 02:35:20 +02:00
|
|
|
#Run the fOOrth integration test suite.
|
2014-10-21 22:46:40 +02:00
|
|
|
Rake::TestTask.new(:integration) do |t|
|
2016-03-30 16:41:51 +02:00
|
|
|
#List out all the integration test files.
|
2015-04-13 00:08:47 +02:00
|
|
|
t.test_files = FileList['integration/*.rb']
|
2016-03-30 16:41:51 +02:00
|
|
|
t.verbose = false
|
2016-03-22 15:53:30 +01:00
|
|
|
t.warning = false
|
2014-10-19 02:35:20 +02:00
|
|
|
end
|
|
|
|
|
2014-11-04 07:17:20 +01:00
|
|
|
desc "Run a scan for smelly code!"
|
2014-09-09 21:35:22 +02:00
|
|
|
task :reek do |t|
|
|
|
|
`reek --no-color lib > reek.txt`
|
|
|
|
end
|
|
|
|
|
2014-11-04 07:17:20 +01:00
|
|
|
desc "Fire up an IRB session with fOOrth preloaded."
|
2014-09-09 21:35:22 +02:00
|
|
|
task :console do
|
2016-05-04 00:16:17 +02:00
|
|
|
system "ruby irbt.rb local"
|
2014-09-09 21:35:22 +02:00
|
|
|
end
|
2014-09-11 05:38:05 +02:00
|
|
|
|
2014-11-04 07:17:20 +01:00
|
|
|
desc "Run an Interactive fOOrth Session."
|
2014-09-11 05:38:05 +02:00
|
|
|
task :run do
|
2014-09-14 20:10:07 +02:00
|
|
|
require './lib/fOOrth'
|
2014-09-11 05:38:05 +02:00
|
|
|
ARGV.clear
|
2014-09-14 20:10:07 +02:00
|
|
|
XfOOrth::main
|
2014-09-11 05:38:05 +02:00
|
|
|
end
|
2014-11-04 21:18:15 +01:00
|
|
|
|
|
|
|
desc "What version of fOOrth is this?"
|
|
|
|
task :vers do |t|
|
|
|
|
puts
|
|
|
|
puts "fOOrth version = #{XfOOrth::VERSION}"
|
|
|
|
end
|
|
|
|
|