Rakefile in iri-0.5.1 vs Rakefile in iri-0.6.0

- old
+ new

@@ -1,8 +1,8 @@ # frozen_string_literal: true -# Copyright (c) 2019-2021 Yegor Bugayenko +# Copyright (c) 2019-2023 Yegor Bugayenko # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the 'Software'), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell @@ -32,11 +32,11 @@ def version Gem::Specification.load(Dir['*.gemspec'].first).version end -task default: %i[clean test rubocop] +task default: %i[clean test rubocop copyright] require 'rake/testtask' Rake::TestTask.new do |test| test.libs << 'lib' << 'test' test.pattern = 'test/**/test_*.rb' @@ -52,6 +52,14 @@ require 'rubocop/rake_task' RuboCop::RakeTask.new do |task| task.fail_on_error = true task.requires << 'rubocop-rspec' +end + +task :copyright do + sh "grep -q -r '#{Date.today.strftime('%Y')}' \ + --include '*.rb' \ + --include '*.txt' \ + --include 'Rakefile' \ + ." end