tasks/rubocop.rake in nanoc-3.6.9 vs tasks/rubocop.rake in nanoc-3.6.10
- old
+ new
@@ -1,5 +1,9 @@
-require 'rubocop/rake_task'
+begin
+ require 'rubocop/rake_task'
-Rubocop::RakeTask.new(:rubocop) do |task|
- task.patterns = ['lib/**/*.rb']
+ Rubocop::RakeTask.new(:rubocop) do |task|
+ task.patterns = ['lib/**/*.rb']
+ end
+rescue LoadError
+ warn "Could not load Rubocop. Rubocop rake tasks will be unavailable."
end