Rakefile in sanitize_email-2.0.0 vs Rakefile in sanitize_email-2.0.1
- old
+ new
@@ -1,50 +1,52 @@
-# encoding: utf-8
-#!/usr/bin/env rake
-require "rubygems"
-require "bundler/setup"
-require "bundler/gem_tasks"
-require "rake"
+# frozen_string_literal: true
+
+# !/usr/bin/env rake
+require 'rubygems'
+require 'bundler/setup'
+require 'bundler/gem_tasks'
+require 'rake'
+
begin
- require "wwtd/tasks"
- require "rspec/core/rake_task"
+ require 'wwtd/tasks'
+ require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
task :default => :spec
task :test => :spec
rescue LoadError
- warn "Failed to load rspec or wwtd"
+ warn 'Failed to load rspec or wwtd'
end
begin
- require "reek/rake/task"
+ require 'reek/rake/task'
Reek::Rake::Task.new do |t|
t.fail_on_error = true
t.verbose = false
- t.source_files = "lib/**/*.rb"
+ t.source_files = 'lib/**/*.rb'
end
rescue LoadError
- warn "Failed to load reek"
+ warn 'Failed to load reek'
end
begin
- require "roodi"
- require "roodi_task"
+ require 'roodi'
+ require 'roodi_task'
RoodiTask.new do |t|
t.verbose = false
end
rescue LoadError
- warn "Failed to load roodi"
+ warn 'Failed to load roodi'
end
-require File.expand_path("../lib/sanitize_email/version", __FILE__)
-require "rdoc"
-require "rdoc/task"
+require File.expand_path('lib/sanitize_email/version', __dir__)
+require 'rdoc'
+require 'rdoc/task'
RDoc::Task.new do |rdoc|
- rdoc.rdoc_dir = "rdoc"
+ rdoc.rdoc_dir = 'rdoc'
rdoc.title = "SanitizeEmail #{SanitizeEmail::VERSION}"
- rdoc.options << "--line-numbers"
- rdoc.rdoc_files.include("README*")
- rdoc.rdoc_files.include("lib/**/*.rb")
+ rdoc.options << '--line-numbers'
+ rdoc.rdoc_files.include('README*')
+ rdoc.rdoc_files.include('lib/**/*.rb')
end
Bundler::GemHelper.install_tasks