diff options
author | Sean McGivern <sean@gitlab.com> | 2018-11-19 15:57:53 +0000 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2018-11-19 15:57:53 +0000 |
commit | 69f74582aab0a2b8d5da55b6a0eeb593122ea7e6 (patch) | |
tree | 9a5d22523939824a6a861aa2be411edf139b315e /lib | |
parent | 08ddb655ef461c57355eeb83edf10988decb2ced (diff) | |
parent | c3bd3bfc6e1990f4774bcd678deef1eb202a2680 (diff) | |
download | gitlab-ce-69f74582aab0a2b8d5da55b6a0eeb593122ea7e6.tar.gz |
Merge branch 'improve-variables-support' into 'master'
Improve variables support
See merge request gitlab-org/gitlab-ce!23077
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/ci/variables/collection/item.rb | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/gitlab.rb b/lib/gitlab.rb index 2bb09684441..2ef54658a11 100644 --- a/lib/gitlab.rb +++ b/lib/gitlab.rb @@ -53,4 +53,8 @@ module Gitlab def self.pre_release? VERSION.include?('pre') end + + def self.version_info + Gitlab::VersionInfo.parse(Gitlab::VERSION) + end end 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 |