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
path: root/lib
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2018-11-19 18:57:53 +0300
committerSean McGivern <sean@gitlab.com>2018-11-19 18:57:53 +0300
commit69f74582aab0a2b8d5da55b6a0eeb593122ea7e6 (patch)
tree9a5d22523939824a6a861aa2be411edf139b315e /lib
parent08ddb655ef461c57355eeb83edf10988decb2ced (diff)
parentc3bd3bfc6e1990f4774bcd678deef1eb202a2680 (diff)
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.rb4
-rw-r--r--lib/gitlab/ci/variables/collection/item.rb4
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