diff --git a/.rubocop.yml b/.rubocop.yml index 1a8fe49..ef0f722 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -52,6 +52,9 @@ Style/ConditionalAssignment: Style/Encoding: Enabled: true +Style/ExpandPathArguments: + Enabled: true + Style/EmptyMethod: Enabled: true @@ -81,3 +84,9 @@ Style/Semicolon: Style/SingleLineMethods: Enabled: true + +Style/SpecialGlobalVars: + Enabled: true + +Style/UnneededPercentQ: + Enabled: true diff --git a/rack-attack.gemspec b/rack-attack.gemspec index 7312881..d911931 100644 --- a/rack-attack.gemspec +++ b/rack-attack.gemspec @@ -1,7 +1,7 @@ # frozen_string_literal: true -lib = File.expand_path('../lib/', __FILE__) -$:.unshift lib unless $:.include?(lib) +lib = File.expand_path('lib', __dir__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'rack/attack/version' @@ -18,7 +18,7 @@ Gem::Specification.new do |s| s.homepage = 'https://github.com/kickstarter/rack-attack' s.rdoc_options = ["--charset=UTF-8"] s.require_paths = ["lib"] - s.summary = %q{Block & throttle abusive requests} + s.summary = 'Block & throttle abusive requests' s.test_files = Dir.glob("spec/**/*") s.metadata = {