Commit 66dc7159 authored by Pawel Chojnacki's avatar Pawel Chojnacki

Cleanup formatting

parent e5cf3f51
...@@ -62,7 +62,7 @@ module Gitlab ...@@ -62,7 +62,7 @@ module Gitlab
rescue TooManyIps => ex rescue TooManyIps => ex
Rails.logger.info ex.message Rails.logger.info ex.message
[429, {'Content-Type' => 'text/plain', 'Retry-After' => UniqueIpsLimiter.config.unique_ips_limit_time_window }, ["Retry later\n"]] [429, { 'Content-Type' => 'text/plain', 'Retry-After' => UniqueIpsLimiter.config.unique_ips_limit_time_window }, ["Retry later\n"]]
end end
end end
end end
......
...@@ -10,7 +10,6 @@ describe Gitlab::Auth::UniqueIpsLimiter, lib: true do ...@@ -10,7 +10,6 @@ describe Gitlab::Auth::UniqueIpsLimiter, lib: true do
end end
describe '#count_unique_ips' do describe '#count_unique_ips' do
context 'non unique IPs' do context 'non unique IPs' do
it 'properly counts them' do it 'properly counts them' do
expect(Gitlab::Auth::UniqueIpsLimiter.count_unique_ips(user.id, '192.168.1.1')).to eq(1) expect(Gitlab::Auth::UniqueIpsLimiter.count_unique_ips(user.id, '192.168.1.1')).to eq(1)
...@@ -39,7 +38,6 @@ describe Gitlab::Auth::UniqueIpsLimiter, lib: true do ...@@ -39,7 +38,6 @@ describe Gitlab::Auth::UniqueIpsLimiter, lib: true do
end end
end end
describe '#limit_user!' do describe '#limit_user!' do
context 'when unique ips limit is enabled' do context 'when unique ips limit is enabled' do
before do before do
......
...@@ -3,12 +3,12 @@ require 'spec_helper' ...@@ -3,12 +3,12 @@ require 'spec_helper'
describe Gitlab::RequestContext, lib: true do describe Gitlab::RequestContext, lib: true do
describe '#client_ip' do describe '#client_ip' do
subject { Gitlab::RequestContext.client_ip } subject { Gitlab::RequestContext.client_ip }
let(:app) { -> env {} } let(:app) { -> (env) {} }
let(:env) { Hash.new } let(:env) { Hash.new }
context 'when RequestStore::Middleware is used' do context 'when RequestStore::Middleware is used' do
around(:each) do |example| around(:each) do |example|
RequestStore::Middleware.new(-> env { example.run }).call({}) RequestStore::Middleware.new(-> (env) { example.run }).call({})
end end
context 'request' do context 'request' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment