diff options
author | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-02-16 11:21:30 +0100 |
---|---|---|
committer | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-03-06 15:41:24 +0100 |
commit | 66dc71599cb698d380e14be7230ae3495c78d266 (patch) | |
tree | fc7bb6a3727f29bbb3491370166ef6e932172e2b | |
parent | e5cf3f51fb568361a247d715facb6cd9bb15bb16 (diff) | |
download | gitlab-ce-66dc71599cb698d380e14be7230ae3495c78d266.tar.gz |
Cleanup formatting
-rw-r--r-- | lib/gitlab/auth/unique_ips_limiter.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/request_context.rb | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/auth/unique_ips_limiter_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/request_context_spec.rb | 4 |
4 files changed, 4 insertions, 6 deletions
diff --git a/lib/gitlab/auth/unique_ips_limiter.rb b/lib/gitlab/auth/unique_ips_limiter.rb index 21307eb35e4..01850ae31e8 100644 --- a/lib/gitlab/auth/unique_ips_limiter.rb +++ b/lib/gitlab/auth/unique_ips_limiter.rb @@ -62,7 +62,7 @@ module Gitlab rescue TooManyIps => ex 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 diff --git a/lib/gitlab/request_context.rb b/lib/gitlab/request_context.rb index 5daf04dc92b..36a5d94d98a 100644 --- a/lib/gitlab/request_context.rb +++ b/lib/gitlab/request_context.rb @@ -22,4 +22,4 @@ module Gitlab @app.call(env) end end -end
\ No newline at end of file +end diff --git a/spec/lib/gitlab/auth/unique_ips_limiter_spec.rb b/spec/lib/gitlab/auth/unique_ips_limiter_spec.rb index 8e9fea0724a..ccaddddf98f 100644 --- a/spec/lib/gitlab/auth/unique_ips_limiter_spec.rb +++ b/spec/lib/gitlab/auth/unique_ips_limiter_spec.rb @@ -10,7 +10,6 @@ describe Gitlab::Auth::UniqueIpsLimiter, lib: true do end describe '#count_unique_ips' do - context 'non unique IPs' do it 'properly counts them' do 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 end end - describe '#limit_user!' do context 'when unique ips limit is enabled' do before do diff --git a/spec/lib/gitlab/request_context_spec.rb b/spec/lib/gitlab/request_context_spec.rb index 3565fab6ded..69c5549c39c 100644 --- a/spec/lib/gitlab/request_context_spec.rb +++ b/spec/lib/gitlab/request_context_spec.rb @@ -3,12 +3,12 @@ require 'spec_helper' describe Gitlab::RequestContext, lib: true do describe '#client_ip' do subject { Gitlab::RequestContext.client_ip } - let(:app) { -> env {} } + let(:app) { -> (env) {} } let(:env) { Hash.new } context 'when RequestStore::Middleware is used' do around(:each) do |example| - RequestStore::Middleware.new(-> env { example.run }).call({}) + RequestStore::Middleware.new(-> (env) { example.run }).call({}) end context 'request' do |