Commit 1dd054e1 authored by Filip Krakowski's avatar Filip Krakowski Committed by Shinya Maeda

Fix static-analysis offenses

parent ecb54cdd
...@@ -229,7 +229,7 @@ module Ci ...@@ -229,7 +229,7 @@ module Ci
end end
def source_to_pattern(source) 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 return source.pluralize
end end
end end
......
...@@ -394,12 +394,12 @@ module Ci ...@@ -394,12 +394,12 @@ module Ci
end end
it "does not return builds if except has special keywords specified and source matches" do it "does not return builds if except has special keywords specified and source matches" do
possibilities = [{keyword: 'pushes', source: 'push'}, possibilities = [{ keyword: 'pushes', source: 'push' },
{keyword: 'web', source: 'web'}, { keyword: 'web', source: 'web' },
{keyword: 'triggers', source: 'trigger'}, { keyword: 'triggers', source: 'trigger' },
{keyword: 'schedules', source: 'schedule'}, { keyword: 'schedules', source: 'schedule' },
{keyword: 'api', source: 'api'}, { keyword: 'api', source: 'api' },
{keyword: 'external', source: 'external'}] { keyword: 'external', source: 'external' }]
possibilities.each do |possibility| possibilities.each do |possibility|
config = YAML.dump({ config = YAML.dump({
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment