diff options
-rw-r--r-- | lib/ci/gitlab_ci_yaml_processor.rb | 2 | ||||
-rw-r--r-- | spec/lib/ci/gitlab_ci_yaml_processor_spec.rb | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/ci/gitlab_ci_yaml_processor.rb b/lib/ci/gitlab_ci_yaml_processor.rb index 0b362921b06..d236c42929a 100644 --- a/lib/ci/gitlab_ci_yaml_processor.rb +++ b/lib/ci/gitlab_ci_yaml_processor.rb @@ -229,7 +229,7 @@ module Ci end def source_to_pattern(source) - return source if ['api', 'external', 'web'].include? source + return source if %w(api external web).include? source return source.pluralize end end diff --git a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb index 79ed1366336..fef2d992aaa 100644 --- a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb +++ b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb @@ -394,12 +394,12 @@ module Ci end it "does not return builds if except has special keywords specified and source matches" do - possibilities = [{keyword: 'pushes', source: 'push'}, - {keyword: 'web', source: 'web'}, - {keyword: 'triggers', source: 'trigger'}, - {keyword: 'schedules', source: 'schedule'}, - {keyword: 'api', source: 'api'}, - {keyword: 'external', source: 'external'}] + possibilities = [{ keyword: 'pushes', source: 'push' }, + { keyword: 'web', source: 'web' }, + { keyword: 'triggers', source: 'trigger' }, + { keyword: 'schedules', source: 'schedule' }, + { keyword: 'api', source: 'api' }, + { keyword: 'external', source: 'external' }] possibilities.each do |possibility| config = YAML.dump({ |