Commit 824846cf authored by Gabriel Mazetto's avatar Gabriel Mazetto

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

parent a0a4bb51
......@@ -19,8 +19,8 @@ module GeoDynamicBackoff
def geometric_backoff_strategy(count)
# This strategy is based on the original one from sidekiq
count = count-30 # we must start counting after 30
(count ** 4) + 15 + (rand(30)*(count+1))
count = count - 30 # we must start counting after 30
(count**4) + 15 + (rand(30) * (count + 1))
end
end
......@@ -293,8 +293,8 @@ Settings.artifacts['max_size'] ||= 100 # in megabytes
Settings['pages'] ||= Settingslogic.new({})
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['host'] ||= "example.com"
Settings.pages['https'] = false if Settings.pages['https'].nil?
Settings.pages['host'] ||= "example.com"
Settings.pages['port'] ||= Settings.pages.https ? 443 : 80
Settings.pages['protocol'] ||= Settings.pages.https ? "https" : "http"
Settings.pages['url'] ||= Settings.send(:build_pages_url)
......
......@@ -40,7 +40,7 @@ module API
if @group.save
# NOTE: add backwards compatibility for single ldap link
ldap_attrs = attributes_for_keys [:ldap_cn, :ldap_access]
ldap_attrs = attributes_for_keys [:ldap_cn, :ldap_access]
if ldap_attrs.present?
@group.ldap_group_links.create({
cn: ldap_attrs[:ldap_cn],
......
......@@ -66,11 +66,11 @@ module Gitlab
def windows_domain_name
# The following is only meaningful for Active Directory
require 'net/ldap/dn'
dn_components=[]
dn_components = []
Net::LDAP::DN.new(dn).each_pair { |name, value| dn_components << { name: name, value: value } }
dn_components.
reverse.
take_while { |rdn| rdn[:name].upcase=='DC' }. # Domain Component
take_while { |rdn| rdn[:name].upcase == 'DC' }. # Domain Component
map { |rdn| rdn[:value] }.
reverse.
join('.')
......
......@@ -32,7 +32,7 @@ describe "Issue", elastic: true do
project = create :empty_project
issue = create :issue, project: project
expected_hash = issue.attributes.extract!('id', 'iid', 'title', 'description', 'created_at',
expected_hash = issue.attributes.extract!('id', 'iid', 'title', 'description', 'created_at',
'updated_at', 'state', 'project_id', 'author_id',
'assignee_id', 'confidential')
......
......@@ -31,7 +31,7 @@ describe "MergeRequest", elastic: true do
it "returns json with all needed elements" do
merge_request = create :merge_request
expected_hash = merge_request.attributes.extract!(
expected_hash = merge_request.attributes.extract!(
'id',
'iid',
'target_branch',
......
......@@ -31,7 +31,7 @@ describe "Milestone", elastic: true do
it "returns json with all needed elements" do
milestone = create :milestone
expected_hash = milestone.attributes.extract!(
expected_hash = milestone.attributes.extract!(
'id',
'title',
'description',
......
......@@ -30,7 +30,7 @@ describe "Note", elastic: true do
it "returns json with all needed elements" do
note = create :note
expected_hash = note.attributes.extract!(
expected_hash = note.attributes.extract!(
'id',
'note',
'project_id',
......
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