From 1bbf2c2cd16140aa95bbf93368209b16795172bd Mon Sep 17 00:00:00 2001 From: Tomasz Maczukin Date: Tue, 28 Feb 2017 20:25:58 +0100 Subject: Fix rubocop offenses --- lib/api/helpers/runner.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/api/helpers') diff --git a/lib/api/helpers/runner.rb b/lib/api/helpers/runner.rb index 97255cc8c81..ec2bcaed929 100644 --- a/lib/api/helpers/runner.rb +++ b/lib/api/helpers/runner.rb @@ -1,7 +1,7 @@ module API module Helpers module Runner - JOB_TOKEN_HEADER = 'HTTP_JOB_TOKEN' + JOB_TOKEN_HEADER = 'HTTP_JOB_TOKEN'.freeze JOB_TOKEN_PARAM = :token UPDATE_RUNNER_EVERY = 10 * 60 @@ -42,7 +42,7 @@ module API end def job_not_found! - if headers['User-Agent'].to_s.match(/gitlab(-ci-multi)?-runner \d+\.\d+\.\d+(~beta\.\d+\.g[0-9a-f]+)? /) + if headers['User-Agent'].to_s =~ /gitlab(-ci-multi)?-runner \d+\.\d+\.\d+(~beta\.\d+\.g[0-9a-f]+)? / no_content! else not_found! -- cgit v1.2.1