summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-08-23 15:09:20 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-08-24 12:22:01 +0200
commit5ced2d8d7d9107f031894c5b16908db8bf6b913f (patch)
treed63c9b2a073fa7f4af4bb4d9347c69e5be323994
parentd546f7d36e6703bda430e2f50fe4e87a07ab48f8 (diff)
downloadgitlab-ce-5ced2d8d7d9107f031894c5b16908db8bf6b913f.tar.gz
Rename CI/CD job triggering policy class to Policy
-rw-r--r--lib/gitlab/ci/config/entry/job.rb4
-rw-r--r--lib/gitlab/ci/config/entry/policy.rb (renamed from lib/gitlab/ci/config/entry/trigger.rb)2
-rw-r--r--spec/lib/gitlab/ci/config/entry/policy_spec.rb (renamed from spec/lib/gitlab/ci/config/entry/trigger_spec.rb)4
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/gitlab/ci/config/entry/job.rb b/lib/gitlab/ci/config/entry/job.rb
index 32f5c6ab142..91aac6df4b1 100644
--- a/lib/gitlab/ci/config/entry/job.rb
+++ b/lib/gitlab/ci/config/entry/job.rb
@@ -59,10 +59,10 @@ module Gitlab
entry :services, Entry::Services,
description: 'Services that will be used to execute this job.'
- entry :only, Entry::Trigger,
+ entry :only, Entry::Policy,
description: 'Refs policy this job will be executed for.'
- entry :except, Entry::Trigger,
+ entry :except, Entry::Policy,
description: 'Refs policy this job will be executed for.'
entry :variables, Entry::Variables,
diff --git a/lib/gitlab/ci/config/entry/trigger.rb b/lib/gitlab/ci/config/entry/policy.rb
index 16b234e6c59..a08ab8a9d14 100644
--- a/lib/gitlab/ci/config/entry/trigger.rb
+++ b/lib/gitlab/ci/config/entry/policy.rb
@@ -5,7 +5,7 @@ module Gitlab
##
# Entry that represents a trigger policy for the job.
#
- class Trigger < Node
+ class Policy < Node
include Validatable
validations do
diff --git a/spec/lib/gitlab/ci/config/entry/trigger_spec.rb b/spec/lib/gitlab/ci/config/entry/policy_spec.rb
index e4ee44f1274..ac57e3ef539 100644
--- a/spec/lib/gitlab/ci/config/entry/trigger_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/policy_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe Gitlab::Ci::Config::Entry::Trigger do
+describe Gitlab::Ci::Config::Entry::Policy do
let(:entry) { described_class.new(config) }
describe 'validations' do
@@ -48,7 +48,7 @@ describe Gitlab::Ci::Config::Entry::Trigger do
describe '#errors' do
it 'saves errors' do
expect(entry.errors)
- .to include 'trigger config should be an array of strings or regexps'
+ .to include 'policy config should be an array of strings or regexps'
end
end
end