Welcome to mirror list, hosted at ThFree Co, Russian Federation.

has_deployment_name.rb « ci « concerns « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 887653e846e83d3517e0f88eb0e1d57a3333c8ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

module Ci
  module HasDeploymentName
    extend ActiveSupport::Concern

    def count_user_deployment?
      deployment_name?
    end

    def deployment_name?
      self.class::DEPLOYMENT_NAMES.any? { |n| name.downcase.include?(n) }
    end
  end
end