Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-11-14 20:55:38 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2018-11-19 16:09:39 +0300
commitc3bd3bfc6e1990f4774bcd678deef1eb202a2680 (patch)
tree89d59fa8513716b5b00a49a293752c9f7533e869 /lib/gitlab/ci/variables
parent321506c7431788e23e12a196ee1b77c0af2ea5f6 (diff)
Improve variables support
This ensures that variables accept only string, alongside also improves kubernetes_namespace, improving validation and default value being set.
Diffstat (limited to 'lib/gitlab/ci/variables')
-rw-r--r--lib/gitlab/ci/variables/collection/item.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/ci/variables/collection/item.rb b/lib/gitlab/ci/variables/collection/item.rb
index fdf852e8788..cf8958e34c2 100644
--- a/lib/gitlab/ci/variables/collection/item.rb
+++ b/lib/gitlab/ci/variables/collection/item.rb
@@ -6,8 +6,8 @@ module Gitlab
class Collection
class Item
def initialize(key:, value:, public: true, file: false)
- raise ArgumentError, "`value` must be of type String, while it was: #{value.class}" unless
- value.is_a?(String) || value.nil?
+ raise ArgumentError, "`#{key}` must be of type String, while it was: #{value.class}" unless
+ value.is_a?(String)
@variable = {
key: key, value: value, public: public, file: file