# frozen_string_literal: true
# wwwjdic # © 2014-2021 Marco Bresciani # # This file is part of wwwjdic. # # wwwjdic is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation, either version 3 of the License, or (at your # option) any later version. # # wwwjdic is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License # along with wwwjdic. If not, see <www.gnu.org/licenses/>. # # SPDX-FileCopyrightText: 2014-2021 Marco Bresciani # # SPDX-<span></span>License-Identifier: GPL-3.0-or-later #++
require 'rake' require 'rake/clean' require 'rake/testtask' require 'rdoc/task' require 'rubygems/package_task'
wwwjdic = Gem::Specification.load 'wwwjdic.gemspec'
desc “Build the gem (Task 'rake package')” Rake::PackageTask.new wwwjdic do |package|
package.name = wwwjdic.name package.need_tar = true package.need_tar_bz2 = true package.need_tar_gz = true package.need_zip = true package.package_files = wwwjdic.files package.version = wwwjdic.version
end
desc “Build the RDoc gem documentation (task 'rake rdoc')” Rake::RDocTask.new do |rdoc|
rdoc.rdoc_files.add wwwjdic.files rdoc.title = "#{wwwjdic.name} #{wwwjdic.version}" rdoc.main = 'README.md' rdoc.options += %w[-e UTF-8 --hyperlink-all --line-numbers]
end
desc “Run the gem unit tests (task 'rake test')” Rake::TestTask.new do |test_task|
test_task.libs << 'test' test_task.test_files = FileList['test/**/test_*.rb'] test_task.verbose = true test_task.warning = true
end