Rakefile in ykxutils-0.1.7 vs Rakefile in ykxutils-0.1.8

- old
+ new

@@ -1,12 +1,29 @@ # frozen_string_literal: true require "bundler/gem_tasks" -require "rspec/core/rake_task" -RSpec::Core::RakeTask.new(:spec) - -require "rubocop/rake_task" - -RuboCop::RakeTask.new - -task default: %i[spec rubocop] +begin + require "rspec/core/rake_task" +rescue LoadError => e + puts e.message +end +begin + RSpec::Core::RakeTask.new(:spec) +rescue NameError, LoadError => e + puts e.message +end +begin + require "rubocop/rake_task" +rescue LoadError => e + puts e.message +end +begin + RuboCop::RakeTask.new +rescue NameError, LoadError => e + puts e.message +end +begin + task default: %i[spec rubocop] +rescue LoadError => e + puts e.message +end