Rakefile in simple-annotations-0.9.0 vs Rakefile in simple-annotations-1.0.0
- old
+ new
@@ -1,58 +1,61 @@
-require 'rubygems'
+# frozen_string_literal: true
-require 'rspec'
-require 'rake'
-require "rake/clean"
-require "rubygems/package_task"
+require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
+require 'rubocop//rake_task'
+
require 'yard'
-require 'yard/rake/yardoc_task.rb'
-require "rake/tasklib"
-require "roodi"
-require "roodi_task"
-
-require "bundler/gem_tasks"
+require 'yard/rake/yardoc_task'
+require 'code_statistics'
-RoodiTask.new() do | t |
-t.patterns = %w(lib/**/*.rb)
-t.config = "coding_convention.yml"
-end
+RuboCop::RakeTask.new
+RSpec::Core::RakeTask.new(:spec)
+task default: :spec
-CLEAN.include('*.tmp','*.old')
-CLOBBER.include('*.tmp', 'build/*','#*#')
+require 'version'
+require 'rake/version_task'
+Rake::VersionTask.new
-
-content = File::readlines(File.join(File.dirname(__FILE__), 'simple-annotations.gemspec')).join
-spec = eval(content)
-
-RSpec::Core::RakeTask.new('spec')
-
-
-
YARD::Rake::YardocTask.new do |t|
- t.files = [ 'lib/**/*.rb', '-', 'doc/**/*','spec/**/*_spec.rb']
- t.options += ['--title', "Gem Documentation"]
- t.options += ['-o', "yardoc"]
- t.options += ['-r', "doc/manual.rdoc"]
+ t.files = ['lib/**/*.rb', '-', 'doc/**/*', 'spec/**/*_spec.rb']
+ t.options += ['-o', 'yardoc']
end
-YARD::Config.load_plugin('yard-rspec')
+YARD::Config.load_plugin('yard-rspec')
namespace :yardoc do
task :clobber do
- rm_r "yardoc" rescue nil
- rm_r ".yardoc" rescue nil
+ begin
+ rm_r 'yardoc'
+ rescue StandardError
+ nil
+ end
+ begin
+ rm_r '.yardoc'
+ rescue StandardError
+ nil
+ end
+ begin
+ rm_r 'pkg'
+ rescue StandardError
+ nil
+ end
end
end
-task :clobber => "yardoc:clobber"
+task clobber: 'yardoc:clobber'
+desc 'Run CVE security audit over bundle'
+task :audit do
+ system('bundle audit')
+end
-Gem::PackageTask.new(spec) do |pkg|
- pkg.need_tar = true
- pkg.need_zip = true
+desc 'Run dead line of code detection'
+task :debride do
+ system('debride -w .debride_whitelist .')
end
-
-
-task :default => [:gem]
+desc 'Run SBOM CycloneDX Xml format file'
+task :sbom do
+ system('cyclonedx-ruby -p .')
+end