Rakefile in RubMat-2.2.1 vs Rakefile in RubMat-2.2.2

- old
+ new

@@ -1,26 +1,55 @@ +# encoding: utf-8 require 'rubygems' +require 'bundler' +begin + Bundler.setup(:default, :development) +rescue Bundler::BundlerError => e + $stderr.puts e.message + $stderr.puts "Run `bundle install` to install missing gems" + exit e.status_code +end require 'rake' -require 'rake/clean' -require 'rake/gempackagetask' -require 'rake/rdoctask' + +require 'jeweler' +Jeweler::Tasks.new do |gem| + # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options + gem.name = "RubMat" + gem.homepage = "http://github.com/regularlambda/RubMat" + gem.license = "MIT" + gem.summary = %Q{Discrete Mathematics REPL and built-in usable library} + gem.description = %Q{Discrete Mathematics REPL and built-in usable library for experimental and experimental projects} + gem.email = "mahmutbulut0@gmail.com" + gem.authors = ["Mahmut Bulut"] + gem.add_dependency "commander", "~> 4.1.0" + gem.executables = ['rubmat'] + # dependencies defined in Gemfile +end +Jeweler::RubygemsDotOrgTasks.new + require 'rake/testtask' +Rake::TestTask.new(:test) do |test| + test.libs << 'lib' << 'test' + test.pattern = 'test/**/test_*.rb' + test.verbose = true +end -Rake::GemPackageTask.new(spec) do |p| - p.gem_spec = spec - p.need_tar = true - p.need_zip = true +require 'rcov/rcovtask' +Rcov::RcovTask.new do |test| + test.libs << 'test' + test.pattern = 'test/**/test_*.rb' + test.verbose = true + test.rcov_opts << '--exclude "gems/*"' end -#Rake::RDocTask.new do |rdoc| -# files =['README.md', 'LICENSE', 'lib/**/*.rb', 'lib/**/*.yml'] -# rdoc.rdoc_files.add(files) -# rdoc.main = "README" # page to start on -# rdoc.title = "RubMat Docs" -# rdoc.rdoc_dir = 'doc/rdoc' # rdoc output folder -# rdoc.options << '--line-numbers' -#end +task :default => :test -Rake::TestTask.new do |t| - t.test_files = FileList['test/**/*.rb'] +require 'rdoc/task' +Rake::RDocTask.new do |rdoc| + version = File.exist?('VERSION') ? File.read('VERSION') : "" + + rdoc.rdoc_dir = 'rdoc' + rdoc.title = "rubmat #{version}" + rdoc.rdoc_files.include('README*') + rdoc.rdoc_files.include('lib/**/*.rb') end