mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-03-25 09:25:49 +00:00
rubocop --auto-correct
This commit is contained in:
parent
e50bfbebaa
commit
b40b5718dc
3 changed files with 9 additions and 3 deletions
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# This file was generated by Appraisal
|
# This file was generated by Appraisal
|
||||||
|
|
||||||
source "https://rubygems.org"
|
source "https://rubygems.org"
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'delegate'
|
require 'delegate'
|
||||||
|
|
||||||
module Rack
|
module Rack
|
||||||
|
|
@ -16,7 +18,7 @@ module Rack
|
||||||
get(key)
|
get(key)
|
||||||
end
|
end
|
||||||
|
|
||||||
def write(key, value, options={})
|
def write(key, value, options = {})
|
||||||
if (expires_in = options[:expires_in])
|
if (expires_in = options[:expires_in])
|
||||||
setex(key, expires_in, value)
|
setex(key, expires_in, value)
|
||||||
else
|
else
|
||||||
|
|
@ -24,7 +26,7 @@ module Rack
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def increment(key, amount, options={})
|
def increment(key, amount, options = {})
|
||||||
count = nil
|
count = nil
|
||||||
|
|
||||||
pipelined do
|
pipelined do
|
||||||
|
|
@ -35,7 +37,7 @@ module Rack
|
||||||
count.value if count
|
count.value if count
|
||||||
end
|
end
|
||||||
|
|
||||||
def delete(key, options={})
|
def delete(key, _options = {})
|
||||||
del(key)
|
del(key)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require_relative "../../spec_helper"
|
require_relative "../../spec_helper"
|
||||||
|
|
||||||
if defined?(::Redis)
|
if defined?(::Redis)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue