Rakefile in secure_headers-3.9.0 vs Rakefile in secure_headers-4.0.0.alpha01
- old
+ new
@@ -1,28 +1,32 @@
#!/usr/bin/env rake
-require 'bundler/gem_tasks'
-require 'rspec/core/rake_task'
-require 'net/http'
-require 'net/https'
+# frozen_string_literal: true
+require "bundler/gem_tasks"
+require "rspec/core/rake_task"
+require "net/http"
+require "net/https"
-desc "Run RSpec"
-RSpec::Core::RakeTask.new do |t|
- t.verbose = false
- t.rspec_opts = "--format progress"
-end
+RSpec::Core::RakeTask.new
-task default: :spec
-
begin
- require 'rdoc/task'
+ require "rdoc/task"
rescue LoadError
- require 'rdoc/rdoc'
- require 'rake/rdoctask'
+ require "rdoc/rdoc"
+ require "rake/rdoctask"
RDoc::Task = Rake::RDocTask
end
+begin
+ require "rubocop/rake_task"
+ RuboCop::RakeTask.new
+rescue LoadError
+ task(:rubocop) { $stderr.puts "RuboCop is disabled" }
+end
+
RDoc::Task.new(:rdoc) do |rdoc|
- rdoc.rdoc_dir = 'rdoc'
- rdoc.title = 'SecureHeaders'
- rdoc.options << '--line-numbers'
- rdoc.rdoc_files.include('lib/**/*.rb')
+ rdoc.rdoc_dir = "rdoc"
+ rdoc.title = "SecureHeaders"
+ rdoc.options << "--line-numbers"
+ rdoc.rdoc_files.include("lib/**/*.rb")
end
+
+task default: [:spec, :rubocop]