Rakefile in fake_ftp-0.2.0 vs Rakefile in fake_ftp-0.3.0
- old
+ new
@@ -1,10 +1,15 @@
-require 'bundler'
-Bundler::GemHelper.install_tasks
+# frozen_string_literal: true
-require 'rspec/core'
-require 'rspec/core/rake_task'
+begin
+ require 'bundler'
+ require 'rspec/core/rake_task'
+ require 'rubocop/rake_task'
+rescue LoadError => e
+ warn e
+end
-RSpec::Core::RakeTask.new('spec')
+Bundler::GemHelper.install_tasks if defined?(Bundler)
+RSpec::Core::RakeTask.new if defined?(RSpec)
+RuboCop::RakeTask.new if defined?(RuboCop)
-# If you want to make this the default task
-task :default => :spec
\ No newline at end of file
+task default: %i[rubocop spec]