fOOrth/rakefile.rb

64 lines
1.4 KiB
Ruby
Raw Normal View History

2014-09-09 21:35:22 +02:00
#!/usr/bin/env rake
# coding: utf-8
require 'rake/testtask'
require 'rdoc/task'
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
#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
#Run the fOOrth unit test suite.
2014-09-09 21:35:22 +02:00
Rake::TestTask.new do |t|
#List out all the unit test files.
t.test_files = FileList['tests/**/*.rb']
2014-09-09 21:35:22 +02:00
t.verbose = false
t.warning = true
2014-09-09 21:35:22 +02:00
end
#Run the fOOrth integration test suite.
Rake::TestTask.new(:integration) do |t|
#List out all the integration test files.
t.test_files = FileList['integration/*.rb']
t.verbose = false
t.warning = false
end
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
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
desc "Run an Interactive fOOrth Session."
2014-09-11 05:38:05 +02:00
task :run do
require './lib/fOOrth'
2014-09-11 05:38:05 +02:00
ARGV.clear
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