diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2018-01-17 11:42:32 -0200 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2018-01-17 11:42:32 -0200 |
commit | d1eb3ff594b42d6e9625724119f52d3356045870 (patch) | |
tree | bde5a5f9e120b385dbdb9ee113a9d7465028d069 | |
parent | 87229cb08b6ed06d92c2cd0990c148f7849c079e (diff) | |
download | gitlab-ce-sh-backport-10-3-4-security-fixes.tar.gz |
Make ruby lint happysh-backport-10-3-4-security-fixes
-rw-r--r-- | lib/api/deploy_keys.rb | 1 | ||||
-rw-r--r-- | spec/lib/gitlab/ci/config/entry/key_spec.rb | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/api/deploy_keys.rb b/lib/api/deploy_keys.rb index a92f17937b8..b0b7b50998f 100644 --- a/lib/api/deploy_keys.rb +++ b/lib/api/deploy_keys.rb @@ -116,6 +116,7 @@ module API result = deploy_keys_project.update_attributes(can_push: can_push, deploy_key_attributes: { id: params[:key_id], title: title }) + if result present deploy_keys_project, with: Entities::DeployKeysProject else diff --git a/spec/lib/gitlab/ci/config/entry/key_spec.rb b/spec/lib/gitlab/ci/config/entry/key_spec.rb index 846f5f44470..3cbf19bea8b 100644 --- a/spec/lib/gitlab/ci/config/entry/key_spec.rb +++ b/spec/lib/gitlab/ci/config/entry/key_spec.rb @@ -10,7 +10,7 @@ describe Gitlab::Ci::Config::Entry::Key do end it 'reports errors with config value' do - expect(entry.errors).to include 'key config cannot contain the "/" character' + expect(entry.errors).to include 'key config cannot contain the "/" character' end end @@ -20,7 +20,7 @@ describe Gitlab::Ci::Config::Entry::Key do end it 'reports errors with config value' do - expect(entry.errors).to include 'key config cannot be "." or ".."' + expect(entry.errors).to include 'key config cannot be "." or ".."' end end |