diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2017-02-28 22:25:58 +0300 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2017-03-02 19:45:46 +0300 |
commit | 1bbf2c2cd16140aa95bbf93368209b16795172bd (patch) | |
tree | 98d190774e1112843bac2c637e47bc61b4c91621 /lib/api/runner.rb | |
parent | f7d352341eb4a0eea98889275cbbeb46049d21a2 (diff) |
Fix rubocop offenses
Diffstat (limited to 'lib/api/runner.rb')
-rw-r--r-- | lib/api/runner.rb | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/api/runner.rb b/lib/api/runner.rb index 4cbc2fb08c2..23db32c9b1f 100644 --- a/lib/api/runner.rb +++ b/lib/api/runner.rb @@ -94,7 +94,7 @@ module API end params do requires :token, type: String, desc: %q(Runners's authentication token) - requires :id, type: Fixnum, desc: %q(Job's ID) + requires :id, type: Integer, desc: %q(Job's ID) optional :trace, type: String, desc: %q(Job's full trace) optional :state, type: String, desc: %q(Job's status: success, failed) end @@ -122,7 +122,7 @@ module API [416, 'Range not satisfiable']] end params do - requires :id, type: Fixnum, desc: %q(Job's ID) + requires :id, type: Integer, desc: %q(Job's ID) optional :token, type: String, desc: %q(Job's authentication token) end patch '/:id/trace' do @@ -152,9 +152,9 @@ module API [413, 'File too large']] end params do - requires :id, type: Fixnum, desc: %q(Job's ID) + requires :id, type: Integer, desc: %q(Job's ID) optional :token, type: String, desc: %q(Job's authentication token) - optional :filesize, type: Fixnum, desc: %q(ARtifacts filesize) + optional :filesize, type: Integer, desc: %q(Artifacts filesize) end post '/:id/artifacts/authorize' do not_allowed! unless Gitlab.config.artifacts.enabled @@ -183,7 +183,7 @@ module API [413, 'File too large']] end params do - requires :id, type: Fixnum, desc: %q(Job's ID) + requires :id, type: Integer, desc: %q(Job's ID) optional :token, type: String, desc: %q(Job's authentication token) optional :expire_in, type: String, desc: %q(Specify when artifacts should expire) optional 'file', type: File, desc: %q(Artifact's file) @@ -211,9 +211,7 @@ module API job.artifacts_file = artifacts job.artifacts_metadata = metadata job.artifacts_expire_in = params['expire_in'] || - Gitlab::CurrentSettings - .current_application_settings - .default_artifacts_expire_in + Gitlab::CurrentSettings.current_application_settings.default_artifacts_expire_in if job.save present job, with: Entities::JobRequest::Response @@ -228,7 +226,7 @@ module API [404, 'Artifact not found']] end params do - requires :id, type: Fixnum, desc: %q(Job's ID) + requires :id, type: Integer, desc: %q(Job's ID) optional :token, type: String, desc: %q(Job's authentication token) end get '/:id/artifacts' do |