diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-02-21 19:02:23 -0600 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-02-23 09:31:57 -0600 |
commit | 8a4d68c53e9c58ad7f8dce1494f7976292b2f929 (patch) | |
tree | 773814f7079c626cafabc229f929cafbe4d4b2e7 /config | |
parent | 7ea641b6d0882fc782a7eb493daf8b66d076924b (diff) | |
download | gitlab-ce-8a4d68c53e9c58ad7f8dce1494f7976292b2f929.tar.gz |
Enable Style/ConditionalAssignment
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/1_settings.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index 680deee6d46..ecae5453736 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -14,10 +14,10 @@ class Settings < Settingslogic end def build_gitlab_ci_url - if on_standard_port?(gitlab) - custom_port = nil + custom_port = if on_standard_port?(gitlab) + nil else - custom_port = ":#{gitlab.port}" + ":#{gitlab.port}" end [gitlab.protocol, "://", @@ -160,10 +160,10 @@ if github_settings github_settings["args"] ||= Settingslogic.new({}) - if github_settings["url"].include?(github_default_url) - github_settings["args"]["client_options"] = OmniAuth::Strategies::GitHub.default_options[:client_options] + github_settings["args"]["client_options"] = if github_settings["url"].include?(github_default_url) + OmniAuth::Strategies::GitHub.default_options[:client_options] else - github_settings["args"]["client_options"] = { + { "site" => File.join(github_settings["url"], "api/v3"), "authorize_url" => File.join(github_settings["url"], "login/oauth/authorize"), "token_url" => File.join(github_settings["url"], "login/oauth/access_token") |