diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-02 21:11:52 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-02 21:11:52 +0300 |
commit | d1ade10ba69cb7c232daa36625656456c32462e4 (patch) | |
tree | 70597a997a68fc63b009001480247794a60e2dd6 /rubocop/code_reuse_helpers.rb | |
parent | 3a52eefc27143af8a2b3838a159c52484ca4bc8b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'rubocop/code_reuse_helpers.rb')
-rw-r--r-- | rubocop/code_reuse_helpers.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rubocop/code_reuse_helpers.rb b/rubocop/code_reuse_helpers.rb index 283c43de227..6ea12999cae 100644 --- a/rubocop/code_reuse_helpers.rb +++ b/rubocop/code_reuse_helpers.rb @@ -180,5 +180,13 @@ module RuboCop def rails_root File.expand_path('..', __dir__) end + + def ee? + File.exist?(File.expand_path('../ee/app/models/license.rb', __dir__)) && !%w[true 1].include?(ENV['FOSS_ONLY'].to_s) + end + + def jh? + ee? && Dir.exist?(File.expand_path('../jh', __dir__)) && !%w[true 1].include?(ENV['EE_ONLY'].to_s) + end end end |