Rakefile in attr-gather-1.0.0 vs Rakefile in attr-gather-1.1.0
- old
+ new
@@ -1,14 +1,28 @@
# frozen_string_literal: true
require 'bundler/gem_tasks'
-require 'rspec/core/rake_task'
-require 'rubocop/rake_task'
-require 'yard'
-RSpec::Core::RakeTask.new(:spec)
-RuboCop::RakeTask.new(:lint)
-YARD::Rake::YardocTask.new(:doc)
+begin
+ require 'rspec/core/rake_task'
+ RSpec::Core::RakeTask.new(:spec)
+rescue LoadError
+ warn 'Could not load rspec rake task'
+end
+
+begin
+ require 'rubocop/rake_task'
+ RuboCop::RakeTask.new(:lint)
+rescue LoadError
+ warn 'Could not load rubocop rake task'
+end
+
+begin
+ require 'yard'
+ YARD::Rake::YardocTask.new(:doc)
+rescue LoadError
+ warn 'Could not load yarddoc rake task'
+end
task default: %i[spec lint]
namespace :examples do
desc 'Run all examples'