debian-mirror-gitlab/lib/gitlab.rb

16 lines
377 B
Ruby
Raw Normal View History

2016-06-02 11:05:42 +05:30
require_dependency 'gitlab/git'
2015-04-26 12:48:37 +05:30
module Gitlab
2017-09-10 17:25:29 +05:30
COM_URL = 'https://gitlab.com'.freeze
2018-05-09 12:01:36 +05:30
APP_DIRS_PATTERN = %r{^/?(app|config|ee|lib|spec|\(\w*\))}
2017-09-10 17:25:29 +05:30
2016-06-02 11:05:42 +05:30
def self.com?
2016-08-24 12:49:21 +05:30
# Check `staging?` as well to keep parity with gitlab.com
2017-09-10 17:25:29 +05:30
Gitlab.config.gitlab.url == COM_URL || staging?
2016-08-24 12:49:21 +05:30
end
def self.staging?
Gitlab.config.gitlab.url == 'https://staging.gitlab.com'
2016-06-02 11:05:42 +05:30
end
2015-04-26 12:48:37 +05:30
end