Commit eab0b5da authored by Robert Speicher's avatar Robert Speicher

Merge branch 'rubocop/space-around-opertors-ee' into 'master'

Codestyle changes to make sure we have space around operators (EE)

This will introduce fixes for gitlab-org/gitlab-ce#17398 so after
gitlab-org/gitlab-ce!4112 gets merged and CE synced to EE, we don't
have failing builds.

See merge request !388
parents 9980d3fe 824846cf
...@@ -19,8 +19,8 @@ module GeoDynamicBackoff ...@@ -19,8 +19,8 @@ module GeoDynamicBackoff
def geometric_backoff_strategy(count) def geometric_backoff_strategy(count)
# This strategy is based on the original one from sidekiq # This strategy is based on the original one from sidekiq
count = count-30 # we must start counting after 30 count = count - 30 # we must start counting after 30
(count ** 4) + 15 + (rand(30)*(count+1)) (count**4) + 15 + (rand(30) * (count + 1))
end end
end end
...@@ -293,8 +293,8 @@ Settings.artifacts['max_size'] ||= 100 # in megabytes ...@@ -293,8 +293,8 @@ Settings.artifacts['max_size'] ||= 100 # in megabytes
Settings['pages'] ||= Settingslogic.new({}) Settings['pages'] ||= Settingslogic.new({})
Settings.pages['enabled'] = false if Settings.pages['enabled'].nil? Settings.pages['enabled'] = false if Settings.pages['enabled'].nil?
Settings.pages['path'] = File.expand_path(Settings.pages['path'] || File.join(Settings.shared['path'], "pages"), Rails.root) Settings.pages['path'] = File.expand_path(Settings.pages['path'] || File.join(Settings.shared['path'], "pages"), Rails.root)
Settings.pages['host'] ||= "example.com"
Settings.pages['https'] = false if Settings.pages['https'].nil? Settings.pages['https'] = false if Settings.pages['https'].nil?
Settings.pages['host'] ||= "example.com"
Settings.pages['port'] ||= Settings.pages.https ? 443 : 80 Settings.pages['port'] ||= Settings.pages.https ? 443 : 80
Settings.pages['protocol'] ||= Settings.pages.https ? "https" : "http" Settings.pages['protocol'] ||= Settings.pages.https ? "https" : "http"
Settings.pages['url'] ||= Settings.send(:build_pages_url) Settings.pages['url'] ||= Settings.send(:build_pages_url)
......
...@@ -66,11 +66,11 @@ module Gitlab ...@@ -66,11 +66,11 @@ module Gitlab
def windows_domain_name def windows_domain_name
# The following is only meaningful for Active Directory # The following is only meaningful for Active Directory
require 'net/ldap/dn' require 'net/ldap/dn'
dn_components=[] dn_components = []
Net::LDAP::DN.new(dn).each_pair { |name, value| dn_components << { name: name, value: value } } Net::LDAP::DN.new(dn).each_pair { |name, value| dn_components << { name: name, value: value } }
dn_components. dn_components.
reverse. reverse.
take_while { |rdn| rdn[:name].upcase=='DC' }. # Domain Component take_while { |rdn| rdn[:name].upcase == 'DC' }. # Domain Component
map { |rdn| rdn[:value] }. map { |rdn| rdn[:value] }.
reverse. reverse.
join('.') join('.')
......
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