diff options
author | Toon Claes <toon@gitlab.com> | 2019-02-28 19:57:34 +0100 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2019-02-28 19:57:34 +0100 |
commit | 62d7990b9bb30cf33ed87017c5c633d1cccc75c2 (patch) | |
tree | c3e1b69c58a412ba1c6f50a0337a23d9f9d6e1a4 /lib/gitlab.rb | |
parent | f6453eca992a9c142268e78ac782cef98110d183 (diff) | |
download | gitlab-ce-tc-standard-gem.tar.gz |
Ran standardrb --fix on the whole codebasetc-standard-gem
Inspired by https://twitter.com/searls/status/1101137953743613952 I
decided to try https://github.com/testdouble/standard on our codebase.
It's opinionated, but at least it's a _standard_.
Diffstat (limited to 'lib/gitlab.rb')
-rw-r--r-- | lib/gitlab.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/gitlab.rb b/lib/gitlab.rb index e073450283b..b90121c0254 100644 --- a/lib/gitlab.rb +++ b/lib/gitlab.rb @@ -1,10 +1,10 @@ # frozen_string_literal: true -require_dependency 'gitlab/popen' +require_dependency "gitlab/popen" module Gitlab def self.root - Pathname.new(File.expand_path('..', __dir__)) + Pathname.new(File.expand_path("..", __dir__)) end def self.version_info @@ -12,7 +12,7 @@ module Gitlab end def self.pre_release? - VERSION.include?('pre') + VERSION.include?("pre") end def self.config @@ -29,13 +29,13 @@ module Gitlab if result.status.success? result.stdout.chomp.freeze else - "Unknown".freeze + "Unknown" end end end end - COM_URL = 'https://gitlab.com'.freeze + COM_URL = "https://gitlab.com" APP_DIRS_PATTERN = %r{^/?(app|config|ee|lib|spec|\(\w*\))} SUBDOMAIN_REGEX = %r{\Ahttps://[a-z0-9]+\.gitlab\.com\z} VERSION = File.read(root.join("VERSION")).strip.freeze @@ -47,7 +47,7 @@ module Gitlab end def self.org? - Gitlab.config.gitlab.url == 'https://dev.gitlab.org' + Gitlab.config.gitlab.url == "https://dev.gitlab.org" end def self.gl_subdomain? @@ -59,10 +59,10 @@ module Gitlab end def self.process_name - return 'sidekiq' if Sidekiq.server? - return 'console' if defined?(Rails::Console) - return 'test' if Rails.env.test? + return "sidekiq" if Sidekiq.server? + return "console" if defined?(Rails::Console) + return "test" if Rails.env.test? - 'web' + "web" end end |